generated-configure.sh revision 786:0874bb4707b7
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712TARGET_BITS_FLAG
713JT_HOME
714JTREGEXE
715LIPO
716ac_ct_OBJDUMP
717OBJDUMP
718ac_ct_OBJCOPY
719OBJCOPY
720MCS
721STRIP
722GNM
723NM
724AS
725CXXCPP
726CPP
727COMPILER_TYPE
728RC_FLAGS
729DUMPBIN
730WINAR
731HOTSPOT_RC
732HOTSPOT_MT
733RC
734MT
735WINLD
736HOTSPOT_LD
737HOTSPOT_CXX
738ARFLAGS
739AR
740LDEXECXX
741LDCXX
742LDEXE
743LD
744ac_ct_OBJC
745OBJCFLAGS
746OBJC
747ac_ct_CXX
748CXXFLAGS
749CXX
750ac_ct_PROPER_COMPILER_CXX
751PROPER_COMPILER_CXX
752POTENTIAL_CXX
753TOOLS_DIR_CXX
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761ac_ct_PROPER_COMPILER_CC
762PROPER_COMPILER_CC
763POTENTIAL_CC
764TOOLS_DIR_CC
765BUILD_LD
766BUILD_CXX
767BUILD_CC
768MSVCR_DLL
769DXSDK_INCLUDE_PATH
770DXSDK_LIB_PATH
771VS_PATH
772VS_LIB
773VS_INCLUDE
774CYGWIN_LINK
775AR_OUT_OPTION
776LD_OUT_OPTION
777EXE_OUT_OPTION
778CC_OUT_OPTION
779BUILD_HOTSPOT
780HOTSPOT_DIST
781BUILD_OUTPUT
782OVERRIDE_SRC_ROOT
783ADD_SRC_ROOT
784JDK_TOPDIR
785NASHORN_TOPDIR
786HOTSPOT_TOPDIR
787JAXWS_TOPDIR
788JAXP_TOPDIR
789CORBA_TOPDIR
790LANGTOOLS_TOPDIR
791BOOT_JDK_JVMARGS
792JAVAC_FLAGS
793BOOT_JDK_SOURCETARGET
794BOOT_JDK
795BOOT_TOOLSJAR
796BOOT_RTJAR
797JAVA_CHECK
798JAVAC_CHECK
799COOKED_BUILD_NUMBER
800JDK_VERSION
801COPYRIGHT_YEAR
802MACOSX_BUNDLE_ID_BASE
803MACOSX_BUNDLE_NAME_BASE
804COMPANY_NAME
805JDK_RC_PLATFORM_NAME
806PRODUCT_SUFFIX
807PRODUCT_NAME
808LAUNCHER_NAME
809MILESTONE
810JDK_BUILD_NUMBER
811JDK_UPDATE_VERSION
812JDK_MICRO_VERSION
813JDK_MINOR_VERSION
814JDK_MAJOR_VERSION
815USER_RELEASE_SUFFIX
816COMPRESS_JARS
817UNLIMITED_CRYPTO
818CACERTS_FILE
819TEST_IN_BUILD
820BUILD_HEADLESS
821SUPPORT_HEADFUL
822SUPPORT_HEADLESS
823BDEPS_FTP
824BDEPS_UNZIP
825OS_VERSION_MICRO
826OS_VERSION_MINOR
827OS_VERSION_MAJOR
828PKG_CONFIG
829CODESIGN
830XATTR
831IS_GNU_TIME
832TIME
833STAT
834HG
835READELF
836OTOOL
837LDD
838ZIP
839UNZIP
840FIND_DELETE
841MAKE
842CHECK_TOOLSDIR_MAKE
843CHECK_TOOLSDIR_GMAKE
844CHECK_MAKE
845CHECK_GMAKE
846PKGHANDLER
847OUTPUT_ROOT
848CONF_NAME
849SPEC
850BUILD_VARIANT_RELEASE
851DEBUG_CLASSFILES
852FASTDEBUG
853VARIANT
854DEBUG_LEVEL
855MACOSX_UNIVERSAL
856INCLUDE_SA
857JVM_VARIANT_ZEROSHARK
858JVM_VARIANT_ZERO
859JVM_VARIANT_KERNEL
860JVM_VARIANT_MINIMAL1
861JVM_VARIANT_CLIENT
862JVM_VARIANT_SERVER
863JVM_VARIANTS
864JDK_VARIANT
865SET_OPENJDK
866BUILD_LOG_WRAPPER
867BUILD_LOG_PREVIOUS
868BUILD_LOG
869SYS_ROOT
870PATH_SEP
871SRC_ROOT
872ZERO_ARCHDEF
873DEFINE_CROSS_COMPILE_ARCH
874LP64
875OPENJDK_TARGET_OS_API_DIR
876OPENJDK_TARGET_CPU_JLI_CFLAGS
877OPENJDK_TARGET_CPU_OSARCH
878OPENJDK_TARGET_CPU_ISADIR
879OPENJDK_TARGET_CPU_LIBDIR
880OPENJDK_TARGET_CPU_LEGACY_LIB
881OPENJDK_TARGET_CPU_LEGACY
882REQUIRED_OS_VERSION
883REQUIRED_OS_NAME
884COMPILE_TYPE
885OPENJDK_TARGET_CPU_ENDIAN
886OPENJDK_TARGET_CPU_BITS
887OPENJDK_TARGET_CPU_ARCH
888OPENJDK_TARGET_CPU
889OPENJDK_TARGET_OS_API
890OPENJDK_TARGET_OS
891OPENJDK_BUILD_CPU_ENDIAN
892OPENJDK_BUILD_CPU_BITS
893OPENJDK_BUILD_CPU_ARCH
894OPENJDK_BUILD_CPU
895OPENJDK_BUILD_OS_API
896OPENJDK_BUILD_OS
897OPENJDK_BUILD_AUTOCONF_NAME
898OPENJDK_TARGET_AUTOCONF_NAME
899target_os
900target_vendor
901target_cpu
902target
903host_os
904host_vendor
905host_cpu
906host
907build_os
908build_vendor
909build_cpu
910build
911SETFILE
912DF
913READLINK
914CYGPATH
915NAWK
916SED
917FGREP
918EGREP
919GREP
920AWK
921XARGS
922WHICH
923WC
924UNIQ
925UNAME
926TR
927TOUCH
928TEE
929TAR
930TAIL
931SORT
932SH
933RM
934PRINTF
935MV
936MKTEMP
937MKDIR
938LS
939LN
940HEAD
941FIND
942FILE
943EXPR
944ECHO
945DIRNAME
946DIFF
947DATE
948CUT
949CPIO
950CP
951COMM
952CMP
953CHMOD
954CAT
955BASH
956BASENAME
957DATE_WHEN_CONFIGURED
958CONFIGURE_COMMAND_LINE
959CUSTOM_MAKE_DIR
960target_alias
961host_alias
962build_alias
963LIBS
964ECHO_T
965ECHO_N
966ECHO_C
967DEFS
968mandir
969localedir
970libdir
971psdir
972pdfdir
973dvidir
974htmldir
975infodir
976docdir
977oldincludedir
978includedir
979localstatedir
980sharedstatedir
981sysconfdir
982datadir
983datarootdir
984libexecdir
985sbindir
986bindir
987program_transform_name
988prefix
989exec_prefix
990PACKAGE_URL
991PACKAGE_BUGREPORT
992PACKAGE_STRING
993PACKAGE_VERSION
994PACKAGE_TARNAME
995PACKAGE_NAME
996PATH_SEPARATOR
997SHELL'
998ac_subst_files=''
999ac_user_opts='
1000enable_option_checking
1001with_custom_make_dir
1002with_target_bits
1003with_sys_root
1004with_tools_dir
1005with_devkit
1006enable_openjdk_only
1007with_jdk_variant
1008with_jvm_variants
1009enable_debug
1010with_debug_level
1011with_conf_name
1012with_builddeps_conf
1013with_builddeps_server
1014with_builddeps_dir
1015with_builddeps_group
1016enable_headful
1017enable_hotspot_test_in_build
1018with_cacerts_file
1019enable_unlimited_crypto
1020with_milestone
1021with_update_version
1022with_build_number
1023with_user_release_suffix
1024with_boot_jdk
1025with_boot_jdk_jvmargs
1026with_add_source_root
1027with_override_source_root
1028with_adds_and_overrides
1029with_override_langtools
1030with_override_corba
1031with_override_jaxp
1032with_override_jaxws
1033with_override_hotspot
1034with_override_jdk
1035with_import_hotspot
1036with_msvcr_dll
1037with_dxsdk
1038with_dxsdk_lib
1039with_dxsdk_include
1040with_jtreg
1041with_extra_cflags
1042with_extra_cxxflags
1043with_extra_ldflags
1044enable_debug_symbols
1045enable_zip_debug_info
1046enable_macosx_runtime_support
1047with_x
1048with_cups
1049with_cups_include
1050with_freetype
1051with_alsa
1052with_alsa_include
1053with_alsa_lib
1054with_giflib
1055with_zlib
1056with_stdc__lib
1057with_num_cores
1058with_memory_size
1059with_jobs
1060with_sjavac_server_java
1061enable_sjavac
1062enable_precompiled_headers
1063enable_ccache
1064with_ccache_dir
1065'
1066      ac_precious_vars='build_alias
1067host_alias
1068target_alias
1069PKG_CONFIG
1070CC
1071CFLAGS
1072LDFLAGS
1073LIBS
1074CPPFLAGS
1075CXX
1076CXXFLAGS
1077CCC
1078OBJC
1079OBJCFLAGS
1080CPP
1081CXXCPP
1082XMKMF
1083FREETYPE2_CFLAGS
1084FREETYPE2_LIBS
1085ALSA_CFLAGS
1086ALSA_LIBS
1087LIBFFI_CFLAGS
1088LIBFFI_LIBS'
1089
1090
1091# Initialize some variables set by options.
1092ac_init_help=
1093ac_init_version=false
1094ac_unrecognized_opts=
1095ac_unrecognized_sep=
1096# The variables have the same names as the options, with
1097# dashes changed to underlines.
1098cache_file=/dev/null
1099exec_prefix=NONE
1100no_create=
1101no_recursion=
1102prefix=NONE
1103program_prefix=NONE
1104program_suffix=NONE
1105program_transform_name=s,x,x,
1106silent=
1107site=
1108srcdir=
1109verbose=
1110x_includes=NONE
1111x_libraries=NONE
1112
1113# Installation directory options.
1114# These are left unexpanded so users can "make install exec_prefix=/foo"
1115# and all the variables that are supposed to be based on exec_prefix
1116# by default will actually change.
1117# Use braces instead of parens because sh, perl, etc. also accept them.
1118# (The list follows the same order as the GNU Coding Standards.)
1119bindir='${exec_prefix}/bin'
1120sbindir='${exec_prefix}/sbin'
1121libexecdir='${exec_prefix}/libexec'
1122datarootdir='${prefix}/share'
1123datadir='${datarootdir}'
1124sysconfdir='${prefix}/etc'
1125sharedstatedir='${prefix}/com'
1126localstatedir='${prefix}/var'
1127includedir='${prefix}/include'
1128oldincludedir='/usr/include'
1129docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1130infodir='${datarootdir}/info'
1131htmldir='${docdir}'
1132dvidir='${docdir}'
1133pdfdir='${docdir}'
1134psdir='${docdir}'
1135libdir='${exec_prefix}/lib'
1136localedir='${datarootdir}/locale'
1137mandir='${datarootdir}/man'
1138
1139ac_prev=
1140ac_dashdash=
1141for ac_option
1142do
1143  # If the previous option needs an argument, assign it.
1144  if test -n "$ac_prev"; then
1145    eval $ac_prev=\$ac_option
1146    ac_prev=
1147    continue
1148  fi
1149
1150  case $ac_option in
1151  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1152  *=)   ac_optarg= ;;
1153  *)    ac_optarg=yes ;;
1154  esac
1155
1156  # Accept the important Cygnus configure options, so we can diagnose typos.
1157
1158  case $ac_dashdash$ac_option in
1159  --)
1160    ac_dashdash=yes ;;
1161
1162  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1163    ac_prev=bindir ;;
1164  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1165    bindir=$ac_optarg ;;
1166
1167  -build | --build | --buil | --bui | --bu)
1168    ac_prev=build_alias ;;
1169  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1170    build_alias=$ac_optarg ;;
1171
1172  -cache-file | --cache-file | --cache-fil | --cache-fi \
1173  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1174    ac_prev=cache_file ;;
1175  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1176  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1177    cache_file=$ac_optarg ;;
1178
1179  --config-cache | -C)
1180    cache_file=config.cache ;;
1181
1182  -datadir | --datadir | --datadi | --datad)
1183    ac_prev=datadir ;;
1184  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1185    datadir=$ac_optarg ;;
1186
1187  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1188  | --dataroo | --dataro | --datar)
1189    ac_prev=datarootdir ;;
1190  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1191  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1192    datarootdir=$ac_optarg ;;
1193
1194  -disable-* | --disable-*)
1195    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1196    # Reject names that are not valid shell variable names.
1197    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1198      as_fn_error $? "invalid feature name: $ac_useropt"
1199    ac_useropt_orig=$ac_useropt
1200    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201    case $ac_user_opts in
1202      *"
1203"enable_$ac_useropt"
1204"*) ;;
1205      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1206	 ac_unrecognized_sep=', ';;
1207    esac
1208    eval enable_$ac_useropt=no ;;
1209
1210  -docdir | --docdir | --docdi | --doc | --do)
1211    ac_prev=docdir ;;
1212  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1213    docdir=$ac_optarg ;;
1214
1215  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1216    ac_prev=dvidir ;;
1217  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1218    dvidir=$ac_optarg ;;
1219
1220  -enable-* | --enable-*)
1221    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1222    # Reject names that are not valid shell variable names.
1223    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1224      as_fn_error $? "invalid feature name: $ac_useropt"
1225    ac_useropt_orig=$ac_useropt
1226    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227    case $ac_user_opts in
1228      *"
1229"enable_$ac_useropt"
1230"*) ;;
1231      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1232	 ac_unrecognized_sep=', ';;
1233    esac
1234    eval enable_$ac_useropt=\$ac_optarg ;;
1235
1236  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1237  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1238  | --exec | --exe | --ex)
1239    ac_prev=exec_prefix ;;
1240  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1241  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1242  | --exec=* | --exe=* | --ex=*)
1243    exec_prefix=$ac_optarg ;;
1244
1245  -gas | --gas | --ga | --g)
1246    # Obsolete; use --with-gas.
1247    with_gas=yes ;;
1248
1249  -help | --help | --hel | --he | -h)
1250    ac_init_help=long ;;
1251  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1252    ac_init_help=recursive ;;
1253  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1254    ac_init_help=short ;;
1255
1256  -host | --host | --hos | --ho)
1257    ac_prev=host_alias ;;
1258  -host=* | --host=* | --hos=* | --ho=*)
1259    host_alias=$ac_optarg ;;
1260
1261  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1262    ac_prev=htmldir ;;
1263  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1264  | --ht=*)
1265    htmldir=$ac_optarg ;;
1266
1267  -includedir | --includedir | --includedi | --included | --include \
1268  | --includ | --inclu | --incl | --inc)
1269    ac_prev=includedir ;;
1270  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1271  | --includ=* | --inclu=* | --incl=* | --inc=*)
1272    includedir=$ac_optarg ;;
1273
1274  -infodir | --infodir | --infodi | --infod | --info | --inf)
1275    ac_prev=infodir ;;
1276  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1277    infodir=$ac_optarg ;;
1278
1279  -libdir | --libdir | --libdi | --libd)
1280    ac_prev=libdir ;;
1281  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1282    libdir=$ac_optarg ;;
1283
1284  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1285  | --libexe | --libex | --libe)
1286    ac_prev=libexecdir ;;
1287  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1288  | --libexe=* | --libex=* | --libe=*)
1289    libexecdir=$ac_optarg ;;
1290
1291  -localedir | --localedir | --localedi | --localed | --locale)
1292    ac_prev=localedir ;;
1293  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1294    localedir=$ac_optarg ;;
1295
1296  -localstatedir | --localstatedir | --localstatedi | --localstated \
1297  | --localstate | --localstat | --localsta | --localst | --locals)
1298    ac_prev=localstatedir ;;
1299  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1300  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1301    localstatedir=$ac_optarg ;;
1302
1303  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1304    ac_prev=mandir ;;
1305  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1306    mandir=$ac_optarg ;;
1307
1308  -nfp | --nfp | --nf)
1309    # Obsolete; use --without-fp.
1310    with_fp=no ;;
1311
1312  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1313  | --no-cr | --no-c | -n)
1314    no_create=yes ;;
1315
1316  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1317  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1318    no_recursion=yes ;;
1319
1320  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1321  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1322  | --oldin | --oldi | --old | --ol | --o)
1323    ac_prev=oldincludedir ;;
1324  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1325  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1326  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1327    oldincludedir=$ac_optarg ;;
1328
1329  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1330    ac_prev=prefix ;;
1331  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1332    prefix=$ac_optarg ;;
1333
1334  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1335  | --program-pre | --program-pr | --program-p)
1336    ac_prev=program_prefix ;;
1337  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1338  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1339    program_prefix=$ac_optarg ;;
1340
1341  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1342  | --program-suf | --program-su | --program-s)
1343    ac_prev=program_suffix ;;
1344  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1345  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1346    program_suffix=$ac_optarg ;;
1347
1348  -program-transform-name | --program-transform-name \
1349  | --program-transform-nam | --program-transform-na \
1350  | --program-transform-n | --program-transform- \
1351  | --program-transform | --program-transfor \
1352  | --program-transfo | --program-transf \
1353  | --program-trans | --program-tran \
1354  | --progr-tra | --program-tr | --program-t)
1355    ac_prev=program_transform_name ;;
1356  -program-transform-name=* | --program-transform-name=* \
1357  | --program-transform-nam=* | --program-transform-na=* \
1358  | --program-transform-n=* | --program-transform-=* \
1359  | --program-transform=* | --program-transfor=* \
1360  | --program-transfo=* | --program-transf=* \
1361  | --program-trans=* | --program-tran=* \
1362  | --progr-tra=* | --program-tr=* | --program-t=*)
1363    program_transform_name=$ac_optarg ;;
1364
1365  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1366    ac_prev=pdfdir ;;
1367  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1368    pdfdir=$ac_optarg ;;
1369
1370  -psdir | --psdir | --psdi | --psd | --ps)
1371    ac_prev=psdir ;;
1372  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1373    psdir=$ac_optarg ;;
1374
1375  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1376  | -silent | --silent | --silen | --sile | --sil)
1377    silent=yes ;;
1378
1379  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1380    ac_prev=sbindir ;;
1381  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1382  | --sbi=* | --sb=*)
1383    sbindir=$ac_optarg ;;
1384
1385  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1386  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1387  | --sharedst | --shareds | --shared | --share | --shar \
1388  | --sha | --sh)
1389    ac_prev=sharedstatedir ;;
1390  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1391  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1392  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1393  | --sha=* | --sh=*)
1394    sharedstatedir=$ac_optarg ;;
1395
1396  -site | --site | --sit)
1397    ac_prev=site ;;
1398  -site=* | --site=* | --sit=*)
1399    site=$ac_optarg ;;
1400
1401  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1402    ac_prev=srcdir ;;
1403  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1404    srcdir=$ac_optarg ;;
1405
1406  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1407  | --syscon | --sysco | --sysc | --sys | --sy)
1408    ac_prev=sysconfdir ;;
1409  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1410  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1411    sysconfdir=$ac_optarg ;;
1412
1413  -target | --target | --targe | --targ | --tar | --ta | --t)
1414    ac_prev=target_alias ;;
1415  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1416    target_alias=$ac_optarg ;;
1417
1418  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1419    verbose=yes ;;
1420
1421  -version | --version | --versio | --versi | --vers | -V)
1422    ac_init_version=: ;;
1423
1424  -with-* | --with-*)
1425    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1426    # Reject names that are not valid shell variable names.
1427    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1428      as_fn_error $? "invalid package name: $ac_useropt"
1429    ac_useropt_orig=$ac_useropt
1430    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1431    case $ac_user_opts in
1432      *"
1433"with_$ac_useropt"
1434"*) ;;
1435      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1436	 ac_unrecognized_sep=', ';;
1437    esac
1438    eval with_$ac_useropt=\$ac_optarg ;;
1439
1440  -without-* | --without-*)
1441    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1442    # Reject names that are not valid shell variable names.
1443    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1444      as_fn_error $? "invalid package name: $ac_useropt"
1445    ac_useropt_orig=$ac_useropt
1446    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1447    case $ac_user_opts in
1448      *"
1449"with_$ac_useropt"
1450"*) ;;
1451      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1452	 ac_unrecognized_sep=', ';;
1453    esac
1454    eval with_$ac_useropt=no ;;
1455
1456  --x)
1457    # Obsolete; use --with-x.
1458    with_x=yes ;;
1459
1460  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1461  | --x-incl | --x-inc | --x-in | --x-i)
1462    ac_prev=x_includes ;;
1463  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1464  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1465    x_includes=$ac_optarg ;;
1466
1467  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1468  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1469    ac_prev=x_libraries ;;
1470  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1471  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1472    x_libraries=$ac_optarg ;;
1473
1474  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1475Try \`$0 --help' for more information"
1476    ;;
1477
1478  *=*)
1479    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1480    # Reject names that are not valid shell variable names.
1481    case $ac_envvar in #(
1482      '' | [0-9]* | *[!_$as_cr_alnum]* )
1483      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1484    esac
1485    eval $ac_envvar=\$ac_optarg
1486    export $ac_envvar ;;
1487
1488  *)
1489    # FIXME: should be removed in autoconf 3.0.
1490    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1491    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1492      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1493    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1494    ;;
1495
1496  esac
1497done
1498
1499if test -n "$ac_prev"; then
1500  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1501  as_fn_error $? "missing argument to $ac_option"
1502fi
1503
1504if test -n "$ac_unrecognized_opts"; then
1505  case $enable_option_checking in
1506    no) ;;
1507    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1508    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1509  esac
1510fi
1511
1512# Check all directory arguments for consistency.
1513for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1514		datadir sysconfdir sharedstatedir localstatedir includedir \
1515		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1516		libdir localedir mandir
1517do
1518  eval ac_val=\$$ac_var
1519  # Remove trailing slashes.
1520  case $ac_val in
1521    */ )
1522      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1523      eval $ac_var=\$ac_val;;
1524  esac
1525  # Be sure to have absolute directory names.
1526  case $ac_val in
1527    [\\/$]* | ?:[\\/]* )  continue;;
1528    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1529  esac
1530  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1531done
1532
1533# There might be people who depend on the old broken behavior: `$host'
1534# used to hold the argument of --host etc.
1535# FIXME: To remove some day.
1536build=$build_alias
1537host=$host_alias
1538target=$target_alias
1539
1540# FIXME: To remove some day.
1541if test "x$host_alias" != x; then
1542  if test "x$build_alias" = x; then
1543    cross_compiling=maybe
1544  elif test "x$build_alias" != "x$host_alias"; then
1545    cross_compiling=yes
1546  fi
1547fi
1548
1549ac_tool_prefix=
1550test -n "$host_alias" && ac_tool_prefix=$host_alias-
1551
1552test "$silent" = yes && exec 6>/dev/null
1553
1554
1555ac_pwd=`pwd` && test -n "$ac_pwd" &&
1556ac_ls_di=`ls -di .` &&
1557ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1558  as_fn_error $? "working directory cannot be determined"
1559test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1560  as_fn_error $? "pwd does not report name of working directory"
1561
1562
1563# Find the source files, if location was not specified.
1564if test -z "$srcdir"; then
1565  ac_srcdir_defaulted=yes
1566  # Try the directory containing this script, then the parent directory.
1567  ac_confdir=`$as_dirname -- "$as_myself" ||
1568$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1569	 X"$as_myself" : 'X\(//\)[^/]' \| \
1570	 X"$as_myself" : 'X\(//\)$' \| \
1571	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1572$as_echo X"$as_myself" |
1573    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1574	    s//\1/
1575	    q
1576	  }
1577	  /^X\(\/\/\)[^/].*/{
1578	    s//\1/
1579	    q
1580	  }
1581	  /^X\(\/\/\)$/{
1582	    s//\1/
1583	    q
1584	  }
1585	  /^X\(\/\).*/{
1586	    s//\1/
1587	    q
1588	  }
1589	  s/.*/./; q'`
1590  srcdir=$ac_confdir
1591  if test ! -r "$srcdir/$ac_unique_file"; then
1592    srcdir=..
1593  fi
1594else
1595  ac_srcdir_defaulted=no
1596fi
1597if test ! -r "$srcdir/$ac_unique_file"; then
1598  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1599  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1600fi
1601ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1602ac_abs_confdir=`(
1603	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1604	pwd)`
1605# When building in place, set srcdir=.
1606if test "$ac_abs_confdir" = "$ac_pwd"; then
1607  srcdir=.
1608fi
1609# Remove unnecessary trailing slashes from srcdir.
1610# Double slashes in file names in object file debugging info
1611# mess up M-x gdb in Emacs.
1612case $srcdir in
1613*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1614esac
1615for ac_var in $ac_precious_vars; do
1616  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1617  eval ac_env_${ac_var}_value=\$${ac_var}
1618  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1619  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1620done
1621
1622#
1623# Report the --help message.
1624#
1625if test "$ac_init_help" = "long"; then
1626  # Omit some internal or obsolete options to make the list less imposing.
1627  # This message is too long to be a string in the A/UX 3.1 sh.
1628  cat <<_ACEOF
1629\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1630
1631Usage: $0 [OPTION]... [VAR=VALUE]...
1632
1633To assign environment variables (e.g., CC, CFLAGS...), specify them as
1634VAR=VALUE.  See below for descriptions of some of the useful variables.
1635
1636Defaults for the options are specified in brackets.
1637
1638Configuration:
1639  -h, --help              display this help and exit
1640      --help=short        display options specific to this package
1641      --help=recursive    display the short help of all the included packages
1642  -V, --version           display version information and exit
1643  -q, --quiet, --silent   do not print \`checking ...' messages
1644      --cache-file=FILE   cache test results in FILE [disabled]
1645  -C, --config-cache      alias for \`--cache-file=config.cache'
1646  -n, --no-create         do not create output files
1647      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1648
1649Installation directories:
1650  --prefix=PREFIX         install architecture-independent files in PREFIX
1651                          [$ac_default_prefix]
1652  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1653                          [PREFIX]
1654
1655By default, \`make install' will install all the files in
1656\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1657an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1658for instance \`--prefix=\$HOME'.
1659
1660For better control, use the options below.
1661
1662Fine tuning of the installation directories:
1663  --bindir=DIR            user executables [EPREFIX/bin]
1664  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1665  --libexecdir=DIR        program executables [EPREFIX/libexec]
1666  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1667  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1668  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1669  --libdir=DIR            object code libraries [EPREFIX/lib]
1670  --includedir=DIR        C header files [PREFIX/include]
1671  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1672  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1673  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1674  --infodir=DIR           info documentation [DATAROOTDIR/info]
1675  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1676  --mandir=DIR            man documentation [DATAROOTDIR/man]
1677  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1678  --htmldir=DIR           html documentation [DOCDIR]
1679  --dvidir=DIR            dvi documentation [DOCDIR]
1680  --pdfdir=DIR            pdf documentation [DOCDIR]
1681  --psdir=DIR             ps documentation [DOCDIR]
1682_ACEOF
1683
1684  cat <<\_ACEOF
1685
1686X features:
1687  --x-includes=DIR    X include files are in DIR
1688  --x-libraries=DIR   X library files are in DIR
1689
1690System types:
1691  --build=BUILD     configure for building on BUILD [guessed]
1692  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1693  --target=TARGET   configure for building compilers for TARGET [HOST]
1694_ACEOF
1695fi
1696
1697if test -n "$ac_init_help"; then
1698  case $ac_init_help in
1699     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1700   esac
1701  cat <<\_ACEOF
1702
1703Optional Features:
1704  --disable-option-checking  ignore unrecognized --enable/--with options
1705  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1706  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1707  --enable-openjdk-only   suppress building custom source even if present
1708                          [disabled]
1709  --enable-debug          set the debug level to fastdebug (shorthand for
1710                          --with-debug-level=fastdebug) [disabled]
1711  --disable-headful       disable building headful support (graphical UI
1712                          support) [enabled]
1713  --enable-hotspot-test-in-build
1714                          run the Queens test after Hotspot build [disabled]
1715  --enable-unlimited-crypto
1716                          Enable unlimited crypto policy [disabled]
1717  --disable-debug-symbols disable generation of debug symbols [enabled]
1718  --disable-zip-debug-info
1719                          disable zipping of debug-info files [enabled]
1720  --disable-macosx-runtime-support
1721                          disable the use of MacOSX Java runtime support
1722                          framework [enabled]
1723  --enable-sjavac         use sjavac to do fast incremental compiles
1724                          [disabled]
1725  --disable-precompiled-headers
1726                          disable using precompiled headers when compiling C++
1727                          [enabled]
1728  --disable-ccache        disable using ccache to speed up recompilations
1729                          [enabled]
1730
1731Optional Packages:
1732  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1733  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1734  --with-custom-make-dir  use this directory for custom build/make files
1735  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1736                          support it), e.g. --with-target-bits=32 [guessed]
1737  --with-sys-root         pass this sys-root to the compilers and tools (for
1738                          cross-compiling)
1739  --with-tools-dir        search this directory for compilers and tools (for
1740                          cross-compiling)
1741  --with-devkit           use this directory as base for tools-dir and
1742                          sys-root (for cross-compiling)
1743  --with-jdk-variant      JDK variant to build (normal) [normal]
1744  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1745                          client, minimal1, kernel, zero, zeroshark) [server]
1746  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1747                          [release]
1748  --with-conf-name        use this as the name of the configuration [generated
1749                          from important configuration options]
1750  --with-builddeps-conf   use this configuration file for the builddeps
1751  --with-builddeps-server download and use build dependencies from this server
1752                          url
1753  --with-builddeps-dir    store downloaded build dependencies here
1754                          [/localhome/builddeps]
1755  --with-builddeps-group  chgrp the downloaded build dependencies to this
1756                          group
1757  --with-cacerts-file     specify alternative cacerts file
1758  --with-milestone        Set milestone value for build [internal]
1759  --with-update-version   Set update version value for build [b00]
1760  --with-build-number     Set build number value for build [b00]
1761  --with-user-release-suffix
1762                          Add a custom string to the version string if build
1763                          number isn't set.[username_builddateb00]
1764  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1765  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1766                          invocations of the Boot JDK, overriding the default
1767                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1768                          -enableassertions"
1769  --with-add-source-root  for each and every source directory, look in this
1770                          additional source root for the same directory; if it
1771                          exists and have files in it, include it in the build
1772  --with-override-source-root
1773                          for each and every source directory, look in this
1774                          override source root for the same directory; if it
1775                          exists, use that directory instead and ignore the
1776                          directory in the original source root
1777  --with-adds-and-overrides
1778                          use the subdirs 'adds' and 'overrides' in the
1779                          specified directory as add-source-root and
1780                          override-source-root
1781  --with-override-langtools
1782                          use this langtools dir for the build
1783  --with-override-corba   use this corba dir for the build
1784  --with-override-jaxp    use this jaxp dir for the build
1785  --with-override-jaxws   use this jaxws dir for the build
1786  --with-override-hotspot use this hotspot dir for the build
1787  --with-override-jdk     use this jdk dir for the build
1788  --with-import-hotspot   import hotspot binaries from this jdk image or
1789                          hotspot build dist dir instead of building from
1790                          source
1791  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1792                          only) [probed]
1793  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1794  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1795                          [probed]
1796  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1797                          [probed]
1798  --with-jtreg            Regression Test Harness [probed]
1799  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1800  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1801  --with-extra-ldflags    extra flags to be used when linking jdk
1802  --with-x                use the X Window System
1803  --with-cups             specify prefix directory for the cups package
1804                          (expecting the headers under PATH/include)
1805  --with-cups-include     specify directory for the cups include files
1806  --with-freetype         specify prefix directory for the freetype2 package
1807                          (expecting the libraries under PATH/lib and the
1808                          headers under PATH/include)
1809  --with-alsa             specify prefix directory for the alsa package
1810                          (expecting the libraries under PATH/lib and the
1811                          headers under PATH/include)
1812  --with-alsa-include     specify directory for the alsa include files
1813  --with-alsa-lib         specify directory for the alsa library
1814  --with-giflib           use giflib from build system or OpenJDK source
1815                          (system, bundled) [bundled]
1816  --with-zlib             use zlib from build system or OpenJDK source
1817                          (system, bundled) [bundled]
1818  --with-stdc++lib=<static>,<dynamic>,<default>
1819                          force linking of the C++ runtime on Linux to either
1820                          static or dynamic, default is static with dynamic as
1821                          fallback
1822  --with-num-cores        number of cores in the build system, e.g.
1823                          --with-num-cores=8 [probed]
1824  --with-memory-size      memory (in MB) available in the build system, e.g.
1825                          --with-memory-size=1024 [probed]
1826  --with-jobs             number of parallel jobs to let make run [calculated
1827                          based on cores and memory]
1828  --with-sjavac-server-java
1829                          use this java binary for running the sjavac
1830                          background server [Boot JDK java]
1831  --with-ccache-dir       where to store ccache files [~/.ccache]
1832
1833Some influential environment variables:
1834  PKG_CONFIG  path to pkg-config utility
1835  CC          C compiler command
1836  CFLAGS      C compiler flags
1837  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1838              nonstandard directory <lib dir>
1839  LIBS        libraries to pass to the linker, e.g. -l<library>
1840  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1841              you have headers in a nonstandard directory <include dir>
1842  CXX         C++ compiler command
1843  CXXFLAGS    C++ compiler flags
1844  OBJC        Objective C compiler command
1845  OBJCFLAGS   Objective C compiler flags
1846  CPP         C preprocessor
1847  CXXCPP      C++ preprocessor
1848  XMKMF       Path to xmkmf, Makefile generator for X Window System
1849  FREETYPE2_CFLAGS
1850              C compiler flags for FREETYPE2, overriding pkg-config
1851  FREETYPE2_LIBS
1852              linker flags for FREETYPE2, overriding pkg-config
1853  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1854  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1855  LIBFFI_CFLAGS
1856              C compiler flags for LIBFFI, overriding pkg-config
1857  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1858
1859Use these variables to override the choices made by `configure' or to help
1860it to find libraries and programs with nonstandard names/locations.
1861
1862Report bugs to <build-dev@openjdk.java.net>.
1863OpenJDK home page: <http://openjdk.java.net>.
1864_ACEOF
1865ac_status=$?
1866fi
1867
1868if test "$ac_init_help" = "recursive"; then
1869  # If there are subdirs, report their specific --help.
1870  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1871    test -d "$ac_dir" ||
1872      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1873      continue
1874    ac_builddir=.
1875
1876case "$ac_dir" in
1877.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1878*)
1879  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1880  # A ".." for each directory in $ac_dir_suffix.
1881  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1882  case $ac_top_builddir_sub in
1883  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1885  esac ;;
1886esac
1887ac_abs_top_builddir=$ac_pwd
1888ac_abs_builddir=$ac_pwd$ac_dir_suffix
1889# for backward compatibility:
1890ac_top_builddir=$ac_top_build_prefix
1891
1892case $srcdir in
1893  .)  # We are building in place.
1894    ac_srcdir=.
1895    ac_top_srcdir=$ac_top_builddir_sub
1896    ac_abs_top_srcdir=$ac_pwd ;;
1897  [\\/]* | ?:[\\/]* )  # Absolute name.
1898    ac_srcdir=$srcdir$ac_dir_suffix;
1899    ac_top_srcdir=$srcdir
1900    ac_abs_top_srcdir=$srcdir ;;
1901  *) # Relative name.
1902    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1903    ac_top_srcdir=$ac_top_build_prefix$srcdir
1904    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1905esac
1906ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1907
1908    cd "$ac_dir" || { ac_status=$?; continue; }
1909    # Check for guested configure.
1910    if test -f "$ac_srcdir/configure.gnu"; then
1911      echo &&
1912      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1913    elif test -f "$ac_srcdir/configure"; then
1914      echo &&
1915      $SHELL "$ac_srcdir/configure" --help=recursive
1916    else
1917      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1918    fi || ac_status=$?
1919    cd "$ac_pwd" || { ac_status=$?; break; }
1920  done
1921fi
1922
1923test -n "$ac_init_help" && exit $ac_status
1924if $ac_init_version; then
1925  cat <<\_ACEOF
1926OpenJDK configure jdk8
1927generated by GNU Autoconf 2.69
1928
1929Copyright (C) 2012 Free Software Foundation, Inc.
1930This configure script is free software; the Free Software Foundation
1931gives unlimited permission to copy, distribute and modify it.
1932_ACEOF
1933  exit
1934fi
1935
1936## ------------------------ ##
1937## Autoconf initialization. ##
1938## ------------------------ ##
1939
1940# ac_fn_c_try_compile LINENO
1941# --------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_c_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_c_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_c_try_compile
1977
1978# ac_fn_cxx_try_compile LINENO
1979# ----------------------------
1980# Try to compile conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_cxx_try_compile ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  rm -f conftest.$ac_objext
1985  if { { ac_try="$ac_compile"
1986case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_compile") 2>conftest.err
1993  ac_status=$?
1994  if test -s conftest.err; then
1995    grep -v '^ *+' conftest.err >conftest.er1
1996    cat conftest.er1 >&5
1997    mv -f conftest.er1 conftest.err
1998  fi
1999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000  test $ac_status = 0; } && {
2001	 test -z "$ac_cxx_werror_flag" ||
2002	 test ! -s conftest.err
2003       } && test -s conftest.$ac_objext; then :
2004  ac_retval=0
2005else
2006  $as_echo "$as_me: failed program was:" >&5
2007sed 's/^/| /' conftest.$ac_ext >&5
2008
2009	ac_retval=1
2010fi
2011  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012  as_fn_set_status $ac_retval
2013
2014} # ac_fn_cxx_try_compile
2015
2016# ac_fn_objc_try_compile LINENO
2017# -----------------------------
2018# Try to compile conftest.$ac_ext, and return whether this succeeded.
2019ac_fn_objc_try_compile ()
2020{
2021  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022  rm -f conftest.$ac_objext
2023  if { { ac_try="$ac_compile"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_compile") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } && {
2039	 test -z "$ac_objc_werror_flag" ||
2040	 test ! -s conftest.err
2041       } && test -s conftest.$ac_objext; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047	ac_retval=1
2048fi
2049  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_objc_try_compile
2053
2054# ac_fn_c_try_cpp LINENO
2055# ----------------------
2056# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2057ac_fn_c_try_cpp ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if { { ac_try="$ac_cpp conftest.$ac_ext"
2061case "(($ac_try" in
2062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063  *) ac_try_echo=$ac_try;;
2064esac
2065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066$as_echo "$ac_try_echo"; } >&5
2067  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2068  ac_status=$?
2069  if test -s conftest.err; then
2070    grep -v '^ *+' conftest.err >conftest.er1
2071    cat conftest.er1 >&5
2072    mv -f conftest.er1 conftest.err
2073  fi
2074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075  test $ac_status = 0; } > conftest.i && {
2076	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2077	 test ! -s conftest.err
2078       }; then :
2079  ac_retval=0
2080else
2081  $as_echo "$as_me: failed program was:" >&5
2082sed 's/^/| /' conftest.$ac_ext >&5
2083
2084    ac_retval=1
2085fi
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087  as_fn_set_status $ac_retval
2088
2089} # ac_fn_c_try_cpp
2090
2091# ac_fn_cxx_try_cpp LINENO
2092# ------------------------
2093# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2094ac_fn_cxx_try_cpp ()
2095{
2096  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097  if { { ac_try="$ac_cpp conftest.$ac_ext"
2098case "(($ac_try" in
2099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2100  *) ac_try_echo=$ac_try;;
2101esac
2102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2103$as_echo "$ac_try_echo"; } >&5
2104  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2105  ac_status=$?
2106  if test -s conftest.err; then
2107    grep -v '^ *+' conftest.err >conftest.er1
2108    cat conftest.er1 >&5
2109    mv -f conftest.er1 conftest.err
2110  fi
2111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2112  test $ac_status = 0; } > conftest.i && {
2113	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2114	 test ! -s conftest.err
2115       }; then :
2116  ac_retval=0
2117else
2118  $as_echo "$as_me: failed program was:" >&5
2119sed 's/^/| /' conftest.$ac_ext >&5
2120
2121    ac_retval=1
2122fi
2123  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2124  as_fn_set_status $ac_retval
2125
2126} # ac_fn_cxx_try_cpp
2127
2128# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2129# ---------------------------------------------------------
2130# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2131# the include files in INCLUDES and setting the cache variable VAR
2132# accordingly.
2133ac_fn_cxx_check_header_mongrel ()
2134{
2135  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136  if eval \${$3+:} false; then :
2137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2138$as_echo_n "checking for $2... " >&6; }
2139if eval \${$3+:} false; then :
2140  $as_echo_n "(cached) " >&6
2141fi
2142eval ac_res=\$$3
2143	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2144$as_echo "$ac_res" >&6; }
2145else
2146  # Is the header compilable?
2147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2148$as_echo_n "checking $2 usability... " >&6; }
2149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h.  */
2151$4
2152#include <$2>
2153_ACEOF
2154if ac_fn_cxx_try_compile "$LINENO"; then :
2155  ac_header_compiler=yes
2156else
2157  ac_header_compiler=no
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2161$as_echo "$ac_header_compiler" >&6; }
2162
2163# Is the header present?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2165$as_echo_n "checking $2 presence... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168#include <$2>
2169_ACEOF
2170if ac_fn_cxx_try_cpp "$LINENO"; then :
2171  ac_header_preproc=yes
2172else
2173  ac_header_preproc=no
2174fi
2175rm -f conftest.err conftest.i conftest.$ac_ext
2176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2177$as_echo "$ac_header_preproc" >&6; }
2178
2179# So?  What about this header?
2180case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2181  yes:no: )
2182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2183$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2185$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2186    ;;
2187  no:yes:* )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2189$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2191$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2193$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2195$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2197$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2198( $as_echo "## ----------------------------------------- ##
2199## Report this to build-dev@openjdk.java.net ##
2200## ----------------------------------------- ##"
2201     ) | sed "s/^/$as_me: WARNING:     /" >&2
2202    ;;
2203esac
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval \${$3+:} false; then :
2207  $as_echo_n "(cached) " >&6
2208else
2209  eval "$3=\$ac_header_compiler"
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216
2217} # ac_fn_cxx_check_header_mongrel
2218
2219# ac_fn_cxx_try_run LINENO
2220# ------------------------
2221# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2222# that executables *can* be run.
2223ac_fn_cxx_try_run ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if { { ac_try="$ac_link"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_link") 2>&5
2234  ac_status=$?
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2237  { { case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_try") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; }; }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: program exited with status $ac_status" >&5
2250       $as_echo "$as_me: failed program was:" >&5
2251sed 's/^/| /' conftest.$ac_ext >&5
2252
2253       ac_retval=$ac_status
2254fi
2255  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_cxx_try_run
2260
2261# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2262# ---------------------------------------------------------
2263# Tests whether HEADER exists and can be compiled using the include files in
2264# INCLUDES, setting the cache variable VAR accordingly.
2265ac_fn_cxx_check_header_compile ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2269$as_echo_n "checking for $2... " >&6; }
2270if eval \${$3+:} false; then :
2271  $as_echo_n "(cached) " >&6
2272else
2273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h.  */
2275$4
2276#include <$2>
2277_ACEOF
2278if ac_fn_cxx_try_compile "$LINENO"; then :
2279  eval "$3=yes"
2280else
2281  eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_cxx_check_header_compile
2291
2292# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2293# ----------------------------------------------
2294# Tries to find the compile-time value of EXPR in a program that includes
2295# INCLUDES, setting VAR accordingly. Returns whether the value could be
2296# computed
2297ac_fn_cxx_compute_int ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if test "$cross_compiling" = yes; then
2301    # Depending upon the size, compute the lo and hi bounds.
2302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) >= 0)];
2309test_array [0] = 0;
2310return test_array [0];
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_lo=0 ac_mid=0
2318  while :; do
2319    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid; break
2335else
2336  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2337			if test $ac_lo -le $ac_mid; then
2338			  ac_lo= ac_hi=
2339			  break
2340			fi
2341			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344  done
2345else
2346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h.  */
2348$4
2349int
2350main ()
2351{
2352static int test_array [1 - 2 * !(($2) < 0)];
2353test_array [0] = 0;
2354return test_array [0];
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_hi=-1 ac_mid=-1
2362  while :; do
2363    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_lo=$ac_mid; break
2379else
2380  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2381			if test $ac_mid -le $ac_hi; then
2382			  ac_lo= ac_hi=
2383			  break
2384			fi
2385			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388  done
2389else
2390  ac_lo= ac_hi=
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395# Binary search between lo and hi bounds.
2396while test "x$ac_lo" != "x$ac_hi"; do
2397  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401int
2402main ()
2403{
2404static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2405test_array [0] = 0;
2406return test_array [0];
2407
2408  ;
2409  return 0;
2410}
2411_ACEOF
2412if ac_fn_cxx_try_compile "$LINENO"; then :
2413  ac_hi=$ac_mid
2414else
2415  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419case $ac_lo in #((
2420?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2421'') ac_retval=1 ;;
2422esac
2423  else
2424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h.  */
2426$4
2427static long int longval () { return $2; }
2428static unsigned long int ulongval () { return $2; }
2429#include <stdio.h>
2430#include <stdlib.h>
2431int
2432main ()
2433{
2434
2435  FILE *f = fopen ("conftest.val", "w");
2436  if (! f)
2437    return 1;
2438  if (($2) < 0)
2439    {
2440      long int i = longval ();
2441      if (i != ($2))
2442	return 1;
2443      fprintf (f, "%ld", i);
2444    }
2445  else
2446    {
2447      unsigned long int i = ulongval ();
2448      if (i != ($2))
2449	return 1;
2450      fprintf (f, "%lu", i);
2451    }
2452  /* Do not output a trailing newline, as this causes \r\n confusion
2453     on some platforms.  */
2454  return ferror (f) || fclose (f) != 0;
2455
2456  ;
2457  return 0;
2458}
2459_ACEOF
2460if ac_fn_cxx_try_run "$LINENO"; then :
2461  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2462else
2463  ac_retval=1
2464fi
2465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2466  conftest.$ac_objext conftest.beam conftest.$ac_ext
2467rm -f conftest.val
2468
2469  fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_compute_int
2474
2475# ac_fn_cxx_try_link LINENO
2476# -------------------------
2477# Try to link conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_cxx_try_link ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  rm -f conftest.$ac_objext conftest$ac_exeext
2482  if { { ac_try="$ac_link"
2483case "(($ac_try" in
2484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2485  *) ac_try_echo=$ac_try;;
2486esac
2487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2488$as_echo "$ac_try_echo"; } >&5
2489  (eval "$ac_link") 2>conftest.err
2490  ac_status=$?
2491  if test -s conftest.err; then
2492    grep -v '^ *+' conftest.err >conftest.er1
2493    cat conftest.er1 >&5
2494    mv -f conftest.er1 conftest.err
2495  fi
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && {
2498	 test -z "$ac_cxx_werror_flag" ||
2499	 test ! -s conftest.err
2500       } && test -s conftest$ac_exeext && {
2501	 test "$cross_compiling" = yes ||
2502	 test -x conftest$ac_exeext
2503       }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: failed program was:" >&5
2507sed 's/^/| /' conftest.$ac_ext >&5
2508
2509	ac_retval=1
2510fi
2511  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2512  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2513  # interfere with the next link command; also delete a directory that is
2514  # left behind by Apple's compiler.  We do this before executing the actions.
2515  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_cxx_try_link
2520
2521# ac_fn_cxx_check_func LINENO FUNC VAR
2522# ------------------------------------
2523# Tests whether FUNC exists, setting the cache variable VAR accordingly
2524ac_fn_cxx_check_func ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2535   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2536#define $2 innocuous_$2
2537
2538/* System header to define __stub macros and hopefully few prototypes,
2539    which can conflict with char $2 (); below.
2540    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2541    <limits.h> exists even on freestanding compilers.  */
2542
2543#ifdef __STDC__
2544# include <limits.h>
2545#else
2546# include <assert.h>
2547#endif
2548
2549#undef $2
2550
2551/* Override any GCC internal prototype to avoid an error.
2552   Use char because int might match the return type of a GCC
2553   builtin and then its argument prototype would still apply.  */
2554#ifdef __cplusplus
2555extern "C"
2556#endif
2557char $2 ();
2558/* The GNU C library defines this for functions which it implements
2559    to always fail with ENOSYS.  Some functions are actually named
2560    something starting with __ and the normal name is an alias.  */
2561#if defined __stub_$2 || defined __stub___$2
2562choke me
2563#endif
2564
2565int
2566main ()
2567{
2568return $2 ();
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_link "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext \
2579    conftest$ac_exeext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_func
2587
2588# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2589# -------------------------------------------------------
2590# Tests whether HEADER exists and can be compiled using the include files in
2591# INCLUDES, setting the cache variable VAR accordingly.
2592ac_fn_c_check_header_compile ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2596$as_echo_n "checking for $2... " >&6; }
2597if eval \${$3+:} false; then :
2598  $as_echo_n "(cached) " >&6
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603#include <$2>
2604_ACEOF
2605if ac_fn_c_try_compile "$LINENO"; then :
2606  eval "$3=yes"
2607else
2608  eval "$3=no"
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2616
2617} # ac_fn_c_check_header_compile
2618cat >config.log <<_ACEOF
2619This file contains any messages produced by compilers while
2620running configure, to aid debugging if configure makes a mistake.
2621
2622It was created by OpenJDK $as_me jdk8, which was
2623generated by GNU Autoconf 2.69.  Invocation command line was
2624
2625  $ $0 $@
2626
2627_ACEOF
2628exec 5>>config.log
2629{
2630cat <<_ASUNAME
2631## --------- ##
2632## Platform. ##
2633## --------- ##
2634
2635hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2636uname -m = `(uname -m) 2>/dev/null || echo unknown`
2637uname -r = `(uname -r) 2>/dev/null || echo unknown`
2638uname -s = `(uname -s) 2>/dev/null || echo unknown`
2639uname -v = `(uname -v) 2>/dev/null || echo unknown`
2640
2641/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2642/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2643
2644/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2645/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2646/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2647/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2648/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2649/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2650/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2651
2652_ASUNAME
2653
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657  IFS=$as_save_IFS
2658  test -z "$as_dir" && as_dir=.
2659    $as_echo "PATH: $as_dir"
2660  done
2661IFS=$as_save_IFS
2662
2663} >&5
2664
2665cat >&5 <<_ACEOF
2666
2667
2668## ----------- ##
2669## Core tests. ##
2670## ----------- ##
2671
2672_ACEOF
2673
2674
2675# Keep a trace of the command line.
2676# Strip out --no-create and --no-recursion so they do not pile up.
2677# Strip out --silent because we don't want to record it for future runs.
2678# Also quote any args containing shell meta-characters.
2679# Make two passes to allow for proper duplicate-argument suppression.
2680ac_configure_args=
2681ac_configure_args0=
2682ac_configure_args1=
2683ac_must_keep_next=false
2684for ac_pass in 1 2
2685do
2686  for ac_arg
2687  do
2688    case $ac_arg in
2689    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2690    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2691    | -silent | --silent | --silen | --sile | --sil)
2692      continue ;;
2693    *\'*)
2694      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2695    esac
2696    case $ac_pass in
2697    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2698    2)
2699      as_fn_append ac_configure_args1 " '$ac_arg'"
2700      if test $ac_must_keep_next = true; then
2701	ac_must_keep_next=false # Got value, back to normal.
2702      else
2703	case $ac_arg in
2704	  *=* | --config-cache | -C | -disable-* | --disable-* \
2705	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2706	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2707	  | -with-* | --with-* | -without-* | --without-* | --x)
2708	    case "$ac_configure_args0 " in
2709	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2710	    esac
2711	    ;;
2712	  -* ) ac_must_keep_next=true ;;
2713	esac
2714      fi
2715      as_fn_append ac_configure_args " '$ac_arg'"
2716      ;;
2717    esac
2718  done
2719done
2720{ ac_configure_args0=; unset ac_configure_args0;}
2721{ ac_configure_args1=; unset ac_configure_args1;}
2722
2723# When interrupted or exit'd, cleanup temporary files, and complete
2724# config.log.  We remove comments because anyway the quotes in there
2725# would cause problems or look ugly.
2726# WARNING: Use '\'' to represent an apostrophe within the trap.
2727# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2728trap 'exit_status=$?
2729  # Save into config.log some information that might help in debugging.
2730  {
2731    echo
2732
2733    $as_echo "## ---------------- ##
2734## Cache variables. ##
2735## ---------------- ##"
2736    echo
2737    # The following way of writing the cache mishandles newlines in values,
2738(
2739  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2740    eval ac_val=\$$ac_var
2741    case $ac_val in #(
2742    *${as_nl}*)
2743      case $ac_var in #(
2744      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2745$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2746      esac
2747      case $ac_var in #(
2748      _ | IFS | as_nl) ;; #(
2749      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2750      *) { eval $ac_var=; unset $ac_var;} ;;
2751      esac ;;
2752    esac
2753  done
2754  (set) 2>&1 |
2755    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2756    *${as_nl}ac_space=\ *)
2757      sed -n \
2758	"s/'\''/'\''\\\\'\'''\''/g;
2759	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2760      ;; #(
2761    *)
2762      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2763      ;;
2764    esac |
2765    sort
2766)
2767    echo
2768
2769    $as_echo "## ----------------- ##
2770## Output variables. ##
2771## ----------------- ##"
2772    echo
2773    for ac_var in $ac_subst_vars
2774    do
2775      eval ac_val=\$$ac_var
2776      case $ac_val in
2777      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778      esac
2779      $as_echo "$ac_var='\''$ac_val'\''"
2780    done | sort
2781    echo
2782
2783    if test -n "$ac_subst_files"; then
2784      $as_echo "## ------------------- ##
2785## File substitutions. ##
2786## ------------------- ##"
2787      echo
2788      for ac_var in $ac_subst_files
2789      do
2790	eval ac_val=\$$ac_var
2791	case $ac_val in
2792	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2793	esac
2794	$as_echo "$ac_var='\''$ac_val'\''"
2795      done | sort
2796      echo
2797    fi
2798
2799    if test -s confdefs.h; then
2800      $as_echo "## ----------- ##
2801## confdefs.h. ##
2802## ----------- ##"
2803      echo
2804      cat confdefs.h
2805      echo
2806    fi
2807    test "$ac_signal" != 0 &&
2808      $as_echo "$as_me: caught signal $ac_signal"
2809    $as_echo "$as_me: exit $exit_status"
2810  } >&5
2811  rm -f core *.core core.conftest.* &&
2812    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2813    exit $exit_status
2814' 0
2815for ac_signal in 1 2 13 15; do
2816  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2817done
2818ac_signal=0
2819
2820# confdefs.h avoids OS command line length limits that DEFS can exceed.
2821rm -f -r conftest* confdefs.h
2822
2823$as_echo "/* confdefs.h */" > confdefs.h
2824
2825# Predefined preprocessor variables.
2826
2827cat >>confdefs.h <<_ACEOF
2828#define PACKAGE_NAME "$PACKAGE_NAME"
2829_ACEOF
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2833_ACEOF
2834
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_VERSION "$PACKAGE_VERSION"
2837_ACEOF
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_STRING "$PACKAGE_STRING"
2841_ACEOF
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_URL "$PACKAGE_URL"
2849_ACEOF
2850
2851
2852# Let the site file select an alternate cache file if it wants to.
2853# Prefer an explicitly selected file to automatically selected ones.
2854ac_site_file1=NONE
2855ac_site_file2=NONE
2856if test -n "$CONFIG_SITE"; then
2857  # We do not want a PATH search for config.site.
2858  case $CONFIG_SITE in #((
2859    -*)  ac_site_file1=./$CONFIG_SITE;;
2860    */*) ac_site_file1=$CONFIG_SITE;;
2861    *)   ac_site_file1=./$CONFIG_SITE;;
2862  esac
2863elif test "x$prefix" != xNONE; then
2864  ac_site_file1=$prefix/share/config.site
2865  ac_site_file2=$prefix/etc/config.site
2866else
2867  ac_site_file1=$ac_default_prefix/share/config.site
2868  ac_site_file2=$ac_default_prefix/etc/config.site
2869fi
2870for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2871do
2872  test "x$ac_site_file" = xNONE && continue
2873  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2874    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2875$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2876    sed 's/^/| /' "$ac_site_file" >&5
2877    . "$ac_site_file" \
2878      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880as_fn_error $? "failed to load site script $ac_site_file
2881See \`config.log' for more details" "$LINENO" 5; }
2882  fi
2883done
2884
2885if test -r "$cache_file"; then
2886  # Some versions of bash will fail to source /dev/null (special files
2887  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2888  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2889    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2890$as_echo "$as_me: loading cache $cache_file" >&6;}
2891    case $cache_file in
2892      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2893      *)                      . "./$cache_file";;
2894    esac
2895  fi
2896else
2897  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2898$as_echo "$as_me: creating cache $cache_file" >&6;}
2899  >$cache_file
2900fi
2901
2902# Check that the precious variables saved in the cache have kept the same
2903# value.
2904ac_cache_corrupted=false
2905for ac_var in $ac_precious_vars; do
2906  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2907  eval ac_new_set=\$ac_env_${ac_var}_set
2908  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2909  eval ac_new_val=\$ac_env_${ac_var}_value
2910  case $ac_old_set,$ac_new_set in
2911    set,)
2912      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2914      ac_cache_corrupted=: ;;
2915    ,set)
2916      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2917$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2918      ac_cache_corrupted=: ;;
2919    ,);;
2920    *)
2921      if test "x$ac_old_val" != "x$ac_new_val"; then
2922	# differences in whitespace do not lead to failure.
2923	ac_old_val_w=`echo x $ac_old_val`
2924	ac_new_val_w=`echo x $ac_new_val`
2925	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2926	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2927$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2928	  ac_cache_corrupted=:
2929	else
2930	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2931$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2932	  eval $ac_var=\$ac_old_val
2933	fi
2934	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2935$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2936	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2937$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2938      fi;;
2939  esac
2940  # Pass precious variables to config.status.
2941  if test "$ac_new_set" = set; then
2942    case $ac_new_val in
2943    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2944    *) ac_arg=$ac_var=$ac_new_val ;;
2945    esac
2946    case " $ac_configure_args " in
2947      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2948      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2949    esac
2950  fi
2951done
2952if $ac_cache_corrupted; then
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2956$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2957  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2958fi
2959## -------------------- ##
2960## Main body of script. ##
2961## -------------------- ##
2962
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
2968
2969
2970
2971ac_aux_dir=
2972for ac_dir in build-aux "$srcdir"/build-aux; do
2973  if test -f "$ac_dir/install-sh"; then
2974    ac_aux_dir=$ac_dir
2975    ac_install_sh="$ac_aux_dir/install-sh -c"
2976    break
2977  elif test -f "$ac_dir/install.sh"; then
2978    ac_aux_dir=$ac_dir
2979    ac_install_sh="$ac_aux_dir/install.sh -c"
2980    break
2981  elif test -f "$ac_dir/shtool"; then
2982    ac_aux_dir=$ac_dir
2983    ac_install_sh="$ac_aux_dir/shtool install -c"
2984    break
2985  fi
2986done
2987if test -z "$ac_aux_dir"; then
2988  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2989fi
2990
2991# These three variables are undocumented and unsupported,
2992# and are intended to be withdrawn in a future Autoconf release.
2993# They can cause serious problems if a builder's source tree is in a directory
2994# whose full name contains unusual characters.
2995ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2996ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2997ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2998
2999
3000# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3001
3002#
3003# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3004# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3005#
3006# This code is free software; you can redistribute it and/or modify it
3007# under the terms of the GNU General Public License version 2 only, as
3008# published by the Free Software Foundation.  Oracle designates this
3009# particular file as subject to the "Classpath" exception as provided
3010# by Oracle in the LICENSE file that accompanied this code.
3011#
3012# This code is distributed in the hope that it will be useful, but WITHOUT
3013# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3014# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3015# version 2 for more details (a copy is included in the LICENSE file that
3016# accompanied this code).
3017#
3018# You should have received a copy of the GNU General Public License version
3019# 2 along with this work; if not, write to the Free Software Foundation,
3020# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3021#
3022# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3023# or visit www.oracle.com if you need additional information or have any
3024# questions.
3025#
3026
3027#
3028# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3029#
3030# This program is free software; you can redistribute it and/or modify
3031# it under the terms of the GNU General Public License as published by
3032# the Free Software Foundation; either version 2 of the License, or
3033# (at your option) any later version.
3034#
3035# This program is distributed in the hope that it will be useful, but
3036# WITHOUT ANY WARRANTY; without even the implied warranty of
3037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3038# General Public License for more details.
3039#
3040# You should have received a copy of the GNU General Public License
3041# along with this program; if not, write to the Free Software
3042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3043#
3044# As a special exception to the GNU General Public License, if you
3045# distribute this file as part of a program that contains a
3046# configuration script generated by Autoconf, you may include it under
3047# the same distribution terms that you use for the rest of that program.
3048
3049# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3050# ----------------------------------
3051# PKG_PROG_PKG_CONFIG
3052
3053# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3054#
3055# Check to see whether a particular set of modules exists.  Similar
3056# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3057#
3058#
3059# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3060# this or PKG_CHECK_MODULES is called, or make sure to call
3061# PKG_CHECK_EXISTS manually
3062# --------------------------------------------------------------
3063
3064
3065
3066# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3067# ---------------------------------------------
3068# _PKG_CONFIG
3069
3070# _PKG_SHORT_ERRORS_SUPPORTED
3071# -----------------------------
3072# _PKG_SHORT_ERRORS_SUPPORTED
3073
3074
3075# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3076# [ACTION-IF-NOT-FOUND])
3077#
3078#
3079# Note that if there is a possibility the first call to
3080# PKG_CHECK_MODULES might not happen, you should be sure to include an
3081# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3082#
3083#
3084# --------------------------------------------------------------
3085# PKG_CHECK_MODULES
3086
3087
3088# Include these first...
3089#
3090# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3092#
3093# This code is free software; you can redistribute it and/or modify it
3094# under the terms of the GNU General Public License version 2 only, as
3095# published by the Free Software Foundation.  Oracle designates this
3096# particular file as subject to the "Classpath" exception as provided
3097# by Oracle in the LICENSE file that accompanied this code.
3098#
3099# This code is distributed in the hope that it will be useful, but WITHOUT
3100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3102# version 2 for more details (a copy is included in the LICENSE file that
3103# accompanied this code).
3104#
3105# You should have received a copy of the GNU General Public License version
3106# 2 along with this work; if not, write to the Free Software Foundation,
3107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3108#
3109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3110# or visit www.oracle.com if you need additional information or have any
3111# questions.
3112#
3113
3114# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3115# If so, then append $1 to $2\
3116# Also set JVM_ARG_OK to true/false depending on outcome.
3117
3118
3119# Appends a string to a path variable, only adding the : when needed.
3120
3121
3122# This will make sure the given variable points to a full and proper
3123# path. This means:
3124# 1) There will be no spaces in the path. On posix platforms,
3125#    spaces in the path will result in an error. On Windows,
3126#    the path will be rewritten using short-style to be space-free.
3127# 2) The path will be absolute, and it will be in unix-style (on
3128#     cygwin).
3129# $1: The name of the variable to fix
3130
3131
3132# This will make sure the given variable points to a executable
3133# with a full and proper path. This means:
3134# 1) There will be no spaces in the path. On posix platforms,
3135#    spaces in the path will result in an error. On Windows,
3136#    the path will be rewritten using short-style to be space-free.
3137# 2) The path will be absolute, and it will be in unix-style (on
3138#     cygwin).
3139# Any arguments given to the executable is preserved.
3140# If the input variable does not have a directory specification, then
3141# it need to be in the PATH.
3142# $1: The name of the variable to fix
3143
3144
3145
3146
3147
3148
3149# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3150# $1: variable to check
3151# $2: executable name to print in warning (optional)
3152
3153
3154# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3155# Arguments as AC_PATH_PROG:
3156# $1: variable to set
3157# $2: executable name to look for
3158
3159
3160# Setup the most fundamental tools that relies on not much else to set up,
3161# but is used by much of the early bootstrap code.
3162
3163
3164# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3165
3166
3167
3168
3169
3170
3171
3172#%%% Simple tools %%%
3173
3174# Check if we have found a usable version of make
3175# $1: the path to a potential make binary (or empty)
3176# $2: the description on how we found this
3177
3178
3179# Goes looking for a usable version of GNU make.
3180
3181
3182
3183
3184
3185
3186# Check if build directory is on local disk. If not possible to determine,
3187# we prefer to claim it's local.
3188# Argument 1: directory to test
3189# Argument 2: what to do if it is on local disk
3190# Argument 3: what to do otherwise (remote disk or failure)
3191
3192
3193# Check that source files have basic read permissions set. This might
3194# not be the case in cygwin in certain conditions.
3195
3196
3197
3198
3199#
3200# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3201# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3202#
3203# This code is free software; you can redistribute it and/or modify it
3204# under the terms of the GNU General Public License version 2 only, as
3205# published by the Free Software Foundation.  Oracle designates this
3206# particular file as subject to the "Classpath" exception as provided
3207# by Oracle in the LICENSE file that accompanied this code.
3208#
3209# This code is distributed in the hope that it will be useful, but WITHOUT
3210# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3211# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3212# version 2 for more details (a copy is included in the LICENSE file that
3213# accompanied this code).
3214#
3215# You should have received a copy of the GNU General Public License version
3216# 2 along with this work; if not, write to the Free Software Foundation,
3217# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3218#
3219# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3220# or visit www.oracle.com if you need additional information or have any
3221# questions.
3222#
3223
3224
3225
3226
3227
3228# Helper function which possibly converts a path using DOS-style short mode.
3229# If so, the updated path is stored in $new_path.
3230# $1: The path to check
3231
3232
3233# Helper function which possibly converts a path using DOS-style short mode.
3234# If so, the updated path is stored in $new_path.
3235# $1: The path to check
3236
3237
3238# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3239# and could probably be heavily simplified. However, all changes in this
3240# area tend to need lot of testing in different scenarios, and in lack of
3241# proper unit testing, cleaning this up has not been deemed worth the effort
3242# at the moment.
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3253
3254
3255
3256
3257#
3258# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3259# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3260#
3261# This code is free software; you can redistribute it and/or modify it
3262# under the terms of the GNU General Public License version 2 only, as
3263# published by the Free Software Foundation.  Oracle designates this
3264# particular file as subject to the "Classpath" exception as provided
3265# by Oracle in the LICENSE file that accompanied this code.
3266#
3267# This code is distributed in the hope that it will be useful, but WITHOUT
3268# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3269# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3270# version 2 for more details (a copy is included in the LICENSE file that
3271# accompanied this code).
3272#
3273# You should have received a copy of the GNU General Public License version
3274# 2 along with this work; if not, write to the Free Software Foundation,
3275# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3276#
3277# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3278# or visit www.oracle.com if you need additional information or have any
3279# questions.
3280#
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292# ... then the rest
3293#
3294# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3295# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3296#
3297# This code is free software; you can redistribute it and/or modify it
3298# under the terms of the GNU General Public License version 2 only, as
3299# published by the Free Software Foundation.  Oracle designates this
3300# particular file as subject to the "Classpath" exception as provided
3301# by Oracle in the LICENSE file that accompanied this code.
3302#
3303# This code is distributed in the hope that it will be useful, but WITHOUT
3304# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3305# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3306# version 2 for more details (a copy is included in the LICENSE file that
3307# accompanied this code).
3308#
3309# You should have received a copy of the GNU General Public License version
3310# 2 along with this work; if not, write to the Free Software Foundation,
3311# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3312#
3313# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3314# or visit www.oracle.com if you need additional information or have any
3315# questions.
3316#
3317
3318# Execute the check given as argument, and verify the result
3319# If the Boot JDK was previously found, do nothing
3320# $1 A command line (typically autoconf macro) to execute
3321
3322
3323# Test: Is bootjdk explicitely set by command line arguments?
3324
3325
3326# Test: Is bootjdk available from builddeps?
3327
3328
3329# Test: Is $JAVA_HOME set?
3330
3331
3332# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3333
3334
3335# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3336
3337
3338# Look for a jdk in the given path. If there are multiple, try to select the newest.
3339# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3340# $1 = Path to directory containing jdk installations.
3341# $2 = String to append to the found JDK directory to get the proper JDK home
3342
3343
3344# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3345# environmental variable as base for where to look.
3346# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3347
3348
3349# Test: Is there a JDK installed in default, well-known locations?
3350
3351
3352# Check that a command-line tool in the Boot JDK is correct
3353# $1 = name of variable to assign
3354# $2 = name of binary
3355
3356
3357###############################################################################
3358#
3359# We need a Boot JDK to bootstrap the build.
3360#
3361
3362
3363
3364
3365
3366#
3367# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3368# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3369#
3370# This code is free software; you can redistribute it and/or modify it
3371# under the terms of the GNU General Public License version 2 only, as
3372# published by the Free Software Foundation.  Oracle designates this
3373# particular file as subject to the "Classpath" exception as provided
3374# by Oracle in the LICENSE file that accompanied this code.
3375#
3376# This code is distributed in the hope that it will be useful, but WITHOUT
3377# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3378# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3379# version 2 for more details (a copy is included in the LICENSE file that
3380# accompanied this code).
3381#
3382# You should have received a copy of the GNU General Public License version
3383# 2 along with this work; if not, write to the Free Software Foundation,
3384# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3385#
3386# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3387# or visit www.oracle.com if you need additional information or have any
3388# questions.
3389#
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410#
3411# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3412# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3413#
3414# This code is free software; you can redistribute it and/or modify it
3415# under the terms of the GNU General Public License version 2 only, as
3416# published by the Free Software Foundation.  Oracle designates this
3417# particular file as subject to the "Classpath" exception as provided
3418# by Oracle in the LICENSE file that accompanied this code.
3419#
3420# This code is distributed in the hope that it will be useful, but WITHOUT
3421# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3422# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3423# version 2 for more details (a copy is included in the LICENSE file that
3424# accompanied this code).
3425#
3426# You should have received a copy of the GNU General Public License version
3427# 2 along with this work; if not, write to the Free Software Foundation,
3428# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3429#
3430# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3431# or visit www.oracle.com if you need additional information or have any
3432# questions.
3433#
3434
3435
3436
3437
3438
3439cygwin_help() {
3440    case $1 in
3441    unzip)
3442        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3443    zip)
3444        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3445    make)
3446        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3447    * )
3448       break ;;
3449    esac
3450}
3451
3452apt_help() {
3453    case $1 in
3454    devkit)
3455        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3456    openjdk)
3457        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3458    alsa)
3459        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3460    cups)
3461        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3462    freetype2)
3463        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3464    pulse)
3465        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3466    x11)
3467        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3468    ccache)
3469        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3470    * )
3471       break ;;
3472    esac
3473}
3474
3475yum_help() {
3476    case $1 in
3477    devkit)
3478        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3479    openjdk)
3480        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3481    alsa)
3482        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3483    cups)
3484        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3485    freetype2)
3486        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3487    pulse)
3488        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3489    x11)
3490        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3491    ccache)
3492        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3493    * )
3494       break ;;
3495    esac
3496}
3497
3498port_help() {
3499    PKGHANDLER_COMMAND=""
3500}
3501
3502pkgutil_help() {
3503    PKGHANDLER_COMMAND=""
3504}
3505
3506pkgadd_help() {
3507    PKGHANDLER_COMMAND=""
3508}
3509
3510
3511
3512#
3513# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3514# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3515#
3516# This code is free software; you can redistribute it and/or modify it
3517# under the terms of the GNU General Public License version 2 only, as
3518# published by the Free Software Foundation.  Oracle designates this
3519# particular file as subject to the "Classpath" exception as provided
3520# by Oracle in the LICENSE file that accompanied this code.
3521#
3522# This code is distributed in the hope that it will be useful, but WITHOUT
3523# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3524# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3525# version 2 for more details (a copy is included in the LICENSE file that
3526# accompanied this code).
3527#
3528# You should have received a copy of the GNU General Public License version
3529# 2 along with this work; if not, write to the Free Software Foundation,
3530# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3531#
3532# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3533# or visit www.oracle.com if you need additional information or have any
3534# questions.
3535#
3536
3537
3538
3539
3540
3541
3542
3543
3544###############################################################################
3545#
3546# Should we build only OpenJDK even if closed sources are present?
3547#
3548
3549
3550
3551
3552###############################################################################
3553#
3554# Setup version numbers
3555#
3556
3557
3558
3559
3560
3561
3562# Support for customization of the build process. Some build files
3563# will include counterparts from this location, if they exist. This allows
3564# for a degree of customization of the build targets and the rules/recipes
3565# to create them
3566
3567# Check whether --with-custom-make-dir was given.
3568if test "${with_custom_make_dir+set}" = set; then :
3569  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3570fi
3571
3572
3573
3574#
3575# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3576# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3577#
3578# This code is free software; you can redistribute it and/or modify it
3579# under the terms of the GNU General Public License version 2 only, as
3580# published by the Free Software Foundation.  Oracle designates this
3581# particular file as subject to the "Classpath" exception as provided
3582# by Oracle in the LICENSE file that accompanied this code.
3583#
3584# This code is distributed in the hope that it will be useful, but WITHOUT
3585# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3586# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3587# version 2 for more details (a copy is included in the LICENSE file that
3588# accompanied this code).
3589#
3590# You should have received a copy of the GNU General Public License version
3591# 2 along with this work; if not, write to the Free Software Foundation,
3592# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3593#
3594# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3595# or visit www.oracle.com if you need additional information or have any
3596# questions.
3597#
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613#
3614# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3615# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3616#
3617# This code is free software; you can redistribute it and/or modify it
3618# under the terms of the GNU General Public License version 2 only, as
3619# published by the Free Software Foundation.  Oracle designates this
3620# particular file as subject to the "Classpath" exception as provided
3621# by Oracle in the LICENSE file that accompanied this code.
3622#
3623# This code is distributed in the hope that it will be useful, but WITHOUT
3624# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3625# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3626# version 2 for more details (a copy is included in the LICENSE file that
3627# accompanied this code).
3628#
3629# You should have received a copy of the GNU General Public License version
3630# 2 along with this work; if not, write to the Free Software Foundation,
3631# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3632#
3633# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3634# or visit www.oracle.com if you need additional information or have any
3635# questions.
3636#
3637
3638# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3639# Converts autoconf style CPU name to OpenJDK style, into
3640# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3641
3642
3643# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3644# Converts autoconf style OS name to OpenJDK style, into
3645# VAR_OS and VAR_OS_API.
3646
3647
3648# Expects $host_os $host_cpu $build_os and $build_cpu
3649# and $with_target_bits to have been setup!
3650#
3651# Translate the standard triplet(quadruplet) definition
3652# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3653# OPENJDK_BUILD_OS, etc.
3654
3655
3656# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3657# accordingly. Must be done after setting up build and target system, but before
3658# doing anything else with these values.
3659
3660
3661    # Setup the legacy variables, for controlling the old makefiles.
3662    #
3663
3664
3665
3666
3667#%%% Build and target systems %%%
3668
3669
3670
3671
3672# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3673# Add -mX to various FLAGS variables.
3674
3675
3676
3677
3678
3679
3680#
3681# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683#
3684# This code is free software; you can redistribute it and/or modify it
3685# under the terms of the GNU General Public License version 2 only, as
3686# published by the Free Software Foundation.  Oracle designates this
3687# particular file as subject to the "Classpath" exception as provided
3688# by Oracle in the LICENSE file that accompanied this code.
3689#
3690# This code is distributed in the hope that it will be useful, but WITHOUT
3691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693# version 2 for more details (a copy is included in the LICENSE file that
3694# accompanied this code).
3695#
3696# You should have received a copy of the GNU General Public License version
3697# 2 along with this work; if not, write to the Free Software Foundation,
3698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699#
3700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701# or visit www.oracle.com if you need additional information or have any
3702# questions.
3703#
3704
3705
3706
3707
3708
3709
3710
3711
3712#
3713# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3714# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3715#
3716# This code is free software; you can redistribute it and/or modify it
3717# under the terms of the GNU General Public License version 2 only, as
3718# published by the Free Software Foundation.  Oracle designates this
3719# particular file as subject to the "Classpath" exception as provided
3720# by Oracle in the LICENSE file that accompanied this code.
3721#
3722# This code is distributed in the hope that it will be useful, but WITHOUT
3723# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3724# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3725# version 2 for more details (a copy is included in the LICENSE file that
3726# accompanied this code).
3727#
3728# You should have received a copy of the GNU General Public License version
3729# 2 along with this work; if not, write to the Free Software Foundation,
3730# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3731#
3732# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3733# or visit www.oracle.com if you need additional information or have any
3734# questions.
3735#
3736
3737# $1 = compiler to test (CC or CXX)
3738# $2 = human readable name of compiler (C or C++)
3739
3740
3741
3742
3743
3744# $1 = compiler to test (CC or CXX)
3745# $2 = human readable name of compiler (C or C++)
3746# $3 = list of compiler names to search for
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3761#                                   [RUN-IF-FALSE])
3762# ------------------------------------------------------------
3763# Check that the c and c++ compilers support an argument
3764
3765
3766
3767
3768# Setup the JTREG paths
3769
3770
3771#
3772# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3773# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3774#
3775# This code is free software; you can redistribute it and/or modify it
3776# under the terms of the GNU General Public License version 2 only, as
3777# published by the Free Software Foundation.  Oracle designates this
3778# particular file as subject to the "Classpath" exception as provided
3779# by Oracle in the LICENSE file that accompanied this code.
3780#
3781# This code is distributed in the hope that it will be useful, but WITHOUT
3782# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3783# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3784# version 2 for more details (a copy is included in the LICENSE file that
3785# accompanied this code).
3786#
3787# You should have received a copy of the GNU General Public License version
3788# 2 along with this work; if not, write to the Free Software Foundation,
3789# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3790#
3791# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3792# or visit www.oracle.com if you need additional information or have any
3793# questions.
3794#
3795
3796
3797
3798
3799
3800
3801
3802# Check if the VS env variables were setup prior to running configure.
3803# If not, then find vcvarsall.bat and run it automatically, and integrate
3804# the set env variables into the spec file.
3805
3806
3807
3808# Setup the DXSDK paths
3809
3810
3811
3812
3813
3814
3815# This line needs to be here, verbatim, after all includes and the dummy hook
3816# definitions. It is replaced with custom functionality when building
3817# custom sources.
3818#CUSTOM_AUTOCONF_INCLUDE
3819
3820# Do not change or remove the following line, it is needed for consistency checks:
3821DATE_WHEN_GENERATED=1378914658
3822
3823###############################################################################
3824#
3825# Initialization / Boot-strapping
3826#
3827# The bootstrapping process needs to solve the "chicken or the egg" problem,
3828# thus it jumps back and forth, each time gaining something needed later on.
3829#
3830###############################################################################
3831
3832# Basic initialization that must happen first of all
3833
3834# Save the original command line. This is passed to us by the wrapper configure script.
3835
3836DATE_WHEN_CONFIGURED=`LANG=C date`
3837
3838{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3839$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3841$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3842
3843
3844
3845# Start with tools that do not need have cross compilation support
3846# and can be expected to be found in the default PATH. These tools are
3847# used by configure. Nor are these tools expected to be found in the
3848# devkit from the builddeps server either, since they are
3849# needed to download the devkit.
3850
3851# First are all the simple required tools.
3852
3853    for ac_prog in basename
3854do
3855  # Extract the first word of "$ac_prog", so it can be a program name with args.
3856set dummy $ac_prog; ac_word=$2
3857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3858$as_echo_n "checking for $ac_word... " >&6; }
3859if ${ac_cv_path_BASENAME+:} false; then :
3860  $as_echo_n "(cached) " >&6
3861else
3862  case $BASENAME in
3863  [\\/]* | ?:[\\/]*)
3864  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3865  ;;
3866  *)
3867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868for as_dir in $PATH
3869do
3870  IFS=$as_save_IFS
3871  test -z "$as_dir" && as_dir=.
3872    for ac_exec_ext in '' $ac_executable_extensions; do
3873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3876    break 2
3877  fi
3878done
3879  done
3880IFS=$as_save_IFS
3881
3882  ;;
3883esac
3884fi
3885BASENAME=$ac_cv_path_BASENAME
3886if test -n "$BASENAME"; then
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3888$as_echo "$BASENAME" >&6; }
3889else
3890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3891$as_echo "no" >&6; }
3892fi
3893
3894
3895  test -n "$BASENAME" && break
3896done
3897
3898
3899    if test "x$BASENAME" = x; then
3900        if test "xbasename" = x; then
3901          PROG_NAME=basename
3902        else
3903          PROG_NAME=basename
3904        fi
3905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3906$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3907        as_fn_error $? "Cannot continue" "$LINENO" 5
3908    fi
3909
3910
3911
3912    for ac_prog in bash
3913do
3914  # Extract the first word of "$ac_prog", so it can be a program name with args.
3915set dummy $ac_prog; ac_word=$2
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3917$as_echo_n "checking for $ac_word... " >&6; }
3918if ${ac_cv_path_BASH+:} false; then :
3919  $as_echo_n "(cached) " >&6
3920else
3921  case $BASH in
3922  [\\/]* | ?:[\\/]*)
3923  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3924  ;;
3925  *)
3926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH
3928do
3929  IFS=$as_save_IFS
3930  test -z "$as_dir" && as_dir=.
3931    for ac_exec_ext in '' $ac_executable_extensions; do
3932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935    break 2
3936  fi
3937done
3938  done
3939IFS=$as_save_IFS
3940
3941  ;;
3942esac
3943fi
3944BASH=$ac_cv_path_BASH
3945if test -n "$BASH"; then
3946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3947$as_echo "$BASH" >&6; }
3948else
3949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950$as_echo "no" >&6; }
3951fi
3952
3953
3954  test -n "$BASH" && break
3955done
3956
3957
3958    if test "x$BASH" = x; then
3959        if test "xbash" = x; then
3960          PROG_NAME=bash
3961        else
3962          PROG_NAME=bash
3963        fi
3964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3966        as_fn_error $? "Cannot continue" "$LINENO" 5
3967    fi
3968
3969
3970
3971    for ac_prog in cat
3972do
3973  # Extract the first word of "$ac_prog", so it can be a program name with args.
3974set dummy $ac_prog; ac_word=$2
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3976$as_echo_n "checking for $ac_word... " >&6; }
3977if ${ac_cv_path_CAT+:} false; then :
3978  $as_echo_n "(cached) " >&6
3979else
3980  case $CAT in
3981  [\\/]* | ?:[\\/]*)
3982  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3983  ;;
3984  *)
3985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986for as_dir in $PATH
3987do
3988  IFS=$as_save_IFS
3989  test -z "$as_dir" && as_dir=.
3990    for ac_exec_ext in '' $ac_executable_extensions; do
3991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3992    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994    break 2
3995  fi
3996done
3997  done
3998IFS=$as_save_IFS
3999
4000  ;;
4001esac
4002fi
4003CAT=$ac_cv_path_CAT
4004if test -n "$CAT"; then
4005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4006$as_echo "$CAT" >&6; }
4007else
4008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010fi
4011
4012
4013  test -n "$CAT" && break
4014done
4015
4016
4017    if test "x$CAT" = x; then
4018        if test "xcat" = x; then
4019          PROG_NAME=cat
4020        else
4021          PROG_NAME=cat
4022        fi
4023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4025        as_fn_error $? "Cannot continue" "$LINENO" 5
4026    fi
4027
4028
4029
4030    for ac_prog in chmod
4031do
4032  # Extract the first word of "$ac_prog", so it can be a program name with args.
4033set dummy $ac_prog; ac_word=$2
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4035$as_echo_n "checking for $ac_word... " >&6; }
4036if ${ac_cv_path_CHMOD+:} false; then :
4037  $as_echo_n "(cached) " >&6
4038else
4039  case $CHMOD in
4040  [\\/]* | ?:[\\/]*)
4041  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4042  ;;
4043  *)
4044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4045for as_dir in $PATH
4046do
4047  IFS=$as_save_IFS
4048  test -z "$as_dir" && as_dir=.
4049    for ac_exec_ext in '' $ac_executable_extensions; do
4050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4051    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4053    break 2
4054  fi
4055done
4056  done
4057IFS=$as_save_IFS
4058
4059  ;;
4060esac
4061fi
4062CHMOD=$ac_cv_path_CHMOD
4063if test -n "$CHMOD"; then
4064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4065$as_echo "$CHMOD" >&6; }
4066else
4067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068$as_echo "no" >&6; }
4069fi
4070
4071
4072  test -n "$CHMOD" && break
4073done
4074
4075
4076    if test "x$CHMOD" = x; then
4077        if test "xchmod" = x; then
4078          PROG_NAME=chmod
4079        else
4080          PROG_NAME=chmod
4081        fi
4082        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4083$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4084        as_fn_error $? "Cannot continue" "$LINENO" 5
4085    fi
4086
4087
4088
4089    for ac_prog in cmp
4090do
4091  # Extract the first word of "$ac_prog", so it can be a program name with args.
4092set dummy $ac_prog; ac_word=$2
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4094$as_echo_n "checking for $ac_word... " >&6; }
4095if ${ac_cv_path_CMP+:} false; then :
4096  $as_echo_n "(cached) " >&6
4097else
4098  case $CMP in
4099  [\\/]* | ?:[\\/]*)
4100  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4101  ;;
4102  *)
4103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in $PATH
4105do
4106  IFS=$as_save_IFS
4107  test -z "$as_dir" && as_dir=.
4108    for ac_exec_ext in '' $ac_executable_extensions; do
4109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4110    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4112    break 2
4113  fi
4114done
4115  done
4116IFS=$as_save_IFS
4117
4118  ;;
4119esac
4120fi
4121CMP=$ac_cv_path_CMP
4122if test -n "$CMP"; then
4123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4124$as_echo "$CMP" >&6; }
4125else
4126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
4128fi
4129
4130
4131  test -n "$CMP" && break
4132done
4133
4134
4135    if test "x$CMP" = x; then
4136        if test "xcmp" = x; then
4137          PROG_NAME=cmp
4138        else
4139          PROG_NAME=cmp
4140        fi
4141        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4142$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4143        as_fn_error $? "Cannot continue" "$LINENO" 5
4144    fi
4145
4146
4147
4148    for ac_prog in comm
4149do
4150  # Extract the first word of "$ac_prog", so it can be a program name with args.
4151set dummy $ac_prog; ac_word=$2
4152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153$as_echo_n "checking for $ac_word... " >&6; }
4154if ${ac_cv_path_COMM+:} false; then :
4155  $as_echo_n "(cached) " >&6
4156else
4157  case $COMM in
4158  [\\/]* | ?:[\\/]*)
4159  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4160  ;;
4161  *)
4162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165  IFS=$as_save_IFS
4166  test -z "$as_dir" && as_dir=.
4167    for ac_exec_ext in '' $ac_executable_extensions; do
4168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171    break 2
4172  fi
4173done
4174  done
4175IFS=$as_save_IFS
4176
4177  ;;
4178esac
4179fi
4180COMM=$ac_cv_path_COMM
4181if test -n "$COMM"; then
4182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4183$as_echo "$COMM" >&6; }
4184else
4185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4186$as_echo "no" >&6; }
4187fi
4188
4189
4190  test -n "$COMM" && break
4191done
4192
4193
4194    if test "x$COMM" = x; then
4195        if test "xcomm" = x; then
4196          PROG_NAME=comm
4197        else
4198          PROG_NAME=comm
4199        fi
4200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4201$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4202        as_fn_error $? "Cannot continue" "$LINENO" 5
4203    fi
4204
4205
4206
4207    for ac_prog in cp
4208do
4209  # Extract the first word of "$ac_prog", so it can be a program name with args.
4210set dummy $ac_prog; ac_word=$2
4211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212$as_echo_n "checking for $ac_word... " >&6; }
4213if ${ac_cv_path_CP+:} false; then :
4214  $as_echo_n "(cached) " >&6
4215else
4216  case $CP in
4217  [\\/]* | ?:[\\/]*)
4218  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4219  ;;
4220  *)
4221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH
4223do
4224  IFS=$as_save_IFS
4225  test -z "$as_dir" && as_dir=.
4226    for ac_exec_ext in '' $ac_executable_extensions; do
4227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4228    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4230    break 2
4231  fi
4232done
4233  done
4234IFS=$as_save_IFS
4235
4236  ;;
4237esac
4238fi
4239CP=$ac_cv_path_CP
4240if test -n "$CP"; then
4241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4242$as_echo "$CP" >&6; }
4243else
4244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245$as_echo "no" >&6; }
4246fi
4247
4248
4249  test -n "$CP" && break
4250done
4251
4252
4253    if test "x$CP" = x; then
4254        if test "xcp" = x; then
4255          PROG_NAME=cp
4256        else
4257          PROG_NAME=cp
4258        fi
4259        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4260$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4261        as_fn_error $? "Cannot continue" "$LINENO" 5
4262    fi
4263
4264
4265
4266    for ac_prog in cpio
4267do
4268  # Extract the first word of "$ac_prog", so it can be a program name with args.
4269set dummy $ac_prog; ac_word=$2
4270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4271$as_echo_n "checking for $ac_word... " >&6; }
4272if ${ac_cv_path_CPIO+:} false; then :
4273  $as_echo_n "(cached) " >&6
4274else
4275  case $CPIO in
4276  [\\/]* | ?:[\\/]*)
4277  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4278  ;;
4279  *)
4280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281for as_dir in $PATH
4282do
4283  IFS=$as_save_IFS
4284  test -z "$as_dir" && as_dir=.
4285    for ac_exec_ext in '' $ac_executable_extensions; do
4286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4289    break 2
4290  fi
4291done
4292  done
4293IFS=$as_save_IFS
4294
4295  ;;
4296esac
4297fi
4298CPIO=$ac_cv_path_CPIO
4299if test -n "$CPIO"; then
4300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4301$as_echo "$CPIO" >&6; }
4302else
4303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4304$as_echo "no" >&6; }
4305fi
4306
4307
4308  test -n "$CPIO" && break
4309done
4310
4311
4312    if test "x$CPIO" = x; then
4313        if test "xcpio" = x; then
4314          PROG_NAME=cpio
4315        else
4316          PROG_NAME=cpio
4317        fi
4318        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4319$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4320        as_fn_error $? "Cannot continue" "$LINENO" 5
4321    fi
4322
4323
4324
4325    for ac_prog in cut
4326do
4327  # Extract the first word of "$ac_prog", so it can be a program name with args.
4328set dummy $ac_prog; ac_word=$2
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330$as_echo_n "checking for $ac_word... " >&6; }
4331if ${ac_cv_path_CUT+:} false; then :
4332  $as_echo_n "(cached) " >&6
4333else
4334  case $CUT in
4335  [\\/]* | ?:[\\/]*)
4336  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4337  ;;
4338  *)
4339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340for as_dir in $PATH
4341do
4342  IFS=$as_save_IFS
4343  test -z "$as_dir" && as_dir=.
4344    for ac_exec_ext in '' $ac_executable_extensions; do
4345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4346    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348    break 2
4349  fi
4350done
4351  done
4352IFS=$as_save_IFS
4353
4354  ;;
4355esac
4356fi
4357CUT=$ac_cv_path_CUT
4358if test -n "$CUT"; then
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4360$as_echo "$CUT" >&6; }
4361else
4362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363$as_echo "no" >&6; }
4364fi
4365
4366
4367  test -n "$CUT" && break
4368done
4369
4370
4371    if test "x$CUT" = x; then
4372        if test "xcut" = x; then
4373          PROG_NAME=cut
4374        else
4375          PROG_NAME=cut
4376        fi
4377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4378$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4379        as_fn_error $? "Cannot continue" "$LINENO" 5
4380    fi
4381
4382
4383
4384    for ac_prog in date
4385do
4386  # Extract the first word of "$ac_prog", so it can be a program name with args.
4387set dummy $ac_prog; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
4390if ${ac_cv_path_DATE+:} false; then :
4391  $as_echo_n "(cached) " >&6
4392else
4393  case $DATE in
4394  [\\/]* | ?:[\\/]*)
4395  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4396  ;;
4397  *)
4398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in $PATH
4400do
4401  IFS=$as_save_IFS
4402  test -z "$as_dir" && as_dir=.
4403    for ac_exec_ext in '' $ac_executable_extensions; do
4404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407    break 2
4408  fi
4409done
4410  done
4411IFS=$as_save_IFS
4412
4413  ;;
4414esac
4415fi
4416DATE=$ac_cv_path_DATE
4417if test -n "$DATE"; then
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4419$as_echo "$DATE" >&6; }
4420else
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
4423fi
4424
4425
4426  test -n "$DATE" && break
4427done
4428
4429
4430    if test "x$DATE" = x; then
4431        if test "xdate" = x; then
4432          PROG_NAME=date
4433        else
4434          PROG_NAME=date
4435        fi
4436        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4437$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4438        as_fn_error $? "Cannot continue" "$LINENO" 5
4439    fi
4440
4441
4442
4443    for ac_prog in gdiff diff
4444do
4445  # Extract the first word of "$ac_prog", so it can be a program name with args.
4446set dummy $ac_prog; ac_word=$2
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448$as_echo_n "checking for $ac_word... " >&6; }
4449if ${ac_cv_path_DIFF+:} false; then :
4450  $as_echo_n "(cached) " >&6
4451else
4452  case $DIFF in
4453  [\\/]* | ?:[\\/]*)
4454  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4455  ;;
4456  *)
4457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in $PATH
4459do
4460  IFS=$as_save_IFS
4461  test -z "$as_dir" && as_dir=.
4462    for ac_exec_ext in '' $ac_executable_extensions; do
4463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4464    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4466    break 2
4467  fi
4468done
4469  done
4470IFS=$as_save_IFS
4471
4472  ;;
4473esac
4474fi
4475DIFF=$ac_cv_path_DIFF
4476if test -n "$DIFF"; then
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4478$as_echo "$DIFF" >&6; }
4479else
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481$as_echo "no" >&6; }
4482fi
4483
4484
4485  test -n "$DIFF" && break
4486done
4487
4488
4489    if test "x$DIFF" = x; then
4490        if test "xgdiff diff" = x; then
4491          PROG_NAME=diff
4492        else
4493          PROG_NAME=gdiff diff
4494        fi
4495        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4496$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4497        as_fn_error $? "Cannot continue" "$LINENO" 5
4498    fi
4499
4500
4501
4502    for ac_prog in dirname
4503do
4504  # Extract the first word of "$ac_prog", so it can be a program name with args.
4505set dummy $ac_prog; ac_word=$2
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507$as_echo_n "checking for $ac_word... " >&6; }
4508if ${ac_cv_path_DIRNAME+:} false; then :
4509  $as_echo_n "(cached) " >&6
4510else
4511  case $DIRNAME in
4512  [\\/]* | ?:[\\/]*)
4513  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4514  ;;
4515  *)
4516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH
4518do
4519  IFS=$as_save_IFS
4520  test -z "$as_dir" && as_dir=.
4521    for ac_exec_ext in '' $ac_executable_extensions; do
4522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525    break 2
4526  fi
4527done
4528  done
4529IFS=$as_save_IFS
4530
4531  ;;
4532esac
4533fi
4534DIRNAME=$ac_cv_path_DIRNAME
4535if test -n "$DIRNAME"; then
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4537$as_echo "$DIRNAME" >&6; }
4538else
4539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
4541fi
4542
4543
4544  test -n "$DIRNAME" && break
4545done
4546
4547
4548    if test "x$DIRNAME" = x; then
4549        if test "xdirname" = x; then
4550          PROG_NAME=dirname
4551        else
4552          PROG_NAME=dirname
4553        fi
4554        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4555$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4556        as_fn_error $? "Cannot continue" "$LINENO" 5
4557    fi
4558
4559
4560
4561    for ac_prog in echo
4562do
4563  # Extract the first word of "$ac_prog", so it can be a program name with args.
4564set dummy $ac_prog; ac_word=$2
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4566$as_echo_n "checking for $ac_word... " >&6; }
4567if ${ac_cv_path_ECHO+:} false; then :
4568  $as_echo_n "(cached) " >&6
4569else
4570  case $ECHO in
4571  [\\/]* | ?:[\\/]*)
4572  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4573  ;;
4574  *)
4575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576for as_dir in $PATH
4577do
4578  IFS=$as_save_IFS
4579  test -z "$as_dir" && as_dir=.
4580    for ac_exec_ext in '' $ac_executable_extensions; do
4581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4584    break 2
4585  fi
4586done
4587  done
4588IFS=$as_save_IFS
4589
4590  ;;
4591esac
4592fi
4593ECHO=$ac_cv_path_ECHO
4594if test -n "$ECHO"; then
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4596$as_echo "$ECHO" >&6; }
4597else
4598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599$as_echo "no" >&6; }
4600fi
4601
4602
4603  test -n "$ECHO" && break
4604done
4605
4606
4607    if test "x$ECHO" = x; then
4608        if test "xecho" = x; then
4609          PROG_NAME=echo
4610        else
4611          PROG_NAME=echo
4612        fi
4613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4614$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4615        as_fn_error $? "Cannot continue" "$LINENO" 5
4616    fi
4617
4618
4619
4620    for ac_prog in expr
4621do
4622  # Extract the first word of "$ac_prog", so it can be a program name with args.
4623set dummy $ac_prog; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_EXPR+:} false; then :
4627  $as_echo_n "(cached) " >&6
4628else
4629  case $EXPR in
4630  [\\/]* | ?:[\\/]*)
4631  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4632  ;;
4633  *)
4634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in $PATH
4636do
4637  IFS=$as_save_IFS
4638  test -z "$as_dir" && as_dir=.
4639    for ac_exec_ext in '' $ac_executable_extensions; do
4640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643    break 2
4644  fi
4645done
4646  done
4647IFS=$as_save_IFS
4648
4649  ;;
4650esac
4651fi
4652EXPR=$ac_cv_path_EXPR
4653if test -n "$EXPR"; then
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4655$as_echo "$EXPR" >&6; }
4656else
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661
4662  test -n "$EXPR" && break
4663done
4664
4665
4666    if test "x$EXPR" = x; then
4667        if test "xexpr" = x; then
4668          PROG_NAME=expr
4669        else
4670          PROG_NAME=expr
4671        fi
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4673$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4674        as_fn_error $? "Cannot continue" "$LINENO" 5
4675    fi
4676
4677
4678
4679    for ac_prog in file
4680do
4681  # Extract the first word of "$ac_prog", so it can be a program name with args.
4682set dummy $ac_prog; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_FILE+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  case $FILE in
4689  [\\/]* | ?:[\\/]*)
4690  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4691  ;;
4692  *)
4693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in $PATH
4695do
4696  IFS=$as_save_IFS
4697  test -z "$as_dir" && as_dir=.
4698    for ac_exec_ext in '' $ac_executable_extensions; do
4699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702    break 2
4703  fi
4704done
4705  done
4706IFS=$as_save_IFS
4707
4708  ;;
4709esac
4710fi
4711FILE=$ac_cv_path_FILE
4712if test -n "$FILE"; then
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4714$as_echo "$FILE" >&6; }
4715else
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721  test -n "$FILE" && break
4722done
4723
4724
4725    if test "x$FILE" = x; then
4726        if test "xfile" = x; then
4727          PROG_NAME=file
4728        else
4729          PROG_NAME=file
4730        fi
4731        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4732$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4733        as_fn_error $? "Cannot continue" "$LINENO" 5
4734    fi
4735
4736
4737
4738    for ac_prog in find
4739do
4740  # Extract the first word of "$ac_prog", so it can be a program name with args.
4741set dummy $ac_prog; ac_word=$2
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
4744if ${ac_cv_path_FIND+:} false; then :
4745  $as_echo_n "(cached) " >&6
4746else
4747  case $FIND in
4748  [\\/]* | ?:[\\/]*)
4749  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4750  ;;
4751  *)
4752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753for as_dir in $PATH
4754do
4755  IFS=$as_save_IFS
4756  test -z "$as_dir" && as_dir=.
4757    for ac_exec_ext in '' $ac_executable_extensions; do
4758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4759    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4761    break 2
4762  fi
4763done
4764  done
4765IFS=$as_save_IFS
4766
4767  ;;
4768esac
4769fi
4770FIND=$ac_cv_path_FIND
4771if test -n "$FIND"; then
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4773$as_echo "$FIND" >&6; }
4774else
4775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
4777fi
4778
4779
4780  test -n "$FIND" && break
4781done
4782
4783
4784    if test "x$FIND" = x; then
4785        if test "xfind" = x; then
4786          PROG_NAME=find
4787        else
4788          PROG_NAME=find
4789        fi
4790        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4791$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4792        as_fn_error $? "Cannot continue" "$LINENO" 5
4793    fi
4794
4795
4796
4797    for ac_prog in head
4798do
4799  # Extract the first word of "$ac_prog", so it can be a program name with args.
4800set dummy $ac_prog; ac_word=$2
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
4803if ${ac_cv_path_HEAD+:} false; then :
4804  $as_echo_n "(cached) " >&6
4805else
4806  case $HEAD in
4807  [\\/]* | ?:[\\/]*)
4808  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4809  ;;
4810  *)
4811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812for as_dir in $PATH
4813do
4814  IFS=$as_save_IFS
4815  test -z "$as_dir" && as_dir=.
4816    for ac_exec_ext in '' $ac_executable_extensions; do
4817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820    break 2
4821  fi
4822done
4823  done
4824IFS=$as_save_IFS
4825
4826  ;;
4827esac
4828fi
4829HEAD=$ac_cv_path_HEAD
4830if test -n "$HEAD"; then
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4832$as_echo "$HEAD" >&6; }
4833else
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839  test -n "$HEAD" && break
4840done
4841
4842
4843    if test "x$HEAD" = x; then
4844        if test "xhead" = x; then
4845          PROG_NAME=head
4846        else
4847          PROG_NAME=head
4848        fi
4849        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4850$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4851        as_fn_error $? "Cannot continue" "$LINENO" 5
4852    fi
4853
4854
4855
4856    for ac_prog in ln
4857do
4858  # Extract the first word of "$ac_prog", so it can be a program name with args.
4859set dummy $ac_prog; ac_word=$2
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861$as_echo_n "checking for $ac_word... " >&6; }
4862if ${ac_cv_path_LN+:} false; then :
4863  $as_echo_n "(cached) " >&6
4864else
4865  case $LN in
4866  [\\/]* | ?:[\\/]*)
4867  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4868  ;;
4869  *)
4870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871for as_dir in $PATH
4872do
4873  IFS=$as_save_IFS
4874  test -z "$as_dir" && as_dir=.
4875    for ac_exec_ext in '' $ac_executable_extensions; do
4876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4877    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879    break 2
4880  fi
4881done
4882  done
4883IFS=$as_save_IFS
4884
4885  ;;
4886esac
4887fi
4888LN=$ac_cv_path_LN
4889if test -n "$LN"; then
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4891$as_echo "$LN" >&6; }
4892else
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894$as_echo "no" >&6; }
4895fi
4896
4897
4898  test -n "$LN" && break
4899done
4900
4901
4902    if test "x$LN" = x; then
4903        if test "xln" = x; then
4904          PROG_NAME=ln
4905        else
4906          PROG_NAME=ln
4907        fi
4908        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4909$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4910        as_fn_error $? "Cannot continue" "$LINENO" 5
4911    fi
4912
4913
4914
4915    for ac_prog in ls
4916do
4917  # Extract the first word of "$ac_prog", so it can be a program name with args.
4918set dummy $ac_prog; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_LS+:} false; then :
4922  $as_echo_n "(cached) " >&6
4923else
4924  case $LS in
4925  [\\/]* | ?:[\\/]*)
4926  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4927  ;;
4928  *)
4929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in $PATH
4931do
4932  IFS=$as_save_IFS
4933  test -z "$as_dir" && as_dir=.
4934    for ac_exec_ext in '' $ac_executable_extensions; do
4935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938    break 2
4939  fi
4940done
4941  done
4942IFS=$as_save_IFS
4943
4944  ;;
4945esac
4946fi
4947LS=$ac_cv_path_LS
4948if test -n "$LS"; then
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4950$as_echo "$LS" >&6; }
4951else
4952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957  test -n "$LS" && break
4958done
4959
4960
4961    if test "x$LS" = x; then
4962        if test "xls" = x; then
4963          PROG_NAME=ls
4964        else
4965          PROG_NAME=ls
4966        fi
4967        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4968$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4969        as_fn_error $? "Cannot continue" "$LINENO" 5
4970    fi
4971
4972
4973
4974    for ac_prog in mkdir
4975do
4976  # Extract the first word of "$ac_prog", so it can be a program name with args.
4977set dummy $ac_prog; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_MKDIR+:} false; then :
4981  $as_echo_n "(cached) " >&6
4982else
4983  case $MKDIR in
4984  [\\/]* | ?:[\\/]*)
4985  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4986  ;;
4987  *)
4988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH
4990do
4991  IFS=$as_save_IFS
4992  test -z "$as_dir" && as_dir=.
4993    for ac_exec_ext in '' $ac_executable_extensions; do
4994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997    break 2
4998  fi
4999done
5000  done
5001IFS=$as_save_IFS
5002
5003  ;;
5004esac
5005fi
5006MKDIR=$ac_cv_path_MKDIR
5007if test -n "$MKDIR"; then
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5009$as_echo "$MKDIR" >&6; }
5010else
5011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016  test -n "$MKDIR" && break
5017done
5018
5019
5020    if test "x$MKDIR" = x; then
5021        if test "xmkdir" = x; then
5022          PROG_NAME=mkdir
5023        else
5024          PROG_NAME=mkdir
5025        fi
5026        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5027$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5028        as_fn_error $? "Cannot continue" "$LINENO" 5
5029    fi
5030
5031
5032
5033    for ac_prog in mktemp
5034do
5035  # Extract the first word of "$ac_prog", so it can be a program name with args.
5036set dummy $ac_prog; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_MKTEMP+:} false; then :
5040  $as_echo_n "(cached) " >&6
5041else
5042  case $MKTEMP in
5043  [\\/]* | ?:[\\/]*)
5044  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5045  ;;
5046  *)
5047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in $PATH
5049do
5050  IFS=$as_save_IFS
5051  test -z "$as_dir" && as_dir=.
5052    for ac_exec_ext in '' $ac_executable_extensions; do
5053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056    break 2
5057  fi
5058done
5059  done
5060IFS=$as_save_IFS
5061
5062  ;;
5063esac
5064fi
5065MKTEMP=$ac_cv_path_MKTEMP
5066if test -n "$MKTEMP"; then
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5068$as_echo "$MKTEMP" >&6; }
5069else
5070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074
5075  test -n "$MKTEMP" && break
5076done
5077
5078
5079    if test "x$MKTEMP" = x; then
5080        if test "xmktemp" = x; then
5081          PROG_NAME=mktemp
5082        else
5083          PROG_NAME=mktemp
5084        fi
5085        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5086$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5087        as_fn_error $? "Cannot continue" "$LINENO" 5
5088    fi
5089
5090
5091
5092    for ac_prog in mv
5093do
5094  # Extract the first word of "$ac_prog", so it can be a program name with args.
5095set dummy $ac_prog; ac_word=$2
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097$as_echo_n "checking for $ac_word... " >&6; }
5098if ${ac_cv_path_MV+:} false; then :
5099  $as_echo_n "(cached) " >&6
5100else
5101  case $MV in
5102  [\\/]* | ?:[\\/]*)
5103  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5104  ;;
5105  *)
5106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109  IFS=$as_save_IFS
5110  test -z "$as_dir" && as_dir=.
5111    for ac_exec_ext in '' $ac_executable_extensions; do
5112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115    break 2
5116  fi
5117done
5118  done
5119IFS=$as_save_IFS
5120
5121  ;;
5122esac
5123fi
5124MV=$ac_cv_path_MV
5125if test -n "$MV"; then
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5127$as_echo "$MV" >&6; }
5128else
5129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133
5134  test -n "$MV" && break
5135done
5136
5137
5138    if test "x$MV" = x; then
5139        if test "xmv" = x; then
5140          PROG_NAME=mv
5141        else
5142          PROG_NAME=mv
5143        fi
5144        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5145$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5146        as_fn_error $? "Cannot continue" "$LINENO" 5
5147    fi
5148
5149
5150
5151    for ac_prog in printf
5152do
5153  # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_PRINTF+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $PRINTF in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183PRINTF=$ac_cv_path_PRINTF
5184if test -n "$PRINTF"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5186$as_echo "$PRINTF" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193  test -n "$PRINTF" && break
5194done
5195
5196
5197    if test "x$PRINTF" = x; then
5198        if test "xprintf" = x; then
5199          PROG_NAME=printf
5200        else
5201          PROG_NAME=printf
5202        fi
5203        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5204$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5205        as_fn_error $? "Cannot continue" "$LINENO" 5
5206    fi
5207
5208
5209
5210    for ac_prog in rm
5211do
5212  # Extract the first word of "$ac_prog", so it can be a program name with args.
5213set dummy $ac_prog; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if ${ac_cv_path_RM+:} false; then :
5217  $as_echo_n "(cached) " >&6
5218else
5219  case $RM in
5220  [\\/]* | ?:[\\/]*)
5221  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5222  ;;
5223  *)
5224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227  IFS=$as_save_IFS
5228  test -z "$as_dir" && as_dir=.
5229    for ac_exec_ext in '' $ac_executable_extensions; do
5230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233    break 2
5234  fi
5235done
5236  done
5237IFS=$as_save_IFS
5238
5239  ;;
5240esac
5241fi
5242RM=$ac_cv_path_RM
5243if test -n "$RM"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5245$as_echo "$RM" >&6; }
5246else
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248$as_echo "no" >&6; }
5249fi
5250
5251
5252  test -n "$RM" && break
5253done
5254
5255
5256    if test "x$RM" = x; then
5257        if test "xrm" = x; then
5258          PROG_NAME=rm
5259        else
5260          PROG_NAME=rm
5261        fi
5262        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5263$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5264        as_fn_error $? "Cannot continue" "$LINENO" 5
5265    fi
5266
5267
5268
5269    for ac_prog in sh
5270do
5271  # Extract the first word of "$ac_prog", so it can be a program name with args.
5272set dummy $ac_prog; ac_word=$2
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274$as_echo_n "checking for $ac_word... " >&6; }
5275if ${ac_cv_path_SH+:} false; then :
5276  $as_echo_n "(cached) " >&6
5277else
5278  case $SH in
5279  [\\/]* | ?:[\\/]*)
5280  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5281  ;;
5282  *)
5283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286  IFS=$as_save_IFS
5287  test -z "$as_dir" && as_dir=.
5288    for ac_exec_ext in '' $ac_executable_extensions; do
5289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292    break 2
5293  fi
5294done
5295  done
5296IFS=$as_save_IFS
5297
5298  ;;
5299esac
5300fi
5301SH=$ac_cv_path_SH
5302if test -n "$SH"; then
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5304$as_echo "$SH" >&6; }
5305else
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
5308fi
5309
5310
5311  test -n "$SH" && break
5312done
5313
5314
5315    if test "x$SH" = x; then
5316        if test "xsh" = x; then
5317          PROG_NAME=sh
5318        else
5319          PROG_NAME=sh
5320        fi
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5322$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5323        as_fn_error $? "Cannot continue" "$LINENO" 5
5324    fi
5325
5326
5327
5328    for ac_prog in sort
5329do
5330  # Extract the first word of "$ac_prog", so it can be a program name with args.
5331set dummy $ac_prog; ac_word=$2
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333$as_echo_n "checking for $ac_word... " >&6; }
5334if ${ac_cv_path_SORT+:} false; then :
5335  $as_echo_n "(cached) " >&6
5336else
5337  case $SORT in
5338  [\\/]* | ?:[\\/]*)
5339  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5340  ;;
5341  *)
5342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357  ;;
5358esac
5359fi
5360SORT=$ac_cv_path_SORT
5361if test -n "$SORT"; then
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5363$as_echo "$SORT" >&6; }
5364else
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369
5370  test -n "$SORT" && break
5371done
5372
5373
5374    if test "x$SORT" = x; then
5375        if test "xsort" = x; then
5376          PROG_NAME=sort
5377        else
5378          PROG_NAME=sort
5379        fi
5380        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5381$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5382        as_fn_error $? "Cannot continue" "$LINENO" 5
5383    fi
5384
5385
5386
5387    for ac_prog in tail
5388do
5389  # Extract the first word of "$ac_prog", so it can be a program name with args.
5390set dummy $ac_prog; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_TAIL+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $TAIL in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419TAIL=$ac_cv_path_TAIL
5420if test -n "$TAIL"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5422$as_echo "$TAIL" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429  test -n "$TAIL" && break
5430done
5431
5432
5433    if test "x$TAIL" = x; then
5434        if test "xtail" = x; then
5435          PROG_NAME=tail
5436        else
5437          PROG_NAME=tail
5438        fi
5439        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5440$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5441        as_fn_error $? "Cannot continue" "$LINENO" 5
5442    fi
5443
5444
5445
5446    for ac_prog in tar
5447do
5448  # Extract the first word of "$ac_prog", so it can be a program name with args.
5449set dummy $ac_prog; ac_word=$2
5450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5451$as_echo_n "checking for $ac_word... " >&6; }
5452if ${ac_cv_path_TAR+:} false; then :
5453  $as_echo_n "(cached) " >&6
5454else
5455  case $TAR in
5456  [\\/]* | ?:[\\/]*)
5457  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5458  ;;
5459  *)
5460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5461for as_dir in $PATH
5462do
5463  IFS=$as_save_IFS
5464  test -z "$as_dir" && as_dir=.
5465    for ac_exec_ext in '' $ac_executable_extensions; do
5466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5467    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5469    break 2
5470  fi
5471done
5472  done
5473IFS=$as_save_IFS
5474
5475  ;;
5476esac
5477fi
5478TAR=$ac_cv_path_TAR
5479if test -n "$TAR"; then
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5481$as_echo "$TAR" >&6; }
5482else
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484$as_echo "no" >&6; }
5485fi
5486
5487
5488  test -n "$TAR" && break
5489done
5490
5491
5492    if test "x$TAR" = x; then
5493        if test "xtar" = x; then
5494          PROG_NAME=tar
5495        else
5496          PROG_NAME=tar
5497        fi
5498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5499$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5500        as_fn_error $? "Cannot continue" "$LINENO" 5
5501    fi
5502
5503
5504
5505    for ac_prog in tee
5506do
5507  # Extract the first word of "$ac_prog", so it can be a program name with args.
5508set dummy $ac_prog; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_TEE+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $TEE in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537TEE=$ac_cv_path_TEE
5538if test -n "$TEE"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5540$as_echo "$TEE" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547  test -n "$TEE" && break
5548done
5549
5550
5551    if test "x$TEE" = x; then
5552        if test "xtee" = x; then
5553          PROG_NAME=tee
5554        else
5555          PROG_NAME=tee
5556        fi
5557        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5558$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5559        as_fn_error $? "Cannot continue" "$LINENO" 5
5560    fi
5561
5562
5563
5564    for ac_prog in touch
5565do
5566  # Extract the first word of "$ac_prog", so it can be a program name with args.
5567set dummy $ac_prog; ac_word=$2
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569$as_echo_n "checking for $ac_word... " >&6; }
5570if ${ac_cv_path_TOUCH+:} false; then :
5571  $as_echo_n "(cached) " >&6
5572else
5573  case $TOUCH in
5574  [\\/]* | ?:[\\/]*)
5575  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5576  ;;
5577  *)
5578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579for as_dir in $PATH
5580do
5581  IFS=$as_save_IFS
5582  test -z "$as_dir" && as_dir=.
5583    for ac_exec_ext in '' $ac_executable_extensions; do
5584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587    break 2
5588  fi
5589done
5590  done
5591IFS=$as_save_IFS
5592
5593  ;;
5594esac
5595fi
5596TOUCH=$ac_cv_path_TOUCH
5597if test -n "$TOUCH"; then
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5599$as_echo "$TOUCH" >&6; }
5600else
5601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602$as_echo "no" >&6; }
5603fi
5604
5605
5606  test -n "$TOUCH" && break
5607done
5608
5609
5610    if test "x$TOUCH" = x; then
5611        if test "xtouch" = x; then
5612          PROG_NAME=touch
5613        else
5614          PROG_NAME=touch
5615        fi
5616        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5617$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5618        as_fn_error $? "Cannot continue" "$LINENO" 5
5619    fi
5620
5621
5622
5623    for ac_prog in tr
5624do
5625  # Extract the first word of "$ac_prog", so it can be a program name with args.
5626set dummy $ac_prog; ac_word=$2
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628$as_echo_n "checking for $ac_word... " >&6; }
5629if ${ac_cv_path_TR+:} false; then :
5630  $as_echo_n "(cached) " >&6
5631else
5632  case $TR in
5633  [\\/]* | ?:[\\/]*)
5634  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5635  ;;
5636  *)
5637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638for as_dir in $PATH
5639do
5640  IFS=$as_save_IFS
5641  test -z "$as_dir" && as_dir=.
5642    for ac_exec_ext in '' $ac_executable_extensions; do
5643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5644    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646    break 2
5647  fi
5648done
5649  done
5650IFS=$as_save_IFS
5651
5652  ;;
5653esac
5654fi
5655TR=$ac_cv_path_TR
5656if test -n "$TR"; then
5657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5658$as_echo "$TR" >&6; }
5659else
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661$as_echo "no" >&6; }
5662fi
5663
5664
5665  test -n "$TR" && break
5666done
5667
5668
5669    if test "x$TR" = x; then
5670        if test "xtr" = x; then
5671          PROG_NAME=tr
5672        else
5673          PROG_NAME=tr
5674        fi
5675        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5676$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5677        as_fn_error $? "Cannot continue" "$LINENO" 5
5678    fi
5679
5680
5681
5682    for ac_prog in uname
5683do
5684  # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_path_UNAME+:} false; then :
5689  $as_echo_n "(cached) " >&6
5690else
5691  case $UNAME in
5692  [\\/]* | ?:[\\/]*)
5693  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5694  ;;
5695  *)
5696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699  IFS=$as_save_IFS
5700  test -z "$as_dir" && as_dir=.
5701    for ac_exec_ext in '' $ac_executable_extensions; do
5702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705    break 2
5706  fi
5707done
5708  done
5709IFS=$as_save_IFS
5710
5711  ;;
5712esac
5713fi
5714UNAME=$ac_cv_path_UNAME
5715if test -n "$UNAME"; then
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5717$as_echo "$UNAME" >&6; }
5718else
5719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
5721fi
5722
5723
5724  test -n "$UNAME" && break
5725done
5726
5727
5728    if test "x$UNAME" = x; then
5729        if test "xuname" = x; then
5730          PROG_NAME=uname
5731        else
5732          PROG_NAME=uname
5733        fi
5734        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5735$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5736        as_fn_error $? "Cannot continue" "$LINENO" 5
5737    fi
5738
5739
5740
5741    for ac_prog in uniq
5742do
5743  # Extract the first word of "$ac_prog", so it can be a program name with args.
5744set dummy $ac_prog; ac_word=$2
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746$as_echo_n "checking for $ac_word... " >&6; }
5747if ${ac_cv_path_UNIQ+:} false; then :
5748  $as_echo_n "(cached) " >&6
5749else
5750  case $UNIQ in
5751  [\\/]* | ?:[\\/]*)
5752  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5753  ;;
5754  *)
5755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758  IFS=$as_save_IFS
5759  test -z "$as_dir" && as_dir=.
5760    for ac_exec_ext in '' $ac_executable_extensions; do
5761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764    break 2
5765  fi
5766done
5767  done
5768IFS=$as_save_IFS
5769
5770  ;;
5771esac
5772fi
5773UNIQ=$ac_cv_path_UNIQ
5774if test -n "$UNIQ"; then
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5776$as_echo "$UNIQ" >&6; }
5777else
5778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779$as_echo "no" >&6; }
5780fi
5781
5782
5783  test -n "$UNIQ" && break
5784done
5785
5786
5787    if test "x$UNIQ" = x; then
5788        if test "xuniq" = x; then
5789          PROG_NAME=uniq
5790        else
5791          PROG_NAME=uniq
5792        fi
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5794$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5795        as_fn_error $? "Cannot continue" "$LINENO" 5
5796    fi
5797
5798
5799
5800    for ac_prog in wc
5801do
5802  # Extract the first word of "$ac_prog", so it can be a program name with args.
5803set dummy $ac_prog; ac_word=$2
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805$as_echo_n "checking for $ac_word... " >&6; }
5806if ${ac_cv_path_WC+:} false; then :
5807  $as_echo_n "(cached) " >&6
5808else
5809  case $WC in
5810  [\\/]* | ?:[\\/]*)
5811  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5812  ;;
5813  *)
5814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815for as_dir in $PATH
5816do
5817  IFS=$as_save_IFS
5818  test -z "$as_dir" && as_dir=.
5819    for ac_exec_ext in '' $ac_executable_extensions; do
5820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5821    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5823    break 2
5824  fi
5825done
5826  done
5827IFS=$as_save_IFS
5828
5829  ;;
5830esac
5831fi
5832WC=$ac_cv_path_WC
5833if test -n "$WC"; then
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5835$as_echo "$WC" >&6; }
5836else
5837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838$as_echo "no" >&6; }
5839fi
5840
5841
5842  test -n "$WC" && break
5843done
5844
5845
5846    if test "x$WC" = x; then
5847        if test "xwc" = x; then
5848          PROG_NAME=wc
5849        else
5850          PROG_NAME=wc
5851        fi
5852        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5853$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5854        as_fn_error $? "Cannot continue" "$LINENO" 5
5855    fi
5856
5857
5858
5859    for ac_prog in which
5860do
5861  # Extract the first word of "$ac_prog", so it can be a program name with args.
5862set dummy $ac_prog; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_WHICH+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $WHICH in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891WHICH=$ac_cv_path_WHICH
5892if test -n "$WHICH"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5894$as_echo "$WHICH" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901  test -n "$WHICH" && break
5902done
5903
5904
5905    if test "x$WHICH" = x; then
5906        if test "xwhich" = x; then
5907          PROG_NAME=which
5908        else
5909          PROG_NAME=which
5910        fi
5911        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5912$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5913        as_fn_error $? "Cannot continue" "$LINENO" 5
5914    fi
5915
5916
5917
5918    for ac_prog in xargs
5919do
5920  # Extract the first word of "$ac_prog", so it can be a program name with args.
5921set dummy $ac_prog; ac_word=$2
5922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923$as_echo_n "checking for $ac_word... " >&6; }
5924if ${ac_cv_path_XARGS+:} false; then :
5925  $as_echo_n "(cached) " >&6
5926else
5927  case $XARGS in
5928  [\\/]* | ?:[\\/]*)
5929  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5930  ;;
5931  *)
5932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933for as_dir in $PATH
5934do
5935  IFS=$as_save_IFS
5936  test -z "$as_dir" && as_dir=.
5937    for ac_exec_ext in '' $ac_executable_extensions; do
5938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5939    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941    break 2
5942  fi
5943done
5944  done
5945IFS=$as_save_IFS
5946
5947  ;;
5948esac
5949fi
5950XARGS=$ac_cv_path_XARGS
5951if test -n "$XARGS"; then
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5953$as_echo "$XARGS" >&6; }
5954else
5955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956$as_echo "no" >&6; }
5957fi
5958
5959
5960  test -n "$XARGS" && break
5961done
5962
5963
5964    if test "x$XARGS" = x; then
5965        if test "xxargs" = x; then
5966          PROG_NAME=xargs
5967        else
5968          PROG_NAME=xargs
5969        fi
5970        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5971$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5972        as_fn_error $? "Cannot continue" "$LINENO" 5
5973    fi
5974
5975
5976
5977# Then required tools that require some special treatment.
5978for ac_prog in gawk mawk nawk awk
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_prog_AWK+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  if test -n "$AWK"; then
5988  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_prog_AWK="$ac_prog"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005fi
6006fi
6007AWK=$ac_cv_prog_AWK
6008if test -n "$AWK"; then
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6010$as_echo "$AWK" >&6; }
6011else
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017  test -n "$AWK" && break
6018done
6019
6020
6021    if test "x$AWK" = x; then
6022        if test "x" = x; then
6023          PROG_NAME=awk
6024        else
6025          PROG_NAME=
6026        fi
6027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6029        as_fn_error $? "Cannot continue" "$LINENO" 5
6030    fi
6031
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6033$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6034if ${ac_cv_path_GREP+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  if test -z "$GREP"; then
6038  ac_path_GREP_found=false
6039  # Loop through the user's path and test for each of PROGNAME-LIST
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_prog in grep ggrep; do
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6048      as_fn_executable_p "$ac_path_GREP" || continue
6049# Check for GNU ac_path_GREP and select it if it is found.
6050  # Check for GNU $ac_path_GREP
6051case `"$ac_path_GREP" --version 2>&1` in
6052*GNU*)
6053  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6054*)
6055  ac_count=0
6056  $as_echo_n 0123456789 >"conftest.in"
6057  while :
6058  do
6059    cat "conftest.in" "conftest.in" >"conftest.tmp"
6060    mv "conftest.tmp" "conftest.in"
6061    cp "conftest.in" "conftest.nl"
6062    $as_echo 'GREP' >> "conftest.nl"
6063    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6064    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6065    as_fn_arith $ac_count + 1 && ac_count=$as_val
6066    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6067      # Best one so far, save it but keep looking for a better one
6068      ac_cv_path_GREP="$ac_path_GREP"
6069      ac_path_GREP_max=$ac_count
6070    fi
6071    # 10*(2^10) chars as input seems more than enough
6072    test $ac_count -gt 10 && break
6073  done
6074  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6075esac
6076
6077      $ac_path_GREP_found && break 3
6078    done
6079  done
6080  done
6081IFS=$as_save_IFS
6082  if test -z "$ac_cv_path_GREP"; then
6083    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6084  fi
6085else
6086  ac_cv_path_GREP=$GREP
6087fi
6088
6089fi
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6091$as_echo "$ac_cv_path_GREP" >&6; }
6092 GREP="$ac_cv_path_GREP"
6093
6094
6095
6096    if test "x$GREP" = x; then
6097        if test "x" = x; then
6098          PROG_NAME=grep
6099        else
6100          PROG_NAME=
6101        fi
6102        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6103$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6104        as_fn_error $? "Cannot continue" "$LINENO" 5
6105    fi
6106
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6108$as_echo_n "checking for egrep... " >&6; }
6109if ${ac_cv_path_EGREP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6113   then ac_cv_path_EGREP="$GREP -E"
6114   else
6115     if test -z "$EGREP"; then
6116  ac_path_EGREP_found=false
6117  # Loop through the user's path and test for each of PROGNAME-LIST
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_prog in egrep; do
6124    for ac_exec_ext in '' $ac_executable_extensions; do
6125      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6126      as_fn_executable_p "$ac_path_EGREP" || continue
6127# Check for GNU ac_path_EGREP and select it if it is found.
6128  # Check for GNU $ac_path_EGREP
6129case `"$ac_path_EGREP" --version 2>&1` in
6130*GNU*)
6131  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6132*)
6133  ac_count=0
6134  $as_echo_n 0123456789 >"conftest.in"
6135  while :
6136  do
6137    cat "conftest.in" "conftest.in" >"conftest.tmp"
6138    mv "conftest.tmp" "conftest.in"
6139    cp "conftest.in" "conftest.nl"
6140    $as_echo 'EGREP' >> "conftest.nl"
6141    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6142    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6143    as_fn_arith $ac_count + 1 && ac_count=$as_val
6144    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6145      # Best one so far, save it but keep looking for a better one
6146      ac_cv_path_EGREP="$ac_path_EGREP"
6147      ac_path_EGREP_max=$ac_count
6148    fi
6149    # 10*(2^10) chars as input seems more than enough
6150    test $ac_count -gt 10 && break
6151  done
6152  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6153esac
6154
6155      $ac_path_EGREP_found && break 3
6156    done
6157  done
6158  done
6159IFS=$as_save_IFS
6160  if test -z "$ac_cv_path_EGREP"; then
6161    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6162  fi
6163else
6164  ac_cv_path_EGREP=$EGREP
6165fi
6166
6167   fi
6168fi
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6170$as_echo "$ac_cv_path_EGREP" >&6; }
6171 EGREP="$ac_cv_path_EGREP"
6172
6173
6174
6175    if test "x$EGREP" = x; then
6176        if test "x" = x; then
6177          PROG_NAME=egrep
6178        else
6179          PROG_NAME=
6180        fi
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6182$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6183        as_fn_error $? "Cannot continue" "$LINENO" 5
6184    fi
6185
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6187$as_echo_n "checking for fgrep... " >&6; }
6188if ${ac_cv_path_FGREP+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6192   then ac_cv_path_FGREP="$GREP -F"
6193   else
6194     if test -z "$FGREP"; then
6195  ac_path_FGREP_found=false
6196  # Loop through the user's path and test for each of PROGNAME-LIST
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_prog in fgrep; do
6203    for ac_exec_ext in '' $ac_executable_extensions; do
6204      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6205      as_fn_executable_p "$ac_path_FGREP" || continue
6206# Check for GNU ac_path_FGREP and select it if it is found.
6207  # Check for GNU $ac_path_FGREP
6208case `"$ac_path_FGREP" --version 2>&1` in
6209*GNU*)
6210  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6211*)
6212  ac_count=0
6213  $as_echo_n 0123456789 >"conftest.in"
6214  while :
6215  do
6216    cat "conftest.in" "conftest.in" >"conftest.tmp"
6217    mv "conftest.tmp" "conftest.in"
6218    cp "conftest.in" "conftest.nl"
6219    $as_echo 'FGREP' >> "conftest.nl"
6220    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6221    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6222    as_fn_arith $ac_count + 1 && ac_count=$as_val
6223    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6224      # Best one so far, save it but keep looking for a better one
6225      ac_cv_path_FGREP="$ac_path_FGREP"
6226      ac_path_FGREP_max=$ac_count
6227    fi
6228    # 10*(2^10) chars as input seems more than enough
6229    test $ac_count -gt 10 && break
6230  done
6231  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6232esac
6233
6234      $ac_path_FGREP_found && break 3
6235    done
6236  done
6237  done
6238IFS=$as_save_IFS
6239  if test -z "$ac_cv_path_FGREP"; then
6240    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6241  fi
6242else
6243  ac_cv_path_FGREP=$FGREP
6244fi
6245
6246   fi
6247fi
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6249$as_echo "$ac_cv_path_FGREP" >&6; }
6250 FGREP="$ac_cv_path_FGREP"
6251
6252
6253
6254    if test "x$FGREP" = x; then
6255        if test "x" = x; then
6256          PROG_NAME=fgrep
6257        else
6258          PROG_NAME=
6259        fi
6260        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6262        as_fn_error $? "Cannot continue" "$LINENO" 5
6263    fi
6264
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6266$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6267if ${ac_cv_path_SED+:} false; then :
6268  $as_echo_n "(cached) " >&6
6269else
6270            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6271     for ac_i in 1 2 3 4 5 6 7; do
6272       ac_script="$ac_script$as_nl$ac_script"
6273     done
6274     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6275     { ac_script=; unset ac_script;}
6276     if test -z "$SED"; then
6277  ac_path_SED_found=false
6278  # Loop through the user's path and test for each of PROGNAME-LIST
6279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282  IFS=$as_save_IFS
6283  test -z "$as_dir" && as_dir=.
6284    for ac_prog in sed gsed; do
6285    for ac_exec_ext in '' $ac_executable_extensions; do
6286      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6287      as_fn_executable_p "$ac_path_SED" || continue
6288# Check for GNU ac_path_SED and select it if it is found.
6289  # Check for GNU $ac_path_SED
6290case `"$ac_path_SED" --version 2>&1` in
6291*GNU*)
6292  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6293*)
6294  ac_count=0
6295  $as_echo_n 0123456789 >"conftest.in"
6296  while :
6297  do
6298    cat "conftest.in" "conftest.in" >"conftest.tmp"
6299    mv "conftest.tmp" "conftest.in"
6300    cp "conftest.in" "conftest.nl"
6301    $as_echo '' >> "conftest.nl"
6302    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6303    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6304    as_fn_arith $ac_count + 1 && ac_count=$as_val
6305    if test $ac_count -gt ${ac_path_SED_max-0}; then
6306      # Best one so far, save it but keep looking for a better one
6307      ac_cv_path_SED="$ac_path_SED"
6308      ac_path_SED_max=$ac_count
6309    fi
6310    # 10*(2^10) chars as input seems more than enough
6311    test $ac_count -gt 10 && break
6312  done
6313  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6314esac
6315
6316      $ac_path_SED_found && break 3
6317    done
6318  done
6319  done
6320IFS=$as_save_IFS
6321  if test -z "$ac_cv_path_SED"; then
6322    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6323  fi
6324else
6325  ac_cv_path_SED=$SED
6326fi
6327
6328fi
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6330$as_echo "$ac_cv_path_SED" >&6; }
6331 SED="$ac_cv_path_SED"
6332  rm -f conftest.sed
6333
6334
6335    if test "x$SED" = x; then
6336        if test "x" = x; then
6337          PROG_NAME=sed
6338        else
6339          PROG_NAME=
6340        fi
6341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6343        as_fn_error $? "Cannot continue" "$LINENO" 5
6344    fi
6345
6346
6347for ac_prog in nawk gawk awk
6348do
6349  # Extract the first word of "$ac_prog", so it can be a program name with args.
6350set dummy $ac_prog; ac_word=$2
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352$as_echo_n "checking for $ac_word... " >&6; }
6353if ${ac_cv_path_NAWK+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356  case $NAWK in
6357  [\\/]* | ?:[\\/]*)
6358  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6359  ;;
6360  *)
6361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364  IFS=$as_save_IFS
6365  test -z "$as_dir" && as_dir=.
6366    for ac_exec_ext in '' $ac_executable_extensions; do
6367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6368    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6370    break 2
6371  fi
6372done
6373  done
6374IFS=$as_save_IFS
6375
6376  ;;
6377esac
6378fi
6379NAWK=$ac_cv_path_NAWK
6380if test -n "$NAWK"; then
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6382$as_echo "$NAWK" >&6; }
6383else
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
6388
6389  test -n "$NAWK" && break
6390done
6391
6392
6393    if test "x$NAWK" = x; then
6394        if test "x" = x; then
6395          PROG_NAME=nawk
6396        else
6397          PROG_NAME=
6398        fi
6399        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6400$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6401        as_fn_error $? "Cannot continue" "$LINENO" 5
6402    fi
6403
6404
6405# Always force rm.
6406RM="$RM -f"
6407
6408# pwd behaves differently on various platforms and some don't support the -L flag.
6409# Always use the bash builtin pwd to get uniform behavior.
6410THEPWDCMD=pwd
6411
6412# These are not required on all platforms
6413# Extract the first word of "cygpath", so it can be a program name with args.
6414set dummy cygpath; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if ${ac_cv_path_CYGPATH+:} false; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $CYGPATH in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6432    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443CYGPATH=$ac_cv_path_CYGPATH
6444if test -n "$CYGPATH"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6446$as_echo "$CYGPATH" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453# Extract the first word of "readlink", so it can be a program name with args.
6454set dummy readlink; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if ${ac_cv_path_READLINK+:} false; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $READLINK in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6472    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483READLINK=$ac_cv_path_READLINK
6484if test -n "$READLINK"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6486$as_echo "$READLINK" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493# Extract the first word of "df", so it can be a program name with args.
6494set dummy df; ac_word=$2
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496$as_echo_n "checking for $ac_word... " >&6; }
6497if ${ac_cv_path_DF+:} false; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500  case $DF in
6501  [\\/]* | ?:[\\/]*)
6502  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6503  ;;
6504  *)
6505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510    for ac_exec_ext in '' $ac_executable_extensions; do
6511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6512    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514    break 2
6515  fi
6516done
6517  done
6518IFS=$as_save_IFS
6519
6520  ;;
6521esac
6522fi
6523DF=$ac_cv_path_DF
6524if test -n "$DF"; then
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6526$as_echo "$DF" >&6; }
6527else
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532
6533# Extract the first word of "SetFile", so it can be a program name with args.
6534set dummy SetFile; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_SETFILE+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $SETFILE in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563SETFILE=$ac_cv_path_SETFILE
6564if test -n "$SETFILE"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6566$as_echo "$SETFILE" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573
6574
6575# Now we can determine OpenJDK build and target platforms. This is required to
6576# have early on.
6577# Make sure we can run config.sub.
6578$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6579  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6580
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6582$as_echo_n "checking build system type... " >&6; }
6583if ${ac_cv_build+:} false; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  ac_build_alias=$build_alias
6587test "x$ac_build_alias" = x &&
6588  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6589test "x$ac_build_alias" = x &&
6590  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6591ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6592  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6596$as_echo "$ac_cv_build" >&6; }
6597case $ac_cv_build in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6600esac
6601build=$ac_cv_build
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_build
6604shift
6605build_cpu=$1
6606build_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610build_os=$*
6611IFS=$ac_save_IFS
6612case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6613
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6616$as_echo_n "checking host system type... " >&6; }
6617if ${ac_cv_host+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test "x$host_alias" = x; then
6621  ac_cv_host=$ac_cv_build
6622else
6623  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6625fi
6626
6627fi
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6629$as_echo "$ac_cv_host" >&6; }
6630case $ac_cv_host in
6631*-*-*) ;;
6632*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6633esac
6634host=$ac_cv_host
6635ac_save_IFS=$IFS; IFS='-'
6636set x $ac_cv_host
6637shift
6638host_cpu=$1
6639host_vendor=$2
6640shift; shift
6641# Remember, the first character of IFS is used to create $*,
6642# except with old shells:
6643host_os=$*
6644IFS=$ac_save_IFS
6645case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6646
6647
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6649$as_echo_n "checking target system type... " >&6; }
6650if ${ac_cv_target+:} false; then :
6651  $as_echo_n "(cached) " >&6
6652else
6653  if test "x$target_alias" = x; then
6654  ac_cv_target=$ac_cv_host
6655else
6656  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6657    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6658fi
6659
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6662$as_echo "$ac_cv_target" >&6; }
6663case $ac_cv_target in
6664*-*-*) ;;
6665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6666esac
6667target=$ac_cv_target
6668ac_save_IFS=$IFS; IFS='-'
6669set x $ac_cv_target
6670shift
6671target_cpu=$1
6672target_vendor=$2
6673shift; shift
6674# Remember, the first character of IFS is used to create $*,
6675# except with old shells:
6676target_os=$*
6677IFS=$ac_save_IFS
6678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6679
6680
6681# The aliases save the names the user supplied, while $host etc.
6682# will get canonicalized.
6683test -n "$target_alias" &&
6684  test "$program_prefix$program_suffix$program_transform_name" = \
6685    NONENONEs,x,x, &&
6686  program_prefix=${target_alias}-
6687
6688# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6689# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6690# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6691# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6692# to use the configure naming style.
6693
6694
6695
6696
6697
6698    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6699    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6700    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6701    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6702    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6703    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6704
6705
6706
6707    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6708
6709  case "$build_os" in
6710    *linux*)
6711      VAR_OS=linux
6712      VAR_OS_API=posix
6713      VAR_OS_ENV=linux
6714      ;;
6715    *solaris*)
6716      VAR_OS=solaris
6717      VAR_OS_API=posix
6718      VAR_OS_ENV=solaris
6719      ;;
6720    *darwin*)
6721      VAR_OS=macosx
6722      VAR_OS_API=posix
6723      VAR_OS_ENV=macosx
6724      ;;
6725    *bsd*)
6726      VAR_OS=bsd
6727      VAR_OS_API=posix
6728      VAR_OS_ENV=bsd
6729      ;;
6730    *cygwin*)
6731      VAR_OS=windows
6732      VAR_OS_API=winapi
6733      VAR_OS_ENV=windows.cygwin
6734      ;;
6735    *mingw*)
6736      VAR_OS=windows
6737      VAR_OS_API=winapi
6738      VAR_OS_ENV=windows.msys
6739      ;;
6740    *)
6741      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6742      ;;
6743  esac
6744
6745
6746  # First argument is the cpu name from the trip/quad
6747  case "$build_cpu" in
6748    x86_64)
6749      VAR_CPU=x86_64
6750      VAR_CPU_ARCH=x86
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=little
6753      ;;
6754    i?86)
6755      VAR_CPU=x86
6756      VAR_CPU_ARCH=x86
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=little
6759      ;;
6760    arm*)
6761      VAR_CPU=arm
6762      VAR_CPU_ARCH=arm
6763      VAR_CPU_BITS=32
6764      VAR_CPU_ENDIAN=little
6765      ;;
6766    powerpc)
6767      VAR_CPU=ppc
6768      VAR_CPU_ARCH=ppc
6769      VAR_CPU_BITS=32
6770      VAR_CPU_ENDIAN=big
6771       ;;
6772    powerpc64)
6773      VAR_CPU=ppc64
6774      VAR_CPU_ARCH=ppc
6775      VAR_CPU_BITS=64
6776      VAR_CPU_ENDIAN=big
6777       ;;
6778    s390)
6779      VAR_CPU=s390
6780      VAR_CPU_ARCH=s390
6781      VAR_CPU_BITS=32
6782      VAR_CPU_ENDIAN=big
6783       ;;
6784    s390x)
6785      VAR_CPU=s390x
6786      VAR_CPU_ARCH=s390
6787      VAR_CPU_BITS=64
6788      VAR_CPU_ENDIAN=big
6789       ;;
6790    sparc)
6791      VAR_CPU=sparc
6792      VAR_CPU_ARCH=sparc
6793      VAR_CPU_BITS=32
6794      VAR_CPU_ENDIAN=big
6795       ;;
6796    sparcv9)
6797      VAR_CPU=sparcv9
6798      VAR_CPU_ARCH=sparc
6799      VAR_CPU_BITS=64
6800      VAR_CPU_ENDIAN=big
6801       ;;
6802    *)
6803      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6804      ;;
6805  esac
6806
6807    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6808    OPENJDK_BUILD_OS="$VAR_OS"
6809    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6810    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6811    OPENJDK_BUILD_CPU="$VAR_CPU"
6812    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6813    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6814    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6815
6816
6817
6818
6819
6820
6821
6822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6823$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6825$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6826
6827    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6828
6829  case "$host_os" in
6830    *linux*)
6831      VAR_OS=linux
6832      VAR_OS_API=posix
6833      VAR_OS_ENV=linux
6834      ;;
6835    *solaris*)
6836      VAR_OS=solaris
6837      VAR_OS_API=posix
6838      VAR_OS_ENV=solaris
6839      ;;
6840    *darwin*)
6841      VAR_OS=macosx
6842      VAR_OS_API=posix
6843      VAR_OS_ENV=macosx
6844      ;;
6845    *bsd*)
6846      VAR_OS=bsd
6847      VAR_OS_API=posix
6848      VAR_OS_ENV=bsd
6849      ;;
6850    *cygwin*)
6851      VAR_OS=windows
6852      VAR_OS_API=winapi
6853      VAR_OS_ENV=windows.cygwin
6854      ;;
6855    *mingw*)
6856      VAR_OS=windows
6857      VAR_OS_API=winapi
6858      VAR_OS_ENV=windows.msys
6859      ;;
6860    *)
6861      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6862      ;;
6863  esac
6864
6865
6866  # First argument is the cpu name from the trip/quad
6867  case "$host_cpu" in
6868    x86_64)
6869      VAR_CPU=x86_64
6870      VAR_CPU_ARCH=x86
6871      VAR_CPU_BITS=64
6872      VAR_CPU_ENDIAN=little
6873      ;;
6874    i?86)
6875      VAR_CPU=x86
6876      VAR_CPU_ARCH=x86
6877      VAR_CPU_BITS=32
6878      VAR_CPU_ENDIAN=little
6879      ;;
6880    arm*)
6881      VAR_CPU=arm
6882      VAR_CPU_ARCH=arm
6883      VAR_CPU_BITS=32
6884      VAR_CPU_ENDIAN=little
6885      ;;
6886    powerpc)
6887      VAR_CPU=ppc
6888      VAR_CPU_ARCH=ppc
6889      VAR_CPU_BITS=32
6890      VAR_CPU_ENDIAN=big
6891       ;;
6892    powerpc64)
6893      VAR_CPU=ppc64
6894      VAR_CPU_ARCH=ppc
6895      VAR_CPU_BITS=64
6896      VAR_CPU_ENDIAN=big
6897       ;;
6898    s390)
6899      VAR_CPU=s390
6900      VAR_CPU_ARCH=s390
6901      VAR_CPU_BITS=32
6902      VAR_CPU_ENDIAN=big
6903       ;;
6904    s390x)
6905      VAR_CPU=s390x
6906      VAR_CPU_ARCH=s390
6907      VAR_CPU_BITS=64
6908      VAR_CPU_ENDIAN=big
6909       ;;
6910    sparc)
6911      VAR_CPU=sparc
6912      VAR_CPU_ARCH=sparc
6913      VAR_CPU_BITS=32
6914      VAR_CPU_ENDIAN=big
6915       ;;
6916    sparcv9)
6917      VAR_CPU=sparcv9
6918      VAR_CPU_ARCH=sparc
6919      VAR_CPU_BITS=64
6920      VAR_CPU_ENDIAN=big
6921       ;;
6922    *)
6923      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6924      ;;
6925  esac
6926
6927    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6928    OPENJDK_TARGET_OS="$VAR_OS"
6929    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6930    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6931    OPENJDK_TARGET_CPU="$VAR_CPU"
6932    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6933    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6934    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6935
6936
6937
6938
6939
6940
6941
6942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6943$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6945$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6946
6947
6948
6949# Check whether --with-target-bits was given.
6950if test "${with_target_bits+set}" = set; then :
6951  withval=$with_target_bits;
6952fi
6953
6954
6955  # We have three types of compiles:
6956  # native  == normal compilation, target system == build system
6957  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6958  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6959  #
6960  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6961    # We're doing a proper cross-compilation
6962    COMPILE_TYPE="cross"
6963  else
6964    COMPILE_TYPE="native"
6965  fi
6966
6967  if test "x$with_target_bits" != x; then
6968    if test "x$COMPILE_TYPE" = "xcross"; then
6969      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6970    fi
6971
6972    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6973      # A reduced build is requested
6974      COMPILE_TYPE="reduced"
6975      OPENJDK_TARGET_CPU_BITS=32
6976      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6977        OPENJDK_TARGET_CPU=x86
6978      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6979        OPENJDK_TARGET_CPU=sparc
6980      else
6981        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6982      fi
6983    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6984      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
6985    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6986      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6987$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6988    else
6989      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6990    fi
6991  fi
6992
6993
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6995$as_echo_n "checking compilation type... " >&6; }
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6997$as_echo "$COMPILE_TYPE" >&6; }
6998
6999
7000    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7001       REQUIRED_OS_NAME=SunOS
7002       REQUIRED_OS_VERSION=5.10
7003    fi
7004    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7005       REQUIRED_OS_NAME=Linux
7006       REQUIRED_OS_VERSION=2.6
7007    fi
7008    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7009        REQUIRED_OS_NAME=Windows
7010        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7011            REQUIRED_OS_VERSION=5.2
7012        else
7013            REQUIRED_OS_VERSION=5.1
7014        fi
7015    fi
7016    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7017        REQUIRED_OS_NAME=Darwin
7018        REQUIRED_OS_VERSION=11.2
7019    fi
7020
7021
7022
7023
7024
7025    # Also store the legacy naming of the cpu.
7026    # Ie i586 and amd64 instead of x86 and x86_64
7027    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7028    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7029      OPENJDK_TARGET_CPU_LEGACY="i586"
7030    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7031      # On all platforms except MacOSX replace x86_64 with amd64.
7032      OPENJDK_TARGET_CPU_LEGACY="amd64"
7033    fi
7034
7035
7036    # And the second legacy naming of the cpu.
7037    # Ie i386 and amd64 instead of x86 and x86_64.
7038    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7039    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7040      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7041    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7042      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7043    fi
7044
7045
7046    # This is the name of the cpu (but using i386 and amd64 instead of
7047    # x86 and x86_64, respectively), preceeded by a /, to be used when
7048    # locating libraries. On macosx, it's empty, though.
7049    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7050    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051        OPENJDK_TARGET_CPU_LIBDIR=""
7052    fi
7053
7054
7055    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7056    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7057    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7058    OPENJDK_TARGET_CPU_ISADIR=""
7059    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7060      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7061          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7062      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7063          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7064      fi
7065    fi
7066
7067
7068    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7069    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7070    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7071      # On linux only, we replace x86 with i386.
7072      OPENJDK_TARGET_CPU_OSARCH="i386"
7073    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7074      # On all platforms except macosx, we replace x86_64 with amd64.
7075      OPENJDK_TARGET_CPU_OSARCH="amd64"
7076    fi
7077
7078
7079    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7080    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7081      OPENJDK_TARGET_CPU_JLI="i386"
7082    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7083      # On all platforms except macosx, we replace x86_64 with amd64.
7084      OPENJDK_TARGET_CPU_JLI="amd64"
7085    fi
7086    # Now setup the -D flags for building libjli.
7087    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7088    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7089      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7090        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7091      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7092        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7093      fi
7094    fi
7095
7096
7097    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7098    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7099        OPENJDK_TARGET_OS_API_DIR="solaris"
7100    fi
7101    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7102        OPENJDK_TARGET_OS_API_DIR="windows"
7103    fi
7104
7105
7106    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7107        A_LP64="LP64:="
7108        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7109        # unpack200.exe
7110        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7111            ADD_LP64="-D_LP64=1"
7112        fi
7113    fi
7114    LP64=$A_LP64
7115
7116
7117    if test "x$COMPILE_TYPE" = "xcross"; then
7118      # FIXME: ... or should this include reduced builds..?
7119      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7120    else
7121      DEFINE_CROSS_COMPILE_ARCH=""
7122    fi
7123
7124
7125    # ZERO_ARCHDEF is used to enable architecture-specific code
7126    case "${OPENJDK_TARGET_CPU}" in
7127      ppc*)    ZERO_ARCHDEF=PPC   ;;
7128      s390*)   ZERO_ARCHDEF=S390  ;;
7129      sparc*)  ZERO_ARCHDEF=SPARC ;;
7130      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7131      x86)     ZERO_ARCHDEF=IA32  ;;
7132      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7133    esac
7134
7135
7136
7137
7138
7139# Continue setting up basic stuff. Most remaining code require fundamental tools.
7140
7141# Locate the directory of this script.
7142SCRIPT="$0"
7143AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7144
7145# Where is the source? It is located two levels above the configure script.
7146CURDIR="$PWD"
7147cd "$AUTOCONF_DIR/../.."
7148SRC_ROOT="`$THEPWDCMD -L`"
7149
7150if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7151  PATH_SEP=";"
7152
7153  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7154  if test $SRC_ROOT_LENGTH -gt 100; then
7155      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7156  fi
7157
7158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7160$as_echo_n "checking cygwin release... " >&6; }
7161    CYGWIN_VERSION=`$UNAME -r`
7162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7163$as_echo "$CYGWIN_VERSION" >&6; }
7164    WINDOWS_ENV_VENDOR='cygwin'
7165    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7166
7167    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7168    if test "x$CYGWIN_VERSION_OK" = x; then
7169      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
7170$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
7171      as_fn_error $? "Cannot continue" "$LINENO" 5
7172    fi
7173    if test "x$CYGPATH" = x; then
7174        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7175    fi
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7177$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7178    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7179    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7180    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7181    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7183$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7184    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7185    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7186    if test "x$test_cygdrive_prefix" = x; then
7187        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7188    fi
7189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7191$as_echo_n "checking msys release... " >&6; }
7192    MSYS_VERSION=`$UNAME -r`
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7194$as_echo "$MSYS_VERSION" >&6; }
7195
7196    WINDOWS_ENV_VENDOR='msys'
7197    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7198
7199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7200$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7201    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7202    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7203
7204  windows_path="$MSYS_ROOT_PATH"
7205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7206    unix_path=`$CYGPATH -u "$windows_path"`
7207    MSYS_ROOT_PATH="$unix_path"
7208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7210    MSYS_ROOT_PATH="$unix_path"
7211  fi
7212
7213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7214$as_echo "$MSYS_ROOT_PATH" >&6; }
7215    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7216  else
7217    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7218  fi
7219
7220  # Test if windows or unix (cygwin/msys) find is first in path.
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7222$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7223  FIND_BINARY_OUTPUT=`find --version 2>&1`
7224  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7226$as_echo "unix style" >&6; }
7227  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7229$as_echo "Windows" >&6; }
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7231$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7232    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
7233$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7234    as_fn_error $? "Cannot continue" "$LINENO" 5
7235  else
7236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7237$as_echo "unknown" >&6; }
7238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7239$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7240  fi
7241
7242else
7243  PATH_SEP=":"
7244fi
7245
7246
7247
7248cd "$CURDIR"
7249
7250
7251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7252
7253  # Input might be given as Windows format, start by converting to
7254  # unix format.
7255  path="$SRC_ROOT"
7256  new_path=`$CYGPATH -u "$path"`
7257
7258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7261  # "foo.exe" is OK but "foo" is an error.
7262  #
7263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7264  # It is also a way to make sure we got the proper file name for the real test later on.
7265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7266  if test "x$test_shortpath" = x; then
7267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7268$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7269    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7270  fi
7271
7272  # Call helper function which possibly converts this using DOS-style short mode.
7273  # If so, the updated path is stored in $new_path.
7274
7275  input_path="$new_path"
7276  # Check if we need to convert this using DOS-style short mode. If the path
7277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7278  # take no chances and rewrite it.
7279  # Note: m4 eats our [], so we need to use [ and ] instead.
7280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7281  if test "x$has_forbidden_chars" != x; then
7282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7286      # Going to short mode and back again did indeed matter. Since short mode is
7287      # case insensitive, let's make it lowercase to improve readability.
7288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7289      # Now convert it back to Unix-stile (cygpath)
7290      input_path=`$CYGPATH -u "$shortmode_path"`
7291      new_path="$input_path"
7292    fi
7293  fi
7294
7295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7296  if test "x$test_cygdrive_prefix" = x; then
7297    # As a simple fix, exclude /usr/bin since it's not a real path.
7298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7300      # a path prefixed by /cygdrive for fixpath to work.
7301      new_path="$CYGWIN_ROOT_PATH$input_path"
7302    fi
7303  fi
7304
7305
7306  if test "x$path" != "x$new_path"; then
7307    SRC_ROOT="$new_path"
7308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7309$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7310  fi
7311
7312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7313
7314  path="$SRC_ROOT"
7315  has_colon=`$ECHO $path | $GREP ^.:`
7316  new_path="$path"
7317  if test "x$has_colon" = x; then
7318    # Not in mixed or Windows style, start by that.
7319    new_path=`cmd //c echo $path`
7320  fi
7321
7322
7323  input_path="$new_path"
7324  # Check if we need to convert this using DOS-style short mode. If the path
7325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7326  # take no chances and rewrite it.
7327  # Note: m4 eats our [], so we need to use [ and ] instead.
7328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7329  if test "x$has_forbidden_chars" != x; then
7330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7332  fi
7333
7334
7335  windows_path="$new_path"
7336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7337    unix_path=`$CYGPATH -u "$windows_path"`
7338    new_path="$unix_path"
7339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7341    new_path="$unix_path"
7342  fi
7343
7344  if test "x$path" != "x$new_path"; then
7345    SRC_ROOT="$new_path"
7346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7347$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7348  fi
7349
7350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7352
7353  else
7354    # We're on a posix platform. Hooray! :)
7355    path="$SRC_ROOT"
7356    has_space=`$ECHO "$path" | $GREP " "`
7357    if test "x$has_space" != x; then
7358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7359$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7360      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7361    fi
7362
7363    # Use eval to expand a potential ~
7364    eval path="$path"
7365    if test ! -f "$path" && test ! -d "$path"; then
7366      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7367    fi
7368
7369    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7370  fi
7371
7372
7373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7374
7375  # Input might be given as Windows format, start by converting to
7376  # unix format.
7377  path="$CURDIR"
7378  new_path=`$CYGPATH -u "$path"`
7379
7380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7383  # "foo.exe" is OK but "foo" is an error.
7384  #
7385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7386  # It is also a way to make sure we got the proper file name for the real test later on.
7387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7388  if test "x$test_shortpath" = x; then
7389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7390$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7391    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7392  fi
7393
7394  # Call helper function which possibly converts this using DOS-style short mode.
7395  # If so, the updated path is stored in $new_path.
7396
7397  input_path="$new_path"
7398  # Check if we need to convert this using DOS-style short mode. If the path
7399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7400  # take no chances and rewrite it.
7401  # Note: m4 eats our [], so we need to use [ and ] instead.
7402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7403  if test "x$has_forbidden_chars" != x; then
7404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7408      # Going to short mode and back again did indeed matter. Since short mode is
7409      # case insensitive, let's make it lowercase to improve readability.
7410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7411      # Now convert it back to Unix-stile (cygpath)
7412      input_path=`$CYGPATH -u "$shortmode_path"`
7413      new_path="$input_path"
7414    fi
7415  fi
7416
7417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7418  if test "x$test_cygdrive_prefix" = x; then
7419    # As a simple fix, exclude /usr/bin since it's not a real path.
7420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7422      # a path prefixed by /cygdrive for fixpath to work.
7423      new_path="$CYGWIN_ROOT_PATH$input_path"
7424    fi
7425  fi
7426
7427
7428  if test "x$path" != "x$new_path"; then
7429    CURDIR="$new_path"
7430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7431$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7432  fi
7433
7434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7435
7436  path="$CURDIR"
7437  has_colon=`$ECHO $path | $GREP ^.:`
7438  new_path="$path"
7439  if test "x$has_colon" = x; then
7440    # Not in mixed or Windows style, start by that.
7441    new_path=`cmd //c echo $path`
7442  fi
7443
7444
7445  input_path="$new_path"
7446  # Check if we need to convert this using DOS-style short mode. If the path
7447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7448  # take no chances and rewrite it.
7449  # Note: m4 eats our [], so we need to use [ and ] instead.
7450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7451  if test "x$has_forbidden_chars" != x; then
7452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7454  fi
7455
7456
7457  windows_path="$new_path"
7458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7459    unix_path=`$CYGPATH -u "$windows_path"`
7460    new_path="$unix_path"
7461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7463    new_path="$unix_path"
7464  fi
7465
7466  if test "x$path" != "x$new_path"; then
7467    CURDIR="$new_path"
7468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7469$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7470  fi
7471
7472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7474
7475  else
7476    # We're on a posix platform. Hooray! :)
7477    path="$CURDIR"
7478    has_space=`$ECHO "$path" | $GREP " "`
7479    if test "x$has_space" != x; then
7480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7481$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7482      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7483    fi
7484
7485    # Use eval to expand a potential ~
7486    eval path="$path"
7487    if test ! -f "$path" && test ! -d "$path"; then
7488      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7489    fi
7490
7491    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7492  fi
7493
7494
7495if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7496    # Add extra search paths on solaris for utilities like ar and as etc...
7497    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7498fi
7499
7500# You can force the sys-root if the sys-root encoded into the cross compiler tools
7501# is not correct.
7502
7503# Check whether --with-sys-root was given.
7504if test "${with_sys_root+set}" = set; then :
7505  withval=$with_sys_root;
7506fi
7507
7508
7509if test "x$with_sys_root" != x; then
7510  SYS_ROOT=$with_sys_root
7511else
7512  SYS_ROOT=/
7513fi
7514
7515
7516
7517# Check whether --with-tools-dir was given.
7518if test "${with_tools_dir+set}" = set; then :
7519  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7520
7521fi
7522
7523
7524
7525# Check whether --with-devkit was given.
7526if test "${with_devkit+set}" = set; then :
7527  withval=$with_devkit;
7528    if test "x$with_sys_root" != x; then
7529      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7530    fi
7531
7532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7533
7534  # Input might be given as Windows format, start by converting to
7535  # unix format.
7536  path="$with_devkit"
7537  new_path=`$CYGPATH -u "$path"`
7538
7539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7542  # "foo.exe" is OK but "foo" is an error.
7543  #
7544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7545  # It is also a way to make sure we got the proper file name for the real test later on.
7546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7547  if test "x$test_shortpath" = x; then
7548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7549$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7550    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7551  fi
7552
7553  # Call helper function which possibly converts this using DOS-style short mode.
7554  # If so, the updated path is stored in $new_path.
7555
7556  input_path="$new_path"
7557  # Check if we need to convert this using DOS-style short mode. If the path
7558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7559  # take no chances and rewrite it.
7560  # Note: m4 eats our [], so we need to use [ and ] instead.
7561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7562  if test "x$has_forbidden_chars" != x; then
7563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7567      # Going to short mode and back again did indeed matter. Since short mode is
7568      # case insensitive, let's make it lowercase to improve readability.
7569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7570      # Now convert it back to Unix-stile (cygpath)
7571      input_path=`$CYGPATH -u "$shortmode_path"`
7572      new_path="$input_path"
7573    fi
7574  fi
7575
7576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7577  if test "x$test_cygdrive_prefix" = x; then
7578    # As a simple fix, exclude /usr/bin since it's not a real path.
7579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7581      # a path prefixed by /cygdrive for fixpath to work.
7582      new_path="$CYGWIN_ROOT_PATH$input_path"
7583    fi
7584  fi
7585
7586
7587  if test "x$path" != "x$new_path"; then
7588    with_devkit="$new_path"
7589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7590$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7591  fi
7592
7593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7594
7595  path="$with_devkit"
7596  has_colon=`$ECHO $path | $GREP ^.:`
7597  new_path="$path"
7598  if test "x$has_colon" = x; then
7599    # Not in mixed or Windows style, start by that.
7600    new_path=`cmd //c echo $path`
7601  fi
7602
7603
7604  input_path="$new_path"
7605  # Check if we need to convert this using DOS-style short mode. If the path
7606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7607  # take no chances and rewrite it.
7608  # Note: m4 eats our [], so we need to use [ and ] instead.
7609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7610  if test "x$has_forbidden_chars" != x; then
7611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7613  fi
7614
7615
7616  windows_path="$new_path"
7617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7618    unix_path=`$CYGPATH -u "$windows_path"`
7619    new_path="$unix_path"
7620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7622    new_path="$unix_path"
7623  fi
7624
7625  if test "x$path" != "x$new_path"; then
7626    with_devkit="$new_path"
7627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7628$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7629  fi
7630
7631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7633
7634  else
7635    # We're on a posix platform. Hooray! :)
7636    path="$with_devkit"
7637    has_space=`$ECHO "$path" | $GREP " "`
7638    if test "x$has_space" != x; then
7639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7640$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7641      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7642    fi
7643
7644    # Use eval to expand a potential ~
7645    eval path="$path"
7646    if test ! -f "$path" && test ! -d "$path"; then
7647      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7648    fi
7649
7650    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7651  fi
7652
7653
7654  if test "x$TOOLS_DIR" = x; then
7655    TOOLS_DIR="$with_devkit/bin"
7656  else
7657    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7658  fi
7659
7660    if test -d "$with_devkit/$host_alias/libc"; then
7661      SYS_ROOT=$with_devkit/$host_alias/libc
7662    elif test -d "$with_devkit/$host/sys-root"; then
7663      SYS_ROOT=$with_devkit/$host/sys-root
7664    fi
7665
7666fi
7667
7668
7669
7670# Setup default logging of stdout and stderr to build.log in the output root.
7671BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7672BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7673BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7674
7675
7676
7677
7678
7679# Check if it's a pure open build or if custom sources are to be used.
7680
7681  # Check whether --enable-openjdk-only was given.
7682if test "${enable_openjdk_only+set}" = set; then :
7683  enableval=$enable_openjdk_only;
7684else
7685  enable_openjdk_only="no"
7686fi
7687
7688
7689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7690$as_echo_n "checking for presence of closed sources... " >&6; }
7691  if test -d "$SRC_ROOT/jdk/src/closed"; then
7692    CLOSED_SOURCE_PRESENT=yes
7693  else
7694    CLOSED_SOURCE_PRESENT=no
7695  fi
7696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7697$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7698
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7700$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7701  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7703$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7704
7705  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7706    OPENJDK=true
7707    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7708      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7709$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7710    fi
7711  else
7712    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7713      OPENJDK=true
7714    else
7715      OPENJDK=false
7716    fi
7717  fi
7718
7719  if test "x$OPENJDK" = "xtrue"; then
7720    SET_OPENJDK="OPENJDK=true"
7721  fi
7722
7723
7724
7725
7726# These are needed to be able to create a configuration name (and thus the output directory)
7727
7728###############################################################################
7729#
7730# Check which variant of the JDK that we want to build.
7731# Currently we have:
7732#    normal:   standard edition
7733# but the custom make system may add other variants
7734#
7735# Effectively the JDK variant gives a name to a specific set of
7736# modules to compile into the JDK. In the future, these modules
7737# might even be Jigsaw modules.
7738#
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7740$as_echo_n "checking which variant of the JDK to build... " >&6; }
7741
7742# Check whether --with-jdk-variant was given.
7743if test "${with_jdk_variant+set}" = set; then :
7744  withval=$with_jdk_variant;
7745fi
7746
7747
7748if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7749    JDK_VARIANT="normal"
7750else
7751    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7752fi
7753
7754
7755
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7757$as_echo "$JDK_VARIANT" >&6; }
7758
7759
7760
7761###############################################################################
7762#
7763# Check which variants of the JVM that we want to build.
7764# Currently we have:
7765#    server: normal interpreter and a tiered C1/C2 compiler
7766#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7767#    minimal1: reduced form of client with optional VM services and features stripped out
7768#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7769#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7770#    zero: no machine code interpreter, no compiler
7771#    zeroshark: zero interpreter and shark/llvm compiler backend
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7773$as_echo_n "checking which variants of the JVM to build... " >&6; }
7774
7775# Check whether --with-jvm-variants was given.
7776if test "${with_jvm_variants+set}" = set; then :
7777  withval=$with_jvm_variants;
7778fi
7779
7780
7781if test "x$with_jvm_variants" = x; then
7782     with_jvm_variants="server"
7783fi
7784
7785JVM_VARIANTS=",$with_jvm_variants,"
7786TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7787
7788if test "x$TEST_VARIANTS" != "x,"; then
7789   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7790fi
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7792$as_echo "$with_jvm_variants" >&6; }
7793
7794JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7795JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7796JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7797JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7798JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7799JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7800
7801if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7802    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7803        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7804    fi
7805fi
7806if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7807    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7808        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7809    fi
7810fi
7811if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7812    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7813        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7814    fi
7815fi
7816
7817# Replace the commas with AND for use in the build directory name.
7818ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7819COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7820if test "x$COUNT_VARIANTS" != "x,1"; then
7821    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7822else
7823    BUILDING_MULTIPLE_JVM_VARIANTS=no
7824fi
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834INCLUDE_SA=true
7835if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7836    INCLUDE_SA=false
7837fi
7838if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7839    INCLUDE_SA=false
7840fi
7841
7842
7843if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7844   MACOSX_UNIVERSAL="true"
7845fi
7846
7847
7848
7849
7850
7851###############################################################################
7852#
7853# Set the debug level
7854#    release: no debug information, all optimizations, no asserts.
7855#    fastdebug: debug information (-g), all optimizations, all asserts
7856#    slowdebug: debug information (-g), no optimizations, all asserts
7857#
7858DEBUG_LEVEL="release"
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7860$as_echo_n "checking which debug level to use... " >&6; }
7861# Check whether --enable-debug was given.
7862if test "${enable_debug+set}" = set; then :
7863  enableval=$enable_debug;
7864        ENABLE_DEBUG="${enableval}"
7865        DEBUG_LEVEL="fastdebug"
7866
7867else
7868  ENABLE_DEBUG="no"
7869fi
7870
7871
7872
7873# Check whether --with-debug-level was given.
7874if test "${with_debug_level+set}" = set; then :
7875  withval=$with_debug_level;
7876        DEBUG_LEVEL="${withval}"
7877        if test "x$ENABLE_DEBUG" = xyes; then
7878			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7879        fi
7880
7881fi
7882
7883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7884$as_echo "$DEBUG_LEVEL" >&6; }
7885
7886if test "x$DEBUG_LEVEL" != xrelease && \
7887   test "x$DEBUG_LEVEL" != xfastdebug && \
7888   test "x$DEBUG_LEVEL" != xslowdebug; then
7889   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7890fi
7891
7892
7893###############################################################################
7894#
7895# Setup legacy vars/targets and new vars to deal with different debug levels.
7896#
7897
7898case $DEBUG_LEVEL in
7899      release )
7900          VARIANT="OPT"
7901          FASTDEBUG="false"
7902          DEBUG_CLASSFILES="false"
7903          BUILD_VARIANT_RELEASE=""
7904          HOTSPOT_DEBUG_LEVEL="product"
7905          HOTSPOT_EXPORT="product"
7906           ;;
7907      fastdebug )
7908          VARIANT="DBG"
7909          FASTDEBUG="true"
7910          DEBUG_CLASSFILES="true"
7911          BUILD_VARIANT_RELEASE="-fastdebug"
7912          HOTSPOT_DEBUG_LEVEL="fastdebug"
7913          HOTSPOT_EXPORT="fastdebug"
7914           ;;
7915      slowdebug )
7916          VARIANT="DBG"
7917          FASTDEBUG="false"
7918          DEBUG_CLASSFILES="true"
7919          BUILD_VARIANT_RELEASE="-debug"
7920          HOTSPOT_DEBUG_LEVEL="jvmg"
7921          HOTSPOT_EXPORT="debug"
7922           ;;
7923esac
7924
7925#####
7926# Generate the legacy makefile targets for hotspot.
7927# The hotspot api for selecting the build artifacts, really, needs to be improved.
7928# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7929# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7930# But until then ...
7931HOTSPOT_TARGET=""
7932
7933if test "x$JVM_VARIANT_SERVER" = xtrue; then
7934    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7935fi
7936
7937if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7938    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7939fi
7940
7941if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7942    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7943fi
7944
7945if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7946    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7947fi
7948
7949if test "x$JVM_VARIANT_ZERO" = xtrue; then
7950    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7951fi
7952
7953if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7954    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7955fi
7956
7957HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7958
7959# On Macosx universal binaries are produced, but they only contain
7960# 64 bit intel. This invalidates control of which jvms are built
7961# from configure, but only server is valid anyway. Fix this
7962# when hotspot makefiles are rewritten.
7963if test "x$MACOSX_UNIVERSAL" = xtrue; then
7964    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7965fi
7966
7967#####
7968
7969
7970
7971
7972
7973
7974
7975
7976# With basic setup done, call the custom early hook.
7977
7978
7979# To properly create a configuration name, we need to have the OpenJDK target
7980# and options (variants and debug level) parsed.
7981
7982
7983
7984# Check whether --with-conf-name was given.
7985if test "${with_conf_name+set}" = set; then :
7986  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7987fi
7988
7989
7990# Test from where we are running configure, in or outside of src root.
7991if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7992        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7993        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7994    # We are running configure from the src root.
7995    # Create a default ./build/target-variant-debuglevel output root.
7996    if test "x${CONF_NAME}" = x; then
7997        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7998    fi
7999    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8000    $MKDIR -p "$OUTPUT_ROOT"
8001    if test ! -d "$OUTPUT_ROOT"; then
8002        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8003    fi
8004else
8005    # We are running configure from outside of the src dir.
8006    # Then use the current directory as output dir!
8007    # If configuration is situated in normal build directory, just use the build
8008    # directory name as configuration name, otherwise use the complete path.
8009    if test "x${CONF_NAME}" = x; then
8010        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8011    fi
8012    OUTPUT_ROOT="$CURDIR"
8013
8014    # WARNING: This might be a bad thing to do. You need to be sure you want to
8015    # have a configuration in this directory. Do some sanity checks!
8016
8017    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8018      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8019      # other files
8020      files_present=`$LS $OUTPUT_ROOT`
8021      # Configure has already touched config.log and confdefs.h in the current dir when this check
8022      # is performed.
8023      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8024                                             | $TR -d '\n'`
8025      if test "x$filtered_files" != x; then
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8027$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8029$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8030        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8031$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8032        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8033$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8035$as_echo "$as_me: seriously mess up just about everything." >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8037$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8039$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8040        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8041      fi
8042    fi
8043fi
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8045$as_echo_n "checking what configuration name to use... " >&6; }
8046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8047$as_echo "$CONF_NAME" >&6; }
8048
8049
8050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8051
8052  # Input might be given as Windows format, start by converting to
8053  # unix format.
8054  path="$OUTPUT_ROOT"
8055  new_path=`$CYGPATH -u "$path"`
8056
8057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8060  # "foo.exe" is OK but "foo" is an error.
8061  #
8062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8063  # It is also a way to make sure we got the proper file name for the real test later on.
8064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8065  if test "x$test_shortpath" = x; then
8066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8067$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8068    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8069  fi
8070
8071  # Call helper function which possibly converts this using DOS-style short mode.
8072  # If so, the updated path is stored in $new_path.
8073
8074  input_path="$new_path"
8075  # Check if we need to convert this using DOS-style short mode. If the path
8076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8077  # take no chances and rewrite it.
8078  # Note: m4 eats our [], so we need to use [ and ] instead.
8079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8080  if test "x$has_forbidden_chars" != x; then
8081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8085      # Going to short mode and back again did indeed matter. Since short mode is
8086      # case insensitive, let's make it lowercase to improve readability.
8087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8088      # Now convert it back to Unix-stile (cygpath)
8089      input_path=`$CYGPATH -u "$shortmode_path"`
8090      new_path="$input_path"
8091    fi
8092  fi
8093
8094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8095  if test "x$test_cygdrive_prefix" = x; then
8096    # As a simple fix, exclude /usr/bin since it's not a real path.
8097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8099      # a path prefixed by /cygdrive for fixpath to work.
8100      new_path="$CYGWIN_ROOT_PATH$input_path"
8101    fi
8102  fi
8103
8104
8105  if test "x$path" != "x$new_path"; then
8106    OUTPUT_ROOT="$new_path"
8107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8108$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8109  fi
8110
8111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8112
8113  path="$OUTPUT_ROOT"
8114  has_colon=`$ECHO $path | $GREP ^.:`
8115  new_path="$path"
8116  if test "x$has_colon" = x; then
8117    # Not in mixed or Windows style, start by that.
8118    new_path=`cmd //c echo $path`
8119  fi
8120
8121
8122  input_path="$new_path"
8123  # Check if we need to convert this using DOS-style short mode. If the path
8124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8125  # take no chances and rewrite it.
8126  # Note: m4 eats our [], so we need to use [ and ] instead.
8127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8128  if test "x$has_forbidden_chars" != x; then
8129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8131  fi
8132
8133
8134  windows_path="$new_path"
8135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8136    unix_path=`$CYGPATH -u "$windows_path"`
8137    new_path="$unix_path"
8138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8140    new_path="$unix_path"
8141  fi
8142
8143  if test "x$path" != "x$new_path"; then
8144    OUTPUT_ROOT="$new_path"
8145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8146$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8147  fi
8148
8149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8151
8152  else
8153    # We're on a posix platform. Hooray! :)
8154    path="$OUTPUT_ROOT"
8155    has_space=`$ECHO "$path" | $GREP " "`
8156    if test "x$has_space" != x; then
8157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8158$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8159      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8160    fi
8161
8162    # Use eval to expand a potential ~
8163    eval path="$path"
8164    if test ! -f "$path" && test ! -d "$path"; then
8165      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8166    fi
8167
8168    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8169  fi
8170
8171
8172SPEC=$OUTPUT_ROOT/spec.gmk
8173
8174CONF_NAME=$CONF_NAME
8175
8176OUTPUT_ROOT=$OUTPUT_ROOT
8177
8178
8179# Most of the probed defines are put into config.h
8180ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8181
8182# The spec.gmk file contains all variables for the make system.
8183ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8184
8185# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8186ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8187
8188# The bootcycle-spec.gmk file contains support for boot cycle builds.
8189ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8190
8191# The compare.sh is used to compare the build output to other builds.
8192ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8193
8194# Spec.sh is currently used by compare-objects.sh
8195ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8196
8197# The generated Makefile knows where the spec.gmk is and where the source is.
8198# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8199# which will look for generated configurations
8200ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8201
8202
8203# Save the arguments given to us
8204echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8205
8206
8207# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8208
8209    for ac_prog in apt-get yum port pkgutil pkgadd
8210do
8211  # Extract the first word of "$ac_prog", so it can be a program name with args.
8212set dummy $ac_prog; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_prog_PKGHANDLER+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  if test -n "$PKGHANDLER"; then
8219  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8220else
8221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_prog_PKGHANDLER="$ac_prog"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236fi
8237fi
8238PKGHANDLER=$ac_cv_prog_PKGHANDLER
8239if test -n "$PKGHANDLER"; then
8240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8241$as_echo "$PKGHANDLER" >&6; }
8242else
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244$as_echo "no" >&6; }
8245fi
8246
8247
8248  test -n "$PKGHANDLER" && break
8249done
8250
8251
8252
8253# Setup tools that requires more complex handling, or that is not needed by the configure script.
8254
8255
8256  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8257  if test "x$MAKE" != x; then
8258    # User has supplied a make, test it.
8259    if test ! -f "$MAKE"; then
8260      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8261    fi
8262
8263  MAKE_CANDIDATE=""$MAKE""
8264  DESCRIPTION="user supplied MAKE=$MAKE"
8265  if test "x$MAKE_CANDIDATE" != x; then
8266    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8267$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8268    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8269    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8270    if test "x$IS_GNU_MAKE" = x; then
8271      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8272$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8273    else
8274      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8275      if test "x$IS_MODERN_MAKE" = x; then
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8277$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8278      else
8279        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8280          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8281            MAKE_EXPECTED_ENV='cygwin'
8282          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8283            MAKE_EXPECTED_ENV='msys'
8284          else
8285            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8286          fi
8287          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8288          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8289        else
8290          # Not relevant for non-Windows
8291          IS_MAKE_CORRECT_ENV=true
8292        fi
8293        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8294          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8295$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8296        else
8297          FOUND_MAKE=$MAKE_CANDIDATE
8298
8299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8300
8301  # First separate the path from the arguments. This will split at the first
8302  # space.
8303  complete="$FOUND_MAKE"
8304  path="${complete%% *}"
8305  tmp="$complete EOL"
8306  arguments="${tmp#* }"
8307
8308  # Input might be given as Windows format, start by converting to
8309  # unix format.
8310  new_path=`$CYGPATH -u "$path"`
8311
8312  # Now try to locate executable using which
8313  new_path=`$WHICH "$new_path" 2> /dev/null`
8314  # bat and cmd files are not always considered executable in cygwin causing which
8315  # to not find them
8316  if test "x$new_path" = x \
8317           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8318           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8319    new_path=`$CYGPATH -u "$path"`
8320  fi
8321  if test "x$new_path" = x; then
8322    # Oops. Which didn't find the executable.
8323    # The splitting of arguments from the executable at a space might have been incorrect,
8324    # since paths with space are more likely in Windows. Give it another try with the whole
8325    # argument.
8326    path="$complete"
8327    arguments="EOL"
8328    new_path=`$CYGPATH -u "$path"`
8329    new_path=`$WHICH "$new_path" 2> /dev/null`
8330    # bat and cmd files are not always considered executable in cygwin causing which
8331    # to not find them
8332    if test "x$new_path" = x \
8333             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8334             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8335      new_path=`$CYGPATH -u "$path"`
8336    fi
8337    if test "x$new_path" = x; then
8338      # It's still not found. Now this is an unrecoverable error.
8339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8341      has_space=`$ECHO "$complete" | $GREP " "`
8342      if test "x$has_space" != x; then
8343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8345      fi
8346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8347    fi
8348  fi
8349
8350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8353  # "foo.exe" is OK but "foo" is an error.
8354  #
8355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8356  # It is also a way to make sure we got the proper file name for the real test later on.
8357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8358  if test "x$test_shortpath" = x; then
8359    # Short path failed, file does not exist as specified.
8360    # Try adding .exe or .cmd
8361    if test -f "${new_path}.exe"; then
8362       input_to_shortpath="${new_path}.exe"
8363    elif test -f "${new_path}.cmd"; then
8364       input_to_shortpath="${new_path}.cmd"
8365    else
8366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8368      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8369$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8370      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8371    fi
8372  else
8373    input_to_shortpath="$new_path"
8374  fi
8375
8376  # Call helper function which possibly converts this using DOS-style short mode.
8377  # If so, the updated path is stored in $new_path.
8378  new_path="$input_to_shortpath"
8379
8380  input_path="$input_to_shortpath"
8381  # Check if we need to convert this using DOS-style short mode. If the path
8382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8383  # take no chances and rewrite it.
8384  # Note: m4 eats our [], so we need to use [ and ] instead.
8385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8386  if test "x$has_forbidden_chars" != x; then
8387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8391      # Going to short mode and back again did indeed matter. Since short mode is
8392      # case insensitive, let's make it lowercase to improve readability.
8393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8394      # Now convert it back to Unix-stile (cygpath)
8395      input_path=`$CYGPATH -u "$shortmode_path"`
8396      new_path="$input_path"
8397    fi
8398  fi
8399
8400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8401  if test "x$test_cygdrive_prefix" = x; then
8402    # As a simple fix, exclude /usr/bin since it's not a real path.
8403    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8405      # a path prefixed by /cygdrive for fixpath to work.
8406      new_path="$CYGWIN_ROOT_PATH$input_path"
8407    fi
8408  fi
8409
8410  # remove trailing .exe if any
8411  new_path="${new_path/%.exe/}"
8412
8413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8414
8415  # First separate the path from the arguments. This will split at the first
8416  # space.
8417  complete="$FOUND_MAKE"
8418  path="${complete%% *}"
8419  tmp="$complete EOL"
8420  arguments="${tmp#* }"
8421
8422  # Input might be given as Windows format, start by converting to
8423  # unix format.
8424  new_path="$path"
8425
8426  windows_path="$new_path"
8427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8428    unix_path=`$CYGPATH -u "$windows_path"`
8429    new_path="$unix_path"
8430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8432    new_path="$unix_path"
8433  fi
8434
8435
8436  # Now try to locate executable using which
8437  new_path=`$WHICH "$new_path" 2> /dev/null`
8438
8439  if test "x$new_path" = x; then
8440    # Oops. Which didn't find the executable.
8441    # The splitting of arguments from the executable at a space might have been incorrect,
8442    # since paths with space are more likely in Windows. Give it another try with the whole
8443    # argument.
8444    path="$complete"
8445    arguments="EOL"
8446    new_path="$path"
8447
8448  windows_path="$new_path"
8449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8450    unix_path=`$CYGPATH -u "$windows_path"`
8451    new_path="$unix_path"
8452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8454    new_path="$unix_path"
8455  fi
8456
8457
8458    new_path=`$WHICH "$new_path" 2> /dev/null`
8459
8460    if test "x$new_path" = x; then
8461      # It's still not found. Now this is an unrecoverable error.
8462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8463$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8464      has_space=`$ECHO "$complete" | $GREP " "`
8465      if test "x$has_space" != x; then
8466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8468      fi
8469      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8470    fi
8471  fi
8472
8473  # Now new_path has a complete unix path to the binary
8474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8475    # Keep paths in /bin as-is, but remove trailing .exe if any
8476    new_path="${new_path/%.exe/}"
8477    # Do not save /bin paths to all_fixpath_prefixes!
8478  else
8479    # Not in mixed or Windows style, start by that.
8480    new_path=`cmd //c echo $new_path`
8481
8482  input_path="$new_path"
8483  # Check if we need to convert this using DOS-style short mode. If the path
8484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8485  # take no chances and rewrite it.
8486  # Note: m4 eats our [], so we need to use [ and ] instead.
8487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8488  if test "x$has_forbidden_chars" != x; then
8489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8491  fi
8492
8493    # Output is in $new_path
8494
8495  windows_path="$new_path"
8496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8497    unix_path=`$CYGPATH -u "$windows_path"`
8498    new_path="$unix_path"
8499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8501    new_path="$unix_path"
8502  fi
8503
8504    # remove trailing .exe if any
8505    new_path="${new_path/%.exe/}"
8506
8507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8509  fi
8510
8511  else
8512    # We're on a posix platform. Hooray! :)
8513    # First separate the path from the arguments. This will split at the first
8514    # space.
8515    complete="$FOUND_MAKE"
8516    path="${complete%% *}"
8517    tmp="$complete EOL"
8518    arguments="${tmp#* }"
8519
8520    # Cannot rely on the command "which" here since it doesn't always work.
8521    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8522    if test -z "$is_absolute_path"; then
8523      # Path to executable is not absolute. Find it.
8524      IFS_save="$IFS"
8525      IFS=:
8526      for p in $PATH; do
8527        if test -f "$p/$path" && test -x "$p/$path"; then
8528          new_path="$p/$path"
8529          break
8530        fi
8531      done
8532      IFS="$IFS_save"
8533    else
8534      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8535$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8536      new_path="$path"
8537    fi
8538
8539    if test "x$new_path" = x; then
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8541$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8542        has_space=`$ECHO "$complete" | $GREP " "`
8543        if test "x$has_space" != x; then
8544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8546        fi
8547        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8548      fi
8549  fi
8550
8551      # Now join together the path and the arguments once again
8552      if test "x$arguments" != xEOL; then
8553        new_complete="$new_path ${arguments% *}"
8554      else
8555        new_complete="$new_path"
8556      fi
8557
8558  if test "x$complete" != "x$new_complete"; then
8559      FOUND_MAKE="$new_complete"
8560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8561$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8562    fi
8563
8564        fi
8565      fi
8566    fi
8567  fi
8568
8569    if test "x$FOUND_MAKE" = x; then
8570      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8571    fi
8572  else
8573    # Try our hardest to locate a correct version of GNU make
8574    for ac_prog in gmake
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $CHECK_GMAKE in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8607if test -n "$CHECK_GMAKE"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8609$as_echo "$CHECK_GMAKE" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$CHECK_GMAKE" && break
8617done
8618
8619
8620  MAKE_CANDIDATE=""$CHECK_GMAKE""
8621  DESCRIPTION="gmake in PATH"
8622  if test "x$MAKE_CANDIDATE" != x; then
8623    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8624$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8625    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8626    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8627    if test "x$IS_GNU_MAKE" = x; then
8628      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8629$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8630    else
8631      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8632      if test "x$IS_MODERN_MAKE" = x; then
8633        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8634$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8635      else
8636        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8637          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8638            MAKE_EXPECTED_ENV='cygwin'
8639          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8640            MAKE_EXPECTED_ENV='msys'
8641          else
8642            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8643          fi
8644          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8645          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8646        else
8647          # Not relevant for non-Windows
8648          IS_MAKE_CORRECT_ENV=true
8649        fi
8650        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8651          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8652$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8653        else
8654          FOUND_MAKE=$MAKE_CANDIDATE
8655
8656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8657
8658  # First separate the path from the arguments. This will split at the first
8659  # space.
8660  complete="$FOUND_MAKE"
8661  path="${complete%% *}"
8662  tmp="$complete EOL"
8663  arguments="${tmp#* }"
8664
8665  # Input might be given as Windows format, start by converting to
8666  # unix format.
8667  new_path=`$CYGPATH -u "$path"`
8668
8669  # Now try to locate executable using which
8670  new_path=`$WHICH "$new_path" 2> /dev/null`
8671  # bat and cmd files are not always considered executable in cygwin causing which
8672  # to not find them
8673  if test "x$new_path" = x \
8674           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8675           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8676    new_path=`$CYGPATH -u "$path"`
8677  fi
8678  if test "x$new_path" = x; then
8679    # Oops. Which didn't find the executable.
8680    # The splitting of arguments from the executable at a space might have been incorrect,
8681    # since paths with space are more likely in Windows. Give it another try with the whole
8682    # argument.
8683    path="$complete"
8684    arguments="EOL"
8685    new_path=`$CYGPATH -u "$path"`
8686    new_path=`$WHICH "$new_path" 2> /dev/null`
8687    # bat and cmd files are not always considered executable in cygwin causing which
8688    # to not find them
8689    if test "x$new_path" = x \
8690             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8691             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8692      new_path=`$CYGPATH -u "$path"`
8693    fi
8694    if test "x$new_path" = x; then
8695      # It's still not found. Now this is an unrecoverable error.
8696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8698      has_space=`$ECHO "$complete" | $GREP " "`
8699      if test "x$has_space" != x; then
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8702      fi
8703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8704    fi
8705  fi
8706
8707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8710  # "foo.exe" is OK but "foo" is an error.
8711  #
8712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8713  # It is also a way to make sure we got the proper file name for the real test later on.
8714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8715  if test "x$test_shortpath" = x; then
8716    # Short path failed, file does not exist as specified.
8717    # Try adding .exe or .cmd
8718    if test -f "${new_path}.exe"; then
8719       input_to_shortpath="${new_path}.exe"
8720    elif test -f "${new_path}.cmd"; then
8721       input_to_shortpath="${new_path}.cmd"
8722    else
8723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8727      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8728    fi
8729  else
8730    input_to_shortpath="$new_path"
8731  fi
8732
8733  # Call helper function which possibly converts this using DOS-style short mode.
8734  # If so, the updated path is stored in $new_path.
8735  new_path="$input_to_shortpath"
8736
8737  input_path="$input_to_shortpath"
8738  # Check if we need to convert this using DOS-style short mode. If the path
8739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8740  # take no chances and rewrite it.
8741  # Note: m4 eats our [], so we need to use [ and ] instead.
8742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8743  if test "x$has_forbidden_chars" != x; then
8744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8748      # Going to short mode and back again did indeed matter. Since short mode is
8749      # case insensitive, let's make it lowercase to improve readability.
8750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8751      # Now convert it back to Unix-stile (cygpath)
8752      input_path=`$CYGPATH -u "$shortmode_path"`
8753      new_path="$input_path"
8754    fi
8755  fi
8756
8757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8758  if test "x$test_cygdrive_prefix" = x; then
8759    # As a simple fix, exclude /usr/bin since it's not a real path.
8760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8762      # a path prefixed by /cygdrive for fixpath to work.
8763      new_path="$CYGWIN_ROOT_PATH$input_path"
8764    fi
8765  fi
8766
8767  # remove trailing .exe if any
8768  new_path="${new_path/%.exe/}"
8769
8770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8771
8772  # First separate the path from the arguments. This will split at the first
8773  # space.
8774  complete="$FOUND_MAKE"
8775  path="${complete%% *}"
8776  tmp="$complete EOL"
8777  arguments="${tmp#* }"
8778
8779  # Input might be given as Windows format, start by converting to
8780  # unix format.
8781  new_path="$path"
8782
8783  windows_path="$new_path"
8784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8785    unix_path=`$CYGPATH -u "$windows_path"`
8786    new_path="$unix_path"
8787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8789    new_path="$unix_path"
8790  fi
8791
8792
8793  # Now try to locate executable using which
8794  new_path=`$WHICH "$new_path" 2> /dev/null`
8795
8796  if test "x$new_path" = x; then
8797    # Oops. Which didn't find the executable.
8798    # The splitting of arguments from the executable at a space might have been incorrect,
8799    # since paths with space are more likely in Windows. Give it another try with the whole
8800    # argument.
8801    path="$complete"
8802    arguments="EOL"
8803    new_path="$path"
8804
8805  windows_path="$new_path"
8806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8807    unix_path=`$CYGPATH -u "$windows_path"`
8808    new_path="$unix_path"
8809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8811    new_path="$unix_path"
8812  fi
8813
8814
8815    new_path=`$WHICH "$new_path" 2> /dev/null`
8816
8817    if test "x$new_path" = x; then
8818      # It's still not found. Now this is an unrecoverable error.
8819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8820$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8821      has_space=`$ECHO "$complete" | $GREP " "`
8822      if test "x$has_space" != x; then
8823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8825      fi
8826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8827    fi
8828  fi
8829
8830  # Now new_path has a complete unix path to the binary
8831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8832    # Keep paths in /bin as-is, but remove trailing .exe if any
8833    new_path="${new_path/%.exe/}"
8834    # Do not save /bin paths to all_fixpath_prefixes!
8835  else
8836    # Not in mixed or Windows style, start by that.
8837    new_path=`cmd //c echo $new_path`
8838
8839  input_path="$new_path"
8840  # Check if we need to convert this using DOS-style short mode. If the path
8841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8842  # take no chances and rewrite it.
8843  # Note: m4 eats our [], so we need to use [ and ] instead.
8844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8845  if test "x$has_forbidden_chars" != x; then
8846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8848  fi
8849
8850    # Output is in $new_path
8851
8852  windows_path="$new_path"
8853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8854    unix_path=`$CYGPATH -u "$windows_path"`
8855    new_path="$unix_path"
8856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8858    new_path="$unix_path"
8859  fi
8860
8861    # remove trailing .exe if any
8862    new_path="${new_path/%.exe/}"
8863
8864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8866  fi
8867
8868  else
8869    # We're on a posix platform. Hooray! :)
8870    # First separate the path from the arguments. This will split at the first
8871    # space.
8872    complete="$FOUND_MAKE"
8873    path="${complete%% *}"
8874    tmp="$complete EOL"
8875    arguments="${tmp#* }"
8876
8877    # Cannot rely on the command "which" here since it doesn't always work.
8878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8879    if test -z "$is_absolute_path"; then
8880      # Path to executable is not absolute. Find it.
8881      IFS_save="$IFS"
8882      IFS=:
8883      for p in $PATH; do
8884        if test -f "$p/$path" && test -x "$p/$path"; then
8885          new_path="$p/$path"
8886          break
8887        fi
8888      done
8889      IFS="$IFS_save"
8890    else
8891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8892$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8893      new_path="$path"
8894    fi
8895
8896    if test "x$new_path" = x; then
8897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8899        has_space=`$ECHO "$complete" | $GREP " "`
8900        if test "x$has_space" != x; then
8901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8903        fi
8904        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8905      fi
8906  fi
8907
8908      # Now join together the path and the arguments once again
8909      if test "x$arguments" != xEOL; then
8910        new_complete="$new_path ${arguments% *}"
8911      else
8912        new_complete="$new_path"
8913      fi
8914
8915  if test "x$complete" != "x$new_complete"; then
8916      FOUND_MAKE="$new_complete"
8917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8918$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8919    fi
8920
8921        fi
8922      fi
8923    fi
8924  fi
8925
8926
8927    if test "x$FOUND_MAKE" = x; then
8928      for ac_prog in make
8929do
8930  # Extract the first word of "$ac_prog", so it can be a program name with args.
8931set dummy $ac_prog; ac_word=$2
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8933$as_echo_n "checking for $ac_word... " >&6; }
8934if ${ac_cv_path_CHECK_MAKE+:} false; then :
8935  $as_echo_n "(cached) " >&6
8936else
8937  case $CHECK_MAKE in
8938  [\\/]* | ?:[\\/]*)
8939  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8940  ;;
8941  *)
8942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8943for as_dir in $PATH
8944do
8945  IFS=$as_save_IFS
8946  test -z "$as_dir" && as_dir=.
8947    for ac_exec_ext in '' $ac_executable_extensions; do
8948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8949    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8951    break 2
8952  fi
8953done
8954  done
8955IFS=$as_save_IFS
8956
8957  ;;
8958esac
8959fi
8960CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8961if test -n "$CHECK_MAKE"; then
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8963$as_echo "$CHECK_MAKE" >&6; }
8964else
8965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8966$as_echo "no" >&6; }
8967fi
8968
8969
8970  test -n "$CHECK_MAKE" && break
8971done
8972
8973
8974  MAKE_CANDIDATE=""$CHECK_MAKE""
8975  DESCRIPTION="make in PATH"
8976  if test "x$MAKE_CANDIDATE" != x; then
8977    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8978$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8979    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8980    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8981    if test "x$IS_GNU_MAKE" = x; then
8982      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8983$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8984    else
8985      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8986      if test "x$IS_MODERN_MAKE" = x; then
8987        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8988$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8989      else
8990        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8991          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8992            MAKE_EXPECTED_ENV='cygwin'
8993          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8994            MAKE_EXPECTED_ENV='msys'
8995          else
8996            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8997          fi
8998          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8999          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9000        else
9001          # Not relevant for non-Windows
9002          IS_MAKE_CORRECT_ENV=true
9003        fi
9004        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9005          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9006$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9007        else
9008          FOUND_MAKE=$MAKE_CANDIDATE
9009
9010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9011
9012  # First separate the path from the arguments. This will split at the first
9013  # space.
9014  complete="$FOUND_MAKE"
9015  path="${complete%% *}"
9016  tmp="$complete EOL"
9017  arguments="${tmp#* }"
9018
9019  # Input might be given as Windows format, start by converting to
9020  # unix format.
9021  new_path=`$CYGPATH -u "$path"`
9022
9023  # Now try to locate executable using which
9024  new_path=`$WHICH "$new_path" 2> /dev/null`
9025  # bat and cmd files are not always considered executable in cygwin causing which
9026  # to not find them
9027  if test "x$new_path" = x \
9028           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9029           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9030    new_path=`$CYGPATH -u "$path"`
9031  fi
9032  if test "x$new_path" = x; then
9033    # Oops. Which didn't find the executable.
9034    # The splitting of arguments from the executable at a space might have been incorrect,
9035    # since paths with space are more likely in Windows. Give it another try with the whole
9036    # argument.
9037    path="$complete"
9038    arguments="EOL"
9039    new_path=`$CYGPATH -u "$path"`
9040    new_path=`$WHICH "$new_path" 2> /dev/null`
9041    # bat and cmd files are not always considered executable in cygwin causing which
9042    # to not find them
9043    if test "x$new_path" = x \
9044             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9045             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9046      new_path=`$CYGPATH -u "$path"`
9047    fi
9048    if test "x$new_path" = x; then
9049      # It's still not found. Now this is an unrecoverable error.
9050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9052      has_space=`$ECHO "$complete" | $GREP " "`
9053      if test "x$has_space" != x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9056      fi
9057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9058    fi
9059  fi
9060
9061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9064  # "foo.exe" is OK but "foo" is an error.
9065  #
9066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9067  # It is also a way to make sure we got the proper file name for the real test later on.
9068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9069  if test "x$test_shortpath" = x; then
9070    # Short path failed, file does not exist as specified.
9071    # Try adding .exe or .cmd
9072    if test -f "${new_path}.exe"; then
9073       input_to_shortpath="${new_path}.exe"
9074    elif test -f "${new_path}.cmd"; then
9075       input_to_shortpath="${new_path}.cmd"
9076    else
9077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9082    fi
9083  else
9084    input_to_shortpath="$new_path"
9085  fi
9086
9087  # Call helper function which possibly converts this using DOS-style short mode.
9088  # If so, the updated path is stored in $new_path.
9089  new_path="$input_to_shortpath"
9090
9091  input_path="$input_to_shortpath"
9092  # Check if we need to convert this using DOS-style short mode. If the path
9093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9094  # take no chances and rewrite it.
9095  # Note: m4 eats our [], so we need to use [ and ] instead.
9096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9097  if test "x$has_forbidden_chars" != x; then
9098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9102      # Going to short mode and back again did indeed matter. Since short mode is
9103      # case insensitive, let's make it lowercase to improve readability.
9104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9105      # Now convert it back to Unix-stile (cygpath)
9106      input_path=`$CYGPATH -u "$shortmode_path"`
9107      new_path="$input_path"
9108    fi
9109  fi
9110
9111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9112  if test "x$test_cygdrive_prefix" = x; then
9113    # As a simple fix, exclude /usr/bin since it's not a real path.
9114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9116      # a path prefixed by /cygdrive for fixpath to work.
9117      new_path="$CYGWIN_ROOT_PATH$input_path"
9118    fi
9119  fi
9120
9121  # remove trailing .exe if any
9122  new_path="${new_path/%.exe/}"
9123
9124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9125
9126  # First separate the path from the arguments. This will split at the first
9127  # space.
9128  complete="$FOUND_MAKE"
9129  path="${complete%% *}"
9130  tmp="$complete EOL"
9131  arguments="${tmp#* }"
9132
9133  # Input might be given as Windows format, start by converting to
9134  # unix format.
9135  new_path="$path"
9136
9137  windows_path="$new_path"
9138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9139    unix_path=`$CYGPATH -u "$windows_path"`
9140    new_path="$unix_path"
9141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9143    new_path="$unix_path"
9144  fi
9145
9146
9147  # Now try to locate executable using which
9148  new_path=`$WHICH "$new_path" 2> /dev/null`
9149
9150  if test "x$new_path" = x; then
9151    # Oops. Which didn't find the executable.
9152    # The splitting of arguments from the executable at a space might have been incorrect,
9153    # since paths with space are more likely in Windows. Give it another try with the whole
9154    # argument.
9155    path="$complete"
9156    arguments="EOL"
9157    new_path="$path"
9158
9159  windows_path="$new_path"
9160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9161    unix_path=`$CYGPATH -u "$windows_path"`
9162    new_path="$unix_path"
9163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9165    new_path="$unix_path"
9166  fi
9167
9168
9169    new_path=`$WHICH "$new_path" 2> /dev/null`
9170
9171    if test "x$new_path" = x; then
9172      # It's still not found. Now this is an unrecoverable error.
9173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9174$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9175      has_space=`$ECHO "$complete" | $GREP " "`
9176      if test "x$has_space" != x; then
9177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9179      fi
9180      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9181    fi
9182  fi
9183
9184  # Now new_path has a complete unix path to the binary
9185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9186    # Keep paths in /bin as-is, but remove trailing .exe if any
9187    new_path="${new_path/%.exe/}"
9188    # Do not save /bin paths to all_fixpath_prefixes!
9189  else
9190    # Not in mixed or Windows style, start by that.
9191    new_path=`cmd //c echo $new_path`
9192
9193  input_path="$new_path"
9194  # Check if we need to convert this using DOS-style short mode. If the path
9195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9196  # take no chances and rewrite it.
9197  # Note: m4 eats our [], so we need to use [ and ] instead.
9198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9199  if test "x$has_forbidden_chars" != x; then
9200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9202  fi
9203
9204    # Output is in $new_path
9205
9206  windows_path="$new_path"
9207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9208    unix_path=`$CYGPATH -u "$windows_path"`
9209    new_path="$unix_path"
9210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9212    new_path="$unix_path"
9213  fi
9214
9215    # remove trailing .exe if any
9216    new_path="${new_path/%.exe/}"
9217
9218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9220  fi
9221
9222  else
9223    # We're on a posix platform. Hooray! :)
9224    # First separate the path from the arguments. This will split at the first
9225    # space.
9226    complete="$FOUND_MAKE"
9227    path="${complete%% *}"
9228    tmp="$complete EOL"
9229    arguments="${tmp#* }"
9230
9231    # Cannot rely on the command "which" here since it doesn't always work.
9232    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9233    if test -z "$is_absolute_path"; then
9234      # Path to executable is not absolute. Find it.
9235      IFS_save="$IFS"
9236      IFS=:
9237      for p in $PATH; do
9238        if test -f "$p/$path" && test -x "$p/$path"; then
9239          new_path="$p/$path"
9240          break
9241        fi
9242      done
9243      IFS="$IFS_save"
9244    else
9245      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9246$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9247      new_path="$path"
9248    fi
9249
9250    if test "x$new_path" = x; then
9251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9253        has_space=`$ECHO "$complete" | $GREP " "`
9254        if test "x$has_space" != x; then
9255          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9257        fi
9258        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9259      fi
9260  fi
9261
9262      # Now join together the path and the arguments once again
9263      if test "x$arguments" != xEOL; then
9264        new_complete="$new_path ${arguments% *}"
9265      else
9266        new_complete="$new_path"
9267      fi
9268
9269  if test "x$complete" != "x$new_complete"; then
9270      FOUND_MAKE="$new_complete"
9271      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9272$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9273    fi
9274
9275        fi
9276      fi
9277    fi
9278  fi
9279
9280    fi
9281
9282    if test "x$FOUND_MAKE" = x; then
9283      if test "x$TOOLS_DIR" != x; then
9284        # We have a tools-dir, check that as well before giving up.
9285        OLD_PATH=$PATH
9286        PATH=$TOOLS_DIR:$PATH
9287        for ac_prog in gmake
9288do
9289  # Extract the first word of "$ac_prog", so it can be a program name with args.
9290set dummy $ac_prog; ac_word=$2
9291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9292$as_echo_n "checking for $ac_word... " >&6; }
9293if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9294  $as_echo_n "(cached) " >&6
9295else
9296  case $CHECK_TOOLSDIR_GMAKE in
9297  [\\/]* | ?:[\\/]*)
9298  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9299  ;;
9300  *)
9301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9302for as_dir in $PATH
9303do
9304  IFS=$as_save_IFS
9305  test -z "$as_dir" && as_dir=.
9306    for ac_exec_ext in '' $ac_executable_extensions; do
9307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9308    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9310    break 2
9311  fi
9312done
9313  done
9314IFS=$as_save_IFS
9315
9316  ;;
9317esac
9318fi
9319CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9320if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9322$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9323else
9324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9325$as_echo "no" >&6; }
9326fi
9327
9328
9329  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9330done
9331
9332
9333  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9334  DESCRIPTION="gmake in tools-dir"
9335  if test "x$MAKE_CANDIDATE" != x; then
9336    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9337$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9338    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9339    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9340    if test "x$IS_GNU_MAKE" = x; then
9341      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9342$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9343    else
9344      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9345      if test "x$IS_MODERN_MAKE" = x; then
9346        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9347$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9348      else
9349        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9350          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9351            MAKE_EXPECTED_ENV='cygwin'
9352          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9353            MAKE_EXPECTED_ENV='msys'
9354          else
9355            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9356          fi
9357          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9358          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9359        else
9360          # Not relevant for non-Windows
9361          IS_MAKE_CORRECT_ENV=true
9362        fi
9363        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9364          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9365$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9366        else
9367          FOUND_MAKE=$MAKE_CANDIDATE
9368
9369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9370
9371  # First separate the path from the arguments. This will split at the first
9372  # space.
9373  complete="$FOUND_MAKE"
9374  path="${complete%% *}"
9375  tmp="$complete EOL"
9376  arguments="${tmp#* }"
9377
9378  # Input might be given as Windows format, start by converting to
9379  # unix format.
9380  new_path=`$CYGPATH -u "$path"`
9381
9382  # Now try to locate executable using which
9383  new_path=`$WHICH "$new_path" 2> /dev/null`
9384  # bat and cmd files are not always considered executable in cygwin causing which
9385  # to not find them
9386  if test "x$new_path" = x \
9387           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9388           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9389    new_path=`$CYGPATH -u "$path"`
9390  fi
9391  if test "x$new_path" = x; then
9392    # Oops. Which didn't find the executable.
9393    # The splitting of arguments from the executable at a space might have been incorrect,
9394    # since paths with space are more likely in Windows. Give it another try with the whole
9395    # argument.
9396    path="$complete"
9397    arguments="EOL"
9398    new_path=`$CYGPATH -u "$path"`
9399    new_path=`$WHICH "$new_path" 2> /dev/null`
9400    # bat and cmd files are not always considered executable in cygwin causing which
9401    # to not find them
9402    if test "x$new_path" = x \
9403             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9404             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9405      new_path=`$CYGPATH -u "$path"`
9406    fi
9407    if test "x$new_path" = x; then
9408      # It's still not found. Now this is an unrecoverable error.
9409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9411      has_space=`$ECHO "$complete" | $GREP " "`
9412      if test "x$has_space" != x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9415      fi
9416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9417    fi
9418  fi
9419
9420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9423  # "foo.exe" is OK but "foo" is an error.
9424  #
9425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9426  # It is also a way to make sure we got the proper file name for the real test later on.
9427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9428  if test "x$test_shortpath" = x; then
9429    # Short path failed, file does not exist as specified.
9430    # Try adding .exe or .cmd
9431    if test -f "${new_path}.exe"; then
9432       input_to_shortpath="${new_path}.exe"
9433    elif test -f "${new_path}.cmd"; then
9434       input_to_shortpath="${new_path}.cmd"
9435    else
9436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9437$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9440      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9441    fi
9442  else
9443    input_to_shortpath="$new_path"
9444  fi
9445
9446  # Call helper function which possibly converts this using DOS-style short mode.
9447  # If so, the updated path is stored in $new_path.
9448  new_path="$input_to_shortpath"
9449
9450  input_path="$input_to_shortpath"
9451  # Check if we need to convert this using DOS-style short mode. If the path
9452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9453  # take no chances and rewrite it.
9454  # Note: m4 eats our [], so we need to use [ and ] instead.
9455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9456  if test "x$has_forbidden_chars" != x; then
9457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9461      # Going to short mode and back again did indeed matter. Since short mode is
9462      # case insensitive, let's make it lowercase to improve readability.
9463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9464      # Now convert it back to Unix-stile (cygpath)
9465      input_path=`$CYGPATH -u "$shortmode_path"`
9466      new_path="$input_path"
9467    fi
9468  fi
9469
9470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9471  if test "x$test_cygdrive_prefix" = x; then
9472    # As a simple fix, exclude /usr/bin since it's not a real path.
9473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9475      # a path prefixed by /cygdrive for fixpath to work.
9476      new_path="$CYGWIN_ROOT_PATH$input_path"
9477    fi
9478  fi
9479
9480  # remove trailing .exe if any
9481  new_path="${new_path/%.exe/}"
9482
9483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9484
9485  # First separate the path from the arguments. This will split at the first
9486  # space.
9487  complete="$FOUND_MAKE"
9488  path="${complete%% *}"
9489  tmp="$complete EOL"
9490  arguments="${tmp#* }"
9491
9492  # Input might be given as Windows format, start by converting to
9493  # unix format.
9494  new_path="$path"
9495
9496  windows_path="$new_path"
9497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9498    unix_path=`$CYGPATH -u "$windows_path"`
9499    new_path="$unix_path"
9500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9502    new_path="$unix_path"
9503  fi
9504
9505
9506  # Now try to locate executable using which
9507  new_path=`$WHICH "$new_path" 2> /dev/null`
9508
9509  if test "x$new_path" = x; then
9510    # Oops. Which didn't find the executable.
9511    # The splitting of arguments from the executable at a space might have been incorrect,
9512    # since paths with space are more likely in Windows. Give it another try with the whole
9513    # argument.
9514    path="$complete"
9515    arguments="EOL"
9516    new_path="$path"
9517
9518  windows_path="$new_path"
9519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9520    unix_path=`$CYGPATH -u "$windows_path"`
9521    new_path="$unix_path"
9522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9524    new_path="$unix_path"
9525  fi
9526
9527
9528    new_path=`$WHICH "$new_path" 2> /dev/null`
9529
9530    if test "x$new_path" = x; then
9531      # It's still not found. Now this is an unrecoverable error.
9532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9534      has_space=`$ECHO "$complete" | $GREP " "`
9535      if test "x$has_space" != x; then
9536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9538      fi
9539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9540    fi
9541  fi
9542
9543  # Now new_path has a complete unix path to the binary
9544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9545    # Keep paths in /bin as-is, but remove trailing .exe if any
9546    new_path="${new_path/%.exe/}"
9547    # Do not save /bin paths to all_fixpath_prefixes!
9548  else
9549    # Not in mixed or Windows style, start by that.
9550    new_path=`cmd //c echo $new_path`
9551
9552  input_path="$new_path"
9553  # Check if we need to convert this using DOS-style short mode. If the path
9554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9555  # take no chances and rewrite it.
9556  # Note: m4 eats our [], so we need to use [ and ] instead.
9557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9558  if test "x$has_forbidden_chars" != x; then
9559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9561  fi
9562
9563    # Output is in $new_path
9564
9565  windows_path="$new_path"
9566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9567    unix_path=`$CYGPATH -u "$windows_path"`
9568    new_path="$unix_path"
9569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9571    new_path="$unix_path"
9572  fi
9573
9574    # remove trailing .exe if any
9575    new_path="${new_path/%.exe/}"
9576
9577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9579  fi
9580
9581  else
9582    # We're on a posix platform. Hooray! :)
9583    # First separate the path from the arguments. This will split at the first
9584    # space.
9585    complete="$FOUND_MAKE"
9586    path="${complete%% *}"
9587    tmp="$complete EOL"
9588    arguments="${tmp#* }"
9589
9590    # Cannot rely on the command "which" here since it doesn't always work.
9591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9592    if test -z "$is_absolute_path"; then
9593      # Path to executable is not absolute. Find it.
9594      IFS_save="$IFS"
9595      IFS=:
9596      for p in $PATH; do
9597        if test -f "$p/$path" && test -x "$p/$path"; then
9598          new_path="$p/$path"
9599          break
9600        fi
9601      done
9602      IFS="$IFS_save"
9603    else
9604      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9605$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9606      new_path="$path"
9607    fi
9608
9609    if test "x$new_path" = x; then
9610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9611$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9612        has_space=`$ECHO "$complete" | $GREP " "`
9613        if test "x$has_space" != x; then
9614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9616        fi
9617        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9618      fi
9619  fi
9620
9621      # Now join together the path and the arguments once again
9622      if test "x$arguments" != xEOL; then
9623        new_complete="$new_path ${arguments% *}"
9624      else
9625        new_complete="$new_path"
9626      fi
9627
9628  if test "x$complete" != "x$new_complete"; then
9629      FOUND_MAKE="$new_complete"
9630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9631$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9632    fi
9633
9634        fi
9635      fi
9636    fi
9637  fi
9638
9639        if test "x$FOUND_MAKE" = x; then
9640          for ac_prog in make
9641do
9642  # Extract the first word of "$ac_prog", so it can be a program name with args.
9643set dummy $ac_prog; ac_word=$2
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9645$as_echo_n "checking for $ac_word... " >&6; }
9646if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9647  $as_echo_n "(cached) " >&6
9648else
9649  case $CHECK_TOOLSDIR_MAKE in
9650  [\\/]* | ?:[\\/]*)
9651  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9652  ;;
9653  *)
9654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9655for as_dir in $PATH
9656do
9657  IFS=$as_save_IFS
9658  test -z "$as_dir" && as_dir=.
9659    for ac_exec_ext in '' $ac_executable_extensions; do
9660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9661    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9663    break 2
9664  fi
9665done
9666  done
9667IFS=$as_save_IFS
9668
9669  ;;
9670esac
9671fi
9672CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9673if test -n "$CHECK_TOOLSDIR_MAKE"; then
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9675$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9676else
9677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9678$as_echo "no" >&6; }
9679fi
9680
9681
9682  test -n "$CHECK_TOOLSDIR_MAKE" && break
9683done
9684
9685
9686  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9687  DESCRIPTION="make in tools-dir"
9688  if test "x$MAKE_CANDIDATE" != x; then
9689    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9690$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9691    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9692    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9693    if test "x$IS_GNU_MAKE" = x; then
9694      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9695$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9696    else
9697      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9698      if test "x$IS_MODERN_MAKE" = x; then
9699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9700$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9701      else
9702        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9703          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9704            MAKE_EXPECTED_ENV='cygwin'
9705          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9706            MAKE_EXPECTED_ENV='msys'
9707          else
9708            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9709          fi
9710          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9711          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9712        else
9713          # Not relevant for non-Windows
9714          IS_MAKE_CORRECT_ENV=true
9715        fi
9716        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9717          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9718$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9719        else
9720          FOUND_MAKE=$MAKE_CANDIDATE
9721
9722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9723
9724  # First separate the path from the arguments. This will split at the first
9725  # space.
9726  complete="$FOUND_MAKE"
9727  path="${complete%% *}"
9728  tmp="$complete EOL"
9729  arguments="${tmp#* }"
9730
9731  # Input might be given as Windows format, start by converting to
9732  # unix format.
9733  new_path=`$CYGPATH -u "$path"`
9734
9735  # Now try to locate executable using which
9736  new_path=`$WHICH "$new_path" 2> /dev/null`
9737  # bat and cmd files are not always considered executable in cygwin causing which
9738  # to not find them
9739  if test "x$new_path" = x \
9740           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9741           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9742    new_path=`$CYGPATH -u "$path"`
9743  fi
9744  if test "x$new_path" = x; then
9745    # Oops. Which didn't find the executable.
9746    # The splitting of arguments from the executable at a space might have been incorrect,
9747    # since paths with space are more likely in Windows. Give it another try with the whole
9748    # argument.
9749    path="$complete"
9750    arguments="EOL"
9751    new_path=`$CYGPATH -u "$path"`
9752    new_path=`$WHICH "$new_path" 2> /dev/null`
9753    # bat and cmd files are not always considered executable in cygwin causing which
9754    # to not find them
9755    if test "x$new_path" = x \
9756             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9757             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9758      new_path=`$CYGPATH -u "$path"`
9759    fi
9760    if test "x$new_path" = x; then
9761      # It's still not found. Now this is an unrecoverable error.
9762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9764      has_space=`$ECHO "$complete" | $GREP " "`
9765      if test "x$has_space" != x; then
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9768      fi
9769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9770    fi
9771  fi
9772
9773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9776  # "foo.exe" is OK but "foo" is an error.
9777  #
9778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9779  # It is also a way to make sure we got the proper file name for the real test later on.
9780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9781  if test "x$test_shortpath" = x; then
9782    # Short path failed, file does not exist as specified.
9783    # Try adding .exe or .cmd
9784    if test -f "${new_path}.exe"; then
9785       input_to_shortpath="${new_path}.exe"
9786    elif test -f "${new_path}.cmd"; then
9787       input_to_shortpath="${new_path}.cmd"
9788    else
9789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9790$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9794    fi
9795  else
9796    input_to_shortpath="$new_path"
9797  fi
9798
9799  # Call helper function which possibly converts this using DOS-style short mode.
9800  # If so, the updated path is stored in $new_path.
9801  new_path="$input_to_shortpath"
9802
9803  input_path="$input_to_shortpath"
9804  # Check if we need to convert this using DOS-style short mode. If the path
9805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9806  # take no chances and rewrite it.
9807  # Note: m4 eats our [], so we need to use [ and ] instead.
9808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9809  if test "x$has_forbidden_chars" != x; then
9810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9814      # Going to short mode and back again did indeed matter. Since short mode is
9815      # case insensitive, let's make it lowercase to improve readability.
9816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9817      # Now convert it back to Unix-stile (cygpath)
9818      input_path=`$CYGPATH -u "$shortmode_path"`
9819      new_path="$input_path"
9820    fi
9821  fi
9822
9823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9824  if test "x$test_cygdrive_prefix" = x; then
9825    # As a simple fix, exclude /usr/bin since it's not a real path.
9826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9828      # a path prefixed by /cygdrive for fixpath to work.
9829      new_path="$CYGWIN_ROOT_PATH$input_path"
9830    fi
9831  fi
9832
9833  # remove trailing .exe if any
9834  new_path="${new_path/%.exe/}"
9835
9836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9837
9838  # First separate the path from the arguments. This will split at the first
9839  # space.
9840  complete="$FOUND_MAKE"
9841  path="${complete%% *}"
9842  tmp="$complete EOL"
9843  arguments="${tmp#* }"
9844
9845  # Input might be given as Windows format, start by converting to
9846  # unix format.
9847  new_path="$path"
9848
9849  windows_path="$new_path"
9850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9851    unix_path=`$CYGPATH -u "$windows_path"`
9852    new_path="$unix_path"
9853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9855    new_path="$unix_path"
9856  fi
9857
9858
9859  # Now try to locate executable using which
9860  new_path=`$WHICH "$new_path" 2> /dev/null`
9861
9862  if test "x$new_path" = x; then
9863    # Oops. Which didn't find the executable.
9864    # The splitting of arguments from the executable at a space might have been incorrect,
9865    # since paths with space are more likely in Windows. Give it another try with the whole
9866    # argument.
9867    path="$complete"
9868    arguments="EOL"
9869    new_path="$path"
9870
9871  windows_path="$new_path"
9872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9873    unix_path=`$CYGPATH -u "$windows_path"`
9874    new_path="$unix_path"
9875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9877    new_path="$unix_path"
9878  fi
9879
9880
9881    new_path=`$WHICH "$new_path" 2> /dev/null`
9882
9883    if test "x$new_path" = x; then
9884      # It's still not found. Now this is an unrecoverable error.
9885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9887      has_space=`$ECHO "$complete" | $GREP " "`
9888      if test "x$has_space" != x; then
9889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9891      fi
9892      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9893    fi
9894  fi
9895
9896  # Now new_path has a complete unix path to the binary
9897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9898    # Keep paths in /bin as-is, but remove trailing .exe if any
9899    new_path="${new_path/%.exe/}"
9900    # Do not save /bin paths to all_fixpath_prefixes!
9901  else
9902    # Not in mixed or Windows style, start by that.
9903    new_path=`cmd //c echo $new_path`
9904
9905  input_path="$new_path"
9906  # Check if we need to convert this using DOS-style short mode. If the path
9907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9908  # take no chances and rewrite it.
9909  # Note: m4 eats our [], so we need to use [ and ] instead.
9910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9911  if test "x$has_forbidden_chars" != x; then
9912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9914  fi
9915
9916    # Output is in $new_path
9917
9918  windows_path="$new_path"
9919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9920    unix_path=`$CYGPATH -u "$windows_path"`
9921    new_path="$unix_path"
9922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9924    new_path="$unix_path"
9925  fi
9926
9927    # remove trailing .exe if any
9928    new_path="${new_path/%.exe/}"
9929
9930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9932  fi
9933
9934  else
9935    # We're on a posix platform. Hooray! :)
9936    # First separate the path from the arguments. This will split at the first
9937    # space.
9938    complete="$FOUND_MAKE"
9939    path="${complete%% *}"
9940    tmp="$complete EOL"
9941    arguments="${tmp#* }"
9942
9943    # Cannot rely on the command "which" here since it doesn't always work.
9944    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9945    if test -z "$is_absolute_path"; then
9946      # Path to executable is not absolute. Find it.
9947      IFS_save="$IFS"
9948      IFS=:
9949      for p in $PATH; do
9950        if test -f "$p/$path" && test -x "$p/$path"; then
9951          new_path="$p/$path"
9952          break
9953        fi
9954      done
9955      IFS="$IFS_save"
9956    else
9957      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9958$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9959      new_path="$path"
9960    fi
9961
9962    if test "x$new_path" = x; then
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9965        has_space=`$ECHO "$complete" | $GREP " "`
9966        if test "x$has_space" != x; then
9967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9969        fi
9970        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9971      fi
9972  fi
9973
9974      # Now join together the path and the arguments once again
9975      if test "x$arguments" != xEOL; then
9976        new_complete="$new_path ${arguments% *}"
9977      else
9978        new_complete="$new_path"
9979      fi
9980
9981  if test "x$complete" != "x$new_complete"; then
9982      FOUND_MAKE="$new_complete"
9983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9984$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9985    fi
9986
9987        fi
9988      fi
9989    fi
9990  fi
9991
9992        fi
9993        PATH=$OLD_PATH
9994      fi
9995    fi
9996
9997    if test "x$FOUND_MAKE" = x; then
9998      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
9999    fi
10000  fi
10001
10002  MAKE=$FOUND_MAKE
10003
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10005$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10006
10007
10008
10009    # Test if find supports -delete
10010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10011$as_echo_n "checking if find supports -delete... " >&6; }
10012    FIND_DELETE="-delete"
10013
10014    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10015
10016    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10017
10018    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10019    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10020        # No, it does not.
10021        rm $DELETEDIR/TestIfFindSupportsDelete
10022        FIND_DELETE="-exec rm \{\} \+"
10023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024$as_echo "no" >&6; }
10025    else
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10027$as_echo "yes" >&6; }
10028    fi
10029    rmdir $DELETEDIR
10030
10031
10032
10033# These tools might not be installed by default,
10034# need hint on how to install them.
10035
10036    for ac_prog in unzip
10037do
10038  # Extract the first word of "$ac_prog", so it can be a program name with args.
10039set dummy $ac_prog; ac_word=$2
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10041$as_echo_n "checking for $ac_word... " >&6; }
10042if ${ac_cv_path_UNZIP+:} false; then :
10043  $as_echo_n "(cached) " >&6
10044else
10045  case $UNZIP in
10046  [\\/]* | ?:[\\/]*)
10047  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10048  ;;
10049  *)
10050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051for as_dir in $PATH
10052do
10053  IFS=$as_save_IFS
10054  test -z "$as_dir" && as_dir=.
10055    for ac_exec_ext in '' $ac_executable_extensions; do
10056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10057    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059    break 2
10060  fi
10061done
10062  done
10063IFS=$as_save_IFS
10064
10065  ;;
10066esac
10067fi
10068UNZIP=$ac_cv_path_UNZIP
10069if test -n "$UNZIP"; then
10070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10071$as_echo "$UNZIP" >&6; }
10072else
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074$as_echo "no" >&6; }
10075fi
10076
10077
10078  test -n "$UNZIP" && break
10079done
10080
10081
10082    if test "x$UNZIP" = x; then
10083        if test "xunzip" = x; then
10084          PROG_NAME=unzip
10085        else
10086          PROG_NAME=unzip
10087        fi
10088        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10089$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10090        as_fn_error $? "Cannot continue" "$LINENO" 5
10091    fi
10092
10093
10094
10095    for ac_prog in zip
10096do
10097  # Extract the first word of "$ac_prog", so it can be a program name with args.
10098set dummy $ac_prog; ac_word=$2
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100$as_echo_n "checking for $ac_word... " >&6; }
10101if ${ac_cv_path_ZIP+:} false; then :
10102  $as_echo_n "(cached) " >&6
10103else
10104  case $ZIP in
10105  [\\/]* | ?:[\\/]*)
10106  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10107  ;;
10108  *)
10109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10110for as_dir in $PATH
10111do
10112  IFS=$as_save_IFS
10113  test -z "$as_dir" && as_dir=.
10114    for ac_exec_ext in '' $ac_executable_extensions; do
10115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10116    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10118    break 2
10119  fi
10120done
10121  done
10122IFS=$as_save_IFS
10123
10124  ;;
10125esac
10126fi
10127ZIP=$ac_cv_path_ZIP
10128if test -n "$ZIP"; then
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10130$as_echo "$ZIP" >&6; }
10131else
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137  test -n "$ZIP" && break
10138done
10139
10140
10141    if test "x$ZIP" = x; then
10142        if test "xzip" = x; then
10143          PROG_NAME=zip
10144        else
10145          PROG_NAME=zip
10146        fi
10147        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10148$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10149        as_fn_error $? "Cannot continue" "$LINENO" 5
10150    fi
10151
10152
10153
10154# Non-required basic tools
10155
10156# Extract the first word of "ldd", so it can be a program name with args.
10157set dummy ldd; ac_word=$2
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10159$as_echo_n "checking for $ac_word... " >&6; }
10160if ${ac_cv_path_LDD+:} false; then :
10161  $as_echo_n "(cached) " >&6
10162else
10163  case $LDD in
10164  [\\/]* | ?:[\\/]*)
10165  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10166  ;;
10167  *)
10168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169for as_dir in $PATH
10170do
10171  IFS=$as_save_IFS
10172  test -z "$as_dir" && as_dir=.
10173    for ac_exec_ext in '' $ac_executable_extensions; do
10174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10175    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177    break 2
10178  fi
10179done
10180  done
10181IFS=$as_save_IFS
10182
10183  ;;
10184esac
10185fi
10186LDD=$ac_cv_path_LDD
10187if test -n "$LDD"; then
10188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10189$as_echo "$LDD" >&6; }
10190else
10191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192$as_echo "no" >&6; }
10193fi
10194
10195
10196if test "x$LDD" = "x"; then
10197    # List shared lib dependencies is used for
10198    # debug output and checking for forbidden dependencies.
10199    # We can build without it.
10200    LDD="true"
10201fi
10202# Extract the first word of "otool", so it can be a program name with args.
10203set dummy otool; ac_word=$2
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10205$as_echo_n "checking for $ac_word... " >&6; }
10206if ${ac_cv_path_OTOOL+:} false; then :
10207  $as_echo_n "(cached) " >&6
10208else
10209  case $OTOOL in
10210  [\\/]* | ?:[\\/]*)
10211  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10212  ;;
10213  *)
10214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10215for as_dir in $PATH
10216do
10217  IFS=$as_save_IFS
10218  test -z "$as_dir" && as_dir=.
10219    for ac_exec_ext in '' $ac_executable_extensions; do
10220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10221    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10223    break 2
10224  fi
10225done
10226  done
10227IFS=$as_save_IFS
10228
10229  ;;
10230esac
10231fi
10232OTOOL=$ac_cv_path_OTOOL
10233if test -n "$OTOOL"; then
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10235$as_echo "$OTOOL" >&6; }
10236else
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242if test "x$OTOOL" = "x"; then
10243   OTOOL="true"
10244fi
10245for ac_prog in readelf greadelf
10246do
10247  # Extract the first word of "$ac_prog", so it can be a program name with args.
10248set dummy $ac_prog; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if ${ac_cv_path_READELF+:} false; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $READELF in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277READELF=$ac_cv_path_READELF
10278if test -n "$READELF"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10280$as_echo "$READELF" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287  test -n "$READELF" && break
10288done
10289
10290# Extract the first word of "hg", so it can be a program name with args.
10291set dummy hg; ac_word=$2
10292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10293$as_echo_n "checking for $ac_word... " >&6; }
10294if ${ac_cv_path_HG+:} false; then :
10295  $as_echo_n "(cached) " >&6
10296else
10297  case $HG in
10298  [\\/]* | ?:[\\/]*)
10299  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10300  ;;
10301  *)
10302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10303for as_dir in $PATH
10304do
10305  IFS=$as_save_IFS
10306  test -z "$as_dir" && as_dir=.
10307    for ac_exec_ext in '' $ac_executable_extensions; do
10308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10309    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10311    break 2
10312  fi
10313done
10314  done
10315IFS=$as_save_IFS
10316
10317  ;;
10318esac
10319fi
10320HG=$ac_cv_path_HG
10321if test -n "$HG"; then
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10323$as_echo "$HG" >&6; }
10324else
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
10327fi
10328
10329
10330# Extract the first word of "stat", so it can be a program name with args.
10331set dummy stat; ac_word=$2
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10333$as_echo_n "checking for $ac_word... " >&6; }
10334if ${ac_cv_path_STAT+:} false; then :
10335  $as_echo_n "(cached) " >&6
10336else
10337  case $STAT in
10338  [\\/]* | ?:[\\/]*)
10339  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10340  ;;
10341  *)
10342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10349    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357  ;;
10358esac
10359fi
10360STAT=$ac_cv_path_STAT
10361if test -n "$STAT"; then
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10363$as_echo "$STAT" >&6; }
10364else
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
10367fi
10368
10369
10370# Extract the first word of "time", so it can be a program name with args.
10371set dummy time; ac_word=$2
10372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10373$as_echo_n "checking for $ac_word... " >&6; }
10374if ${ac_cv_path_TIME+:} false; then :
10375  $as_echo_n "(cached) " >&6
10376else
10377  case $TIME in
10378  [\\/]* | ?:[\\/]*)
10379  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10380  ;;
10381  *)
10382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10383for as_dir in $PATH
10384do
10385  IFS=$as_save_IFS
10386  test -z "$as_dir" && as_dir=.
10387    for ac_exec_ext in '' $ac_executable_extensions; do
10388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10389    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10391    break 2
10392  fi
10393done
10394  done
10395IFS=$as_save_IFS
10396
10397  ;;
10398esac
10399fi
10400TIME=$ac_cv_path_TIME
10401if test -n "$TIME"; then
10402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10403$as_echo "$TIME" >&6; }
10404else
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
10407fi
10408
10409
10410# Check if it's GNU time
10411IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10412if test "x$IS_GNU_TIME" != x; then
10413  IS_GNU_TIME=yes
10414else
10415  IS_GNU_TIME=no
10416fi
10417
10418
10419if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10420
10421    for ac_prog in comm
10422do
10423  # Extract the first word of "$ac_prog", so it can be a program name with args.
10424set dummy $ac_prog; ac_word=$2
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426$as_echo_n "checking for $ac_word... " >&6; }
10427if ${ac_cv_path_COMM+:} false; then :
10428  $as_echo_n "(cached) " >&6
10429else
10430  case $COMM in
10431  [\\/]* | ?:[\\/]*)
10432  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10433  ;;
10434  *)
10435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436for as_dir in $PATH
10437do
10438  IFS=$as_save_IFS
10439  test -z "$as_dir" && as_dir=.
10440    for ac_exec_ext in '' $ac_executable_extensions; do
10441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444    break 2
10445  fi
10446done
10447  done
10448IFS=$as_save_IFS
10449
10450  ;;
10451esac
10452fi
10453COMM=$ac_cv_path_COMM
10454if test -n "$COMM"; then
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10456$as_echo "$COMM" >&6; }
10457else
10458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
10460fi
10461
10462
10463  test -n "$COMM" && break
10464done
10465
10466
10467    if test "x$COMM" = x; then
10468        if test "xcomm" = x; then
10469          PROG_NAME=comm
10470        else
10471          PROG_NAME=comm
10472        fi
10473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10474$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10475        as_fn_error $? "Cannot continue" "$LINENO" 5
10476    fi
10477
10478
10479fi
10480
10481if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10482
10483    for ac_prog in xattr
10484do
10485  # Extract the first word of "$ac_prog", so it can be a program name with args.
10486set dummy $ac_prog; ac_word=$2
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488$as_echo_n "checking for $ac_word... " >&6; }
10489if ${ac_cv_path_XATTR+:} false; then :
10490  $as_echo_n "(cached) " >&6
10491else
10492  case $XATTR in
10493  [\\/]* | ?:[\\/]*)
10494  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10495  ;;
10496  *)
10497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512  ;;
10513esac
10514fi
10515XATTR=$ac_cv_path_XATTR
10516if test -n "$XATTR"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10518$as_echo "$XATTR" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  test -n "$XATTR" && break
10526done
10527
10528
10529    if test "x$XATTR" = x; then
10530        if test "xxattr" = x; then
10531          PROG_NAME=xattr
10532        else
10533          PROG_NAME=xattr
10534        fi
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10536$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10537        as_fn_error $? "Cannot continue" "$LINENO" 5
10538    fi
10539
10540
10541  # Extract the first word of "codesign", so it can be a program name with args.
10542set dummy codesign; ac_word=$2
10543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544$as_echo_n "checking for $ac_word... " >&6; }
10545if ${ac_cv_path_CODESIGN+:} false; then :
10546  $as_echo_n "(cached) " >&6
10547else
10548  case $CODESIGN in
10549  [\\/]* | ?:[\\/]*)
10550  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10551  ;;
10552  *)
10553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554for as_dir in $PATH
10555do
10556  IFS=$as_save_IFS
10557  test -z "$as_dir" && as_dir=.
10558    for ac_exec_ext in '' $ac_executable_extensions; do
10559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10562    break 2
10563  fi
10564done
10565  done
10566IFS=$as_save_IFS
10567
10568  ;;
10569esac
10570fi
10571CODESIGN=$ac_cv_path_CODESIGN
10572if test -n "$CODESIGN"; then
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10574$as_echo "$CODESIGN" >&6; }
10575else
10576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577$as_echo "no" >&6; }
10578fi
10579
10580
10581  if test "x$CODESIGN" != "x"; then
10582    # Verify that the openjdk_codesign certificate is present
10583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10584$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10585    rm -f codesign-testfile
10586    touch codesign-testfile
10587    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10588    rm -f codesign-testfile
10589    if test "x$CODESIGN" = x; then
10590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
10592    else
10593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10594$as_echo "yes" >&6; }
10595    fi
10596  fi
10597fi
10598
10599
10600# Check if pkg-config is available.
10601
10602
10603if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10604	if test -n "$ac_tool_prefix"; then
10605  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10606set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10608$as_echo_n "checking for $ac_word... " >&6; }
10609if ${ac_cv_path_PKG_CONFIG+:} false; then :
10610  $as_echo_n "(cached) " >&6
10611else
10612  case $PKG_CONFIG in
10613  [\\/]* | ?:[\\/]*)
10614  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10615  ;;
10616  *)
10617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10618for as_dir in $PATH
10619do
10620  IFS=$as_save_IFS
10621  test -z "$as_dir" && as_dir=.
10622    for ac_exec_ext in '' $ac_executable_extensions; do
10623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10624    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10626    break 2
10627  fi
10628done
10629  done
10630IFS=$as_save_IFS
10631
10632  ;;
10633esac
10634fi
10635PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10636if test -n "$PKG_CONFIG"; then
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10638$as_echo "$PKG_CONFIG" >&6; }
10639else
10640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
10642fi
10643
10644
10645fi
10646if test -z "$ac_cv_path_PKG_CONFIG"; then
10647  ac_pt_PKG_CONFIG=$PKG_CONFIG
10648  # Extract the first word of "pkg-config", so it can be a program name with args.
10649set dummy pkg-config; ac_word=$2
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651$as_echo_n "checking for $ac_word... " >&6; }
10652if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10653  $as_echo_n "(cached) " >&6
10654else
10655  case $ac_pt_PKG_CONFIG in
10656  [\\/]* | ?:[\\/]*)
10657  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10658  ;;
10659  *)
10660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675  ;;
10676esac
10677fi
10678ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10679if test -n "$ac_pt_PKG_CONFIG"; then
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10681$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686
10687  if test "x$ac_pt_PKG_CONFIG" = x; then
10688    PKG_CONFIG=""
10689  else
10690    case $cross_compiling:$ac_tool_warned in
10691yes:)
10692{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10693$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10694ac_tool_warned=yes ;;
10695esac
10696    PKG_CONFIG=$ac_pt_PKG_CONFIG
10697  fi
10698else
10699  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10700fi
10701
10702fi
10703if test -n "$PKG_CONFIG"; then
10704	_pkg_min_version=0.9.0
10705	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10706$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10707	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10708		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10709$as_echo "yes" >&6; }
10710	else
10711		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
10713		PKG_CONFIG=""
10714	fi
10715
10716fi
10717
10718# After basic tools have been setup, we can check build os specific details.
10719
10720###############################################################################
10721
10722# Note that this is the build platform OS version!
10723
10724OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10725OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10726OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10727OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10728
10729
10730
10731
10732
10733# Setup builddeps, for automatic downloading of tools we need.
10734# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10735# boot-jdk setup, but we need to have basic tools setup first.
10736
10737
10738# Check whether --with-builddeps-conf was given.
10739if test "${with_builddeps_conf+set}" = set; then :
10740  withval=$with_builddeps_conf;
10741fi
10742
10743
10744
10745# Check whether --with-builddeps-server was given.
10746if test "${with_builddeps_server+set}" = set; then :
10747  withval=$with_builddeps_server;
10748fi
10749
10750
10751
10752# Check whether --with-builddeps-dir was given.
10753if test "${with_builddeps_dir+set}" = set; then :
10754  withval=$with_builddeps_dir;
10755else
10756  with_builddeps_dir=/localhome/builddeps
10757fi
10758
10759
10760
10761# Check whether --with-builddeps-group was given.
10762if test "${with_builddeps_group+set}" = set; then :
10763  withval=$with_builddeps_group;
10764fi
10765
10766
10767
10768
10769    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10770        if test "x$with_builddeps_conf" != x; then
10771            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10772$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10773            builddepsfile=$with_builddeps_conf
10774            if test -s $builddepsfile; then
10775                . $builddepsfile
10776                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10777$as_echo "loaded!" >&6; }
10778            else
10779               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10780           fi
10781        else
10782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10783$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10784            builddepsfile=`mktemp`
10785            touch $builddepsfile
10786            # Put all found confs into a single file.
10787            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10788            # Source the file to acquire the variables
10789            if test -s $builddepsfile; then
10790                . $builddepsfile
10791                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10792$as_echo "found at least one!" >&6; }
10793            else
10794               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10795           fi
10796        fi
10797        # Create build and target names that use _ instead of "-" and ".".
10798        # This is necessary to use them in variable names.
10799        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10800        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10801        # Extract rewrite information for build and target
10802        eval rewritten_build=\${REWRITE_${build_var}}
10803        if test "x$rewritten_build" = x; then
10804            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10805            echo Build stays the same $rewritten_build
10806        else
10807            echo Rewriting build for builddeps into $rewritten_build
10808        fi
10809        eval rewritten_target=\${REWRITE_${target_var}}
10810        if test "x$rewritten_target" = x; then
10811            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10812            echo Target stays the same $rewritten_target
10813        else
10814            echo Rewriting target for builddeps into $rewritten_target
10815        fi
10816        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10817        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10818    fi
10819    for ac_prog in 7z unzip
10820do
10821  # Extract the first word of "$ac_prog", so it can be a program name with args.
10822set dummy $ac_prog; ac_word=$2
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824$as_echo_n "checking for $ac_word... " >&6; }
10825if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10826  $as_echo_n "(cached) " >&6
10827else
10828  if test -n "$BDEPS_UNZIP"; then
10829  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10830else
10831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10832for as_dir in $PATH
10833do
10834  IFS=$as_save_IFS
10835  test -z "$as_dir" && as_dir=.
10836    for ac_exec_ext in '' $ac_executable_extensions; do
10837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10838    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10840    break 2
10841  fi
10842done
10843  done
10844IFS=$as_save_IFS
10845
10846fi
10847fi
10848BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10849if test -n "$BDEPS_UNZIP"; then
10850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10851$as_echo "$BDEPS_UNZIP" >&6; }
10852else
10853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10854$as_echo "no" >&6; }
10855fi
10856
10857
10858  test -n "$BDEPS_UNZIP" && break
10859done
10860
10861    if test "x$BDEPS_UNZIP" = x7z; then
10862        BDEPS_UNZIP="7z x"
10863    fi
10864
10865    for ac_prog in wget lftp ftp
10866do
10867  # Extract the first word of "$ac_prog", so it can be a program name with args.
10868set dummy $ac_prog; ac_word=$2
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10870$as_echo_n "checking for $ac_word... " >&6; }
10871if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10872  $as_echo_n "(cached) " >&6
10873else
10874  if test -n "$BDEPS_FTP"; then
10875  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10876else
10877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_prog_BDEPS_FTP="$ac_prog"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892fi
10893fi
10894BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10895if test -n "$BDEPS_FTP"; then
10896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10897$as_echo "$BDEPS_FTP" >&6; }
10898else
10899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10900$as_echo "no" >&6; }
10901fi
10902
10903
10904  test -n "$BDEPS_FTP" && break
10905done
10906
10907
10908
10909###############################################################################
10910#
10911# Determine OpenJDK variants, options and version numbers.
10912#
10913###############################################################################
10914
10915# We need build & target for this.
10916
10917
10918###############################################################################
10919#
10920# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10921# We always build headless support.
10922#
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10924$as_echo_n "checking headful support... " >&6; }
10925# Check whether --enable-headful was given.
10926if test "${enable_headful+set}" = set; then :
10927  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10928else
10929  SUPPORT_HEADFUL=yes
10930fi
10931
10932
10933SUPPORT_HEADLESS=yes
10934BUILD_HEADLESS="BUILD_HEADLESS:=true"
10935
10936if test "x$SUPPORT_HEADFUL" = xyes; then
10937    # We are building both headful and headless.
10938    headful_msg="inlude support for both headful and headless"
10939fi
10940
10941if test "x$SUPPORT_HEADFUL" = xno; then
10942    # Thus we are building headless only.
10943    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10944    headful_msg="headless only"
10945fi
10946
10947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10948$as_echo "$headful_msg" >&6; }
10949
10950
10951
10952
10953
10954# Control wether Hotspot runs Queens test after build.
10955# Check whether --enable-hotspot-test-in-build was given.
10956if test "${enable_hotspot_test_in_build+set}" = set; then :
10957  enableval=$enable_hotspot_test_in_build;
10958else
10959  enable_hotspot_test_in_build=no
10960fi
10961
10962if test "x$enable_hotspot_test_in_build" = "xyes"; then
10963    TEST_IN_BUILD=true
10964else
10965    TEST_IN_BUILD=false
10966fi
10967
10968
10969###############################################################################
10970#
10971# Choose cacerts source file
10972#
10973
10974# Check whether --with-cacerts-file was given.
10975if test "${with_cacerts_file+set}" = set; then :
10976  withval=$with_cacerts_file;
10977fi
10978
10979if test "x$with_cacerts_file" != x; then
10980    CACERTS_FILE=$with_cacerts_file
10981else
10982    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10983fi
10984
10985
10986###############################################################################
10987#
10988# Enable or disable unlimited crypto
10989#
10990# Check whether --enable-unlimited-crypto was given.
10991if test "${enable_unlimited_crypto+set}" = set; then :
10992  enableval=$enable_unlimited_crypto;
10993else
10994  enable_unlimited_crypto=no
10995fi
10996
10997if test "x$enable_unlimited_crypto" = "xyes"; then
10998    UNLIMITED_CRYPTO=true
10999else
11000    UNLIMITED_CRYPTO=false
11001fi
11002
11003
11004###############################################################################
11005#
11006# Enable or disable the elliptic curve crypto implementation
11007#
11008
11009
11010###############################################################################
11011#
11012# Compress jars
11013#
11014COMPRESS_JARS=false
11015
11016
11017
11018
11019# Source the version numbers
11020. $AUTOCONF_DIR/version-numbers
11021
11022# Get the settings from parameters
11023
11024# Check whether --with-milestone was given.
11025if test "${with_milestone+set}" = set; then :
11026  withval=$with_milestone;
11027fi
11028
11029if test "x$with_milestone" = xyes; then
11030  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11031elif test "x$with_milestone" != x; then
11032    MILESTONE="$with_milestone"
11033fi
11034if test "x$MILESTONE" = x; then
11035  MILESTONE=internal
11036fi
11037
11038
11039# Check whether --with-update-version was given.
11040if test "${with_update_version+set}" = set; then :
11041  withval=$with_update_version;
11042fi
11043
11044if test "x$with_update_version" = xyes; then
11045  as_fn_error $? "Update version must have a value" "$LINENO" 5
11046elif test "x$with_update_version" != x; then
11047  JDK_UPDATE_VERSION="$with_update_version"
11048fi
11049
11050
11051# Check whether --with-build-number was given.
11052if test "${with_build_number+set}" = set; then :
11053  withval=$with_build_number;
11054fi
11055
11056if test "x$with_build_number" = xyes; then
11057  as_fn_error $? "Build number must have a value" "$LINENO" 5
11058elif test "x$with_build_number" != x; then
11059  JDK_BUILD_NUMBER="$with_build_number"
11060fi
11061if test "x$JDK_BUILD_NUMBER" = x; then
11062  JDK_BUILD_NUMBER=b00
11063fi
11064
11065
11066# Check whether --with-user-release-suffix was given.
11067if test "${with_user_release_suffix+set}" = set; then :
11068  withval=$with_user_release_suffix;
11069fi
11070
11071if test "x$with_user_release_suffix" = xyes; then
11072  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11073elif test "x$with_user_release_suffix" != x; then
11074  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11075else
11076  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11077  # Avoid [:alnum:] since it depends on the locale.
11078  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11079  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11080fi
11081
11082
11083# Now set the JDK version, milestone, build number etc.
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098COPYRIGHT_YEAR=`date +'%Y'`
11099
11100
11101if test "x$JDK_UPDATE_VERSION" != x; then
11102  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11103else
11104  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11105fi
11106
11107
11108COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11109
11110
11111
11112###############################################################################
11113#
11114# Setup BootJDK, used to bootstrap the build.
11115#
11116###############################################################################
11117
11118
11119BOOT_JDK_FOUND=no
11120
11121# Check whether --with-boot-jdk was given.
11122if test "${with_boot_jdk+set}" = set; then :
11123  withval=$with_boot_jdk;
11124fi
11125
11126
11127# We look for the Boot JDK through various means, going from more certain to
11128# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11129# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11130# must check if this is indeed valid; otherwise we'll continue looking.
11131
11132# Test: Is bootjdk explicitely set by command line arguments?
11133
11134  if test "x$BOOT_JDK_FOUND" = xno; then
11135    # Now execute the test
11136
11137if test "x$with_boot_jdk" != x; then
11138    BOOT_JDK=$with_boot_jdk
11139    BOOT_JDK_FOUND=maybe
11140    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11141$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11142fi
11143
11144
11145    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11146    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11147      # Do we have a bin/java?
11148      if test ! -x "$BOOT_JDK/bin/java"; then
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11151        BOOT_JDK_FOUND=no
11152      else
11153        # Do we have a bin/javac?
11154        if test ! -x "$BOOT_JDK/bin/javac"; then
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11157          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11158$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11159          BOOT_JDK_FOUND=no
11160        else
11161          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11162          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11165            BOOT_JDK_FOUND=no
11166          else
11167            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11168            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11169
11170            # Extra M4 quote needed to protect [] in grep expression.
11171            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11172            if test "x$FOUND_VERSION_78" = x; then
11173              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11175              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11176$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11177              BOOT_JDK_FOUND=no
11178            else
11179              # We're done! :-)
11180              BOOT_JDK_FOUND=yes
11181
11182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11183
11184  # Input might be given as Windows format, start by converting to
11185  # unix format.
11186  path="$BOOT_JDK"
11187  new_path=`$CYGPATH -u "$path"`
11188
11189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11192  # "foo.exe" is OK but "foo" is an error.
11193  #
11194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11195  # It is also a way to make sure we got the proper file name for the real test later on.
11196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11197  if test "x$test_shortpath" = x; then
11198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11201  fi
11202
11203  # Call helper function which possibly converts this using DOS-style short mode.
11204  # If so, the updated path is stored in $new_path.
11205
11206  input_path="$new_path"
11207  # Check if we need to convert this using DOS-style short mode. If the path
11208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11209  # take no chances and rewrite it.
11210  # Note: m4 eats our [], so we need to use [ and ] instead.
11211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11212  if test "x$has_forbidden_chars" != x; then
11213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11217      # Going to short mode and back again did indeed matter. Since short mode is
11218      # case insensitive, let's make it lowercase to improve readability.
11219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11220      # Now convert it back to Unix-stile (cygpath)
11221      input_path=`$CYGPATH -u "$shortmode_path"`
11222      new_path="$input_path"
11223    fi
11224  fi
11225
11226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11227  if test "x$test_cygdrive_prefix" = x; then
11228    # As a simple fix, exclude /usr/bin since it's not a real path.
11229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11231      # a path prefixed by /cygdrive for fixpath to work.
11232      new_path="$CYGWIN_ROOT_PATH$input_path"
11233    fi
11234  fi
11235
11236
11237  if test "x$path" != "x$new_path"; then
11238    BOOT_JDK="$new_path"
11239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11241  fi
11242
11243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11244
11245  path="$BOOT_JDK"
11246  has_colon=`$ECHO $path | $GREP ^.:`
11247  new_path="$path"
11248  if test "x$has_colon" = x; then
11249    # Not in mixed or Windows style, start by that.
11250    new_path=`cmd //c echo $path`
11251  fi
11252
11253
11254  input_path="$new_path"
11255  # Check if we need to convert this using DOS-style short mode. If the path
11256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11257  # take no chances and rewrite it.
11258  # Note: m4 eats our [], so we need to use [ and ] instead.
11259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11260  if test "x$has_forbidden_chars" != x; then
11261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11263  fi
11264
11265
11266  windows_path="$new_path"
11267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11268    unix_path=`$CYGPATH -u "$windows_path"`
11269    new_path="$unix_path"
11270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11272    new_path="$unix_path"
11273  fi
11274
11275  if test "x$path" != "x$new_path"; then
11276    BOOT_JDK="$new_path"
11277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11279  fi
11280
11281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11283
11284  else
11285    # We're on a posix platform. Hooray! :)
11286    path="$BOOT_JDK"
11287    has_space=`$ECHO "$path" | $GREP " "`
11288    if test "x$has_space" != x; then
11289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11291      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11292    fi
11293
11294    # Use eval to expand a potential ~
11295    eval path="$path"
11296    if test ! -f "$path" && test ! -d "$path"; then
11297      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11298    fi
11299
11300    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11301  fi
11302
11303              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11304$as_echo_n "checking for Boot JDK... " >&6; }
11305              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11306$as_echo "$BOOT_JDK" >&6; }
11307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11308$as_echo_n "checking Boot JDK version... " >&6; }
11309              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11311$as_echo "$BOOT_JDK_VERSION" >&6; }
11312            fi # end check jdk version
11313          fi # end check rt.jar
11314        fi # end check javac
11315      fi # end check java
11316    fi # end check boot jdk found
11317  fi
11318
11319if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11320  # Having specified an argument which is incorrect will produce an instant failure;
11321  # we should not go on looking
11322  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11323fi
11324
11325# Test: Is bootjdk available from builddeps?
11326
11327  if test "x$BOOT_JDK_FOUND" = xno; then
11328    # Now execute the test
11329
11330
11331
11332    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11333        # Source the builddeps file again, to make sure it uses the latest variables!
11334        . $builddepsfile
11335        # Look for a target and build machine specific resource!
11336        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11337        if test "x$resource" = x; then
11338            # Ok, lets instead look for a target specific resource
11339            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11340        fi
11341        if test "x$resource" = x; then
11342            # Ok, lets instead look for a build specific resource
11343            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11344        fi
11345        if test "x$resource" = x; then
11346            # Ok, lets instead look for a generic resource
11347            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11348            resource=${builddep_bootjdk}
11349        fi
11350        if test "x$resource" != x; then
11351            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11352$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11353	    # If the resource in the builddeps.conf file is an existing directory,
11354	    # for example /java/linux/cups
11355	    if test -d ${resource}; then
11356	       depdir=${resource}
11357	    else
11358
11359# bootjdk is for example mymodule
11360# $resource is for example libs/general/libmymod_1_2_3.zip
11361# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11362# $with_builddeps_dir is for example /localhome/builddeps
11363# depdir is the name of the variable into which we store the depdir, eg MYMOD
11364# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11365# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11366    filename=`basename $resource`
11367    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11368    filebase=${filename%%.*}
11369    extension=${filename#*.}
11370    installdir=$with_builddeps_dir/$filebase
11371    if test ! -f $installdir/$filename.unpacked; then
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11373$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11374        if test ! -d $installdir; then
11375            mkdir -p $installdir
11376        fi
11377        if test ! -d $installdir; then
11378            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11379        fi
11380        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11381        touch $tmpfile
11382        if test ! -f $tmpfile; then
11383            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11384        fi
11385
11386    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11387    # $tmpfile is the local file name for the downloaded file.
11388    VALID_TOOL=no
11389    if test "x$BDEPS_FTP" = xwget; then
11390       VALID_TOOL=yes
11391       wget -O $tmpfile $with_builddeps_server/$resource
11392    fi
11393    if test "x$BDEPS_FTP" = xlftp; then
11394       VALID_TOOL=yes
11395       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11396    fi
11397    if test "x$BDEPS_FTP" = xftp; then
11398        VALID_TOOL=yes
11399        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11400        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11401        FTPUSERPWD=${FTPSERVER%%@*}
11402        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11403            FTPUSER=${userpwd%%:*}
11404            FTPPWD=${userpwd#*@}
11405            FTPSERVER=${FTPSERVER#*@}
11406        else
11407            FTPUSER=ftp
11408            FTPPWD=ftp
11409        fi
11410        # the "pass" command does not work on some
11411        # ftp clients (read ftp.exe) but if it works,
11412        # passive mode is better!
11413        (\
11414            echo "user $FTPUSER $FTPPWD"        ;\
11415            echo "pass"                         ;\
11416            echo "bin"                          ;\
11417            echo "get $FTPPATH $tmpfile"              ;\
11418        ) | ftp -in $FTPSERVER
11419    fi
11420    if test "x$VALID_TOOL" != xyes; then
11421       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11422    fi
11423
11424        mv $tmpfile $installdir/$filename
11425        if test ! -s $installdir/$filename; then
11426            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11427        fi
11428        case "$extension" in
11429            zip)  echo "Unzipping $installdir/$filename..."
11430               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11431            ;;
11432            tar.gz) echo "Untaring $installdir/$filename..."
11433               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11434            ;;
11435            tgz) echo "Untaring $installdir/$filename..."
11436               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11437            ;;
11438            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11439            ;;
11440        esac
11441    fi
11442    if test -f $installdir/$filename.unpacked; then
11443        depdir=$installdir
11444    fi
11445
11446	    fi
11447            # Source the builddeps file again, because in the previous command, the depdir
11448            # was updated to point at the current build dependency install directory.
11449            . $builddepsfile
11450            # Now extract variables from the builddeps.conf files.
11451            theroot=${builddep_bootjdk_ROOT}
11452            thecflags=${builddep_bootjdk_CFLAGS}
11453            thelibs=${builddep_bootjdk_LIBS}
11454            if test "x$depdir" = x; then
11455                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11456            fi
11457            BOOT_JDK=$depdir
11458            if test "x$theroot" != x; then
11459               BOOT_JDK="$theroot"
11460            fi
11461            if test "x$thecflags" != x; then
11462               BOOT_JDK_CFLAGS="$thecflags"
11463            fi
11464            if test "x$thelibs" != x; then
11465               BOOT_JDK_LIBS="$thelibs"
11466            fi
11467            BOOT_JDK_FOUND=maybe
11468            else BOOT_JDK_FOUND=no
11469
11470        fi
11471        else BOOT_JDK_FOUND=no
11472
11473    fi
11474
11475
11476
11477    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11478    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11479      # Do we have a bin/java?
11480      if test ! -x "$BOOT_JDK/bin/java"; then
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11483        BOOT_JDK_FOUND=no
11484      else
11485        # Do we have a bin/javac?
11486        if test ! -x "$BOOT_JDK/bin/javac"; then
11487          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11489          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11490$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11491          BOOT_JDK_FOUND=no
11492        else
11493          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11494          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11495            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11497            BOOT_JDK_FOUND=no
11498          else
11499            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11501
11502            # Extra M4 quote needed to protect [] in grep expression.
11503            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11504            if test "x$FOUND_VERSION_78" = x; then
11505              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11507              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11508$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11509              BOOT_JDK_FOUND=no
11510            else
11511              # We're done! :-)
11512              BOOT_JDK_FOUND=yes
11513
11514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11515
11516  # Input might be given as Windows format, start by converting to
11517  # unix format.
11518  path="$BOOT_JDK"
11519  new_path=`$CYGPATH -u "$path"`
11520
11521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11524  # "foo.exe" is OK but "foo" is an error.
11525  #
11526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11527  # It is also a way to make sure we got the proper file name for the real test later on.
11528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11529  if test "x$test_shortpath" = x; then
11530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11532    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11533  fi
11534
11535  # Call helper function which possibly converts this using DOS-style short mode.
11536  # If so, the updated path is stored in $new_path.
11537
11538  input_path="$new_path"
11539  # Check if we need to convert this using DOS-style short mode. If the path
11540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11541  # take no chances and rewrite it.
11542  # Note: m4 eats our [], so we need to use [ and ] instead.
11543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11544  if test "x$has_forbidden_chars" != x; then
11545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11549      # Going to short mode and back again did indeed matter. Since short mode is
11550      # case insensitive, let's make it lowercase to improve readability.
11551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11552      # Now convert it back to Unix-stile (cygpath)
11553      input_path=`$CYGPATH -u "$shortmode_path"`
11554      new_path="$input_path"
11555    fi
11556  fi
11557
11558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11559  if test "x$test_cygdrive_prefix" = x; then
11560    # As a simple fix, exclude /usr/bin since it's not a real path.
11561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11563      # a path prefixed by /cygdrive for fixpath to work.
11564      new_path="$CYGWIN_ROOT_PATH$input_path"
11565    fi
11566  fi
11567
11568
11569  if test "x$path" != "x$new_path"; then
11570    BOOT_JDK="$new_path"
11571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11573  fi
11574
11575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11576
11577  path="$BOOT_JDK"
11578  has_colon=`$ECHO $path | $GREP ^.:`
11579  new_path="$path"
11580  if test "x$has_colon" = x; then
11581    # Not in mixed or Windows style, start by that.
11582    new_path=`cmd //c echo $path`
11583  fi
11584
11585
11586  input_path="$new_path"
11587  # Check if we need to convert this using DOS-style short mode. If the path
11588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11589  # take no chances and rewrite it.
11590  # Note: m4 eats our [], so we need to use [ and ] instead.
11591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11592  if test "x$has_forbidden_chars" != x; then
11593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11595  fi
11596
11597
11598  windows_path="$new_path"
11599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11600    unix_path=`$CYGPATH -u "$windows_path"`
11601    new_path="$unix_path"
11602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11604    new_path="$unix_path"
11605  fi
11606
11607  if test "x$path" != "x$new_path"; then
11608    BOOT_JDK="$new_path"
11609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11611  fi
11612
11613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11615
11616  else
11617    # We're on a posix platform. Hooray! :)
11618    path="$BOOT_JDK"
11619    has_space=`$ECHO "$path" | $GREP " "`
11620    if test "x$has_space" != x; then
11621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11624    fi
11625
11626    # Use eval to expand a potential ~
11627    eval path="$path"
11628    if test ! -f "$path" && test ! -d "$path"; then
11629      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11630    fi
11631
11632    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11633  fi
11634
11635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11636$as_echo_n "checking for Boot JDK... " >&6; }
11637              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11638$as_echo "$BOOT_JDK" >&6; }
11639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11640$as_echo_n "checking Boot JDK version... " >&6; }
11641              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11643$as_echo "$BOOT_JDK_VERSION" >&6; }
11644            fi # end check jdk version
11645          fi # end check rt.jar
11646        fi # end check javac
11647      fi # end check java
11648    fi # end check boot jdk found
11649  fi
11650
11651
11652# Test: Is $JAVA_HOME set?
11653
11654  if test "x$BOOT_JDK_FOUND" = xno; then
11655    # Now execute the test
11656
11657    if test "x$JAVA_HOME" != x; then
11658        JAVA_HOME_PROCESSED="$JAVA_HOME"
11659
11660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11661
11662  # Input might be given as Windows format, start by converting to
11663  # unix format.
11664  path="$JAVA_HOME_PROCESSED"
11665  new_path=`$CYGPATH -u "$path"`
11666
11667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11670  # "foo.exe" is OK but "foo" is an error.
11671  #
11672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11673  # It is also a way to make sure we got the proper file name for the real test later on.
11674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11675  if test "x$test_shortpath" = x; then
11676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11677$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11678    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11679  fi
11680
11681  # Call helper function which possibly converts this using DOS-style short mode.
11682  # If so, the updated path is stored in $new_path.
11683
11684  input_path="$new_path"
11685  # Check if we need to convert this using DOS-style short mode. If the path
11686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11687  # take no chances and rewrite it.
11688  # Note: m4 eats our [], so we need to use [ and ] instead.
11689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11690  if test "x$has_forbidden_chars" != x; then
11691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11695      # Going to short mode and back again did indeed matter. Since short mode is
11696      # case insensitive, let's make it lowercase to improve readability.
11697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11698      # Now convert it back to Unix-stile (cygpath)
11699      input_path=`$CYGPATH -u "$shortmode_path"`
11700      new_path="$input_path"
11701    fi
11702  fi
11703
11704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11705  if test "x$test_cygdrive_prefix" = x; then
11706    # As a simple fix, exclude /usr/bin since it's not a real path.
11707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11709      # a path prefixed by /cygdrive for fixpath to work.
11710      new_path="$CYGWIN_ROOT_PATH$input_path"
11711    fi
11712  fi
11713
11714
11715  if test "x$path" != "x$new_path"; then
11716    JAVA_HOME_PROCESSED="$new_path"
11717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11718$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11719  fi
11720
11721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11722
11723  path="$JAVA_HOME_PROCESSED"
11724  has_colon=`$ECHO $path | $GREP ^.:`
11725  new_path="$path"
11726  if test "x$has_colon" = x; then
11727    # Not in mixed or Windows style, start by that.
11728    new_path=`cmd //c echo $path`
11729  fi
11730
11731
11732  input_path="$new_path"
11733  # Check if we need to convert this using DOS-style short mode. If the path
11734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11735  # take no chances and rewrite it.
11736  # Note: m4 eats our [], so we need to use [ and ] instead.
11737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11738  if test "x$has_forbidden_chars" != x; then
11739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11741  fi
11742
11743
11744  windows_path="$new_path"
11745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11746    unix_path=`$CYGPATH -u "$windows_path"`
11747    new_path="$unix_path"
11748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11750    new_path="$unix_path"
11751  fi
11752
11753  if test "x$path" != "x$new_path"; then
11754    JAVA_HOME_PROCESSED="$new_path"
11755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11756$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11757  fi
11758
11759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11761
11762  else
11763    # We're on a posix platform. Hooray! :)
11764    path="$JAVA_HOME_PROCESSED"
11765    has_space=`$ECHO "$path" | $GREP " "`
11766    if test "x$has_space" != x; then
11767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11768$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11770    fi
11771
11772    # Use eval to expand a potential ~
11773    eval path="$path"
11774    if test ! -f "$path" && test ! -d "$path"; then
11775      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11776    fi
11777
11778    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11779  fi
11780
11781        if test ! -d "$JAVA_HOME_PROCESSED"; then
11782            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11783$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11784        else
11785          # Aha, the user has set a JAVA_HOME
11786          # let us use that as the Boot JDK.
11787          BOOT_JDK="$JAVA_HOME_PROCESSED"
11788          BOOT_JDK_FOUND=maybe
11789          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11790$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11791        fi
11792    fi
11793
11794
11795    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11796    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11797      # Do we have a bin/java?
11798      if test ! -x "$BOOT_JDK/bin/java"; then
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11801        BOOT_JDK_FOUND=no
11802      else
11803        # Do we have a bin/javac?
11804        if test ! -x "$BOOT_JDK/bin/javac"; then
11805          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11807          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11808$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11809          BOOT_JDK_FOUND=no
11810        else
11811          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11812          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11813            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11815            BOOT_JDK_FOUND=no
11816          else
11817            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11818            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11819
11820            # Extra M4 quote needed to protect [] in grep expression.
11821            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11822            if test "x$FOUND_VERSION_78" = x; then
11823              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11825              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11826$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11827              BOOT_JDK_FOUND=no
11828            else
11829              # We're done! :-)
11830              BOOT_JDK_FOUND=yes
11831
11832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11833
11834  # Input might be given as Windows format, start by converting to
11835  # unix format.
11836  path="$BOOT_JDK"
11837  new_path=`$CYGPATH -u "$path"`
11838
11839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11842  # "foo.exe" is OK but "foo" is an error.
11843  #
11844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11845  # It is also a way to make sure we got the proper file name for the real test later on.
11846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11847  if test "x$test_shortpath" = x; then
11848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11851  fi
11852
11853  # Call helper function which possibly converts this using DOS-style short mode.
11854  # If so, the updated path is stored in $new_path.
11855
11856  input_path="$new_path"
11857  # Check if we need to convert this using DOS-style short mode. If the path
11858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11859  # take no chances and rewrite it.
11860  # Note: m4 eats our [], so we need to use [ and ] instead.
11861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11862  if test "x$has_forbidden_chars" != x; then
11863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11867      # Going to short mode and back again did indeed matter. Since short mode is
11868      # case insensitive, let's make it lowercase to improve readability.
11869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11870      # Now convert it back to Unix-stile (cygpath)
11871      input_path=`$CYGPATH -u "$shortmode_path"`
11872      new_path="$input_path"
11873    fi
11874  fi
11875
11876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11877  if test "x$test_cygdrive_prefix" = x; then
11878    # As a simple fix, exclude /usr/bin since it's not a real path.
11879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11881      # a path prefixed by /cygdrive for fixpath to work.
11882      new_path="$CYGWIN_ROOT_PATH$input_path"
11883    fi
11884  fi
11885
11886
11887  if test "x$path" != "x$new_path"; then
11888    BOOT_JDK="$new_path"
11889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11891  fi
11892
11893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11894
11895  path="$BOOT_JDK"
11896  has_colon=`$ECHO $path | $GREP ^.:`
11897  new_path="$path"
11898  if test "x$has_colon" = x; then
11899    # Not in mixed or Windows style, start by that.
11900    new_path=`cmd //c echo $path`
11901  fi
11902
11903
11904  input_path="$new_path"
11905  # Check if we need to convert this using DOS-style short mode. If the path
11906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11907  # take no chances and rewrite it.
11908  # Note: m4 eats our [], so we need to use [ and ] instead.
11909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11910  if test "x$has_forbidden_chars" != x; then
11911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11913  fi
11914
11915
11916  windows_path="$new_path"
11917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11918    unix_path=`$CYGPATH -u "$windows_path"`
11919    new_path="$unix_path"
11920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11922    new_path="$unix_path"
11923  fi
11924
11925  if test "x$path" != "x$new_path"; then
11926    BOOT_JDK="$new_path"
11927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11929  fi
11930
11931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11933
11934  else
11935    # We're on a posix platform. Hooray! :)
11936    path="$BOOT_JDK"
11937    has_space=`$ECHO "$path" | $GREP " "`
11938    if test "x$has_space" != x; then
11939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11941      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11942    fi
11943
11944    # Use eval to expand a potential ~
11945    eval path="$path"
11946    if test ! -f "$path" && test ! -d "$path"; then
11947      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11948    fi
11949
11950    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11951  fi
11952
11953              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11954$as_echo_n "checking for Boot JDK... " >&6; }
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11956$as_echo "$BOOT_JDK" >&6; }
11957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11958$as_echo_n "checking Boot JDK version... " >&6; }
11959              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11961$as_echo "$BOOT_JDK_VERSION" >&6; }
11962            fi # end check jdk version
11963          fi # end check rt.jar
11964        fi # end check javac
11965      fi # end check java
11966    fi # end check boot jdk found
11967  fi
11968
11969
11970# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11971
11972  if test "x$BOOT_JDK_FOUND" = xno; then
11973    # Now execute the test
11974
11975    if test -x /usr/libexec/java_home; then
11976        BOOT_JDK=`/usr/libexec/java_home`
11977        BOOT_JDK_FOUND=maybe
11978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11979$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11980    fi
11981
11982
11983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11985      # Do we have a bin/java?
11986      if test ! -x "$BOOT_JDK/bin/java"; then
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11989        BOOT_JDK_FOUND=no
11990      else
11991        # Do we have a bin/javac?
11992        if test ! -x "$BOOT_JDK/bin/javac"; then
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11997          BOOT_JDK_FOUND=no
11998        else
11999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12003            BOOT_JDK_FOUND=no
12004          else
12005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12007
12008            # Extra M4 quote needed to protect [] in grep expression.
12009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12010            if test "x$FOUND_VERSION_78" = x; then
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12015              BOOT_JDK_FOUND=no
12016            else
12017              # We're done! :-)
12018              BOOT_JDK_FOUND=yes
12019
12020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12021
12022  # Input might be given as Windows format, start by converting to
12023  # unix format.
12024  path="$BOOT_JDK"
12025  new_path=`$CYGPATH -u "$path"`
12026
12027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12030  # "foo.exe" is OK but "foo" is an error.
12031  #
12032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12033  # It is also a way to make sure we got the proper file name for the real test later on.
12034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12035  if test "x$test_shortpath" = x; then
12036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12039  fi
12040
12041  # Call helper function which possibly converts this using DOS-style short mode.
12042  # If so, the updated path is stored in $new_path.
12043
12044  input_path="$new_path"
12045  # Check if we need to convert this using DOS-style short mode. If the path
12046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12047  # take no chances and rewrite it.
12048  # Note: m4 eats our [], so we need to use [ and ] instead.
12049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12050  if test "x$has_forbidden_chars" != x; then
12051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12055      # Going to short mode and back again did indeed matter. Since short mode is
12056      # case insensitive, let's make it lowercase to improve readability.
12057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12058      # Now convert it back to Unix-stile (cygpath)
12059      input_path=`$CYGPATH -u "$shortmode_path"`
12060      new_path="$input_path"
12061    fi
12062  fi
12063
12064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12065  if test "x$test_cygdrive_prefix" = x; then
12066    # As a simple fix, exclude /usr/bin since it's not a real path.
12067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12069      # a path prefixed by /cygdrive for fixpath to work.
12070      new_path="$CYGWIN_ROOT_PATH$input_path"
12071    fi
12072  fi
12073
12074
12075  if test "x$path" != "x$new_path"; then
12076    BOOT_JDK="$new_path"
12077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12079  fi
12080
12081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12082
12083  path="$BOOT_JDK"
12084  has_colon=`$ECHO $path | $GREP ^.:`
12085  new_path="$path"
12086  if test "x$has_colon" = x; then
12087    # Not in mixed or Windows style, start by that.
12088    new_path=`cmd //c echo $path`
12089  fi
12090
12091
12092  input_path="$new_path"
12093  # Check if we need to convert this using DOS-style short mode. If the path
12094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12095  # take no chances and rewrite it.
12096  # Note: m4 eats our [], so we need to use [ and ] instead.
12097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12098  if test "x$has_forbidden_chars" != x; then
12099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12101  fi
12102
12103
12104  windows_path="$new_path"
12105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12106    unix_path=`$CYGPATH -u "$windows_path"`
12107    new_path="$unix_path"
12108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12110    new_path="$unix_path"
12111  fi
12112
12113  if test "x$path" != "x$new_path"; then
12114    BOOT_JDK="$new_path"
12115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12117  fi
12118
12119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12121
12122  else
12123    # We're on a posix platform. Hooray! :)
12124    path="$BOOT_JDK"
12125    has_space=`$ECHO "$path" | $GREP " "`
12126    if test "x$has_space" != x; then
12127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12129      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12130    fi
12131
12132    # Use eval to expand a potential ~
12133    eval path="$path"
12134    if test ! -f "$path" && test ! -d "$path"; then
12135      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12136    fi
12137
12138    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12139  fi
12140
12141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12142$as_echo_n "checking for Boot JDK... " >&6; }
12143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12144$as_echo "$BOOT_JDK" >&6; }
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12146$as_echo_n "checking Boot JDK version... " >&6; }
12147              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12148              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12149$as_echo "$BOOT_JDK_VERSION" >&6; }
12150            fi # end check jdk version
12151          fi # end check rt.jar
12152        fi # end check javac
12153      fi # end check java
12154    fi # end check boot jdk found
12155  fi
12156
12157
12158# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12159
12160  if test "x$BOOT_JDK_FOUND" = xno; then
12161    # Now execute the test
12162
12163    # Extract the first word of "javac", so it can be a program name with args.
12164set dummy javac; ac_word=$2
12165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12166$as_echo_n "checking for $ac_word... " >&6; }
12167if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12168  $as_echo_n "(cached) " >&6
12169else
12170  case $JAVAC_CHECK in
12171  [\\/]* | ?:[\\/]*)
12172  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12173  ;;
12174  *)
12175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12176for as_dir in $PATH
12177do
12178  IFS=$as_save_IFS
12179  test -z "$as_dir" && as_dir=.
12180    for ac_exec_ext in '' $ac_executable_extensions; do
12181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12182    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12184    break 2
12185  fi
12186done
12187  done
12188IFS=$as_save_IFS
12189
12190  ;;
12191esac
12192fi
12193JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12194if test -n "$JAVAC_CHECK"; then
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12196$as_echo "$JAVAC_CHECK" >&6; }
12197else
12198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12199$as_echo "no" >&6; }
12200fi
12201
12202
12203    # Extract the first word of "java", so it can be a program name with args.
12204set dummy java; ac_word=$2
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12206$as_echo_n "checking for $ac_word... " >&6; }
12207if ${ac_cv_path_JAVA_CHECK+:} false; then :
12208  $as_echo_n "(cached) " >&6
12209else
12210  case $JAVA_CHECK in
12211  [\\/]* | ?:[\\/]*)
12212  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12213  ;;
12214  *)
12215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12216for as_dir in $PATH
12217do
12218  IFS=$as_save_IFS
12219  test -z "$as_dir" && as_dir=.
12220    for ac_exec_ext in '' $ac_executable_extensions; do
12221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12222    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12224    break 2
12225  fi
12226done
12227  done
12228IFS=$as_save_IFS
12229
12230  ;;
12231esac
12232fi
12233JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12234if test -n "$JAVA_CHECK"; then
12235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12236$as_echo "$JAVA_CHECK" >&6; }
12237else
12238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12239$as_echo "no" >&6; }
12240fi
12241
12242
12243    BINARY="$JAVAC_CHECK"
12244    if test "x$JAVAC_CHECK" = x; then
12245        BINARY="$JAVA_CHECK"
12246    fi
12247    if test "x$BINARY" != x; then
12248        # So there is a java(c) binary, it might be part of a JDK.
12249        # Lets find the JDK/JRE directory by following symbolic links.
12250        # Linux/GNU systems often have links from /usr/bin/java to
12251        # /etc/alternatives/java to the real JDK binary.
12252
12253    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12254        # Follow a chain of symbolic links. Use readlink
12255        # where it exists, else fall back to horribly
12256        # complicated shell code.
12257        if test "x$READLINK_TESTED" != yes; then
12258            # On MacOSX there is a readlink tool with a different
12259            # purpose than the GNU readlink tool. Check the found readlink.
12260            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12261            if test "x$ISGNU" = x; then
12262                 # A readlink that we do not know how to use.
12263                 # Are there other non-GNU readlinks out there?
12264                 READLINK_TESTED=yes
12265                 READLINK=
12266            fi
12267        fi
12268
12269        if test "x$READLINK" != x; then
12270            BINARY=`$READLINK -f $BINARY`
12271        else
12272            # Save the current directory for restoring afterwards
12273            STARTDIR=$PWD
12274            COUNTER=0
12275            sym_link_dir=`$DIRNAME $BINARY`
12276            sym_link_file=`$BASENAME $BINARY`
12277            cd $sym_link_dir
12278            # Use -P flag to resolve symlinks in directories.
12279            cd `$THEPWDCMD -P`
12280            sym_link_dir=`$THEPWDCMD -P`
12281            # Resolve file symlinks
12282            while test $COUNTER -lt 20; do
12283                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12284                if test "x$ISLINK" == x; then
12285                    # This is not a symbolic link! We are done!
12286                    break
12287                fi
12288                # Again resolve directory symlinks since the target of the just found
12289                # link could be in a different directory
12290                cd `$DIRNAME $ISLINK`
12291                sym_link_dir=`$THEPWDCMD -P`
12292                sym_link_file=`$BASENAME $ISLINK`
12293                let COUNTER=COUNTER+1
12294            done
12295            cd $STARTDIR
12296            BINARY=$sym_link_dir/$sym_link_file
12297        fi
12298    fi
12299
12300        BOOT_JDK=`dirname "$BINARY"`
12301        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12302        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12303            # Looks like we found ourselves an JDK
12304            BOOT_JDK_FOUND=maybe
12305            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12306$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12307        fi
12308    fi
12309
12310
12311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12313      # Do we have a bin/java?
12314      if test ! -x "$BOOT_JDK/bin/java"; then
12315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12317        BOOT_JDK_FOUND=no
12318      else
12319        # Do we have a bin/javac?
12320        if test ! -x "$BOOT_JDK/bin/javac"; then
12321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12325          BOOT_JDK_FOUND=no
12326        else
12327          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12328          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12331            BOOT_JDK_FOUND=no
12332          else
12333            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12335
12336            # Extra M4 quote needed to protect [] in grep expression.
12337            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12338            if test "x$FOUND_VERSION_78" = x; then
12339              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12341              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12342$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12343              BOOT_JDK_FOUND=no
12344            else
12345              # We're done! :-)
12346              BOOT_JDK_FOUND=yes
12347
12348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12349
12350  # Input might be given as Windows format, start by converting to
12351  # unix format.
12352  path="$BOOT_JDK"
12353  new_path=`$CYGPATH -u "$path"`
12354
12355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12358  # "foo.exe" is OK but "foo" is an error.
12359  #
12360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12361  # It is also a way to make sure we got the proper file name for the real test later on.
12362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12363  if test "x$test_shortpath" = x; then
12364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12367  fi
12368
12369  # Call helper function which possibly converts this using DOS-style short mode.
12370  # If so, the updated path is stored in $new_path.
12371
12372  input_path="$new_path"
12373  # Check if we need to convert this using DOS-style short mode. If the path
12374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12375  # take no chances and rewrite it.
12376  # Note: m4 eats our [], so we need to use [ and ] instead.
12377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12378  if test "x$has_forbidden_chars" != x; then
12379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12383      # Going to short mode and back again did indeed matter. Since short mode is
12384      # case insensitive, let's make it lowercase to improve readability.
12385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12386      # Now convert it back to Unix-stile (cygpath)
12387      input_path=`$CYGPATH -u "$shortmode_path"`
12388      new_path="$input_path"
12389    fi
12390  fi
12391
12392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12393  if test "x$test_cygdrive_prefix" = x; then
12394    # As a simple fix, exclude /usr/bin since it's not a real path.
12395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12397      # a path prefixed by /cygdrive for fixpath to work.
12398      new_path="$CYGWIN_ROOT_PATH$input_path"
12399    fi
12400  fi
12401
12402
12403  if test "x$path" != "x$new_path"; then
12404    BOOT_JDK="$new_path"
12405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12407  fi
12408
12409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12410
12411  path="$BOOT_JDK"
12412  has_colon=`$ECHO $path | $GREP ^.:`
12413  new_path="$path"
12414  if test "x$has_colon" = x; then
12415    # Not in mixed or Windows style, start by that.
12416    new_path=`cmd //c echo $path`
12417  fi
12418
12419
12420  input_path="$new_path"
12421  # Check if we need to convert this using DOS-style short mode. If the path
12422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12423  # take no chances and rewrite it.
12424  # Note: m4 eats our [], so we need to use [ and ] instead.
12425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12426  if test "x$has_forbidden_chars" != x; then
12427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12429  fi
12430
12431
12432  windows_path="$new_path"
12433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12434    unix_path=`$CYGPATH -u "$windows_path"`
12435    new_path="$unix_path"
12436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12438    new_path="$unix_path"
12439  fi
12440
12441  if test "x$path" != "x$new_path"; then
12442    BOOT_JDK="$new_path"
12443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12445  fi
12446
12447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12449
12450  else
12451    # We're on a posix platform. Hooray! :)
12452    path="$BOOT_JDK"
12453    has_space=`$ECHO "$path" | $GREP " "`
12454    if test "x$has_space" != x; then
12455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12458    fi
12459
12460    # Use eval to expand a potential ~
12461    eval path="$path"
12462    if test ! -f "$path" && test ! -d "$path"; then
12463      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12464    fi
12465
12466    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12467  fi
12468
12469              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12470$as_echo_n "checking for Boot JDK... " >&6; }
12471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12472$as_echo "$BOOT_JDK" >&6; }
12473              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12474$as_echo_n "checking Boot JDK version... " >&6; }
12475              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12476              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12477$as_echo "$BOOT_JDK_VERSION" >&6; }
12478            fi # end check jdk version
12479          fi # end check rt.jar
12480        fi # end check javac
12481      fi # end check java
12482    fi # end check boot jdk found
12483  fi
12484
12485
12486# Test: Is there a JDK installed in default, well-known locations?
12487
12488  if test "x$BOOT_JDK_FOUND" = xno; then
12489    # Now execute the test
12490
12491  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12492
12493  if test "x$BOOT_JDK_FOUND" = xno; then
12494    # Now execute the test
12495
12496  if test "x$ProgramW6432" != x; then
12497    VIRTUAL_DIR="$ProgramW6432/Java"
12498
12499  windows_path="$VIRTUAL_DIR"
12500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12501    unix_path=`$CYGPATH -u "$windows_path"`
12502    VIRTUAL_DIR="$unix_path"
12503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12505    VIRTUAL_DIR="$unix_path"
12506  fi
12507
12508
12509  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12510  BOOT_JDK_SUFFIX=""
12511  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12512  if test "x$ALL_JDKS_FOUND" != x; then
12513    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12514
12515  if test "x$BOOT_JDK_FOUND" = xno; then
12516    # Now execute the test
12517
12518        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12519        if test -d "$BOOT_JDK"; then
12520          BOOT_JDK_FOUND=maybe
12521          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12522$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12523        fi
12524
12525
12526    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12527    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12528      # Do we have a bin/java?
12529      if test ! -x "$BOOT_JDK/bin/java"; then
12530        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12532        BOOT_JDK_FOUND=no
12533      else
12534        # Do we have a bin/javac?
12535        if test ! -x "$BOOT_JDK/bin/javac"; then
12536          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12539$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12540          BOOT_JDK_FOUND=no
12541        else
12542          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12543          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12544            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12546            BOOT_JDK_FOUND=no
12547          else
12548            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12549            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12550
12551            # Extra M4 quote needed to protect [] in grep expression.
12552            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12553            if test "x$FOUND_VERSION_78" = x; then
12554              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12557$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12558              BOOT_JDK_FOUND=no
12559            else
12560              # We're done! :-)
12561              BOOT_JDK_FOUND=yes
12562
12563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12564
12565  # Input might be given as Windows format, start by converting to
12566  # unix format.
12567  path="$BOOT_JDK"
12568  new_path=`$CYGPATH -u "$path"`
12569
12570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12573  # "foo.exe" is OK but "foo" is an error.
12574  #
12575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12576  # It is also a way to make sure we got the proper file name for the real test later on.
12577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12578  if test "x$test_shortpath" = x; then
12579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12580$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12581    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12582  fi
12583
12584  # Call helper function which possibly converts this using DOS-style short mode.
12585  # If so, the updated path is stored in $new_path.
12586
12587  input_path="$new_path"
12588  # Check if we need to convert this using DOS-style short mode. If the path
12589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12590  # take no chances and rewrite it.
12591  # Note: m4 eats our [], so we need to use [ and ] instead.
12592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12593  if test "x$has_forbidden_chars" != x; then
12594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12598      # Going to short mode and back again did indeed matter. Since short mode is
12599      # case insensitive, let's make it lowercase to improve readability.
12600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12601      # Now convert it back to Unix-stile (cygpath)
12602      input_path=`$CYGPATH -u "$shortmode_path"`
12603      new_path="$input_path"
12604    fi
12605  fi
12606
12607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12608  if test "x$test_cygdrive_prefix" = x; then
12609    # As a simple fix, exclude /usr/bin since it's not a real path.
12610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12612      # a path prefixed by /cygdrive for fixpath to work.
12613      new_path="$CYGWIN_ROOT_PATH$input_path"
12614    fi
12615  fi
12616
12617
12618  if test "x$path" != "x$new_path"; then
12619    BOOT_JDK="$new_path"
12620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12622  fi
12623
12624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12625
12626  path="$BOOT_JDK"
12627  has_colon=`$ECHO $path | $GREP ^.:`
12628  new_path="$path"
12629  if test "x$has_colon" = x; then
12630    # Not in mixed or Windows style, start by that.
12631    new_path=`cmd //c echo $path`
12632  fi
12633
12634
12635  input_path="$new_path"
12636  # Check if we need to convert this using DOS-style short mode. If the path
12637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12638  # take no chances and rewrite it.
12639  # Note: m4 eats our [], so we need to use [ and ] instead.
12640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12641  if test "x$has_forbidden_chars" != x; then
12642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12644  fi
12645
12646
12647  windows_path="$new_path"
12648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12649    unix_path=`$CYGPATH -u "$windows_path"`
12650    new_path="$unix_path"
12651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12653    new_path="$unix_path"
12654  fi
12655
12656  if test "x$path" != "x$new_path"; then
12657    BOOT_JDK="$new_path"
12658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12660  fi
12661
12662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12664
12665  else
12666    # We're on a posix platform. Hooray! :)
12667    path="$BOOT_JDK"
12668    has_space=`$ECHO "$path" | $GREP " "`
12669    if test "x$has_space" != x; then
12670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12672      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12673    fi
12674
12675    # Use eval to expand a potential ~
12676    eval path="$path"
12677    if test ! -f "$path" && test ! -d "$path"; then
12678      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12679    fi
12680
12681    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12682  fi
12683
12684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12685$as_echo_n "checking for Boot JDK... " >&6; }
12686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12687$as_echo "$BOOT_JDK" >&6; }
12688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12689$as_echo_n "checking Boot JDK version... " >&6; }
12690              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12692$as_echo "$BOOT_JDK_VERSION" >&6; }
12693            fi # end check jdk version
12694          fi # end check rt.jar
12695        fi # end check javac
12696      fi # end check java
12697    fi # end check boot jdk found
12698  fi
12699
12700    done
12701  fi
12702
12703  fi
12704
12705
12706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12708      # Do we have a bin/java?
12709      if test ! -x "$BOOT_JDK/bin/java"; then
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12712        BOOT_JDK_FOUND=no
12713      else
12714        # Do we have a bin/javac?
12715        if test ! -x "$BOOT_JDK/bin/javac"; then
12716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12720          BOOT_JDK_FOUND=no
12721        else
12722          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12723          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12726            BOOT_JDK_FOUND=no
12727          else
12728            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12730
12731            # Extra M4 quote needed to protect [] in grep expression.
12732            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12733            if test "x$FOUND_VERSION_78" = x; then
12734              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12736              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12737$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12738              BOOT_JDK_FOUND=no
12739            else
12740              # We're done! :-)
12741              BOOT_JDK_FOUND=yes
12742
12743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12744
12745  # Input might be given as Windows format, start by converting to
12746  # unix format.
12747  path="$BOOT_JDK"
12748  new_path=`$CYGPATH -u "$path"`
12749
12750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12753  # "foo.exe" is OK but "foo" is an error.
12754  #
12755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12756  # It is also a way to make sure we got the proper file name for the real test later on.
12757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12758  if test "x$test_shortpath" = x; then
12759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12762  fi
12763
12764  # Call helper function which possibly converts this using DOS-style short mode.
12765  # If so, the updated path is stored in $new_path.
12766
12767  input_path="$new_path"
12768  # Check if we need to convert this using DOS-style short mode. If the path
12769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12770  # take no chances and rewrite it.
12771  # Note: m4 eats our [], so we need to use [ and ] instead.
12772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12773  if test "x$has_forbidden_chars" != x; then
12774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12778      # Going to short mode and back again did indeed matter. Since short mode is
12779      # case insensitive, let's make it lowercase to improve readability.
12780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12781      # Now convert it back to Unix-stile (cygpath)
12782      input_path=`$CYGPATH -u "$shortmode_path"`
12783      new_path="$input_path"
12784    fi
12785  fi
12786
12787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12788  if test "x$test_cygdrive_prefix" = x; then
12789    # As a simple fix, exclude /usr/bin since it's not a real path.
12790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12792      # a path prefixed by /cygdrive for fixpath to work.
12793      new_path="$CYGWIN_ROOT_PATH$input_path"
12794    fi
12795  fi
12796
12797
12798  if test "x$path" != "x$new_path"; then
12799    BOOT_JDK="$new_path"
12800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12802  fi
12803
12804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12805
12806  path="$BOOT_JDK"
12807  has_colon=`$ECHO $path | $GREP ^.:`
12808  new_path="$path"
12809  if test "x$has_colon" = x; then
12810    # Not in mixed or Windows style, start by that.
12811    new_path=`cmd //c echo $path`
12812  fi
12813
12814
12815  input_path="$new_path"
12816  # Check if we need to convert this using DOS-style short mode. If the path
12817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12818  # take no chances and rewrite it.
12819  # Note: m4 eats our [], so we need to use [ and ] instead.
12820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12821  if test "x$has_forbidden_chars" != x; then
12822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12824  fi
12825
12826
12827  windows_path="$new_path"
12828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12829    unix_path=`$CYGPATH -u "$windows_path"`
12830    new_path="$unix_path"
12831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12833    new_path="$unix_path"
12834  fi
12835
12836  if test "x$path" != "x$new_path"; then
12837    BOOT_JDK="$new_path"
12838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12840  fi
12841
12842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12844
12845  else
12846    # We're on a posix platform. Hooray! :)
12847    path="$BOOT_JDK"
12848    has_space=`$ECHO "$path" | $GREP " "`
12849    if test "x$has_space" != x; then
12850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12852      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12853    fi
12854
12855    # Use eval to expand a potential ~
12856    eval path="$path"
12857    if test ! -f "$path" && test ! -d "$path"; then
12858      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12859    fi
12860
12861    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12862  fi
12863
12864              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12865$as_echo_n "checking for Boot JDK... " >&6; }
12866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12867$as_echo "$BOOT_JDK" >&6; }
12868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12869$as_echo_n "checking Boot JDK version... " >&6; }
12870              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12872$as_echo "$BOOT_JDK_VERSION" >&6; }
12873            fi # end check jdk version
12874          fi # end check rt.jar
12875        fi # end check javac
12876      fi # end check java
12877    fi # end check boot jdk found
12878  fi
12879
12880
12881  if test "x$BOOT_JDK_FOUND" = xno; then
12882    # Now execute the test
12883
12884  if test "x$PROGRAMW6432" != x; then
12885    VIRTUAL_DIR="$PROGRAMW6432/Java"
12886
12887  windows_path="$VIRTUAL_DIR"
12888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12889    unix_path=`$CYGPATH -u "$windows_path"`
12890    VIRTUAL_DIR="$unix_path"
12891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12893    VIRTUAL_DIR="$unix_path"
12894  fi
12895
12896
12897  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12898  BOOT_JDK_SUFFIX=""
12899  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12900  if test "x$ALL_JDKS_FOUND" != x; then
12901    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12902
12903  if test "x$BOOT_JDK_FOUND" = xno; then
12904    # Now execute the test
12905
12906        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12907        if test -d "$BOOT_JDK"; then
12908          BOOT_JDK_FOUND=maybe
12909          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12910$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12911        fi
12912
12913
12914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12916      # Do we have a bin/java?
12917      if test ! -x "$BOOT_JDK/bin/java"; then
12918        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12920        BOOT_JDK_FOUND=no
12921      else
12922        # Do we have a bin/javac?
12923        if test ! -x "$BOOT_JDK/bin/javac"; then
12924          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12928          BOOT_JDK_FOUND=no
12929        else
12930          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12931          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12932            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12934            BOOT_JDK_FOUND=no
12935          else
12936            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12938
12939            # Extra M4 quote needed to protect [] in grep expression.
12940            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12941            if test "x$FOUND_VERSION_78" = x; then
12942              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12944              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12945$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12946              BOOT_JDK_FOUND=no
12947            else
12948              # We're done! :-)
12949              BOOT_JDK_FOUND=yes
12950
12951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12952
12953  # Input might be given as Windows format, start by converting to
12954  # unix format.
12955  path="$BOOT_JDK"
12956  new_path=`$CYGPATH -u "$path"`
12957
12958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12961  # "foo.exe" is OK but "foo" is an error.
12962  #
12963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12964  # It is also a way to make sure we got the proper file name for the real test later on.
12965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12966  if test "x$test_shortpath" = x; then
12967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12969    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12970  fi
12971
12972  # Call helper function which possibly converts this using DOS-style short mode.
12973  # If so, the updated path is stored in $new_path.
12974
12975  input_path="$new_path"
12976  # Check if we need to convert this using DOS-style short mode. If the path
12977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12978  # take no chances and rewrite it.
12979  # Note: m4 eats our [], so we need to use [ and ] instead.
12980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12981  if test "x$has_forbidden_chars" != x; then
12982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12986      # Going to short mode and back again did indeed matter. Since short mode is
12987      # case insensitive, let's make it lowercase to improve readability.
12988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12989      # Now convert it back to Unix-stile (cygpath)
12990      input_path=`$CYGPATH -u "$shortmode_path"`
12991      new_path="$input_path"
12992    fi
12993  fi
12994
12995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12996  if test "x$test_cygdrive_prefix" = x; then
12997    # As a simple fix, exclude /usr/bin since it's not a real path.
12998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13000      # a path prefixed by /cygdrive for fixpath to work.
13001      new_path="$CYGWIN_ROOT_PATH$input_path"
13002    fi
13003  fi
13004
13005
13006  if test "x$path" != "x$new_path"; then
13007    BOOT_JDK="$new_path"
13008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13010  fi
13011
13012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13013
13014  path="$BOOT_JDK"
13015  has_colon=`$ECHO $path | $GREP ^.:`
13016  new_path="$path"
13017  if test "x$has_colon" = x; then
13018    # Not in mixed or Windows style, start by that.
13019    new_path=`cmd //c echo $path`
13020  fi
13021
13022
13023  input_path="$new_path"
13024  # Check if we need to convert this using DOS-style short mode. If the path
13025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13026  # take no chances and rewrite it.
13027  # Note: m4 eats our [], so we need to use [ and ] instead.
13028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13029  if test "x$has_forbidden_chars" != x; then
13030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13032  fi
13033
13034
13035  windows_path="$new_path"
13036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13037    unix_path=`$CYGPATH -u "$windows_path"`
13038    new_path="$unix_path"
13039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13041    new_path="$unix_path"
13042  fi
13043
13044  if test "x$path" != "x$new_path"; then
13045    BOOT_JDK="$new_path"
13046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13048  fi
13049
13050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13052
13053  else
13054    # We're on a posix platform. Hooray! :)
13055    path="$BOOT_JDK"
13056    has_space=`$ECHO "$path" | $GREP " "`
13057    if test "x$has_space" != x; then
13058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13060      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13061    fi
13062
13063    # Use eval to expand a potential ~
13064    eval path="$path"
13065    if test ! -f "$path" && test ! -d "$path"; then
13066      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13067    fi
13068
13069    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13070  fi
13071
13072              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13073$as_echo_n "checking for Boot JDK... " >&6; }
13074              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13075$as_echo "$BOOT_JDK" >&6; }
13076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13077$as_echo_n "checking Boot JDK version... " >&6; }
13078              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13079              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13080$as_echo "$BOOT_JDK_VERSION" >&6; }
13081            fi # end check jdk version
13082          fi # end check rt.jar
13083        fi # end check javac
13084      fi # end check java
13085    fi # end check boot jdk found
13086  fi
13087
13088    done
13089  fi
13090
13091  fi
13092
13093
13094    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13095    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13096      # Do we have a bin/java?
13097      if test ! -x "$BOOT_JDK/bin/java"; then
13098        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13100        BOOT_JDK_FOUND=no
13101      else
13102        # Do we have a bin/javac?
13103        if test ! -x "$BOOT_JDK/bin/javac"; then
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13106          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13107$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13108          BOOT_JDK_FOUND=no
13109        else
13110          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13111          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13112            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13114            BOOT_JDK_FOUND=no
13115          else
13116            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13118
13119            # Extra M4 quote needed to protect [] in grep expression.
13120            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13121            if test "x$FOUND_VERSION_78" = x; then
13122              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13124              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13125$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13126              BOOT_JDK_FOUND=no
13127            else
13128              # We're done! :-)
13129              BOOT_JDK_FOUND=yes
13130
13131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13132
13133  # Input might be given as Windows format, start by converting to
13134  # unix format.
13135  path="$BOOT_JDK"
13136  new_path=`$CYGPATH -u "$path"`
13137
13138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13141  # "foo.exe" is OK but "foo" is an error.
13142  #
13143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13144  # It is also a way to make sure we got the proper file name for the real test later on.
13145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13146  if test "x$test_shortpath" = x; then
13147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13149    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13150  fi
13151
13152  # Call helper function which possibly converts this using DOS-style short mode.
13153  # If so, the updated path is stored in $new_path.
13154
13155  input_path="$new_path"
13156  # Check if we need to convert this using DOS-style short mode. If the path
13157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13158  # take no chances and rewrite it.
13159  # Note: m4 eats our [], so we need to use [ and ] instead.
13160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13161  if test "x$has_forbidden_chars" != x; then
13162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13166      # Going to short mode and back again did indeed matter. Since short mode is
13167      # case insensitive, let's make it lowercase to improve readability.
13168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13169      # Now convert it back to Unix-stile (cygpath)
13170      input_path=`$CYGPATH -u "$shortmode_path"`
13171      new_path="$input_path"
13172    fi
13173  fi
13174
13175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13176  if test "x$test_cygdrive_prefix" = x; then
13177    # As a simple fix, exclude /usr/bin since it's not a real path.
13178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13180      # a path prefixed by /cygdrive for fixpath to work.
13181      new_path="$CYGWIN_ROOT_PATH$input_path"
13182    fi
13183  fi
13184
13185
13186  if test "x$path" != "x$new_path"; then
13187    BOOT_JDK="$new_path"
13188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13190  fi
13191
13192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13193
13194  path="$BOOT_JDK"
13195  has_colon=`$ECHO $path | $GREP ^.:`
13196  new_path="$path"
13197  if test "x$has_colon" = x; then
13198    # Not in mixed or Windows style, start by that.
13199    new_path=`cmd //c echo $path`
13200  fi
13201
13202
13203  input_path="$new_path"
13204  # Check if we need to convert this using DOS-style short mode. If the path
13205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13206  # take no chances and rewrite it.
13207  # Note: m4 eats our [], so we need to use [ and ] instead.
13208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13209  if test "x$has_forbidden_chars" != x; then
13210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13212  fi
13213
13214
13215  windows_path="$new_path"
13216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13217    unix_path=`$CYGPATH -u "$windows_path"`
13218    new_path="$unix_path"
13219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13221    new_path="$unix_path"
13222  fi
13223
13224  if test "x$path" != "x$new_path"; then
13225    BOOT_JDK="$new_path"
13226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13228  fi
13229
13230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13232
13233  else
13234    # We're on a posix platform. Hooray! :)
13235    path="$BOOT_JDK"
13236    has_space=`$ECHO "$path" | $GREP " "`
13237    if test "x$has_space" != x; then
13238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13241    fi
13242
13243    # Use eval to expand a potential ~
13244    eval path="$path"
13245    if test ! -f "$path" && test ! -d "$path"; then
13246      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13247    fi
13248
13249    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13250  fi
13251
13252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13253$as_echo_n "checking for Boot JDK... " >&6; }
13254              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13255$as_echo "$BOOT_JDK" >&6; }
13256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13257$as_echo_n "checking Boot JDK version... " >&6; }
13258              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13260$as_echo "$BOOT_JDK_VERSION" >&6; }
13261            fi # end check jdk version
13262          fi # end check rt.jar
13263        fi # end check javac
13264      fi # end check java
13265    fi # end check boot jdk found
13266  fi
13267
13268
13269  if test "x$BOOT_JDK_FOUND" = xno; then
13270    # Now execute the test
13271
13272  if test "x$PROGRAMFILES" != x; then
13273    VIRTUAL_DIR="$PROGRAMFILES/Java"
13274
13275  windows_path="$VIRTUAL_DIR"
13276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13277    unix_path=`$CYGPATH -u "$windows_path"`
13278    VIRTUAL_DIR="$unix_path"
13279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13281    VIRTUAL_DIR="$unix_path"
13282  fi
13283
13284
13285  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13286  BOOT_JDK_SUFFIX=""
13287  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13288  if test "x$ALL_JDKS_FOUND" != x; then
13289    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13290
13291  if test "x$BOOT_JDK_FOUND" = xno; then
13292    # Now execute the test
13293
13294        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13295        if test -d "$BOOT_JDK"; then
13296          BOOT_JDK_FOUND=maybe
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13298$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13299        fi
13300
13301
13302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13304      # Do we have a bin/java?
13305      if test ! -x "$BOOT_JDK/bin/java"; then
13306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13308        BOOT_JDK_FOUND=no
13309      else
13310        # Do we have a bin/javac?
13311        if test ! -x "$BOOT_JDK/bin/javac"; then
13312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13316          BOOT_JDK_FOUND=no
13317        else
13318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13322            BOOT_JDK_FOUND=no
13323          else
13324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13326
13327            # Extra M4 quote needed to protect [] in grep expression.
13328            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13329            if test "x$FOUND_VERSION_78" = x; then
13330              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13332              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13333$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13334              BOOT_JDK_FOUND=no
13335            else
13336              # We're done! :-)
13337              BOOT_JDK_FOUND=yes
13338
13339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13340
13341  # Input might be given as Windows format, start by converting to
13342  # unix format.
13343  path="$BOOT_JDK"
13344  new_path=`$CYGPATH -u "$path"`
13345
13346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13349  # "foo.exe" is OK but "foo" is an error.
13350  #
13351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13352  # It is also a way to make sure we got the proper file name for the real test later on.
13353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13354  if test "x$test_shortpath" = x; then
13355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13358  fi
13359
13360  # Call helper function which possibly converts this using DOS-style short mode.
13361  # If so, the updated path is stored in $new_path.
13362
13363  input_path="$new_path"
13364  # Check if we need to convert this using DOS-style short mode. If the path
13365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13366  # take no chances and rewrite it.
13367  # Note: m4 eats our [], so we need to use [ and ] instead.
13368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13369  if test "x$has_forbidden_chars" != x; then
13370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13374      # Going to short mode and back again did indeed matter. Since short mode is
13375      # case insensitive, let's make it lowercase to improve readability.
13376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13377      # Now convert it back to Unix-stile (cygpath)
13378      input_path=`$CYGPATH -u "$shortmode_path"`
13379      new_path="$input_path"
13380    fi
13381  fi
13382
13383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13384  if test "x$test_cygdrive_prefix" = x; then
13385    # As a simple fix, exclude /usr/bin since it's not a real path.
13386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13388      # a path prefixed by /cygdrive for fixpath to work.
13389      new_path="$CYGWIN_ROOT_PATH$input_path"
13390    fi
13391  fi
13392
13393
13394  if test "x$path" != "x$new_path"; then
13395    BOOT_JDK="$new_path"
13396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13398  fi
13399
13400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13401
13402  path="$BOOT_JDK"
13403  has_colon=`$ECHO $path | $GREP ^.:`
13404  new_path="$path"
13405  if test "x$has_colon" = x; then
13406    # Not in mixed or Windows style, start by that.
13407    new_path=`cmd //c echo $path`
13408  fi
13409
13410
13411  input_path="$new_path"
13412  # Check if we need to convert this using DOS-style short mode. If the path
13413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13414  # take no chances and rewrite it.
13415  # Note: m4 eats our [], so we need to use [ and ] instead.
13416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13417  if test "x$has_forbidden_chars" != x; then
13418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13420  fi
13421
13422
13423  windows_path="$new_path"
13424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13425    unix_path=`$CYGPATH -u "$windows_path"`
13426    new_path="$unix_path"
13427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13429    new_path="$unix_path"
13430  fi
13431
13432  if test "x$path" != "x$new_path"; then
13433    BOOT_JDK="$new_path"
13434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13436  fi
13437
13438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13440
13441  else
13442    # We're on a posix platform. Hooray! :)
13443    path="$BOOT_JDK"
13444    has_space=`$ECHO "$path" | $GREP " "`
13445    if test "x$has_space" != x; then
13446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13448      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13449    fi
13450
13451    # Use eval to expand a potential ~
13452    eval path="$path"
13453    if test ! -f "$path" && test ! -d "$path"; then
13454      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13455    fi
13456
13457    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13458  fi
13459
13460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13461$as_echo_n "checking for Boot JDK... " >&6; }
13462              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13463$as_echo "$BOOT_JDK" >&6; }
13464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13465$as_echo_n "checking Boot JDK version... " >&6; }
13466              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13468$as_echo "$BOOT_JDK_VERSION" >&6; }
13469            fi # end check jdk version
13470          fi # end check rt.jar
13471        fi # end check javac
13472      fi # end check java
13473    fi # end check boot jdk found
13474  fi
13475
13476    done
13477  fi
13478
13479  fi
13480
13481
13482    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13483    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13484      # Do we have a bin/java?
13485      if test ! -x "$BOOT_JDK/bin/java"; then
13486        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13488        BOOT_JDK_FOUND=no
13489      else
13490        # Do we have a bin/javac?
13491        if test ! -x "$BOOT_JDK/bin/javac"; then
13492          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13495$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13496          BOOT_JDK_FOUND=no
13497        else
13498          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13499          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13500            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13502            BOOT_JDK_FOUND=no
13503          else
13504            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13506
13507            # Extra M4 quote needed to protect [] in grep expression.
13508            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13509            if test "x$FOUND_VERSION_78" = x; then
13510              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13513$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13514              BOOT_JDK_FOUND=no
13515            else
13516              # We're done! :-)
13517              BOOT_JDK_FOUND=yes
13518
13519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13520
13521  # Input might be given as Windows format, start by converting to
13522  # unix format.
13523  path="$BOOT_JDK"
13524  new_path=`$CYGPATH -u "$path"`
13525
13526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13529  # "foo.exe" is OK but "foo" is an error.
13530  #
13531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13532  # It is also a way to make sure we got the proper file name for the real test later on.
13533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13534  if test "x$test_shortpath" = x; then
13535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13537    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13538  fi
13539
13540  # Call helper function which possibly converts this using DOS-style short mode.
13541  # If so, the updated path is stored in $new_path.
13542
13543  input_path="$new_path"
13544  # Check if we need to convert this using DOS-style short mode. If the path
13545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13546  # take no chances and rewrite it.
13547  # Note: m4 eats our [], so we need to use [ and ] instead.
13548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13549  if test "x$has_forbidden_chars" != x; then
13550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13554      # Going to short mode and back again did indeed matter. Since short mode is
13555      # case insensitive, let's make it lowercase to improve readability.
13556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13557      # Now convert it back to Unix-stile (cygpath)
13558      input_path=`$CYGPATH -u "$shortmode_path"`
13559      new_path="$input_path"
13560    fi
13561  fi
13562
13563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13564  if test "x$test_cygdrive_prefix" = x; then
13565    # As a simple fix, exclude /usr/bin since it's not a real path.
13566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13568      # a path prefixed by /cygdrive for fixpath to work.
13569      new_path="$CYGWIN_ROOT_PATH$input_path"
13570    fi
13571  fi
13572
13573
13574  if test "x$path" != "x$new_path"; then
13575    BOOT_JDK="$new_path"
13576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13578  fi
13579
13580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13581
13582  path="$BOOT_JDK"
13583  has_colon=`$ECHO $path | $GREP ^.:`
13584  new_path="$path"
13585  if test "x$has_colon" = x; then
13586    # Not in mixed or Windows style, start by that.
13587    new_path=`cmd //c echo $path`
13588  fi
13589
13590
13591  input_path="$new_path"
13592  # Check if we need to convert this using DOS-style short mode. If the path
13593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13594  # take no chances and rewrite it.
13595  # Note: m4 eats our [], so we need to use [ and ] instead.
13596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13597  if test "x$has_forbidden_chars" != x; then
13598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13600  fi
13601
13602
13603  windows_path="$new_path"
13604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13605    unix_path=`$CYGPATH -u "$windows_path"`
13606    new_path="$unix_path"
13607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13609    new_path="$unix_path"
13610  fi
13611
13612  if test "x$path" != "x$new_path"; then
13613    BOOT_JDK="$new_path"
13614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13616  fi
13617
13618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13620
13621  else
13622    # We're on a posix platform. Hooray! :)
13623    path="$BOOT_JDK"
13624    has_space=`$ECHO "$path" | $GREP " "`
13625    if test "x$has_space" != x; then
13626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13628      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13629    fi
13630
13631    # Use eval to expand a potential ~
13632    eval path="$path"
13633    if test ! -f "$path" && test ! -d "$path"; then
13634      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13635    fi
13636
13637    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13638  fi
13639
13640              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13641$as_echo_n "checking for Boot JDK... " >&6; }
13642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13643$as_echo "$BOOT_JDK" >&6; }
13644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13645$as_echo_n "checking Boot JDK version... " >&6; }
13646              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13647              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13648$as_echo "$BOOT_JDK_VERSION" >&6; }
13649            fi # end check jdk version
13650          fi # end check rt.jar
13651        fi # end check javac
13652      fi # end check java
13653    fi # end check boot jdk found
13654  fi
13655
13656
13657  if test "x$BOOT_JDK_FOUND" = xno; then
13658    # Now execute the test
13659
13660  if test "x$ProgramFiles" != x; then
13661    VIRTUAL_DIR="$ProgramFiles/Java"
13662
13663  windows_path="$VIRTUAL_DIR"
13664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13665    unix_path=`$CYGPATH -u "$windows_path"`
13666    VIRTUAL_DIR="$unix_path"
13667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13669    VIRTUAL_DIR="$unix_path"
13670  fi
13671
13672
13673  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13674  BOOT_JDK_SUFFIX=""
13675  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13676  if test "x$ALL_JDKS_FOUND" != x; then
13677    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13678
13679  if test "x$BOOT_JDK_FOUND" = xno; then
13680    # Now execute the test
13681
13682        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13683        if test -d "$BOOT_JDK"; then
13684          BOOT_JDK_FOUND=maybe
13685          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13686$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13687        fi
13688
13689
13690    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13691    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13692      # Do we have a bin/java?
13693      if test ! -x "$BOOT_JDK/bin/java"; then
13694        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13696        BOOT_JDK_FOUND=no
13697      else
13698        # Do we have a bin/javac?
13699        if test ! -x "$BOOT_JDK/bin/javac"; then
13700          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13702          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13703$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13704          BOOT_JDK_FOUND=no
13705        else
13706          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13707          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13708            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13710            BOOT_JDK_FOUND=no
13711          else
13712            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13713            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13714
13715            # Extra M4 quote needed to protect [] in grep expression.
13716            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13717            if test "x$FOUND_VERSION_78" = x; then
13718              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13720              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13721$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13722              BOOT_JDK_FOUND=no
13723            else
13724              # We're done! :-)
13725              BOOT_JDK_FOUND=yes
13726
13727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13728
13729  # Input might be given as Windows format, start by converting to
13730  # unix format.
13731  path="$BOOT_JDK"
13732  new_path=`$CYGPATH -u "$path"`
13733
13734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13737  # "foo.exe" is OK but "foo" is an error.
13738  #
13739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13740  # It is also a way to make sure we got the proper file name for the real test later on.
13741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13742  if test "x$test_shortpath" = x; then
13743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13745    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13746  fi
13747
13748  # Call helper function which possibly converts this using DOS-style short mode.
13749  # If so, the updated path is stored in $new_path.
13750
13751  input_path="$new_path"
13752  # Check if we need to convert this using DOS-style short mode. If the path
13753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13754  # take no chances and rewrite it.
13755  # Note: m4 eats our [], so we need to use [ and ] instead.
13756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13757  if test "x$has_forbidden_chars" != x; then
13758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13762      # Going to short mode and back again did indeed matter. Since short mode is
13763      # case insensitive, let's make it lowercase to improve readability.
13764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13765      # Now convert it back to Unix-stile (cygpath)
13766      input_path=`$CYGPATH -u "$shortmode_path"`
13767      new_path="$input_path"
13768    fi
13769  fi
13770
13771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13772  if test "x$test_cygdrive_prefix" = x; then
13773    # As a simple fix, exclude /usr/bin since it's not a real path.
13774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13776      # a path prefixed by /cygdrive for fixpath to work.
13777      new_path="$CYGWIN_ROOT_PATH$input_path"
13778    fi
13779  fi
13780
13781
13782  if test "x$path" != "x$new_path"; then
13783    BOOT_JDK="$new_path"
13784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13785$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13786  fi
13787
13788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13789
13790  path="$BOOT_JDK"
13791  has_colon=`$ECHO $path | $GREP ^.:`
13792  new_path="$path"
13793  if test "x$has_colon" = x; then
13794    # Not in mixed or Windows style, start by that.
13795    new_path=`cmd //c echo $path`
13796  fi
13797
13798
13799  input_path="$new_path"
13800  # Check if we need to convert this using DOS-style short mode. If the path
13801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13802  # take no chances and rewrite it.
13803  # Note: m4 eats our [], so we need to use [ and ] instead.
13804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13805  if test "x$has_forbidden_chars" != x; then
13806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13808  fi
13809
13810
13811  windows_path="$new_path"
13812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13813    unix_path=`$CYGPATH -u "$windows_path"`
13814    new_path="$unix_path"
13815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13817    new_path="$unix_path"
13818  fi
13819
13820  if test "x$path" != "x$new_path"; then
13821    BOOT_JDK="$new_path"
13822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13823$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13824  fi
13825
13826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13828
13829  else
13830    # We're on a posix platform. Hooray! :)
13831    path="$BOOT_JDK"
13832    has_space=`$ECHO "$path" | $GREP " "`
13833    if test "x$has_space" != x; then
13834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13836      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13837    fi
13838
13839    # Use eval to expand a potential ~
13840    eval path="$path"
13841    if test ! -f "$path" && test ! -d "$path"; then
13842      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13843    fi
13844
13845    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13846  fi
13847
13848              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13849$as_echo_n "checking for Boot JDK... " >&6; }
13850              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13851$as_echo "$BOOT_JDK" >&6; }
13852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13853$as_echo_n "checking Boot JDK version... " >&6; }
13854              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13855              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13856$as_echo "$BOOT_JDK_VERSION" >&6; }
13857            fi # end check jdk version
13858          fi # end check rt.jar
13859        fi # end check javac
13860      fi # end check java
13861    fi # end check boot jdk found
13862  fi
13863
13864    done
13865  fi
13866
13867  fi
13868
13869
13870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13872      # Do we have a bin/java?
13873      if test ! -x "$BOOT_JDK/bin/java"; then
13874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13876        BOOT_JDK_FOUND=no
13877      else
13878        # Do we have a bin/javac?
13879        if test ! -x "$BOOT_JDK/bin/javac"; then
13880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13884          BOOT_JDK_FOUND=no
13885        else
13886          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13887          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13888            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13890            BOOT_JDK_FOUND=no
13891          else
13892            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13893            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13894
13895            # Extra M4 quote needed to protect [] in grep expression.
13896            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13897            if test "x$FOUND_VERSION_78" = x; then
13898              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13900              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13901$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13902              BOOT_JDK_FOUND=no
13903            else
13904              # We're done! :-)
13905              BOOT_JDK_FOUND=yes
13906
13907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13908
13909  # Input might be given as Windows format, start by converting to
13910  # unix format.
13911  path="$BOOT_JDK"
13912  new_path=`$CYGPATH -u "$path"`
13913
13914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13917  # "foo.exe" is OK but "foo" is an error.
13918  #
13919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13920  # It is also a way to make sure we got the proper file name for the real test later on.
13921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13922  if test "x$test_shortpath" = x; then
13923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13926  fi
13927
13928  # Call helper function which possibly converts this using DOS-style short mode.
13929  # If so, the updated path is stored in $new_path.
13930
13931  input_path="$new_path"
13932  # Check if we need to convert this using DOS-style short mode. If the path
13933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13934  # take no chances and rewrite it.
13935  # Note: m4 eats our [], so we need to use [ and ] instead.
13936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13937  if test "x$has_forbidden_chars" != x; then
13938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13942      # Going to short mode and back again did indeed matter. Since short mode is
13943      # case insensitive, let's make it lowercase to improve readability.
13944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13945      # Now convert it back to Unix-stile (cygpath)
13946      input_path=`$CYGPATH -u "$shortmode_path"`
13947      new_path="$input_path"
13948    fi
13949  fi
13950
13951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13952  if test "x$test_cygdrive_prefix" = x; then
13953    # As a simple fix, exclude /usr/bin since it's not a real path.
13954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13956      # a path prefixed by /cygdrive for fixpath to work.
13957      new_path="$CYGWIN_ROOT_PATH$input_path"
13958    fi
13959  fi
13960
13961
13962  if test "x$path" != "x$new_path"; then
13963    BOOT_JDK="$new_path"
13964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13966  fi
13967
13968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13969
13970  path="$BOOT_JDK"
13971  has_colon=`$ECHO $path | $GREP ^.:`
13972  new_path="$path"
13973  if test "x$has_colon" = x; then
13974    # Not in mixed or Windows style, start by that.
13975    new_path=`cmd //c echo $path`
13976  fi
13977
13978
13979  input_path="$new_path"
13980  # Check if we need to convert this using DOS-style short mode. If the path
13981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13982  # take no chances and rewrite it.
13983  # Note: m4 eats our [], so we need to use [ and ] instead.
13984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13985  if test "x$has_forbidden_chars" != x; then
13986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13988  fi
13989
13990
13991  windows_path="$new_path"
13992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13993    unix_path=`$CYGPATH -u "$windows_path"`
13994    new_path="$unix_path"
13995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13997    new_path="$unix_path"
13998  fi
13999
14000  if test "x$path" != "x$new_path"; then
14001    BOOT_JDK="$new_path"
14002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14004  fi
14005
14006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14008
14009  else
14010    # We're on a posix platform. Hooray! :)
14011    path="$BOOT_JDK"
14012    has_space=`$ECHO "$path" | $GREP " "`
14013    if test "x$has_space" != x; then
14014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14016      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14017    fi
14018
14019    # Use eval to expand a potential ~
14020    eval path="$path"
14021    if test ! -f "$path" && test ! -d "$path"; then
14022      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14023    fi
14024
14025    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14026  fi
14027
14028              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14029$as_echo_n "checking for Boot JDK... " >&6; }
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14031$as_echo "$BOOT_JDK" >&6; }
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14033$as_echo_n "checking Boot JDK version... " >&6; }
14034              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14035              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14036$as_echo "$BOOT_JDK_VERSION" >&6; }
14037            fi # end check jdk version
14038          fi # end check rt.jar
14039        fi # end check javac
14040      fi # end check java
14041    fi # end check boot jdk found
14042  fi
14043
14044
14045  if test "x$BOOT_JDK_FOUND" = xno; then
14046    # Now execute the test
14047
14048  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14049  BOOT_JDK_SUFFIX=""
14050  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14051  if test "x$ALL_JDKS_FOUND" != x; then
14052    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14053
14054  if test "x$BOOT_JDK_FOUND" = xno; then
14055    # Now execute the test
14056
14057        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14058        if test -d "$BOOT_JDK"; then
14059          BOOT_JDK_FOUND=maybe
14060          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14061$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14062        fi
14063
14064
14065    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14066    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14067      # Do we have a bin/java?
14068      if test ! -x "$BOOT_JDK/bin/java"; then
14069        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14071        BOOT_JDK_FOUND=no
14072      else
14073        # Do we have a bin/javac?
14074        if test ! -x "$BOOT_JDK/bin/javac"; then
14075          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14077          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14078$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14079          BOOT_JDK_FOUND=no
14080        else
14081          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14082          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14083            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14085            BOOT_JDK_FOUND=no
14086          else
14087            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14088            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14089
14090            # Extra M4 quote needed to protect [] in grep expression.
14091            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14092            if test "x$FOUND_VERSION_78" = x; then
14093              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14096$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14097              BOOT_JDK_FOUND=no
14098            else
14099              # We're done! :-)
14100              BOOT_JDK_FOUND=yes
14101
14102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14103
14104  # Input might be given as Windows format, start by converting to
14105  # unix format.
14106  path="$BOOT_JDK"
14107  new_path=`$CYGPATH -u "$path"`
14108
14109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14112  # "foo.exe" is OK but "foo" is an error.
14113  #
14114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14115  # It is also a way to make sure we got the proper file name for the real test later on.
14116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14117  if test "x$test_shortpath" = x; then
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14120    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14121  fi
14122
14123  # Call helper function which possibly converts this using DOS-style short mode.
14124  # If so, the updated path is stored in $new_path.
14125
14126  input_path="$new_path"
14127  # Check if we need to convert this using DOS-style short mode. If the path
14128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14129  # take no chances and rewrite it.
14130  # Note: m4 eats our [], so we need to use [ and ] instead.
14131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14132  if test "x$has_forbidden_chars" != x; then
14133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14137      # Going to short mode and back again did indeed matter. Since short mode is
14138      # case insensitive, let's make it lowercase to improve readability.
14139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14140      # Now convert it back to Unix-stile (cygpath)
14141      input_path=`$CYGPATH -u "$shortmode_path"`
14142      new_path="$input_path"
14143    fi
14144  fi
14145
14146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14147  if test "x$test_cygdrive_prefix" = x; then
14148    # As a simple fix, exclude /usr/bin since it's not a real path.
14149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14151      # a path prefixed by /cygdrive for fixpath to work.
14152      new_path="$CYGWIN_ROOT_PATH$input_path"
14153    fi
14154  fi
14155
14156
14157  if test "x$path" != "x$new_path"; then
14158    BOOT_JDK="$new_path"
14159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14161  fi
14162
14163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14164
14165  path="$BOOT_JDK"
14166  has_colon=`$ECHO $path | $GREP ^.:`
14167  new_path="$path"
14168  if test "x$has_colon" = x; then
14169    # Not in mixed or Windows style, start by that.
14170    new_path=`cmd //c echo $path`
14171  fi
14172
14173
14174  input_path="$new_path"
14175  # Check if we need to convert this using DOS-style short mode. If the path
14176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14177  # take no chances and rewrite it.
14178  # Note: m4 eats our [], so we need to use [ and ] instead.
14179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14180  if test "x$has_forbidden_chars" != x; then
14181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14183  fi
14184
14185
14186  windows_path="$new_path"
14187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14188    unix_path=`$CYGPATH -u "$windows_path"`
14189    new_path="$unix_path"
14190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14192    new_path="$unix_path"
14193  fi
14194
14195  if test "x$path" != "x$new_path"; then
14196    BOOT_JDK="$new_path"
14197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14199  fi
14200
14201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14203
14204  else
14205    # We're on a posix platform. Hooray! :)
14206    path="$BOOT_JDK"
14207    has_space=`$ECHO "$path" | $GREP " "`
14208    if test "x$has_space" != x; then
14209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14211      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14212    fi
14213
14214    # Use eval to expand a potential ~
14215    eval path="$path"
14216    if test ! -f "$path" && test ! -d "$path"; then
14217      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14218    fi
14219
14220    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14221  fi
14222
14223              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14224$as_echo_n "checking for Boot JDK... " >&6; }
14225              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14226$as_echo "$BOOT_JDK" >&6; }
14227              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14228$as_echo_n "checking Boot JDK version... " >&6; }
14229              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14230              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14231$as_echo "$BOOT_JDK_VERSION" >&6; }
14232            fi # end check jdk version
14233          fi # end check rt.jar
14234        fi # end check javac
14235      fi # end check java
14236    fi # end check boot jdk found
14237  fi
14238
14239    done
14240  fi
14241
14242
14243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14245      # Do we have a bin/java?
14246      if test ! -x "$BOOT_JDK/bin/java"; then
14247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14249        BOOT_JDK_FOUND=no
14250      else
14251        # Do we have a bin/javac?
14252        if test ! -x "$BOOT_JDK/bin/javac"; then
14253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14257          BOOT_JDK_FOUND=no
14258        else
14259          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14260          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14263            BOOT_JDK_FOUND=no
14264          else
14265            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14267
14268            # Extra M4 quote needed to protect [] in grep expression.
14269            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14270            if test "x$FOUND_VERSION_78" = x; then
14271              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14273              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14274$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14275              BOOT_JDK_FOUND=no
14276            else
14277              # We're done! :-)
14278              BOOT_JDK_FOUND=yes
14279
14280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14281
14282  # Input might be given as Windows format, start by converting to
14283  # unix format.
14284  path="$BOOT_JDK"
14285  new_path=`$CYGPATH -u "$path"`
14286
14287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14290  # "foo.exe" is OK but "foo" is an error.
14291  #
14292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14293  # It is also a way to make sure we got the proper file name for the real test later on.
14294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14295  if test "x$test_shortpath" = x; then
14296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14299  fi
14300
14301  # Call helper function which possibly converts this using DOS-style short mode.
14302  # If so, the updated path is stored in $new_path.
14303
14304  input_path="$new_path"
14305  # Check if we need to convert this using DOS-style short mode. If the path
14306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14307  # take no chances and rewrite it.
14308  # Note: m4 eats our [], so we need to use [ and ] instead.
14309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14310  if test "x$has_forbidden_chars" != x; then
14311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14315      # Going to short mode and back again did indeed matter. Since short mode is
14316      # case insensitive, let's make it lowercase to improve readability.
14317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14318      # Now convert it back to Unix-stile (cygpath)
14319      input_path=`$CYGPATH -u "$shortmode_path"`
14320      new_path="$input_path"
14321    fi
14322  fi
14323
14324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14325  if test "x$test_cygdrive_prefix" = x; then
14326    # As a simple fix, exclude /usr/bin since it's not a real path.
14327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14329      # a path prefixed by /cygdrive for fixpath to work.
14330      new_path="$CYGWIN_ROOT_PATH$input_path"
14331    fi
14332  fi
14333
14334
14335  if test "x$path" != "x$new_path"; then
14336    BOOT_JDK="$new_path"
14337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14339  fi
14340
14341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14342
14343  path="$BOOT_JDK"
14344  has_colon=`$ECHO $path | $GREP ^.:`
14345  new_path="$path"
14346  if test "x$has_colon" = x; then
14347    # Not in mixed or Windows style, start by that.
14348    new_path=`cmd //c echo $path`
14349  fi
14350
14351
14352  input_path="$new_path"
14353  # Check if we need to convert this using DOS-style short mode. If the path
14354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14355  # take no chances and rewrite it.
14356  # Note: m4 eats our [], so we need to use [ and ] instead.
14357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14358  if test "x$has_forbidden_chars" != x; then
14359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14361  fi
14362
14363
14364  windows_path="$new_path"
14365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14366    unix_path=`$CYGPATH -u "$windows_path"`
14367    new_path="$unix_path"
14368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14370    new_path="$unix_path"
14371  fi
14372
14373  if test "x$path" != "x$new_path"; then
14374    BOOT_JDK="$new_path"
14375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14377  fi
14378
14379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14381
14382  else
14383    # We're on a posix platform. Hooray! :)
14384    path="$BOOT_JDK"
14385    has_space=`$ECHO "$path" | $GREP " "`
14386    if test "x$has_space" != x; then
14387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14390    fi
14391
14392    # Use eval to expand a potential ~
14393    eval path="$path"
14394    if test ! -f "$path" && test ! -d "$path"; then
14395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14396    fi
14397
14398    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14399  fi
14400
14401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14402$as_echo_n "checking for Boot JDK... " >&6; }
14403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14404$as_echo "$BOOT_JDK" >&6; }
14405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14406$as_echo_n "checking Boot JDK version... " >&6; }
14407              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14409$as_echo "$BOOT_JDK_VERSION" >&6; }
14410            fi # end check jdk version
14411          fi # end check rt.jar
14412        fi # end check javac
14413      fi # end check java
14414    fi # end check boot jdk found
14415  fi
14416
14417  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14418
14419  if test "x$BOOT_JDK_FOUND" = xno; then
14420    # Now execute the test
14421
14422  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14423  BOOT_JDK_SUFFIX="/Contents/Home"
14424  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14425  if test "x$ALL_JDKS_FOUND" != x; then
14426    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14427
14428  if test "x$BOOT_JDK_FOUND" = xno; then
14429    # Now execute the test
14430
14431        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14432        if test -d "$BOOT_JDK"; then
14433          BOOT_JDK_FOUND=maybe
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14435$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14436        fi
14437
14438
14439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14441      # Do we have a bin/java?
14442      if test ! -x "$BOOT_JDK/bin/java"; then
14443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14445        BOOT_JDK_FOUND=no
14446      else
14447        # Do we have a bin/javac?
14448        if test ! -x "$BOOT_JDK/bin/javac"; then
14449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14453          BOOT_JDK_FOUND=no
14454        else
14455          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14456          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14459            BOOT_JDK_FOUND=no
14460          else
14461            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14463
14464            # Extra M4 quote needed to protect [] in grep expression.
14465            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14466            if test "x$FOUND_VERSION_78" = x; then
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14470$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14471              BOOT_JDK_FOUND=no
14472            else
14473              # We're done! :-)
14474              BOOT_JDK_FOUND=yes
14475
14476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14477
14478  # Input might be given as Windows format, start by converting to
14479  # unix format.
14480  path="$BOOT_JDK"
14481  new_path=`$CYGPATH -u "$path"`
14482
14483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14486  # "foo.exe" is OK but "foo" is an error.
14487  #
14488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14489  # It is also a way to make sure we got the proper file name for the real test later on.
14490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14491  if test "x$test_shortpath" = x; then
14492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14494    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14495  fi
14496
14497  # Call helper function which possibly converts this using DOS-style short mode.
14498  # If so, the updated path is stored in $new_path.
14499
14500  input_path="$new_path"
14501  # Check if we need to convert this using DOS-style short mode. If the path
14502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14503  # take no chances and rewrite it.
14504  # Note: m4 eats our [], so we need to use [ and ] instead.
14505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14506  if test "x$has_forbidden_chars" != x; then
14507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14511      # Going to short mode and back again did indeed matter. Since short mode is
14512      # case insensitive, let's make it lowercase to improve readability.
14513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14514      # Now convert it back to Unix-stile (cygpath)
14515      input_path=`$CYGPATH -u "$shortmode_path"`
14516      new_path="$input_path"
14517    fi
14518  fi
14519
14520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14521  if test "x$test_cygdrive_prefix" = x; then
14522    # As a simple fix, exclude /usr/bin since it's not a real path.
14523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14525      # a path prefixed by /cygdrive for fixpath to work.
14526      new_path="$CYGWIN_ROOT_PATH$input_path"
14527    fi
14528  fi
14529
14530
14531  if test "x$path" != "x$new_path"; then
14532    BOOT_JDK="$new_path"
14533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14535  fi
14536
14537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14538
14539  path="$BOOT_JDK"
14540  has_colon=`$ECHO $path | $GREP ^.:`
14541  new_path="$path"
14542  if test "x$has_colon" = x; then
14543    # Not in mixed or Windows style, start by that.
14544    new_path=`cmd //c echo $path`
14545  fi
14546
14547
14548  input_path="$new_path"
14549  # Check if we need to convert this using DOS-style short mode. If the path
14550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14551  # take no chances and rewrite it.
14552  # Note: m4 eats our [], so we need to use [ and ] instead.
14553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14554  if test "x$has_forbidden_chars" != x; then
14555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14557  fi
14558
14559
14560  windows_path="$new_path"
14561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14562    unix_path=`$CYGPATH -u "$windows_path"`
14563    new_path="$unix_path"
14564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14566    new_path="$unix_path"
14567  fi
14568
14569  if test "x$path" != "x$new_path"; then
14570    BOOT_JDK="$new_path"
14571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14573  fi
14574
14575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14577
14578  else
14579    # We're on a posix platform. Hooray! :)
14580    path="$BOOT_JDK"
14581    has_space=`$ECHO "$path" | $GREP " "`
14582    if test "x$has_space" != x; then
14583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14585      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14586    fi
14587
14588    # Use eval to expand a potential ~
14589    eval path="$path"
14590    if test ! -f "$path" && test ! -d "$path"; then
14591      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14592    fi
14593
14594    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14595  fi
14596
14597              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14598$as_echo_n "checking for Boot JDK... " >&6; }
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14600$as_echo "$BOOT_JDK" >&6; }
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14602$as_echo_n "checking Boot JDK version... " >&6; }
14603              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14605$as_echo "$BOOT_JDK_VERSION" >&6; }
14606            fi # end check jdk version
14607          fi # end check rt.jar
14608        fi # end check javac
14609      fi # end check java
14610    fi # end check boot jdk found
14611  fi
14612
14613    done
14614  fi
14615
14616
14617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14619      # Do we have a bin/java?
14620      if test ! -x "$BOOT_JDK/bin/java"; then
14621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14623        BOOT_JDK_FOUND=no
14624      else
14625        # Do we have a bin/javac?
14626        if test ! -x "$BOOT_JDK/bin/javac"; then
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14631          BOOT_JDK_FOUND=no
14632        else
14633          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14634          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14637            BOOT_JDK_FOUND=no
14638          else
14639            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14640            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14641
14642            # Extra M4 quote needed to protect [] in grep expression.
14643            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14644            if test "x$FOUND_VERSION_78" = x; then
14645              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14647              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14648$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14649              BOOT_JDK_FOUND=no
14650            else
14651              # We're done! :-)
14652              BOOT_JDK_FOUND=yes
14653
14654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14655
14656  # Input might be given as Windows format, start by converting to
14657  # unix format.
14658  path="$BOOT_JDK"
14659  new_path=`$CYGPATH -u "$path"`
14660
14661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14664  # "foo.exe" is OK but "foo" is an error.
14665  #
14666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14667  # It is also a way to make sure we got the proper file name for the real test later on.
14668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14669  if test "x$test_shortpath" = x; then
14670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14672    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14673  fi
14674
14675  # Call helper function which possibly converts this using DOS-style short mode.
14676  # If so, the updated path is stored in $new_path.
14677
14678  input_path="$new_path"
14679  # Check if we need to convert this using DOS-style short mode. If the path
14680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14681  # take no chances and rewrite it.
14682  # Note: m4 eats our [], so we need to use [ and ] instead.
14683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14684  if test "x$has_forbidden_chars" != x; then
14685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14689      # Going to short mode and back again did indeed matter. Since short mode is
14690      # case insensitive, let's make it lowercase to improve readability.
14691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14692      # Now convert it back to Unix-stile (cygpath)
14693      input_path=`$CYGPATH -u "$shortmode_path"`
14694      new_path="$input_path"
14695    fi
14696  fi
14697
14698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14699  if test "x$test_cygdrive_prefix" = x; then
14700    # As a simple fix, exclude /usr/bin since it's not a real path.
14701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14703      # a path prefixed by /cygdrive for fixpath to work.
14704      new_path="$CYGWIN_ROOT_PATH$input_path"
14705    fi
14706  fi
14707
14708
14709  if test "x$path" != "x$new_path"; then
14710    BOOT_JDK="$new_path"
14711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14713  fi
14714
14715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14716
14717  path="$BOOT_JDK"
14718  has_colon=`$ECHO $path | $GREP ^.:`
14719  new_path="$path"
14720  if test "x$has_colon" = x; then
14721    # Not in mixed or Windows style, start by that.
14722    new_path=`cmd //c echo $path`
14723  fi
14724
14725
14726  input_path="$new_path"
14727  # Check if we need to convert this using DOS-style short mode. If the path
14728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14729  # take no chances and rewrite it.
14730  # Note: m4 eats our [], so we need to use [ and ] instead.
14731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14732  if test "x$has_forbidden_chars" != x; then
14733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14735  fi
14736
14737
14738  windows_path="$new_path"
14739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14740    unix_path=`$CYGPATH -u "$windows_path"`
14741    new_path="$unix_path"
14742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14744    new_path="$unix_path"
14745  fi
14746
14747  if test "x$path" != "x$new_path"; then
14748    BOOT_JDK="$new_path"
14749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14750$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14751  fi
14752
14753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14755
14756  else
14757    # We're on a posix platform. Hooray! :)
14758    path="$BOOT_JDK"
14759    has_space=`$ECHO "$path" | $GREP " "`
14760    if test "x$has_space" != x; then
14761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14763      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14764    fi
14765
14766    # Use eval to expand a potential ~
14767    eval path="$path"
14768    if test ! -f "$path" && test ! -d "$path"; then
14769      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14770    fi
14771
14772    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14773  fi
14774
14775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14776$as_echo_n "checking for Boot JDK... " >&6; }
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14778$as_echo "$BOOT_JDK" >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14780$as_echo_n "checking Boot JDK version... " >&6; }
14781              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14783$as_echo "$BOOT_JDK_VERSION" >&6; }
14784            fi # end check jdk version
14785          fi # end check rt.jar
14786        fi # end check javac
14787      fi # end check java
14788    fi # end check boot jdk found
14789  fi
14790
14791
14792  if test "x$BOOT_JDK_FOUND" = xno; then
14793    # Now execute the test
14794
14795  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14796  BOOT_JDK_SUFFIX="/Contents/Home"
14797  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14798  if test "x$ALL_JDKS_FOUND" != x; then
14799    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14800
14801  if test "x$BOOT_JDK_FOUND" = xno; then
14802    # Now execute the test
14803
14804        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14805        if test -d "$BOOT_JDK"; then
14806          BOOT_JDK_FOUND=maybe
14807          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14808$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14809        fi
14810
14811
14812    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14813    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14814      # Do we have a bin/java?
14815      if test ! -x "$BOOT_JDK/bin/java"; then
14816        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14818        BOOT_JDK_FOUND=no
14819      else
14820        # Do we have a bin/javac?
14821        if test ! -x "$BOOT_JDK/bin/javac"; then
14822          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14825$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14826          BOOT_JDK_FOUND=no
14827        else
14828          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14829          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14830            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14832            BOOT_JDK_FOUND=no
14833          else
14834            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14835            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14836
14837            # Extra M4 quote needed to protect [] in grep expression.
14838            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14839            if test "x$FOUND_VERSION_78" = x; then
14840              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14842              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14843$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14844              BOOT_JDK_FOUND=no
14845            else
14846              # We're done! :-)
14847              BOOT_JDK_FOUND=yes
14848
14849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14850
14851  # Input might be given as Windows format, start by converting to
14852  # unix format.
14853  path="$BOOT_JDK"
14854  new_path=`$CYGPATH -u "$path"`
14855
14856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14859  # "foo.exe" is OK but "foo" is an error.
14860  #
14861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14862  # It is also a way to make sure we got the proper file name for the real test later on.
14863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14864  if test "x$test_shortpath" = x; then
14865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14867    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14868  fi
14869
14870  # Call helper function which possibly converts this using DOS-style short mode.
14871  # If so, the updated path is stored in $new_path.
14872
14873  input_path="$new_path"
14874  # Check if we need to convert this using DOS-style short mode. If the path
14875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14876  # take no chances and rewrite it.
14877  # Note: m4 eats our [], so we need to use [ and ] instead.
14878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14879  if test "x$has_forbidden_chars" != x; then
14880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14884      # Going to short mode and back again did indeed matter. Since short mode is
14885      # case insensitive, let's make it lowercase to improve readability.
14886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14887      # Now convert it back to Unix-stile (cygpath)
14888      input_path=`$CYGPATH -u "$shortmode_path"`
14889      new_path="$input_path"
14890    fi
14891  fi
14892
14893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14894  if test "x$test_cygdrive_prefix" = x; then
14895    # As a simple fix, exclude /usr/bin since it's not a real path.
14896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14898      # a path prefixed by /cygdrive for fixpath to work.
14899      new_path="$CYGWIN_ROOT_PATH$input_path"
14900    fi
14901  fi
14902
14903
14904  if test "x$path" != "x$new_path"; then
14905    BOOT_JDK="$new_path"
14906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14908  fi
14909
14910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14911
14912  path="$BOOT_JDK"
14913  has_colon=`$ECHO $path | $GREP ^.:`
14914  new_path="$path"
14915  if test "x$has_colon" = x; then
14916    # Not in mixed or Windows style, start by that.
14917    new_path=`cmd //c echo $path`
14918  fi
14919
14920
14921  input_path="$new_path"
14922  # Check if we need to convert this using DOS-style short mode. If the path
14923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14924  # take no chances and rewrite it.
14925  # Note: m4 eats our [], so we need to use [ and ] instead.
14926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14927  if test "x$has_forbidden_chars" != x; then
14928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14930  fi
14931
14932
14933  windows_path="$new_path"
14934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14935    unix_path=`$CYGPATH -u "$windows_path"`
14936    new_path="$unix_path"
14937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14939    new_path="$unix_path"
14940  fi
14941
14942  if test "x$path" != "x$new_path"; then
14943    BOOT_JDK="$new_path"
14944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14945$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14946  fi
14947
14948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14950
14951  else
14952    # We're on a posix platform. Hooray! :)
14953    path="$BOOT_JDK"
14954    has_space=`$ECHO "$path" | $GREP " "`
14955    if test "x$has_space" != x; then
14956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14958      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14959    fi
14960
14961    # Use eval to expand a potential ~
14962    eval path="$path"
14963    if test ! -f "$path" && test ! -d "$path"; then
14964      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14965    fi
14966
14967    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14968  fi
14969
14970              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14971$as_echo_n "checking for Boot JDK... " >&6; }
14972              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14973$as_echo "$BOOT_JDK" >&6; }
14974              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14975$as_echo_n "checking Boot JDK version... " >&6; }
14976              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14977              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14978$as_echo "$BOOT_JDK_VERSION" >&6; }
14979            fi # end check jdk version
14980          fi # end check rt.jar
14981        fi # end check javac
14982      fi # end check java
14983    fi # end check boot jdk found
14984  fi
14985
14986    done
14987  fi
14988
14989
14990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14992      # Do we have a bin/java?
14993      if test ! -x "$BOOT_JDK/bin/java"; then
14994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14996        BOOT_JDK_FOUND=no
14997      else
14998        # Do we have a bin/javac?
14999        if test ! -x "$BOOT_JDK/bin/javac"; then
15000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15004          BOOT_JDK_FOUND=no
15005        else
15006          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15007          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15008            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15010            BOOT_JDK_FOUND=no
15011          else
15012            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15013            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15014
15015            # Extra M4 quote needed to protect [] in grep expression.
15016            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15017            if test "x$FOUND_VERSION_78" = x; then
15018              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15020              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15021$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15022              BOOT_JDK_FOUND=no
15023            else
15024              # We're done! :-)
15025              BOOT_JDK_FOUND=yes
15026
15027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15028
15029  # Input might be given as Windows format, start by converting to
15030  # unix format.
15031  path="$BOOT_JDK"
15032  new_path=`$CYGPATH -u "$path"`
15033
15034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15037  # "foo.exe" is OK but "foo" is an error.
15038  #
15039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15040  # It is also a way to make sure we got the proper file name for the real test later on.
15041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15042  if test "x$test_shortpath" = x; then
15043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15045    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15046  fi
15047
15048  # Call helper function which possibly converts this using DOS-style short mode.
15049  # If so, the updated path is stored in $new_path.
15050
15051  input_path="$new_path"
15052  # Check if we need to convert this using DOS-style short mode. If the path
15053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15054  # take no chances and rewrite it.
15055  # Note: m4 eats our [], so we need to use [ and ] instead.
15056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15057  if test "x$has_forbidden_chars" != x; then
15058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15062      # Going to short mode and back again did indeed matter. Since short mode is
15063      # case insensitive, let's make it lowercase to improve readability.
15064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15065      # Now convert it back to Unix-stile (cygpath)
15066      input_path=`$CYGPATH -u "$shortmode_path"`
15067      new_path="$input_path"
15068    fi
15069  fi
15070
15071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15072  if test "x$test_cygdrive_prefix" = x; then
15073    # As a simple fix, exclude /usr/bin since it's not a real path.
15074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15076      # a path prefixed by /cygdrive for fixpath to work.
15077      new_path="$CYGWIN_ROOT_PATH$input_path"
15078    fi
15079  fi
15080
15081
15082  if test "x$path" != "x$new_path"; then
15083    BOOT_JDK="$new_path"
15084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15086  fi
15087
15088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15089
15090  path="$BOOT_JDK"
15091  has_colon=`$ECHO $path | $GREP ^.:`
15092  new_path="$path"
15093  if test "x$has_colon" = x; then
15094    # Not in mixed or Windows style, start by that.
15095    new_path=`cmd //c echo $path`
15096  fi
15097
15098
15099  input_path="$new_path"
15100  # Check if we need to convert this using DOS-style short mode. If the path
15101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15102  # take no chances and rewrite it.
15103  # Note: m4 eats our [], so we need to use [ and ] instead.
15104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15105  if test "x$has_forbidden_chars" != x; then
15106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15108  fi
15109
15110
15111  windows_path="$new_path"
15112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15113    unix_path=`$CYGPATH -u "$windows_path"`
15114    new_path="$unix_path"
15115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15117    new_path="$unix_path"
15118  fi
15119
15120  if test "x$path" != "x$new_path"; then
15121    BOOT_JDK="$new_path"
15122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15124  fi
15125
15126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15128
15129  else
15130    # We're on a posix platform. Hooray! :)
15131    path="$BOOT_JDK"
15132    has_space=`$ECHO "$path" | $GREP " "`
15133    if test "x$has_space" != x; then
15134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15137    fi
15138
15139    # Use eval to expand a potential ~
15140    eval path="$path"
15141    if test ! -f "$path" && test ! -d "$path"; then
15142      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15143    fi
15144
15145    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15146  fi
15147
15148              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15149$as_echo_n "checking for Boot JDK... " >&6; }
15150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15151$as_echo "$BOOT_JDK" >&6; }
15152              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15153$as_echo_n "checking Boot JDK version... " >&6; }
15154              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15156$as_echo "$BOOT_JDK_VERSION" >&6; }
15157            fi # end check jdk version
15158          fi # end check rt.jar
15159        fi # end check javac
15160      fi # end check java
15161    fi # end check boot jdk found
15162  fi
15163
15164  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15165
15166  if test "x$BOOT_JDK_FOUND" = xno; then
15167    # Now execute the test
15168
15169  BOOT_JDK_PREFIX="/usr/lib/jvm"
15170  BOOT_JDK_SUFFIX=""
15171  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15172  if test "x$ALL_JDKS_FOUND" != x; then
15173    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15174
15175  if test "x$BOOT_JDK_FOUND" = xno; then
15176    # Now execute the test
15177
15178        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15179        if test -d "$BOOT_JDK"; then
15180          BOOT_JDK_FOUND=maybe
15181          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15182$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15183        fi
15184
15185
15186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15188      # Do we have a bin/java?
15189      if test ! -x "$BOOT_JDK/bin/java"; then
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15192        BOOT_JDK_FOUND=no
15193      else
15194        # Do we have a bin/javac?
15195        if test ! -x "$BOOT_JDK/bin/javac"; then
15196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15200          BOOT_JDK_FOUND=no
15201        else
15202          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15203          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15206            BOOT_JDK_FOUND=no
15207          else
15208            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15209            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15210
15211            # Extra M4 quote needed to protect [] in grep expression.
15212            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15213            if test "x$FOUND_VERSION_78" = x; then
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15217$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15218              BOOT_JDK_FOUND=no
15219            else
15220              # We're done! :-)
15221              BOOT_JDK_FOUND=yes
15222
15223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15224
15225  # Input might be given as Windows format, start by converting to
15226  # unix format.
15227  path="$BOOT_JDK"
15228  new_path=`$CYGPATH -u "$path"`
15229
15230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15233  # "foo.exe" is OK but "foo" is an error.
15234  #
15235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15236  # It is also a way to make sure we got the proper file name for the real test later on.
15237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15238  if test "x$test_shortpath" = x; then
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15242  fi
15243
15244  # Call helper function which possibly converts this using DOS-style short mode.
15245  # If so, the updated path is stored in $new_path.
15246
15247  input_path="$new_path"
15248  # Check if we need to convert this using DOS-style short mode. If the path
15249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15250  # take no chances and rewrite it.
15251  # Note: m4 eats our [], so we need to use [ and ] instead.
15252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15253  if test "x$has_forbidden_chars" != x; then
15254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15258      # Going to short mode and back again did indeed matter. Since short mode is
15259      # case insensitive, let's make it lowercase to improve readability.
15260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15261      # Now convert it back to Unix-stile (cygpath)
15262      input_path=`$CYGPATH -u "$shortmode_path"`
15263      new_path="$input_path"
15264    fi
15265  fi
15266
15267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15268  if test "x$test_cygdrive_prefix" = x; then
15269    # As a simple fix, exclude /usr/bin since it's not a real path.
15270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15272      # a path prefixed by /cygdrive for fixpath to work.
15273      new_path="$CYGWIN_ROOT_PATH$input_path"
15274    fi
15275  fi
15276
15277
15278  if test "x$path" != "x$new_path"; then
15279    BOOT_JDK="$new_path"
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15282  fi
15283
15284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15285
15286  path="$BOOT_JDK"
15287  has_colon=`$ECHO $path | $GREP ^.:`
15288  new_path="$path"
15289  if test "x$has_colon" = x; then
15290    # Not in mixed or Windows style, start by that.
15291    new_path=`cmd //c echo $path`
15292  fi
15293
15294
15295  input_path="$new_path"
15296  # Check if we need to convert this using DOS-style short mode. If the path
15297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15298  # take no chances and rewrite it.
15299  # Note: m4 eats our [], so we need to use [ and ] instead.
15300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15301  if test "x$has_forbidden_chars" != x; then
15302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15304  fi
15305
15306
15307  windows_path="$new_path"
15308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15309    unix_path=`$CYGPATH -u "$windows_path"`
15310    new_path="$unix_path"
15311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15313    new_path="$unix_path"
15314  fi
15315
15316  if test "x$path" != "x$new_path"; then
15317    BOOT_JDK="$new_path"
15318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15320  fi
15321
15322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15324
15325  else
15326    # We're on a posix platform. Hooray! :)
15327    path="$BOOT_JDK"
15328    has_space=`$ECHO "$path" | $GREP " "`
15329    if test "x$has_space" != x; then
15330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15332      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15333    fi
15334
15335    # Use eval to expand a potential ~
15336    eval path="$path"
15337    if test ! -f "$path" && test ! -d "$path"; then
15338      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15339    fi
15340
15341    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15342  fi
15343
15344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15345$as_echo_n "checking for Boot JDK... " >&6; }
15346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15347$as_echo "$BOOT_JDK" >&6; }
15348              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15349$as_echo_n "checking Boot JDK version... " >&6; }
15350              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15351              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15352$as_echo "$BOOT_JDK_VERSION" >&6; }
15353            fi # end check jdk version
15354          fi # end check rt.jar
15355        fi # end check javac
15356      fi # end check java
15357    fi # end check boot jdk found
15358  fi
15359
15360    done
15361  fi
15362
15363
15364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15366      # Do we have a bin/java?
15367      if test ! -x "$BOOT_JDK/bin/java"; then
15368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15370        BOOT_JDK_FOUND=no
15371      else
15372        # Do we have a bin/javac?
15373        if test ! -x "$BOOT_JDK/bin/javac"; then
15374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15378          BOOT_JDK_FOUND=no
15379        else
15380          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15381          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15382            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15384            BOOT_JDK_FOUND=no
15385          else
15386            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15387            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15388
15389            # Extra M4 quote needed to protect [] in grep expression.
15390            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15391            if test "x$FOUND_VERSION_78" = x; then
15392              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15394              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15395$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15396              BOOT_JDK_FOUND=no
15397            else
15398              # We're done! :-)
15399              BOOT_JDK_FOUND=yes
15400
15401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15402
15403  # Input might be given as Windows format, start by converting to
15404  # unix format.
15405  path="$BOOT_JDK"
15406  new_path=`$CYGPATH -u "$path"`
15407
15408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15411  # "foo.exe" is OK but "foo" is an error.
15412  #
15413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15414  # It is also a way to make sure we got the proper file name for the real test later on.
15415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15416  if test "x$test_shortpath" = x; then
15417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15419    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15420  fi
15421
15422  # Call helper function which possibly converts this using DOS-style short mode.
15423  # If so, the updated path is stored in $new_path.
15424
15425  input_path="$new_path"
15426  # Check if we need to convert this using DOS-style short mode. If the path
15427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15428  # take no chances and rewrite it.
15429  # Note: m4 eats our [], so we need to use [ and ] instead.
15430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15431  if test "x$has_forbidden_chars" != x; then
15432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15436      # Going to short mode and back again did indeed matter. Since short mode is
15437      # case insensitive, let's make it lowercase to improve readability.
15438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15439      # Now convert it back to Unix-stile (cygpath)
15440      input_path=`$CYGPATH -u "$shortmode_path"`
15441      new_path="$input_path"
15442    fi
15443  fi
15444
15445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15446  if test "x$test_cygdrive_prefix" = x; then
15447    # As a simple fix, exclude /usr/bin since it's not a real path.
15448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15450      # a path prefixed by /cygdrive for fixpath to work.
15451      new_path="$CYGWIN_ROOT_PATH$input_path"
15452    fi
15453  fi
15454
15455
15456  if test "x$path" != "x$new_path"; then
15457    BOOT_JDK="$new_path"
15458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15460  fi
15461
15462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15463
15464  path="$BOOT_JDK"
15465  has_colon=`$ECHO $path | $GREP ^.:`
15466  new_path="$path"
15467  if test "x$has_colon" = x; then
15468    # Not in mixed or Windows style, start by that.
15469    new_path=`cmd //c echo $path`
15470  fi
15471
15472
15473  input_path="$new_path"
15474  # Check if we need to convert this using DOS-style short mode. If the path
15475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15476  # take no chances and rewrite it.
15477  # Note: m4 eats our [], so we need to use [ and ] instead.
15478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15479  if test "x$has_forbidden_chars" != x; then
15480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15482  fi
15483
15484
15485  windows_path="$new_path"
15486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15487    unix_path=`$CYGPATH -u "$windows_path"`
15488    new_path="$unix_path"
15489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15491    new_path="$unix_path"
15492  fi
15493
15494  if test "x$path" != "x$new_path"; then
15495    BOOT_JDK="$new_path"
15496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15498  fi
15499
15500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15502
15503  else
15504    # We're on a posix platform. Hooray! :)
15505    path="$BOOT_JDK"
15506    has_space=`$ECHO "$path" | $GREP " "`
15507    if test "x$has_space" != x; then
15508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15510      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15511    fi
15512
15513    # Use eval to expand a potential ~
15514    eval path="$path"
15515    if test ! -f "$path" && test ! -d "$path"; then
15516      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15517    fi
15518
15519    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15520  fi
15521
15522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15523$as_echo_n "checking for Boot JDK... " >&6; }
15524              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15525$as_echo "$BOOT_JDK" >&6; }
15526              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15527$as_echo_n "checking Boot JDK version... " >&6; }
15528              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15529              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15530$as_echo "$BOOT_JDK_VERSION" >&6; }
15531            fi # end check jdk version
15532          fi # end check rt.jar
15533        fi # end check javac
15534      fi # end check java
15535    fi # end check boot jdk found
15536  fi
15537
15538  fi
15539
15540
15541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15543      # Do we have a bin/java?
15544      if test ! -x "$BOOT_JDK/bin/java"; then
15545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15547        BOOT_JDK_FOUND=no
15548      else
15549        # Do we have a bin/javac?
15550        if test ! -x "$BOOT_JDK/bin/javac"; then
15551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15555          BOOT_JDK_FOUND=no
15556        else
15557          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15558          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15559            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15561            BOOT_JDK_FOUND=no
15562          else
15563            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15565
15566            # Extra M4 quote needed to protect [] in grep expression.
15567            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15568            if test "x$FOUND_VERSION_78" = x; then
15569              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15571              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15572$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15573              BOOT_JDK_FOUND=no
15574            else
15575              # We're done! :-)
15576              BOOT_JDK_FOUND=yes
15577
15578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15579
15580  # Input might be given as Windows format, start by converting to
15581  # unix format.
15582  path="$BOOT_JDK"
15583  new_path=`$CYGPATH -u "$path"`
15584
15585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15588  # "foo.exe" is OK but "foo" is an error.
15589  #
15590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15591  # It is also a way to make sure we got the proper file name for the real test later on.
15592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15593  if test "x$test_shortpath" = x; then
15594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15596    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15597  fi
15598
15599  # Call helper function which possibly converts this using DOS-style short mode.
15600  # If so, the updated path is stored in $new_path.
15601
15602  input_path="$new_path"
15603  # Check if we need to convert this using DOS-style short mode. If the path
15604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15605  # take no chances and rewrite it.
15606  # Note: m4 eats our [], so we need to use [ and ] instead.
15607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15608  if test "x$has_forbidden_chars" != x; then
15609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15613      # Going to short mode and back again did indeed matter. Since short mode is
15614      # case insensitive, let's make it lowercase to improve readability.
15615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15616      # Now convert it back to Unix-stile (cygpath)
15617      input_path=`$CYGPATH -u "$shortmode_path"`
15618      new_path="$input_path"
15619    fi
15620  fi
15621
15622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15623  if test "x$test_cygdrive_prefix" = x; then
15624    # As a simple fix, exclude /usr/bin since it's not a real path.
15625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15627      # a path prefixed by /cygdrive for fixpath to work.
15628      new_path="$CYGWIN_ROOT_PATH$input_path"
15629    fi
15630  fi
15631
15632
15633  if test "x$path" != "x$new_path"; then
15634    BOOT_JDK="$new_path"
15635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15637  fi
15638
15639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15640
15641  path="$BOOT_JDK"
15642  has_colon=`$ECHO $path | $GREP ^.:`
15643  new_path="$path"
15644  if test "x$has_colon" = x; then
15645    # Not in mixed or Windows style, start by that.
15646    new_path=`cmd //c echo $path`
15647  fi
15648
15649
15650  input_path="$new_path"
15651  # Check if we need to convert this using DOS-style short mode. If the path
15652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15653  # take no chances and rewrite it.
15654  # Note: m4 eats our [], so we need to use [ and ] instead.
15655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15656  if test "x$has_forbidden_chars" != x; then
15657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15659  fi
15660
15661
15662  windows_path="$new_path"
15663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15664    unix_path=`$CYGPATH -u "$windows_path"`
15665    new_path="$unix_path"
15666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15668    new_path="$unix_path"
15669  fi
15670
15671  if test "x$path" != "x$new_path"; then
15672    BOOT_JDK="$new_path"
15673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15675  fi
15676
15677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15679
15680  else
15681    # We're on a posix platform. Hooray! :)
15682    path="$BOOT_JDK"
15683    has_space=`$ECHO "$path" | $GREP " "`
15684    if test "x$has_space" != x; then
15685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15687      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15688    fi
15689
15690    # Use eval to expand a potential ~
15691    eval path="$path"
15692    if test ! -f "$path" && test ! -d "$path"; then
15693      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15694    fi
15695
15696    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15697  fi
15698
15699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15700$as_echo_n "checking for Boot JDK... " >&6; }
15701              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15702$as_echo "$BOOT_JDK" >&6; }
15703              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15704$as_echo_n "checking Boot JDK version... " >&6; }
15705              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15706              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15707$as_echo "$BOOT_JDK_VERSION" >&6; }
15708            fi # end check jdk version
15709          fi # end check rt.jar
15710        fi # end check javac
15711      fi # end check java
15712    fi # end check boot jdk found
15713  fi
15714
15715
15716# If we haven't found anything yet, we've truly lost. Give up.
15717if test "x$BOOT_JDK_FOUND" = xno; then
15718
15719    # Print a helpful message on how to acquire the necessary build dependency.
15720    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15721    MISSING_DEPENDENCY=openjdk
15722    PKGHANDLER_COMMAND=
15723
15724    case $PKGHANDLER in
15725	apt-get)
15726                apt_help     $MISSING_DEPENDENCY ;;
15727    yum)
15728                yum_help     $MISSING_DEPENDENCY ;;
15729	port)
15730                port_help    $MISSING_DEPENDENCY ;;
15731	pkgutil)
15732                pkgutil_help $MISSING_DEPENDENCY ;;
15733	pkgadd)
15734                pkgadd_help  $MISSING_DEPENDENCY ;;
15735    * )
15736      break ;;
15737    esac
15738
15739    if test "x$PKGHANDLER_COMMAND" != x; then
15740        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15741    fi
15742
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15744$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15746$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15747  as_fn_error $? "Cannot continue" "$LINENO" 5
15748fi
15749
15750# Setup proper paths for what we found
15751BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15752if test ! -f "$BOOT_RTJAR"; then
15753    # On MacOSX it is called classes.jar
15754    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15755    if test -f "$BOOT_RTJAR"; then
15756      # Remove the ..
15757      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15758    fi
15759fi
15760BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15761BOOT_JDK="$BOOT_JDK"
15762
15763
15764
15765
15766# Setup tools from the Boot JDK.
15767
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15769$as_echo_n "checking for java in Boot JDK... " >&6; }
15770  JAVA=$BOOT_JDK/bin/java
15771  if test ! -x $JAVA; then
15772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15773$as_echo "not found" >&6; }
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15775$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15776      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15777  fi
15778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15779$as_echo "ok" >&6; }
15780
15781
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15783$as_echo_n "checking for javac in Boot JDK... " >&6; }
15784  JAVAC=$BOOT_JDK/bin/javac
15785  if test ! -x $JAVAC; then
15786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15787$as_echo "not found" >&6; }
15788      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15789$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15790      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15791  fi
15792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15793$as_echo "ok" >&6; }
15794
15795
15796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15797$as_echo_n "checking for javah in Boot JDK... " >&6; }
15798  JAVAH=$BOOT_JDK/bin/javah
15799  if test ! -x $JAVAH; then
15800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15801$as_echo "not found" >&6; }
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15803$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15804      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15805  fi
15806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15807$as_echo "ok" >&6; }
15808
15809
15810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15811$as_echo_n "checking for javap in Boot JDK... " >&6; }
15812  JAVAP=$BOOT_JDK/bin/javap
15813  if test ! -x $JAVAP; then
15814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15815$as_echo "not found" >&6; }
15816      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15817$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15818      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15819  fi
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15821$as_echo "ok" >&6; }
15822
15823
15824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15825$as_echo_n "checking for jar in Boot JDK... " >&6; }
15826  JAR=$BOOT_JDK/bin/jar
15827  if test ! -x $JAR; then
15828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15829$as_echo "not found" >&6; }
15830      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15831$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15832      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15833  fi
15834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15835$as_echo "ok" >&6; }
15836
15837
15838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15839$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15840  RMIC=$BOOT_JDK/bin/rmic
15841  if test ! -x $RMIC; then
15842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15843$as_echo "not found" >&6; }
15844      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15845$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15846      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15847  fi
15848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15849$as_echo "ok" >&6; }
15850
15851
15852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15853$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15854  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15855  if test ! -x $NATIVE2ASCII; then
15856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15857$as_echo "not found" >&6; }
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15859$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15860      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15861  fi
15862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15863$as_echo "ok" >&6; }
15864
15865
15866# Finally, set some other options...
15867
15868# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15869BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15870
15871
15872
15873
15874##############################################################################
15875#
15876# Specify options for anything that is run with the Boot JDK.
15877#
15878
15879# Check whether --with-boot-jdk-jvmargs was given.
15880if test "${with_boot_jdk_jvmargs+set}" = set; then :
15881  withval=$with_boot_jdk_jvmargs;
15882fi
15883
15884
15885if test "x$with_boot_jdk_jvmargs" = x; then
15886    # Not all JVM:s accept the same arguments on the command line.
15887    # OpenJDK specific increase in thread stack for JDK build,
15888    # well more specifically, when running javac.
15889    if test "x$BUILD_NUM_BITS" = x32; then
15890       STACK_SIZE=768
15891    else
15892       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15893       # since 64-bit pointers are pushed on the stach. Apparently, we need
15894       # to increase the stack space when javacing the JDK....
15895       STACK_SIZE=1536
15896    fi
15897
15898    # Minimum amount of heap memory.
15899
15900    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15901    $ECHO "Command: $JAVA -Xms64M -version" >&5
15902    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15903    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15904    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15905    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15906        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15907	JVM_ARG_OK=true
15908    else
15909	$ECHO "Arg failed:" >&5
15910	$ECHO "$OUTPUT" >&5
15911	JVM_ARG_OK=false
15912    fi
15913
15914    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15915        # Why does macosx need more heap? Its the huge JDK batch.
15916
15917    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15918    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15919    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15920    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15921    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15922    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15923        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15924	JVM_ARG_OK=true
15925    else
15926	$ECHO "Arg failed:" >&5
15927	$ECHO "$OUTPUT" >&5
15928	JVM_ARG_OK=false
15929    fi
15930
15931    else
15932
15933    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15934    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15935    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15936    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15937    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15938    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15939        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15940	JVM_ARG_OK=true
15941    else
15942	$ECHO "Arg failed:" >&5
15943	$ECHO "$OUTPUT" >&5
15944	JVM_ARG_OK=false
15945    fi
15946
15947    fi
15948    # When is adding -client something that speeds up the JVM?
15949    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15950
15951    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15952    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15953    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15954    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15955    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15956    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15957        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15958	JVM_ARG_OK=true
15959    else
15960	$ECHO "Arg failed:" >&5
15961	$ECHO "$OUTPUT" >&5
15962	JVM_ARG_OK=false
15963    fi
15964
15965
15966    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15967    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15968    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15969    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15970    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15971    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15972        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15973	JVM_ARG_OK=true
15974    else
15975	$ECHO "Arg failed:" >&5
15976	$ECHO "$OUTPUT" >&5
15977	JVM_ARG_OK=false
15978    fi
15979
15980
15981    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15982    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15983    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15984    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15985    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15986    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15987        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15988	JVM_ARG_OK=true
15989    else
15990	$ECHO "Arg failed:" >&5
15991	$ECHO "$OUTPUT" >&5
15992	JVM_ARG_OK=false
15993    fi
15994
15995    # Disable special log output when a debug build is used as Boot JDK...
15996
15997    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15998    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15999    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16000    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16001    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16002    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16003        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16004	JVM_ARG_OK=true
16005    else
16006	$ECHO "Arg failed:" >&5
16007	$ECHO "$OUTPUT" >&5
16008	JVM_ARG_OK=false
16009    fi
16010
16011fi
16012
16013BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16014
16015
16016
16017###############################################################################
16018#
16019# Configure the sources to use. We can add or override individual directories.
16020#
16021###############################################################################
16022
16023
16024
16025# Where are the sources. Any of these can be overridden
16026# using --with-override-corba and the likes.
16027LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16028CORBA_TOPDIR="$SRC_ROOT/corba"
16029JAXP_TOPDIR="$SRC_ROOT/jaxp"
16030JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16031HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16032NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16033JDK_TOPDIR="$SRC_ROOT/jdk"
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044###############################################################################
16045#
16046# Pickup additional source for a component from outside of the source root
16047# or override source for a component.
16048#
16049
16050# Check whether --with-add-source-root was given.
16051if test "${with_add_source_root+set}" = set; then :
16052  withval=$with_add_source_root;
16053fi
16054
16055
16056
16057# Check whether --with-override-source-root was given.
16058if test "${with_override_source_root+set}" = set; then :
16059  withval=$with_override_source_root;
16060fi
16061
16062
16063
16064# Check whether --with-adds-and-overrides was given.
16065if test "${with_adds_and_overrides+set}" = set; then :
16066  withval=$with_adds_and_overrides;
16067fi
16068
16069
16070if test "x$with_adds_and_overrides" != x; then
16071    with_add_source_root="$with_adds_and_overrides/adds"
16072    with_override_source_root="$with_adds_and_overrides/overrides"
16073fi
16074
16075if test "x$with_add_source_root" != x; then
16076    if ! test -d $with_add_source_root; then
16077       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16078    fi
16079    CURDIR="$PWD"
16080    cd "$with_add_source_root"
16081    ADD_SRC_ROOT="`pwd`"
16082    cd "$CURDIR"
16083    # Verify that the addon source root does not have any root makefiles.
16084    # If it does, then it is usually an error, prevent this.
16085    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16086       test -f $with_add_source_root/langtools/make/Makefile; then
16087        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
16088    fi
16089    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16090       test -f $with_add_source_root/corba/make/Makefile; then
16091        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
16092    fi
16093    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16094       test -f $with_add_source_root/jaxp/make/Makefile; then
16095        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
16096    fi
16097    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16098       test -f $with_add_source_root/jaxws/make/Makefile; then
16099        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
16100    fi
16101    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16102       test -f $with_add_source_root/hotspot/make/Makefile; then
16103        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
16104    fi
16105    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16106       test -f $with_add_source_root/jdk/make/Makefile; then
16107        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
16108    fi
16109fi
16110
16111
16112if test "x$with_override_source_root" != x; then
16113    if ! test -d $with_override_source_root; then
16114       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16115    fi
16116    CURDIR="$PWD"
16117    cd "$with_override_source_root"
16118    OVERRIDE_SRC_ROOT="`pwd`"
16119    cd "$CURDIR"
16120    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16121       test -f $with_override_source_root/langtools/make/Makefile; then
16122        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
16123    fi
16124    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16125       test -f $with_override_source_root/corba/make/Makefile; then
16126        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
16127    fi
16128    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16129       test -f $with_override_source_root/jaxp/make/Makefile; then
16130        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
16131    fi
16132    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16133       test -f $with_override_source_root/jaxws/make/Makefile; then
16134        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
16135    fi
16136    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16137       test -f $with_override_source_root/hotspot/make/Makefile; then
16138        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
16139    fi
16140    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16141       test -f $with_override_source_root/jdk/make/Makefile; then
16142        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
16143    fi
16144fi
16145
16146
16147###############################################################################
16148#
16149# Override a repo completely, this is used for example when you have 3 small
16150# development sandboxes of the langtools sources and want to avoid having 3 full
16151# OpenJDK sources checked out on disk.
16152#
16153# Assuming that the 3 langtools sandboxes are located here:
16154# /home/fredrik/sandbox1/langtools
16155# /home/fredrik/sandbox2/langtools
16156# /home/fredrik/sandbox3/langtools
16157#
16158# From the source root you create build subdirs manually:
16159#     mkdir -p build1 build2 build3
16160# in each build directory run:
16161#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16162#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16163#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16164#
16165
16166
16167# Check whether --with-override-langtools was given.
16168if test "${with_override_langtools+set}" = set; then :
16169  withval=$with_override_langtools;
16170fi
16171
16172
16173
16174# Check whether --with-override-corba was given.
16175if test "${with_override_corba+set}" = set; then :
16176  withval=$with_override_corba;
16177fi
16178
16179
16180
16181# Check whether --with-override-jaxp was given.
16182if test "${with_override_jaxp+set}" = set; then :
16183  withval=$with_override_jaxp;
16184fi
16185
16186
16187
16188# Check whether --with-override-jaxws was given.
16189if test "${with_override_jaxws+set}" = set; then :
16190  withval=$with_override_jaxws;
16191fi
16192
16193
16194
16195# Check whether --with-override-hotspot was given.
16196if test "${with_override_hotspot+set}" = set; then :
16197  withval=$with_override_hotspot;
16198fi
16199
16200
16201
16202# Check whether --with-override-jdk was given.
16203if test "${with_override_jdk+set}" = set; then :
16204  withval=$with_override_jdk;
16205fi
16206
16207
16208if test "x$with_override_langtools" != x; then
16209    CURDIR="$PWD"
16210    cd "$with_override_langtools"
16211    LANGTOOLS_TOPDIR="`pwd`"
16212    cd "$CURDIR"
16213    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16214        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16215    fi
16216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16217$as_echo_n "checking if langtools should be overridden... " >&6; }
16218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16219$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16220fi
16221if test "x$with_override_corba" != x; then
16222    CURDIR="$PWD"
16223    cd "$with_override_corba"
16224    CORBA_TOPDIR="`pwd`"
16225    cd "$CURDIR"
16226    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16227        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16228    fi
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16230$as_echo_n "checking if corba should be overridden... " >&6; }
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16232$as_echo "yes with $CORBA_TOPDIR" >&6; }
16233fi
16234if test "x$with_override_jaxp" != x; then
16235    CURDIR="$PWD"
16236    cd "$with_override_jaxp"
16237    JAXP_TOPDIR="`pwd`"
16238    cd "$CURDIR"
16239    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16240        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16241    fi
16242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16243$as_echo_n "checking if jaxp should be overridden... " >&6; }
16244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16245$as_echo "yes with $JAXP_TOPDIR" >&6; }
16246fi
16247if test "x$with_override_jaxws" != x; then
16248    CURDIR="$PWD"
16249    cd "$with_override_jaxws"
16250    JAXWS_TOPDIR="`pwd`"
16251    cd "$CURDIR"
16252    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16253        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16254    fi
16255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16256$as_echo_n "checking if jaxws should be overridden... " >&6; }
16257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16258$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16259fi
16260if test "x$with_override_hotspot" != x; then
16261    CURDIR="$PWD"
16262    cd "$with_override_hotspot"
16263    HOTSPOT_TOPDIR="`pwd`"
16264    cd "$CURDIR"
16265    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16266       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16267        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16268    fi
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16270$as_echo_n "checking if hotspot should be overridden... " >&6; }
16271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16272$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16273fi
16274if test "x$with_override_nashorn" != x; then
16275    CURDIR="$PWD"
16276    cd "$with_override_nashorn"
16277    NASHORN_TOPDIR="`pwd`"
16278    cd "$CURDIR"
16279    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16280        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16281    fi
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16283$as_echo_n "checking if nashorn should be overridden... " >&6; }
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16285$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16286fi
16287if test "x$with_override_jdk" != x; then
16288    CURDIR="$PWD"
16289    cd "$with_override_jdk"
16290    JDK_TOPDIR="`pwd`"
16291    cd "$CURDIR"
16292    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16293        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16294    fi
16295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16296$as_echo_n "checking if JDK should be overridden... " >&6; }
16297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16298$as_echo "yes with $JDK_TOPDIR" >&6; }
16299fi
16300
16301
16302
16303BUILD_OUTPUT="$OUTPUT_ROOT"
16304
16305
16306HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16307BUILD_HOTSPOT=true
16308
16309
16310
16311# Check whether --with-import-hotspot was given.
16312if test "${with_import_hotspot+set}" = set; then :
16313  withval=$with_import_hotspot;
16314fi
16315
16316if test "x$with_import_hotspot" != x; then
16317    CURDIR="$PWD"
16318    cd "$with_import_hotspot"
16319    HOTSPOT_DIST="`pwd`"
16320    cd "$CURDIR"
16321    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16322        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16323    fi
16324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16325$as_echo_n "checking if hotspot should be imported... " >&6; }
16326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16327$as_echo "yes from $HOTSPOT_DIST" >&6; }
16328    BUILD_HOTSPOT=false
16329fi
16330
16331JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16332
16333
16334###############################################################################
16335#
16336# Setup the toolchain (compilers etc), i.e. the tools that need to be
16337# cross-compilation aware.
16338#
16339###############################################################################
16340
16341
16342###############################################################################
16343#
16344# Configure the development tool paths and potential sysroot.
16345#
16346ac_ext=cpp
16347ac_cpp='$CXXCPP $CPPFLAGS'
16348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16351
16352
16353# The option used to specify the target .o,.a or .so file.
16354# When compiling, how to specify the to be created object file.
16355CC_OUT_OPTION='-o$(SPACE)'
16356# When linking, how to specify the to be created executable.
16357EXE_OUT_OPTION='-o$(SPACE)'
16358# When linking, how to specify the to be created dynamically linkable library.
16359LD_OUT_OPTION='-o$(SPACE)'
16360# When archiving, how to specify the to be create static archive for object files.
16361AR_OUT_OPTION='rcs$(SPACE)'
16362
16363
16364
16365
16366
16367# Locate the actual tools
16368
16369
16370# Check whether --with-jtreg was given.
16371if test "${with_jtreg+set}" = set; then :
16372  withval=$with_jtreg;
16373else
16374  with_jtreg=no
16375fi
16376
16377
16378  if test "x$with_jtreg" = xno; then
16379    # jtreg disabled
16380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16381$as_echo_n "checking for jtreg... " >&6; }
16382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16383$as_echo "no" >&6; }
16384  else
16385    if test "x$with_jtreg" != xyes; then
16386      # with path specified.
16387      JT_HOME="$with_jtreg"
16388    fi
16389
16390    if test "x$JT_HOME" != x; then
16391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16392$as_echo_n "checking for jtreg... " >&6; }
16393
16394      # use JT_HOME enviroment var.
16395
16396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16397
16398  # Input might be given as Windows format, start by converting to
16399  # unix format.
16400  path="$JT_HOME"
16401  new_path=`$CYGPATH -u "$path"`
16402
16403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16406  # "foo.exe" is OK but "foo" is an error.
16407  #
16408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16409  # It is also a way to make sure we got the proper file name for the real test later on.
16410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16411  if test "x$test_shortpath" = x; then
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16413$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16414    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16415  fi
16416
16417  # Call helper function which possibly converts this using DOS-style short mode.
16418  # If so, the updated path is stored in $new_path.
16419
16420  input_path="$new_path"
16421  # Check if we need to convert this using DOS-style short mode. If the path
16422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16423  # take no chances and rewrite it.
16424  # Note: m4 eats our [], so we need to use [ and ] instead.
16425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16426  if test "x$has_forbidden_chars" != x; then
16427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16431      # Going to short mode and back again did indeed matter. Since short mode is
16432      # case insensitive, let's make it lowercase to improve readability.
16433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16434      # Now convert it back to Unix-stile (cygpath)
16435      input_path=`$CYGPATH -u "$shortmode_path"`
16436      new_path="$input_path"
16437    fi
16438  fi
16439
16440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16441  if test "x$test_cygdrive_prefix" = x; then
16442    # As a simple fix, exclude /usr/bin since it's not a real path.
16443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16445      # a path prefixed by /cygdrive for fixpath to work.
16446      new_path="$CYGWIN_ROOT_PATH$input_path"
16447    fi
16448  fi
16449
16450
16451  if test "x$path" != "x$new_path"; then
16452    JT_HOME="$new_path"
16453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16454$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16455  fi
16456
16457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16458
16459  path="$JT_HOME"
16460  has_colon=`$ECHO $path | $GREP ^.:`
16461  new_path="$path"
16462  if test "x$has_colon" = x; then
16463    # Not in mixed or Windows style, start by that.
16464    new_path=`cmd //c echo $path`
16465  fi
16466
16467
16468  input_path="$new_path"
16469  # Check if we need to convert this using DOS-style short mode. If the path
16470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16471  # take no chances and rewrite it.
16472  # Note: m4 eats our [], so we need to use [ and ] instead.
16473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16474  if test "x$has_forbidden_chars" != x; then
16475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16477  fi
16478
16479
16480  windows_path="$new_path"
16481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16482    unix_path=`$CYGPATH -u "$windows_path"`
16483    new_path="$unix_path"
16484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16486    new_path="$unix_path"
16487  fi
16488
16489  if test "x$path" != "x$new_path"; then
16490    JT_HOME="$new_path"
16491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16492$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16493  fi
16494
16495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16497
16498  else
16499    # We're on a posix platform. Hooray! :)
16500    path="$JT_HOME"
16501    has_space=`$ECHO "$path" | $GREP " "`
16502    if test "x$has_space" != x; then
16503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16504$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16505      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16506    fi
16507
16508    # Use eval to expand a potential ~
16509    eval path="$path"
16510    if test ! -f "$path" && test ! -d "$path"; then
16511      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16512    fi
16513
16514    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16515  fi
16516
16517
16518      # jtreg win32 script works for everybody
16519      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16520
16521      if test ! -f "$JTREGEXE"; then
16522        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16523      fi
16524
16525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16526$as_echo "$JTREGEXE" >&6; }
16527    else
16528      # try to find jtreg on path
16529
16530    for ac_prog in jtreg
16531do
16532  # Extract the first word of "$ac_prog", so it can be a program name with args.
16533set dummy $ac_prog; ac_word=$2
16534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16535$as_echo_n "checking for $ac_word... " >&6; }
16536if ${ac_cv_path_JTREGEXE+:} false; then :
16537  $as_echo_n "(cached) " >&6
16538else
16539  case $JTREGEXE in
16540  [\\/]* | ?:[\\/]*)
16541  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16542  ;;
16543  *)
16544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16545for as_dir in $PATH
16546do
16547  IFS=$as_save_IFS
16548  test -z "$as_dir" && as_dir=.
16549    for ac_exec_ext in '' $ac_executable_extensions; do
16550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16551    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16553    break 2
16554  fi
16555done
16556  done
16557IFS=$as_save_IFS
16558
16559  ;;
16560esac
16561fi
16562JTREGEXE=$ac_cv_path_JTREGEXE
16563if test -n "$JTREGEXE"; then
16564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16565$as_echo "$JTREGEXE" >&6; }
16566else
16567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16568$as_echo "no" >&6; }
16569fi
16570
16571
16572  test -n "$JTREGEXE" && break
16573done
16574
16575
16576    if test "x$JTREGEXE" = x; then
16577        if test "xjtreg" = x; then
16578          PROG_NAME=jtregexe
16579        else
16580          PROG_NAME=jtreg
16581        fi
16582        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16583$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16584        as_fn_error $? "Cannot continue" "$LINENO" 5
16585    fi
16586
16587
16588      JT_HOME="`$DIRNAME $JTREGEXE`"
16589    fi
16590  fi
16591
16592
16593
16594
16595
16596if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16597
16598  # Store path to cygwin link.exe to help excluding it when searching for
16599  # VS linker. This must be done before changing the PATH when looking for VS.
16600  # Extract the first word of "link", so it can be a program name with args.
16601set dummy link; ac_word=$2
16602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16603$as_echo_n "checking for $ac_word... " >&6; }
16604if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16605  $as_echo_n "(cached) " >&6
16606else
16607  case $CYGWIN_LINK in
16608  [\\/]* | ?:[\\/]*)
16609  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16610  ;;
16611  *)
16612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16613for as_dir in $PATH
16614do
16615  IFS=$as_save_IFS
16616  test -z "$as_dir" && as_dir=.
16617    for ac_exec_ext in '' $ac_executable_extensions; do
16618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16619    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16621    break 2
16622  fi
16623done
16624  done
16625IFS=$as_save_IFS
16626
16627  ;;
16628esac
16629fi
16630CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16631if test -n "$CYGWIN_LINK"; then
16632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16633$as_echo "$CYGWIN_LINK" >&6; }
16634else
16635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16636$as_echo "no" >&6; }
16637fi
16638
16639
16640  if test "x$CYGWIN_LINK" != x; then
16641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16642$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16643    "$CYGWIN_LINK" --version > /dev/null
16644    if test $? -eq 0 ; then
16645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16646$as_echo "yes" >&6; }
16647    else
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16649$as_echo "no" >&6; }
16650      # This might be the VS linker. Don't exclude it later on.
16651      CYGWIN_LINK=""
16652    fi
16653  fi
16654
16655  # First-hand choice is to locate and run the vsvars bat file.
16656
16657  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16658    VCVARSFILE="vc/bin/vcvars32.bat"
16659  else
16660    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16661  fi
16662
16663  VS_ENV_CMD=""
16664  VS_ENV_ARGS=""
16665  if test "x$with_toolsdir" != x; then
16666
16667  if test "x$VS_ENV_CMD" = x; then
16668    VS100BASE="$with_toolsdir/../.."
16669    METHOD="--with-tools-dir"
16670
16671  windows_path="$VS100BASE"
16672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16673    unix_path=`$CYGPATH -u "$windows_path"`
16674    VS100BASE="$unix_path"
16675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16677    VS100BASE="$unix_path"
16678  fi
16679
16680    if test -d "$VS100BASE"; then
16681      if test -f "$VS100BASE/$VCVARSFILE"; then
16682        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16683$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16684        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16685      else
16686        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16687$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16688        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16689$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16690      fi
16691    fi
16692  fi
16693
16694  fi
16695
16696  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16697    # Having specified an argument which is incorrect will produce an instant failure;
16698    # we should not go on looking
16699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16700$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16701    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16702$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16703    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16704  fi
16705
16706  if test "x$VS100COMNTOOLS" != x; then
16707
16708  if test "x$VS_ENV_CMD" = x; then
16709    VS100BASE="$VS100COMNTOOLS/../.."
16710    METHOD="VS100COMNTOOLS variable"
16711
16712  windows_path="$VS100BASE"
16713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16714    unix_path=`$CYGPATH -u "$windows_path"`
16715    VS100BASE="$unix_path"
16716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16718    VS100BASE="$unix_path"
16719  fi
16720
16721    if test -d "$VS100BASE"; then
16722      if test -f "$VS100BASE/$VCVARSFILE"; then
16723        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16724$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16725        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16726      else
16727        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16728$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16729        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16730$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16731      fi
16732    fi
16733  fi
16734
16735  fi
16736  if test "x$PROGRAMFILES" != x; then
16737
16738  if test "x$VS_ENV_CMD" = x; then
16739    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16740    METHOD="well-known name"
16741
16742  windows_path="$VS100BASE"
16743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16744    unix_path=`$CYGPATH -u "$windows_path"`
16745    VS100BASE="$unix_path"
16746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16748    VS100BASE="$unix_path"
16749  fi
16750
16751    if test -d "$VS100BASE"; then
16752      if test -f "$VS100BASE/$VCVARSFILE"; then
16753        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16754$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16755        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16756      else
16757        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16758$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16759        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16760$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16761      fi
16762    fi
16763  fi
16764
16765  fi
16766
16767  if test "x$VS_ENV_CMD" = x; then
16768    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16769    METHOD="well-known name"
16770
16771  windows_path="$VS100BASE"
16772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16773    unix_path=`$CYGPATH -u "$windows_path"`
16774    VS100BASE="$unix_path"
16775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16777    VS100BASE="$unix_path"
16778  fi
16779
16780    if test -d "$VS100BASE"; then
16781      if test -f "$VS100BASE/$VCVARSFILE"; then
16782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16783$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16784        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16785      else
16786        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16787$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16788        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16789$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16790      fi
16791    fi
16792  fi
16793
16794
16795  if test "x$VS_ENV_CMD" = x; then
16796    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16797    METHOD="well-known name"
16798
16799  windows_path="$VS100BASE"
16800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16801    unix_path=`$CYGPATH -u "$windows_path"`
16802    VS100BASE="$unix_path"
16803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16805    VS100BASE="$unix_path"
16806  fi
16807
16808    if test -d "$VS100BASE"; then
16809      if test -f "$VS100BASE/$VCVARSFILE"; then
16810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16811$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16812        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16813      else
16814        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16815$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16817$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16818      fi
16819    fi
16820  fi
16821
16822
16823  if test "x$ProgramW6432" != x; then
16824
16825  if test "x$VS_ENV_CMD" = x; then
16826    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16827    METHOD="well-known name"
16828
16829  windows_path="$WIN_SDK_BASE"
16830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16831    unix_path=`$CYGPATH -u "$windows_path"`
16832    WIN_SDK_BASE="$unix_path"
16833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16835    WIN_SDK_BASE="$unix_path"
16836  fi
16837
16838    if test -d "$WIN_SDK_BASE"; then
16839      # There have been cases of partial or broken SDK installations. A missing
16840      # lib dir is not going to work.
16841      if test ! -d "$WIN_SDK_BASE/../lib"; then
16842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16843$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16844        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16845$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16846      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16847        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16848$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16849        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16850        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16851          VS_ENV_ARGS="/x86"
16852        else
16853          VS_ENV_ARGS="/x64"
16854        fi
16855      else
16856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16857$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16858        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16859$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16860      fi
16861    fi
16862  fi
16863
16864  fi
16865  if test "x$PROGRAMW6432" != x; then
16866
16867  if test "x$VS_ENV_CMD" = x; then
16868    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16869    METHOD="well-known name"
16870
16871  windows_path="$WIN_SDK_BASE"
16872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16873    unix_path=`$CYGPATH -u "$windows_path"`
16874    WIN_SDK_BASE="$unix_path"
16875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16877    WIN_SDK_BASE="$unix_path"
16878  fi
16879
16880    if test -d "$WIN_SDK_BASE"; then
16881      # There have been cases of partial or broken SDK installations. A missing
16882      # lib dir is not going to work.
16883      if test ! -d "$WIN_SDK_BASE/../lib"; then
16884        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16885$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16887$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16888      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16890$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16891        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16892        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16893          VS_ENV_ARGS="/x86"
16894        else
16895          VS_ENV_ARGS="/x64"
16896        fi
16897      else
16898        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16899$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16900        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16901$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16902      fi
16903    fi
16904  fi
16905
16906  fi
16907  if test "x$PROGRAMFILES" != x; then
16908
16909  if test "x$VS_ENV_CMD" = x; then
16910    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16911    METHOD="well-known name"
16912
16913  windows_path="$WIN_SDK_BASE"
16914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16915    unix_path=`$CYGPATH -u "$windows_path"`
16916    WIN_SDK_BASE="$unix_path"
16917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16919    WIN_SDK_BASE="$unix_path"
16920  fi
16921
16922    if test -d "$WIN_SDK_BASE"; then
16923      # There have been cases of partial or broken SDK installations. A missing
16924      # lib dir is not going to work.
16925      if test ! -d "$WIN_SDK_BASE/../lib"; then
16926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16927$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16929$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16930      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16932$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16933        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16934        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16935          VS_ENV_ARGS="/x86"
16936        else
16937          VS_ENV_ARGS="/x64"
16938        fi
16939      else
16940        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16941$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16942        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16943$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16944      fi
16945    fi
16946  fi
16947
16948  fi
16949
16950  if test "x$VS_ENV_CMD" = x; then
16951    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16952    METHOD="well-known name"
16953
16954  windows_path="$WIN_SDK_BASE"
16955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16956    unix_path=`$CYGPATH -u "$windows_path"`
16957    WIN_SDK_BASE="$unix_path"
16958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16960    WIN_SDK_BASE="$unix_path"
16961  fi
16962
16963    if test -d "$WIN_SDK_BASE"; then
16964      # There have been cases of partial or broken SDK installations. A missing
16965      # lib dir is not going to work.
16966      if test ! -d "$WIN_SDK_BASE/../lib"; then
16967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16968$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16970$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16971      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16973$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16974        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16975        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16976          VS_ENV_ARGS="/x86"
16977        else
16978          VS_ENV_ARGS="/x64"
16979        fi
16980      else
16981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16982$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16983        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16984$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16985      fi
16986    fi
16987  fi
16988
16989
16990  if test "x$VS_ENV_CMD" = x; then
16991    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16992    METHOD="well-known name"
16993
16994  windows_path="$WIN_SDK_BASE"
16995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16996    unix_path=`$CYGPATH -u "$windows_path"`
16997    WIN_SDK_BASE="$unix_path"
16998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17000    WIN_SDK_BASE="$unix_path"
17001  fi
17002
17003    if test -d "$WIN_SDK_BASE"; then
17004      # There have been cases of partial or broken SDK installations. A missing
17005      # lib dir is not going to work.
17006      if test ! -d "$WIN_SDK_BASE/../lib"; then
17007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17008$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17009        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17010$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17011      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17014        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17015        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17016          VS_ENV_ARGS="/x86"
17017        else
17018          VS_ENV_ARGS="/x64"
17019        fi
17020      else
17021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17022$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17023        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17024$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17025      fi
17026    fi
17027  fi
17028
17029
17030  if test "x$VS_ENV_CMD" != x; then
17031    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17032
17033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17034
17035  # First separate the path from the arguments. This will split at the first
17036  # space.
17037  complete="$VS_ENV_CMD"
17038  path="${complete%% *}"
17039  tmp="$complete EOL"
17040  arguments="${tmp#* }"
17041
17042  # Input might be given as Windows format, start by converting to
17043  # unix format.
17044  new_path=`$CYGPATH -u "$path"`
17045
17046  # Now try to locate executable using which
17047  new_path=`$WHICH "$new_path" 2> /dev/null`
17048  # bat and cmd files are not always considered executable in cygwin causing which
17049  # to not find them
17050  if test "x$new_path" = x \
17051           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17052           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17053    new_path=`$CYGPATH -u "$path"`
17054  fi
17055  if test "x$new_path" = x; then
17056    # Oops. Which didn't find the executable.
17057    # The splitting of arguments from the executable at a space might have been incorrect,
17058    # since paths with space are more likely in Windows. Give it another try with the whole
17059    # argument.
17060    path="$complete"
17061    arguments="EOL"
17062    new_path=`$CYGPATH -u "$path"`
17063    new_path=`$WHICH "$new_path" 2> /dev/null`
17064    # bat and cmd files are not always considered executable in cygwin causing which
17065    # to not find them
17066    if test "x$new_path" = x \
17067             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17068             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17069      new_path=`$CYGPATH -u "$path"`
17070    fi
17071    if test "x$new_path" = x; then
17072      # It's still not found. Now this is an unrecoverable error.
17073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17074$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17075      has_space=`$ECHO "$complete" | $GREP " "`
17076      if test "x$has_space" != x; then
17077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17079      fi
17080      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17081    fi
17082  fi
17083
17084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17087  # "foo.exe" is OK but "foo" is an error.
17088  #
17089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17090  # It is also a way to make sure we got the proper file name for the real test later on.
17091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17092  if test "x$test_shortpath" = x; then
17093    # Short path failed, file does not exist as specified.
17094    # Try adding .exe or .cmd
17095    if test -f "${new_path}.exe"; then
17096       input_to_shortpath="${new_path}.exe"
17097    elif test -f "${new_path}.cmd"; then
17098       input_to_shortpath="${new_path}.cmd"
17099    else
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17101$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17104      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17105    fi
17106  else
17107    input_to_shortpath="$new_path"
17108  fi
17109
17110  # Call helper function which possibly converts this using DOS-style short mode.
17111  # If so, the updated path is stored in $new_path.
17112  new_path="$input_to_shortpath"
17113
17114  input_path="$input_to_shortpath"
17115  # Check if we need to convert this using DOS-style short mode. If the path
17116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17117  # take no chances and rewrite it.
17118  # Note: m4 eats our [], so we need to use [ and ] instead.
17119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17120  if test "x$has_forbidden_chars" != x; then
17121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17125      # Going to short mode and back again did indeed matter. Since short mode is
17126      # case insensitive, let's make it lowercase to improve readability.
17127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17128      # Now convert it back to Unix-stile (cygpath)
17129      input_path=`$CYGPATH -u "$shortmode_path"`
17130      new_path="$input_path"
17131    fi
17132  fi
17133
17134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17135  if test "x$test_cygdrive_prefix" = x; then
17136    # As a simple fix, exclude /usr/bin since it's not a real path.
17137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17139      # a path prefixed by /cygdrive for fixpath to work.
17140      new_path="$CYGWIN_ROOT_PATH$input_path"
17141    fi
17142  fi
17143
17144  # remove trailing .exe if any
17145  new_path="${new_path/%.exe/}"
17146
17147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17148
17149  # First separate the path from the arguments. This will split at the first
17150  # space.
17151  complete="$VS_ENV_CMD"
17152  path="${complete%% *}"
17153  tmp="$complete EOL"
17154  arguments="${tmp#* }"
17155
17156  # Input might be given as Windows format, start by converting to
17157  # unix format.
17158  new_path="$path"
17159
17160  windows_path="$new_path"
17161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17162    unix_path=`$CYGPATH -u "$windows_path"`
17163    new_path="$unix_path"
17164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17166    new_path="$unix_path"
17167  fi
17168
17169
17170  # Now try to locate executable using which
17171  new_path=`$WHICH "$new_path" 2> /dev/null`
17172
17173  if test "x$new_path" = x; then
17174    # Oops. Which didn't find the executable.
17175    # The splitting of arguments from the executable at a space might have been incorrect,
17176    # since paths with space are more likely in Windows. Give it another try with the whole
17177    # argument.
17178    path="$complete"
17179    arguments="EOL"
17180    new_path="$path"
17181
17182  windows_path="$new_path"
17183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17184    unix_path=`$CYGPATH -u "$windows_path"`
17185    new_path="$unix_path"
17186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17188    new_path="$unix_path"
17189  fi
17190
17191
17192    new_path=`$WHICH "$new_path" 2> /dev/null`
17193
17194    if test "x$new_path" = x; then
17195      # It's still not found. Now this is an unrecoverable error.
17196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17197$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17198      has_space=`$ECHO "$complete" | $GREP " "`
17199      if test "x$has_space" != x; then
17200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17202      fi
17203      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17204    fi
17205  fi
17206
17207  # Now new_path has a complete unix path to the binary
17208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17209    # Keep paths in /bin as-is, but remove trailing .exe if any
17210    new_path="${new_path/%.exe/}"
17211    # Do not save /bin paths to all_fixpath_prefixes!
17212  else
17213    # Not in mixed or Windows style, start by that.
17214    new_path=`cmd //c echo $new_path`
17215
17216  input_path="$new_path"
17217  # Check if we need to convert this using DOS-style short mode. If the path
17218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17219  # take no chances and rewrite it.
17220  # Note: m4 eats our [], so we need to use [ and ] instead.
17221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17222  if test "x$has_forbidden_chars" != x; then
17223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17225  fi
17226
17227    # Output is in $new_path
17228
17229  windows_path="$new_path"
17230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17231    unix_path=`$CYGPATH -u "$windows_path"`
17232    new_path="$unix_path"
17233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17235    new_path="$unix_path"
17236  fi
17237
17238    # remove trailing .exe if any
17239    new_path="${new_path/%.exe/}"
17240
17241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17243  fi
17244
17245  else
17246    # We're on a posix platform. Hooray! :)
17247    # First separate the path from the arguments. This will split at the first
17248    # space.
17249    complete="$VS_ENV_CMD"
17250    path="${complete%% *}"
17251    tmp="$complete EOL"
17252    arguments="${tmp#* }"
17253
17254    # Cannot rely on the command "which" here since it doesn't always work.
17255    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17256    if test -z "$is_absolute_path"; then
17257      # Path to executable is not absolute. Find it.
17258      IFS_save="$IFS"
17259      IFS=:
17260      for p in $PATH; do
17261        if test -f "$p/$path" && test -x "$p/$path"; then
17262          new_path="$p/$path"
17263          break
17264        fi
17265      done
17266      IFS="$IFS_save"
17267    else
17268      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17269$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17270      new_path="$path"
17271    fi
17272
17273    if test "x$new_path" = x; then
17274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17275$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17276        has_space=`$ECHO "$complete" | $GREP " "`
17277        if test "x$has_space" != x; then
17278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17280        fi
17281        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17282      fi
17283  fi
17284
17285      # Now join together the path and the arguments once again
17286      if test "x$arguments" != xEOL; then
17287        new_complete="$new_path ${arguments% *}"
17288      else
17289        new_complete="$new_path"
17290      fi
17291
17292  if test "x$complete" != "x$new_complete"; then
17293      VS_ENV_CMD="$new_complete"
17294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17295$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17296    fi
17297
17298
17299    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17300    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17301$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17302    cd $OUTPUT_ROOT
17303    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17304    # to autoconf standards.
17305
17306    #----
17307
17308    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17309    # but calculate the difference in Cygwin environment before/after running it and then
17310    # apply the diff.
17311
17312    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17313      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17314      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17315      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17316    else
17317      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17318      _dosbash=`cmd //c echo \`which bash\``
17319    fi
17320
17321    # generate the set of exported vars before/after the vs10 setup
17322    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17323    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17324    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17325    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17326
17327    # Now execute the newly created bat file.
17328    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17329    cmd /c localdevenvtmp.bat | cat
17330
17331    # apply the diff (less some non-vs10 vars named by "!")
17332    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17333    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17334    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17335
17336    # cleanup
17337    $RM localdevenvtmp*
17338    #----
17339    cd $CURDIR
17340    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17341      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17342$as_echo "no" >&6; }
17343      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17344$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17345      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17346$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17347      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17348$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17349      as_fn_error $? "Cannot continue" "$LINENO" 5
17350    fi
17351
17352    # Now set all paths and other env variables. This will allow the rest of
17353    # the configure script to find and run the compiler in the proper way.
17354    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17355$as_echo "$as_me: Setting extracted environment variables" >&6;}
17356    . $OUTPUT_ROOT/localdevenv.sh
17357  else
17358    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17359    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17360$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17361  fi
17362
17363  # At this point, we should have corrent variables in the environment, or we can't continue.
17364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17365$as_echo_n "checking for Visual Studio variables... " >&6; }
17366
17367  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17368    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17370$as_echo "present but broken" >&6; }
17371      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17372    else
17373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17374$as_echo "ok" >&6; }
17375      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17376      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17377      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17378      # Remove any paths containing # (typically F#) as that messes up make
17379      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17380      VS_PATH="$PATH"
17381
17382
17383
17384    fi
17385  else
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17387$as_echo "not found" >&6; }
17388
17389    if test "x$VS_ENV_CMD" = x; then
17390      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17391$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17392      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17393$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17394    else
17395      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17396$as_echo "$as_me: Running the extraction script failed." >&6;}
17397    fi
17398    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17399$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17400    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17401$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17402    as_fn_error $? "Cannot continue" "$LINENO" 5
17403  fi
17404
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17406$as_echo_n "checking for msvcr100.dll... " >&6; }
17407
17408# Check whether --with-msvcr-dll was given.
17409if test "${with_msvcr_dll+set}" = set; then :
17410  withval=$with_msvcr_dll;
17411fi
17412
17413  if test "x$with_msvcr_dll" != x; then
17414    MSVCR_DLL="$with_msvcr_dll"
17415  else
17416    if test "x$VCINSTALLDIR" != x; then
17417      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17418        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17419      else
17420        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17421        if test "x$MSVCR_DLL" = x; then
17422          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17423        fi
17424      fi
17425      if test "x$MSVCR_DLL" != x; then
17426        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17427$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17428      else
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17430$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17431      fi
17432    fi
17433    # Try some fallback alternatives
17434    if test "x$MSVCR_DLL" = x; then
17435      # If visual studio express is installed, there is usually one with the debugger
17436      if test "x$VS100COMNTOOLS" != x; then
17437        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17438          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17439          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17440$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17441        fi
17442      fi
17443    fi
17444    if test "x$MSVCR_DLL" = x; then
17445      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17446        # Fallback for 32bit builds, look in the windows directory.
17447        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17448          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17449$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17450          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17451        fi
17452      fi
17453    fi
17454  fi
17455  if test "x$MSVCR_DLL" = x; then
17456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17457$as_echo "no" >&6; }
17458    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17459  fi
17460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17461$as_echo "$MSVCR_DLL" >&6; }
17462
17463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17464
17465  # Input might be given as Windows format, start by converting to
17466  # unix format.
17467  path="$MSVCR_DLL"
17468  new_path=`$CYGPATH -u "$path"`
17469
17470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17473  # "foo.exe" is OK but "foo" is an error.
17474  #
17475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17476  # It is also a way to make sure we got the proper file name for the real test later on.
17477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17478  if test "x$test_shortpath" = x; then
17479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17480$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17481    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17482  fi
17483
17484  # Call helper function which possibly converts this using DOS-style short mode.
17485  # If so, the updated path is stored in $new_path.
17486
17487  input_path="$new_path"
17488  # Check if we need to convert this using DOS-style short mode. If the path
17489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17490  # take no chances and rewrite it.
17491  # Note: m4 eats our [], so we need to use [ and ] instead.
17492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17493  if test "x$has_forbidden_chars" != x; then
17494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17498      # Going to short mode and back again did indeed matter. Since short mode is
17499      # case insensitive, let's make it lowercase to improve readability.
17500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17501      # Now convert it back to Unix-stile (cygpath)
17502      input_path=`$CYGPATH -u "$shortmode_path"`
17503      new_path="$input_path"
17504    fi
17505  fi
17506
17507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17508  if test "x$test_cygdrive_prefix" = x; then
17509    # As a simple fix, exclude /usr/bin since it's not a real path.
17510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17512      # a path prefixed by /cygdrive for fixpath to work.
17513      new_path="$CYGWIN_ROOT_PATH$input_path"
17514    fi
17515  fi
17516
17517
17518  if test "x$path" != "x$new_path"; then
17519    MSVCR_DLL="$new_path"
17520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17521$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17522  fi
17523
17524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17525
17526  path="$MSVCR_DLL"
17527  has_colon=`$ECHO $path | $GREP ^.:`
17528  new_path="$path"
17529  if test "x$has_colon" = x; then
17530    # Not in mixed or Windows style, start by that.
17531    new_path=`cmd //c echo $path`
17532  fi
17533
17534
17535  input_path="$new_path"
17536  # Check if we need to convert this using DOS-style short mode. If the path
17537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17538  # take no chances and rewrite it.
17539  # Note: m4 eats our [], so we need to use [ and ] instead.
17540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17541  if test "x$has_forbidden_chars" != x; then
17542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17544  fi
17545
17546
17547  windows_path="$new_path"
17548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17549    unix_path=`$CYGPATH -u "$windows_path"`
17550    new_path="$unix_path"
17551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17553    new_path="$unix_path"
17554  fi
17555
17556  if test "x$path" != "x$new_path"; then
17557    MSVCR_DLL="$new_path"
17558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17559$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17560  fi
17561
17562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17564
17565  else
17566    # We're on a posix platform. Hooray! :)
17567    path="$MSVCR_DLL"
17568    has_space=`$ECHO "$path" | $GREP " "`
17569    if test "x$has_space" != x; then
17570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17571$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17572      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17573    fi
17574
17575    # Use eval to expand a potential ~
17576    eval path="$path"
17577    if test ! -f "$path" && test ! -d "$path"; then
17578      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17579    fi
17580
17581    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17582  fi
17583
17584
17585
17586
17587# Check whether --with-dxsdk was given.
17588if test "${with_dxsdk+set}" = set; then :
17589  withval=$with_dxsdk;
17590fi
17591
17592
17593# Check whether --with-dxsdk-lib was given.
17594if test "${with_dxsdk_lib+set}" = set; then :
17595  withval=$with_dxsdk_lib;
17596fi
17597
17598
17599# Check whether --with-dxsdk-include was given.
17600if test "${with_dxsdk_include+set}" = set; then :
17601  withval=$with_dxsdk_include;
17602fi
17603
17604
17605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17606$as_echo_n "checking for DirectX SDK... " >&6; }
17607
17608  if test "x$with_dxsdk" != x; then
17609    dxsdk_path="$with_dxsdk"
17610  elif test "x$DXSDK_DIR" != x; then
17611    dxsdk_path="$DXSDK_DIR"
17612  elif test -d "C:/DXSDK"; then
17613    dxsdk_path="C:/DXSDK"
17614  else
17615    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17616  fi
17617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17618$as_echo "$dxsdk_path" >&6; }
17619
17620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17621
17622  # Input might be given as Windows format, start by converting to
17623  # unix format.
17624  path="$dxsdk_path"
17625  new_path=`$CYGPATH -u "$path"`
17626
17627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17630  # "foo.exe" is OK but "foo" is an error.
17631  #
17632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17633  # It is also a way to make sure we got the proper file name for the real test later on.
17634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17635  if test "x$test_shortpath" = x; then
17636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17637$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17638    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17639  fi
17640
17641  # Call helper function which possibly converts this using DOS-style short mode.
17642  # If so, the updated path is stored in $new_path.
17643
17644  input_path="$new_path"
17645  # Check if we need to convert this using DOS-style short mode. If the path
17646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17647  # take no chances and rewrite it.
17648  # Note: m4 eats our [], so we need to use [ and ] instead.
17649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17650  if test "x$has_forbidden_chars" != x; then
17651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17655      # Going to short mode and back again did indeed matter. Since short mode is
17656      # case insensitive, let's make it lowercase to improve readability.
17657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17658      # Now convert it back to Unix-stile (cygpath)
17659      input_path=`$CYGPATH -u "$shortmode_path"`
17660      new_path="$input_path"
17661    fi
17662  fi
17663
17664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17665  if test "x$test_cygdrive_prefix" = x; then
17666    # As a simple fix, exclude /usr/bin since it's not a real path.
17667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17669      # a path prefixed by /cygdrive for fixpath to work.
17670      new_path="$CYGWIN_ROOT_PATH$input_path"
17671    fi
17672  fi
17673
17674
17675  if test "x$path" != "x$new_path"; then
17676    dxsdk_path="$new_path"
17677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17678$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17679  fi
17680
17681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17682
17683  path="$dxsdk_path"
17684  has_colon=`$ECHO $path | $GREP ^.:`
17685  new_path="$path"
17686  if test "x$has_colon" = x; then
17687    # Not in mixed or Windows style, start by that.
17688    new_path=`cmd //c echo $path`
17689  fi
17690
17691
17692  input_path="$new_path"
17693  # Check if we need to convert this using DOS-style short mode. If the path
17694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17695  # take no chances and rewrite it.
17696  # Note: m4 eats our [], so we need to use [ and ] instead.
17697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17698  if test "x$has_forbidden_chars" != x; then
17699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17701  fi
17702
17703
17704  windows_path="$new_path"
17705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17706    unix_path=`$CYGPATH -u "$windows_path"`
17707    new_path="$unix_path"
17708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17710    new_path="$unix_path"
17711  fi
17712
17713  if test "x$path" != "x$new_path"; then
17714    dxsdk_path="$new_path"
17715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17716$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17717  fi
17718
17719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17721
17722  else
17723    # We're on a posix platform. Hooray! :)
17724    path="$dxsdk_path"
17725    has_space=`$ECHO "$path" | $GREP " "`
17726    if test "x$has_space" != x; then
17727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17728$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17729      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17730    fi
17731
17732    # Use eval to expand a potential ~
17733    eval path="$path"
17734    if test ! -f "$path" && test ! -d "$path"; then
17735      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17736    fi
17737
17738    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17739  fi
17740
17741
17742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17743$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17744  if test "x$with_dxsdk_lib" != x; then
17745    DXSDK_LIB_PATH="$with_dxsdk_lib"
17746  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17747    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17748  else
17749    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17750  fi
17751  # dsound.lib is linked to in jsoundds
17752  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17753    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17754  fi
17755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17756$as_echo "$DXSDK_LIB_PATH" >&6; }
17757
17758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17759
17760  # Input might be given as Windows format, start by converting to
17761  # unix format.
17762  path="$DXSDK_LIB_PATH"
17763  new_path=`$CYGPATH -u "$path"`
17764
17765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17768  # "foo.exe" is OK but "foo" is an error.
17769  #
17770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17771  # It is also a way to make sure we got the proper file name for the real test later on.
17772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17773  if test "x$test_shortpath" = x; then
17774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17775$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17776    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17777  fi
17778
17779  # Call helper function which possibly converts this using DOS-style short mode.
17780  # If so, the updated path is stored in $new_path.
17781
17782  input_path="$new_path"
17783  # Check if we need to convert this using DOS-style short mode. If the path
17784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17785  # take no chances and rewrite it.
17786  # Note: m4 eats our [], so we need to use [ and ] instead.
17787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17788  if test "x$has_forbidden_chars" != x; then
17789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17793      # Going to short mode and back again did indeed matter. Since short mode is
17794      # case insensitive, let's make it lowercase to improve readability.
17795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17796      # Now convert it back to Unix-stile (cygpath)
17797      input_path=`$CYGPATH -u "$shortmode_path"`
17798      new_path="$input_path"
17799    fi
17800  fi
17801
17802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17803  if test "x$test_cygdrive_prefix" = x; then
17804    # As a simple fix, exclude /usr/bin since it's not a real path.
17805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17807      # a path prefixed by /cygdrive for fixpath to work.
17808      new_path="$CYGWIN_ROOT_PATH$input_path"
17809    fi
17810  fi
17811
17812
17813  if test "x$path" != "x$new_path"; then
17814    DXSDK_LIB_PATH="$new_path"
17815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17816$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17817  fi
17818
17819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17820
17821  path="$DXSDK_LIB_PATH"
17822  has_colon=`$ECHO $path | $GREP ^.:`
17823  new_path="$path"
17824  if test "x$has_colon" = x; then
17825    # Not in mixed or Windows style, start by that.
17826    new_path=`cmd //c echo $path`
17827  fi
17828
17829
17830  input_path="$new_path"
17831  # Check if we need to convert this using DOS-style short mode. If the path
17832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17833  # take no chances and rewrite it.
17834  # Note: m4 eats our [], so we need to use [ and ] instead.
17835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17836  if test "x$has_forbidden_chars" != x; then
17837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17839  fi
17840
17841
17842  windows_path="$new_path"
17843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17844    unix_path=`$CYGPATH -u "$windows_path"`
17845    new_path="$unix_path"
17846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17848    new_path="$unix_path"
17849  fi
17850
17851  if test "x$path" != "x$new_path"; then
17852    DXSDK_LIB_PATH="$new_path"
17853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17854$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17855  fi
17856
17857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17859
17860  else
17861    # We're on a posix platform. Hooray! :)
17862    path="$DXSDK_LIB_PATH"
17863    has_space=`$ECHO "$path" | $GREP " "`
17864    if test "x$has_space" != x; then
17865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17866$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17867      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17868    fi
17869
17870    # Use eval to expand a potential ~
17871    eval path="$path"
17872    if test ! -f "$path" && test ! -d "$path"; then
17873      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17874    fi
17875
17876    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17877  fi
17878
17879
17880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17881$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17882  if test "x$with_dxsdk_include" != x; then
17883    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17884  else
17885    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17886  fi
17887  # dsound.h is included in jsoundds
17888  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17889    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17890  fi
17891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17892$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17893
17894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17895
17896  # Input might be given as Windows format, start by converting to
17897  # unix format.
17898  path="$DXSDK_INCLUDE_PATH"
17899  new_path=`$CYGPATH -u "$path"`
17900
17901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17904  # "foo.exe" is OK but "foo" is an error.
17905  #
17906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17907  # It is also a way to make sure we got the proper file name for the real test later on.
17908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17909  if test "x$test_shortpath" = x; then
17910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17911$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17912    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17913  fi
17914
17915  # Call helper function which possibly converts this using DOS-style short mode.
17916  # If so, the updated path is stored in $new_path.
17917
17918  input_path="$new_path"
17919  # Check if we need to convert this using DOS-style short mode. If the path
17920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17921  # take no chances and rewrite it.
17922  # Note: m4 eats our [], so we need to use [ and ] instead.
17923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17924  if test "x$has_forbidden_chars" != x; then
17925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17929      # Going to short mode and back again did indeed matter. Since short mode is
17930      # case insensitive, let's make it lowercase to improve readability.
17931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17932      # Now convert it back to Unix-stile (cygpath)
17933      input_path=`$CYGPATH -u "$shortmode_path"`
17934      new_path="$input_path"
17935    fi
17936  fi
17937
17938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17939  if test "x$test_cygdrive_prefix" = x; then
17940    # As a simple fix, exclude /usr/bin since it's not a real path.
17941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17943      # a path prefixed by /cygdrive for fixpath to work.
17944      new_path="$CYGWIN_ROOT_PATH$input_path"
17945    fi
17946  fi
17947
17948
17949  if test "x$path" != "x$new_path"; then
17950    DXSDK_INCLUDE_PATH="$new_path"
17951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17952$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17953  fi
17954
17955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17956
17957  path="$DXSDK_INCLUDE_PATH"
17958  has_colon=`$ECHO $path | $GREP ^.:`
17959  new_path="$path"
17960  if test "x$has_colon" = x; then
17961    # Not in mixed or Windows style, start by that.
17962    new_path=`cmd //c echo $path`
17963  fi
17964
17965
17966  input_path="$new_path"
17967  # Check if we need to convert this using DOS-style short mode. If the path
17968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17969  # take no chances and rewrite it.
17970  # Note: m4 eats our [], so we need to use [ and ] instead.
17971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17972  if test "x$has_forbidden_chars" != x; then
17973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17975  fi
17976
17977
17978  windows_path="$new_path"
17979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17980    unix_path=`$CYGPATH -u "$windows_path"`
17981    new_path="$unix_path"
17982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17984    new_path="$unix_path"
17985  fi
17986
17987  if test "x$path" != "x$new_path"; then
17988    DXSDK_INCLUDE_PATH="$new_path"
17989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17990$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17991  fi
17992
17993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17995
17996  else
17997    # We're on a posix platform. Hooray! :)
17998    path="$DXSDK_INCLUDE_PATH"
17999    has_space=`$ECHO "$path" | $GREP " "`
18000    if test "x$has_space" != x; then
18001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18002$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18003      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18004    fi
18005
18006    # Use eval to expand a potential ~
18007    eval path="$path"
18008    if test ! -f "$path" && test ! -d "$path"; then
18009      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18010    fi
18011
18012    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
18013  fi
18014
18015
18016
18017
18018  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18019
18020fi
18021
18022
18023
18024# If --build AND --host is set, then the configure script will find any
18025# cross compilation tools in the PATH. Cross compilation tools
18026# follows the cross compilation standard where they are prefixed with ${host}.
18027# For example the binary i686-sun-solaris2.10-gcc
18028# will cross compile for i686-sun-solaris2.10
18029# If neither of build and host is not set, then build=host and the
18030# default compiler found in the path will be used.
18031# Setting only --host, does not seem to be really supported.
18032# Please set both --build and --host if you want to cross compile.
18033
18034if test "x$COMPILE_TYPE" = "xcross"; then
18035    # Now we to find a C/C++ compiler that can build executables for the build
18036    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18037    # once. Also, we need to do this before adding a tools dir to the path,
18038    # otherwise we might pick up cross-compilers which don't use standard naming.
18039    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18040    # to wait until they are properly discovered.
18041    for ac_prog in cl cc gcc
18042do
18043  # Extract the first word of "$ac_prog", so it can be a program name with args.
18044set dummy $ac_prog; ac_word=$2
18045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18046$as_echo_n "checking for $ac_word... " >&6; }
18047if ${ac_cv_path_BUILD_CC+:} false; then :
18048  $as_echo_n "(cached) " >&6
18049else
18050  case $BUILD_CC in
18051  [\\/]* | ?:[\\/]*)
18052  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18053  ;;
18054  *)
18055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18056for as_dir in $PATH
18057do
18058  IFS=$as_save_IFS
18059  test -z "$as_dir" && as_dir=.
18060    for ac_exec_ext in '' $ac_executable_extensions; do
18061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18062    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18064    break 2
18065  fi
18066done
18067  done
18068IFS=$as_save_IFS
18069
18070  ;;
18071esac
18072fi
18073BUILD_CC=$ac_cv_path_BUILD_CC
18074if test -n "$BUILD_CC"; then
18075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18076$as_echo "$BUILD_CC" >&6; }
18077else
18078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18079$as_echo "no" >&6; }
18080fi
18081
18082
18083  test -n "$BUILD_CC" && break
18084done
18085
18086
18087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18088
18089  # First separate the path from the arguments. This will split at the first
18090  # space.
18091  complete="$BUILD_CC"
18092  path="${complete%% *}"
18093  tmp="$complete EOL"
18094  arguments="${tmp#* }"
18095
18096  # Input might be given as Windows format, start by converting to
18097  # unix format.
18098  new_path=`$CYGPATH -u "$path"`
18099
18100  # Now try to locate executable using which
18101  new_path=`$WHICH "$new_path" 2> /dev/null`
18102  # bat and cmd files are not always considered executable in cygwin causing which
18103  # to not find them
18104  if test "x$new_path" = x \
18105           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18106           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18107    new_path=`$CYGPATH -u "$path"`
18108  fi
18109  if test "x$new_path" = x; then
18110    # Oops. Which didn't find the executable.
18111    # The splitting of arguments from the executable at a space might have been incorrect,
18112    # since paths with space are more likely in Windows. Give it another try with the whole
18113    # argument.
18114    path="$complete"
18115    arguments="EOL"
18116    new_path=`$CYGPATH -u "$path"`
18117    new_path=`$WHICH "$new_path" 2> /dev/null`
18118    # bat and cmd files are not always considered executable in cygwin causing which
18119    # to not find them
18120    if test "x$new_path" = x \
18121             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18122             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18123      new_path=`$CYGPATH -u "$path"`
18124    fi
18125    if test "x$new_path" = x; then
18126      # It's still not found. Now this is an unrecoverable error.
18127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18128$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18129      has_space=`$ECHO "$complete" | $GREP " "`
18130      if test "x$has_space" != x; then
18131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18133      fi
18134      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18135    fi
18136  fi
18137
18138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18141  # "foo.exe" is OK but "foo" is an error.
18142  #
18143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18144  # It is also a way to make sure we got the proper file name for the real test later on.
18145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18146  if test "x$test_shortpath" = x; then
18147    # Short path failed, file does not exist as specified.
18148    # Try adding .exe or .cmd
18149    if test -f "${new_path}.exe"; then
18150       input_to_shortpath="${new_path}.exe"
18151    elif test -f "${new_path}.cmd"; then
18152       input_to_shortpath="${new_path}.cmd"
18153    else
18154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18155$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18156      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18157$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18158      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18159    fi
18160  else
18161    input_to_shortpath="$new_path"
18162  fi
18163
18164  # Call helper function which possibly converts this using DOS-style short mode.
18165  # If so, the updated path is stored in $new_path.
18166  new_path="$input_to_shortpath"
18167
18168  input_path="$input_to_shortpath"
18169  # Check if we need to convert this using DOS-style short mode. If the path
18170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18171  # take no chances and rewrite it.
18172  # Note: m4 eats our [], so we need to use [ and ] instead.
18173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18174  if test "x$has_forbidden_chars" != x; then
18175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18179      # Going to short mode and back again did indeed matter. Since short mode is
18180      # case insensitive, let's make it lowercase to improve readability.
18181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18182      # Now convert it back to Unix-stile (cygpath)
18183      input_path=`$CYGPATH -u "$shortmode_path"`
18184      new_path="$input_path"
18185    fi
18186  fi
18187
18188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18189  if test "x$test_cygdrive_prefix" = x; then
18190    # As a simple fix, exclude /usr/bin since it's not a real path.
18191    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18193      # a path prefixed by /cygdrive for fixpath to work.
18194      new_path="$CYGWIN_ROOT_PATH$input_path"
18195    fi
18196  fi
18197
18198  # remove trailing .exe if any
18199  new_path="${new_path/%.exe/}"
18200
18201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18202
18203  # First separate the path from the arguments. This will split at the first
18204  # space.
18205  complete="$BUILD_CC"
18206  path="${complete%% *}"
18207  tmp="$complete EOL"
18208  arguments="${tmp#* }"
18209
18210  # Input might be given as Windows format, start by converting to
18211  # unix format.
18212  new_path="$path"
18213
18214  windows_path="$new_path"
18215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18216    unix_path=`$CYGPATH -u "$windows_path"`
18217    new_path="$unix_path"
18218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18220    new_path="$unix_path"
18221  fi
18222
18223
18224  # Now try to locate executable using which
18225  new_path=`$WHICH "$new_path" 2> /dev/null`
18226
18227  if test "x$new_path" = x; then
18228    # Oops. Which didn't find the executable.
18229    # The splitting of arguments from the executable at a space might have been incorrect,
18230    # since paths with space are more likely in Windows. Give it another try with the whole
18231    # argument.
18232    path="$complete"
18233    arguments="EOL"
18234    new_path="$path"
18235
18236  windows_path="$new_path"
18237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18238    unix_path=`$CYGPATH -u "$windows_path"`
18239    new_path="$unix_path"
18240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18242    new_path="$unix_path"
18243  fi
18244
18245
18246    new_path=`$WHICH "$new_path" 2> /dev/null`
18247
18248    if test "x$new_path" = x; then
18249      # It's still not found. Now this is an unrecoverable error.
18250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18251$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18252      has_space=`$ECHO "$complete" | $GREP " "`
18253      if test "x$has_space" != x; then
18254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18256      fi
18257      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18258    fi
18259  fi
18260
18261  # Now new_path has a complete unix path to the binary
18262  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18263    # Keep paths in /bin as-is, but remove trailing .exe if any
18264    new_path="${new_path/%.exe/}"
18265    # Do not save /bin paths to all_fixpath_prefixes!
18266  else
18267    # Not in mixed or Windows style, start by that.
18268    new_path=`cmd //c echo $new_path`
18269
18270  input_path="$new_path"
18271  # Check if we need to convert this using DOS-style short mode. If the path
18272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18273  # take no chances and rewrite it.
18274  # Note: m4 eats our [], so we need to use [ and ] instead.
18275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18276  if test "x$has_forbidden_chars" != x; then
18277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18279  fi
18280
18281    # Output is in $new_path
18282
18283  windows_path="$new_path"
18284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18285    unix_path=`$CYGPATH -u "$windows_path"`
18286    new_path="$unix_path"
18287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18289    new_path="$unix_path"
18290  fi
18291
18292    # remove trailing .exe if any
18293    new_path="${new_path/%.exe/}"
18294
18295    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18296    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18297  fi
18298
18299  else
18300    # We're on a posix platform. Hooray! :)
18301    # First separate the path from the arguments. This will split at the first
18302    # space.
18303    complete="$BUILD_CC"
18304    path="${complete%% *}"
18305    tmp="$complete EOL"
18306    arguments="${tmp#* }"
18307
18308    # Cannot rely on the command "which" here since it doesn't always work.
18309    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18310    if test -z "$is_absolute_path"; then
18311      # Path to executable is not absolute. Find it.
18312      IFS_save="$IFS"
18313      IFS=:
18314      for p in $PATH; do
18315        if test -f "$p/$path" && test -x "$p/$path"; then
18316          new_path="$p/$path"
18317          break
18318        fi
18319      done
18320      IFS="$IFS_save"
18321    else
18322      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18323$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18324      new_path="$path"
18325    fi
18326
18327    if test "x$new_path" = x; then
18328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18329$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18330        has_space=`$ECHO "$complete" | $GREP " "`
18331        if test "x$has_space" != x; then
18332          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18333$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18334        fi
18335        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18336      fi
18337  fi
18338
18339      # Now join together the path and the arguments once again
18340      if test "x$arguments" != xEOL; then
18341        new_complete="$new_path ${arguments% *}"
18342      else
18343        new_complete="$new_path"
18344      fi
18345
18346  if test "x$complete" != "x$new_complete"; then
18347      BUILD_CC="$new_complete"
18348      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18349$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18350    fi
18351
18352    for ac_prog in cl CC g++
18353do
18354  # Extract the first word of "$ac_prog", so it can be a program name with args.
18355set dummy $ac_prog; ac_word=$2
18356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18357$as_echo_n "checking for $ac_word... " >&6; }
18358if ${ac_cv_path_BUILD_CXX+:} false; then :
18359  $as_echo_n "(cached) " >&6
18360else
18361  case $BUILD_CXX in
18362  [\\/]* | ?:[\\/]*)
18363  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18364  ;;
18365  *)
18366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18367for as_dir in $PATH
18368do
18369  IFS=$as_save_IFS
18370  test -z "$as_dir" && as_dir=.
18371    for ac_exec_ext in '' $ac_executable_extensions; do
18372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18373    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18375    break 2
18376  fi
18377done
18378  done
18379IFS=$as_save_IFS
18380
18381  ;;
18382esac
18383fi
18384BUILD_CXX=$ac_cv_path_BUILD_CXX
18385if test -n "$BUILD_CXX"; then
18386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18387$as_echo "$BUILD_CXX" >&6; }
18388else
18389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18390$as_echo "no" >&6; }
18391fi
18392
18393
18394  test -n "$BUILD_CXX" && break
18395done
18396
18397
18398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18399
18400  # First separate the path from the arguments. This will split at the first
18401  # space.
18402  complete="$BUILD_CXX"
18403  path="${complete%% *}"
18404  tmp="$complete EOL"
18405  arguments="${tmp#* }"
18406
18407  # Input might be given as Windows format, start by converting to
18408  # unix format.
18409  new_path=`$CYGPATH -u "$path"`
18410
18411  # Now try to locate executable using which
18412  new_path=`$WHICH "$new_path" 2> /dev/null`
18413  # bat and cmd files are not always considered executable in cygwin causing which
18414  # to not find them
18415  if test "x$new_path" = x \
18416           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18417           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18418    new_path=`$CYGPATH -u "$path"`
18419  fi
18420  if test "x$new_path" = x; then
18421    # Oops. Which didn't find the executable.
18422    # The splitting of arguments from the executable at a space might have been incorrect,
18423    # since paths with space are more likely in Windows. Give it another try with the whole
18424    # argument.
18425    path="$complete"
18426    arguments="EOL"
18427    new_path=`$CYGPATH -u "$path"`
18428    new_path=`$WHICH "$new_path" 2> /dev/null`
18429    # bat and cmd files are not always considered executable in cygwin causing which
18430    # to not find them
18431    if test "x$new_path" = x \
18432             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18433             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18434      new_path=`$CYGPATH -u "$path"`
18435    fi
18436    if test "x$new_path" = x; then
18437      # It's still not found. Now this is an unrecoverable error.
18438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18439$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18440      has_space=`$ECHO "$complete" | $GREP " "`
18441      if test "x$has_space" != x; then
18442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18444      fi
18445      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18446    fi
18447  fi
18448
18449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18452  # "foo.exe" is OK but "foo" is an error.
18453  #
18454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18455  # It is also a way to make sure we got the proper file name for the real test later on.
18456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18457  if test "x$test_shortpath" = x; then
18458    # Short path failed, file does not exist as specified.
18459    # Try adding .exe or .cmd
18460    if test -f "${new_path}.exe"; then
18461       input_to_shortpath="${new_path}.exe"
18462    elif test -f "${new_path}.cmd"; then
18463       input_to_shortpath="${new_path}.cmd"
18464    else
18465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18466$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18469      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18470    fi
18471  else
18472    input_to_shortpath="$new_path"
18473  fi
18474
18475  # Call helper function which possibly converts this using DOS-style short mode.
18476  # If so, the updated path is stored in $new_path.
18477  new_path="$input_to_shortpath"
18478
18479  input_path="$input_to_shortpath"
18480  # Check if we need to convert this using DOS-style short mode. If the path
18481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18482  # take no chances and rewrite it.
18483  # Note: m4 eats our [], so we need to use [ and ] instead.
18484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18485  if test "x$has_forbidden_chars" != x; then
18486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18490      # Going to short mode and back again did indeed matter. Since short mode is
18491      # case insensitive, let's make it lowercase to improve readability.
18492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18493      # Now convert it back to Unix-stile (cygpath)
18494      input_path=`$CYGPATH -u "$shortmode_path"`
18495      new_path="$input_path"
18496    fi
18497  fi
18498
18499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18500  if test "x$test_cygdrive_prefix" = x; then
18501    # As a simple fix, exclude /usr/bin since it's not a real path.
18502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18504      # a path prefixed by /cygdrive for fixpath to work.
18505      new_path="$CYGWIN_ROOT_PATH$input_path"
18506    fi
18507  fi
18508
18509  # remove trailing .exe if any
18510  new_path="${new_path/%.exe/}"
18511
18512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18513
18514  # First separate the path from the arguments. This will split at the first
18515  # space.
18516  complete="$BUILD_CXX"
18517  path="${complete%% *}"
18518  tmp="$complete EOL"
18519  arguments="${tmp#* }"
18520
18521  # Input might be given as Windows format, start by converting to
18522  # unix format.
18523  new_path="$path"
18524
18525  windows_path="$new_path"
18526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18527    unix_path=`$CYGPATH -u "$windows_path"`
18528    new_path="$unix_path"
18529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18531    new_path="$unix_path"
18532  fi
18533
18534
18535  # Now try to locate executable using which
18536  new_path=`$WHICH "$new_path" 2> /dev/null`
18537
18538  if test "x$new_path" = x; then
18539    # Oops. Which didn't find the executable.
18540    # The splitting of arguments from the executable at a space might have been incorrect,
18541    # since paths with space are more likely in Windows. Give it another try with the whole
18542    # argument.
18543    path="$complete"
18544    arguments="EOL"
18545    new_path="$path"
18546
18547  windows_path="$new_path"
18548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18549    unix_path=`$CYGPATH -u "$windows_path"`
18550    new_path="$unix_path"
18551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18553    new_path="$unix_path"
18554  fi
18555
18556
18557    new_path=`$WHICH "$new_path" 2> /dev/null`
18558
18559    if test "x$new_path" = x; then
18560      # It's still not found. Now this is an unrecoverable error.
18561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18562$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18563      has_space=`$ECHO "$complete" | $GREP " "`
18564      if test "x$has_space" != x; then
18565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18567      fi
18568      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18569    fi
18570  fi
18571
18572  # Now new_path has a complete unix path to the binary
18573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18574    # Keep paths in /bin as-is, but remove trailing .exe if any
18575    new_path="${new_path/%.exe/}"
18576    # Do not save /bin paths to all_fixpath_prefixes!
18577  else
18578    # Not in mixed or Windows style, start by that.
18579    new_path=`cmd //c echo $new_path`
18580
18581  input_path="$new_path"
18582  # Check if we need to convert this using DOS-style short mode. If the path
18583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18584  # take no chances and rewrite it.
18585  # Note: m4 eats our [], so we need to use [ and ] instead.
18586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18587  if test "x$has_forbidden_chars" != x; then
18588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18590  fi
18591
18592    # Output is in $new_path
18593
18594  windows_path="$new_path"
18595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18596    unix_path=`$CYGPATH -u "$windows_path"`
18597    new_path="$unix_path"
18598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18600    new_path="$unix_path"
18601  fi
18602
18603    # remove trailing .exe if any
18604    new_path="${new_path/%.exe/}"
18605
18606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18608  fi
18609
18610  else
18611    # We're on a posix platform. Hooray! :)
18612    # First separate the path from the arguments. This will split at the first
18613    # space.
18614    complete="$BUILD_CXX"
18615    path="${complete%% *}"
18616    tmp="$complete EOL"
18617    arguments="${tmp#* }"
18618
18619    # Cannot rely on the command "which" here since it doesn't always work.
18620    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18621    if test -z "$is_absolute_path"; then
18622      # Path to executable is not absolute. Find it.
18623      IFS_save="$IFS"
18624      IFS=:
18625      for p in $PATH; do
18626        if test -f "$p/$path" && test -x "$p/$path"; then
18627          new_path="$p/$path"
18628          break
18629        fi
18630      done
18631      IFS="$IFS_save"
18632    else
18633      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18634$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18635      new_path="$path"
18636    fi
18637
18638    if test "x$new_path" = x; then
18639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18640$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18641        has_space=`$ECHO "$complete" | $GREP " "`
18642        if test "x$has_space" != x; then
18643          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18645        fi
18646        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18647      fi
18648  fi
18649
18650      # Now join together the path and the arguments once again
18651      if test "x$arguments" != xEOL; then
18652        new_complete="$new_path ${arguments% *}"
18653      else
18654        new_complete="$new_path"
18655      fi
18656
18657  if test "x$complete" != "x$new_complete"; then
18658      BUILD_CXX="$new_complete"
18659      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18660$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18661    fi
18662
18663    # Extract the first word of "ld", so it can be a program name with args.
18664set dummy ld; ac_word=$2
18665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18666$as_echo_n "checking for $ac_word... " >&6; }
18667if ${ac_cv_path_BUILD_LD+:} false; then :
18668  $as_echo_n "(cached) " >&6
18669else
18670  case $BUILD_LD in
18671  [\\/]* | ?:[\\/]*)
18672  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18673  ;;
18674  *)
18675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18676for as_dir in $PATH
18677do
18678  IFS=$as_save_IFS
18679  test -z "$as_dir" && as_dir=.
18680    for ac_exec_ext in '' $ac_executable_extensions; do
18681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18682    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18684    break 2
18685  fi
18686done
18687  done
18688IFS=$as_save_IFS
18689
18690  ;;
18691esac
18692fi
18693BUILD_LD=$ac_cv_path_BUILD_LD
18694if test -n "$BUILD_LD"; then
18695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18696$as_echo "$BUILD_LD" >&6; }
18697else
18698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18699$as_echo "no" >&6; }
18700fi
18701
18702
18703
18704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18705
18706  # First separate the path from the arguments. This will split at the first
18707  # space.
18708  complete="$BUILD_LD"
18709  path="${complete%% *}"
18710  tmp="$complete EOL"
18711  arguments="${tmp#* }"
18712
18713  # Input might be given as Windows format, start by converting to
18714  # unix format.
18715  new_path=`$CYGPATH -u "$path"`
18716
18717  # Now try to locate executable using which
18718  new_path=`$WHICH "$new_path" 2> /dev/null`
18719  # bat and cmd files are not always considered executable in cygwin causing which
18720  # to not find them
18721  if test "x$new_path" = x \
18722           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18723           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18724    new_path=`$CYGPATH -u "$path"`
18725  fi
18726  if test "x$new_path" = x; then
18727    # Oops. Which didn't find the executable.
18728    # The splitting of arguments from the executable at a space might have been incorrect,
18729    # since paths with space are more likely in Windows. Give it another try with the whole
18730    # argument.
18731    path="$complete"
18732    arguments="EOL"
18733    new_path=`$CYGPATH -u "$path"`
18734    new_path=`$WHICH "$new_path" 2> /dev/null`
18735    # bat and cmd files are not always considered executable in cygwin causing which
18736    # to not find them
18737    if test "x$new_path" = x \
18738             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18739             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18740      new_path=`$CYGPATH -u "$path"`
18741    fi
18742    if test "x$new_path" = x; then
18743      # It's still not found. Now this is an unrecoverable error.
18744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18745$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18746      has_space=`$ECHO "$complete" | $GREP " "`
18747      if test "x$has_space" != x; then
18748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18750      fi
18751      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18752    fi
18753  fi
18754
18755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18758  # "foo.exe" is OK but "foo" is an error.
18759  #
18760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18761  # It is also a way to make sure we got the proper file name for the real test later on.
18762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18763  if test "x$test_shortpath" = x; then
18764    # Short path failed, file does not exist as specified.
18765    # Try adding .exe or .cmd
18766    if test -f "${new_path}.exe"; then
18767       input_to_shortpath="${new_path}.exe"
18768    elif test -f "${new_path}.cmd"; then
18769       input_to_shortpath="${new_path}.cmd"
18770    else
18771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18772$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18775      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18776    fi
18777  else
18778    input_to_shortpath="$new_path"
18779  fi
18780
18781  # Call helper function which possibly converts this using DOS-style short mode.
18782  # If so, the updated path is stored in $new_path.
18783  new_path="$input_to_shortpath"
18784
18785  input_path="$input_to_shortpath"
18786  # Check if we need to convert this using DOS-style short mode. If the path
18787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18788  # take no chances and rewrite it.
18789  # Note: m4 eats our [], so we need to use [ and ] instead.
18790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18791  if test "x$has_forbidden_chars" != x; then
18792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18796      # Going to short mode and back again did indeed matter. Since short mode is
18797      # case insensitive, let's make it lowercase to improve readability.
18798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18799      # Now convert it back to Unix-stile (cygpath)
18800      input_path=`$CYGPATH -u "$shortmode_path"`
18801      new_path="$input_path"
18802    fi
18803  fi
18804
18805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18806  if test "x$test_cygdrive_prefix" = x; then
18807    # As a simple fix, exclude /usr/bin since it's not a real path.
18808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18810      # a path prefixed by /cygdrive for fixpath to work.
18811      new_path="$CYGWIN_ROOT_PATH$input_path"
18812    fi
18813  fi
18814
18815  # remove trailing .exe if any
18816  new_path="${new_path/%.exe/}"
18817
18818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18819
18820  # First separate the path from the arguments. This will split at the first
18821  # space.
18822  complete="$BUILD_LD"
18823  path="${complete%% *}"
18824  tmp="$complete EOL"
18825  arguments="${tmp#* }"
18826
18827  # Input might be given as Windows format, start by converting to
18828  # unix format.
18829  new_path="$path"
18830
18831  windows_path="$new_path"
18832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18833    unix_path=`$CYGPATH -u "$windows_path"`
18834    new_path="$unix_path"
18835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18837    new_path="$unix_path"
18838  fi
18839
18840
18841  # Now try to locate executable using which
18842  new_path=`$WHICH "$new_path" 2> /dev/null`
18843
18844  if test "x$new_path" = x; then
18845    # Oops. Which didn't find the executable.
18846    # The splitting of arguments from the executable at a space might have been incorrect,
18847    # since paths with space are more likely in Windows. Give it another try with the whole
18848    # argument.
18849    path="$complete"
18850    arguments="EOL"
18851    new_path="$path"
18852
18853  windows_path="$new_path"
18854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18855    unix_path=`$CYGPATH -u "$windows_path"`
18856    new_path="$unix_path"
18857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18859    new_path="$unix_path"
18860  fi
18861
18862
18863    new_path=`$WHICH "$new_path" 2> /dev/null`
18864
18865    if test "x$new_path" = x; then
18866      # It's still not found. Now this is an unrecoverable error.
18867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18868$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18869      has_space=`$ECHO "$complete" | $GREP " "`
18870      if test "x$has_space" != x; then
18871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18873      fi
18874      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18875    fi
18876  fi
18877
18878  # Now new_path has a complete unix path to the binary
18879  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18880    # Keep paths in /bin as-is, but remove trailing .exe if any
18881    new_path="${new_path/%.exe/}"
18882    # Do not save /bin paths to all_fixpath_prefixes!
18883  else
18884    # Not in mixed or Windows style, start by that.
18885    new_path=`cmd //c echo $new_path`
18886
18887  input_path="$new_path"
18888  # Check if we need to convert this using DOS-style short mode. If the path
18889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18890  # take no chances and rewrite it.
18891  # Note: m4 eats our [], so we need to use [ and ] instead.
18892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18893  if test "x$has_forbidden_chars" != x; then
18894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18896  fi
18897
18898    # Output is in $new_path
18899
18900  windows_path="$new_path"
18901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18902    unix_path=`$CYGPATH -u "$windows_path"`
18903    new_path="$unix_path"
18904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18906    new_path="$unix_path"
18907  fi
18908
18909    # remove trailing .exe if any
18910    new_path="${new_path/%.exe/}"
18911
18912    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18913    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18914  fi
18915
18916  else
18917    # We're on a posix platform. Hooray! :)
18918    # First separate the path from the arguments. This will split at the first
18919    # space.
18920    complete="$BUILD_LD"
18921    path="${complete%% *}"
18922    tmp="$complete EOL"
18923    arguments="${tmp#* }"
18924
18925    # Cannot rely on the command "which" here since it doesn't always work.
18926    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18927    if test -z "$is_absolute_path"; then
18928      # Path to executable is not absolute. Find it.
18929      IFS_save="$IFS"
18930      IFS=:
18931      for p in $PATH; do
18932        if test -f "$p/$path" && test -x "$p/$path"; then
18933          new_path="$p/$path"
18934          break
18935        fi
18936      done
18937      IFS="$IFS_save"
18938    else
18939      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18940$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18941      new_path="$path"
18942    fi
18943
18944    if test "x$new_path" = x; then
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18946$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18947        has_space=`$ECHO "$complete" | $GREP " "`
18948        if test "x$has_space" != x; then
18949          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18950$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18951        fi
18952        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18953      fi
18954  fi
18955
18956      # Now join together the path and the arguments once again
18957      if test "x$arguments" != xEOL; then
18958        new_complete="$new_path ${arguments% *}"
18959      else
18960        new_complete="$new_path"
18961      fi
18962
18963  if test "x$complete" != "x$new_complete"; then
18964      BUILD_LD="$new_complete"
18965      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18966$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18967    fi
18968
18969fi
18970
18971
18972
18973
18974# If a devkit is found on the builddeps server, then prepend its path to the
18975# PATH variable. If there are cross compilers available in the devkit, these
18976# will be found by AC_PROG_CC et al.
18977DEVKIT=
18978
18979
18980    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18981        # Source the builddeps file again, to make sure it uses the latest variables!
18982        . $builddepsfile
18983        # Look for a target and build machine specific resource!
18984        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18985        if test "x$resource" = x; then
18986            # Ok, lets instead look for a target specific resource
18987            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18988        fi
18989        if test "x$resource" = x; then
18990            # Ok, lets instead look for a build specific resource
18991            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18992        fi
18993        if test "x$resource" = x; then
18994            # Ok, lets instead look for a generic resource
18995            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18996            resource=${builddep_devkit}
18997        fi
18998        if test "x$resource" != x; then
18999            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19000$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19001	    # If the resource in the builddeps.conf file is an existing directory,
19002	    # for example /java/linux/cups
19003	    if test -d ${resource}; then
19004	       depdir=${resource}
19005	    else
19006
19007# devkit is for example mymodule
19008# $resource is for example libs/general/libmymod_1_2_3.zip
19009# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19010# $with_builddeps_dir is for example /localhome/builddeps
19011# depdir is the name of the variable into which we store the depdir, eg MYMOD
19012# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19013# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19014    filename=`basename $resource`
19015    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19016    filebase=${filename%%.*}
19017    extension=${filename#*.}
19018    installdir=$with_builddeps_dir/$filebase
19019    if test ! -f $installdir/$filename.unpacked; then
19020        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19021$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19022        if test ! -d $installdir; then
19023            mkdir -p $installdir
19024        fi
19025        if test ! -d $installdir; then
19026            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19027        fi
19028        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19029        touch $tmpfile
19030        if test ! -f $tmpfile; then
19031            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19032        fi
19033
19034    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19035    # $tmpfile is the local file name for the downloaded file.
19036    VALID_TOOL=no
19037    if test "x$BDEPS_FTP" = xwget; then
19038       VALID_TOOL=yes
19039       wget -O $tmpfile $with_builddeps_server/$resource
19040    fi
19041    if test "x$BDEPS_FTP" = xlftp; then
19042       VALID_TOOL=yes
19043       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19044    fi
19045    if test "x$BDEPS_FTP" = xftp; then
19046        VALID_TOOL=yes
19047        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19048        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19049        FTPUSERPWD=${FTPSERVER%%@*}
19050        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19051            FTPUSER=${userpwd%%:*}
19052            FTPPWD=${userpwd#*@}
19053            FTPSERVER=${FTPSERVER#*@}
19054        else
19055            FTPUSER=ftp
19056            FTPPWD=ftp
19057        fi
19058        # the "pass" command does not work on some
19059        # ftp clients (read ftp.exe) but if it works,
19060        # passive mode is better!
19061        (\
19062            echo "user $FTPUSER $FTPPWD"        ;\
19063            echo "pass"                         ;\
19064            echo "bin"                          ;\
19065            echo "get $FTPPATH $tmpfile"              ;\
19066        ) | ftp -in $FTPSERVER
19067    fi
19068    if test "x$VALID_TOOL" != xyes; then
19069       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19070    fi
19071
19072        mv $tmpfile $installdir/$filename
19073        if test ! -s $installdir/$filename; then
19074            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19075        fi
19076        case "$extension" in
19077            zip)  echo "Unzipping $installdir/$filename..."
19078               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19079            ;;
19080            tar.gz) echo "Untaring $installdir/$filename..."
19081               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19082            ;;
19083            tgz) echo "Untaring $installdir/$filename..."
19084               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19085            ;;
19086            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19087            ;;
19088        esac
19089    fi
19090    if test -f $installdir/$filename.unpacked; then
19091        depdir=$installdir
19092    fi
19093
19094	    fi
19095            # Source the builddeps file again, because in the previous command, the depdir
19096            # was updated to point at the current build dependency install directory.
19097            . $builddepsfile
19098            # Now extract variables from the builddeps.conf files.
19099            theroot=${builddep_devkit_ROOT}
19100            thecflags=${builddep_devkit_CFLAGS}
19101            thelibs=${builddep_devkit_LIBS}
19102            if test "x$depdir" = x; then
19103                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19104            fi
19105            DEVKIT=$depdir
19106            if test "x$theroot" != x; then
19107               DEVKIT="$theroot"
19108            fi
19109            if test "x$thecflags" != x; then
19110               DEVKIT_CFLAGS="$thecflags"
19111            fi
19112            if test "x$thelibs" != x; then
19113               DEVKIT_LIBS="$thelibs"
19114            fi
19115            # Found devkit
19116                     PATH="$DEVKIT/bin:$PATH"
19117                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19118                     if test "x$x_includes" = "xNONE"; then
19119                         x_includes="$SYS_ROOT/usr/include/X11"
19120                     fi
19121                     if test "x$x_libraries" = "xNONE"; then
19122                         x_libraries="$SYS_ROOT/usr/lib"
19123                     fi
19124
19125
19126        fi
19127
19128    fi
19129
19130
19131# Store the CFLAGS etal passed to the configure script.
19132ORG_CFLAGS="$CFLAGS"
19133ORG_CXXFLAGS="$CXXFLAGS"
19134ORG_OBJCFLAGS="$OBJCFLAGS"
19135
19136# autoconf magic only relies on PATH, so update it if tools dir is specified
19137OLD_PATH="$PATH"
19138if test "x$TOOLS_DIR" != x; then
19139  PATH=$TOOLS_DIR:$PATH
19140fi
19141
19142
19143### Locate C compiler (CC)
19144
19145# On windows, only cl.exe is supported.
19146# On Solaris, cc is preferred to gcc.
19147# Elsewhere, gcc is preferred to cc.
19148
19149if test "x$CC" != x; then
19150  COMPILER_CHECK_LIST="$CC"
19151elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19152  COMPILER_CHECK_LIST="cl"
19153elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19154  COMPILER_CHECK_LIST="cc gcc"
19155else
19156  COMPILER_CHECK_LIST="gcc cc"
19157fi
19158
19159
19160  COMPILER_NAME=C
19161
19162  CC=
19163  # If TOOLS_DIR is set, check for all compiler names in there first
19164  # before checking the rest of the PATH.
19165  if test -n "$TOOLS_DIR"; then
19166    PATH_save="$PATH"
19167    PATH="$TOOLS_DIR"
19168    for ac_prog in $COMPILER_CHECK_LIST
19169do
19170  # Extract the first word of "$ac_prog", so it can be a program name with args.
19171set dummy $ac_prog; ac_word=$2
19172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19173$as_echo_n "checking for $ac_word... " >&6; }
19174if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19175  $as_echo_n "(cached) " >&6
19176else
19177  case $TOOLS_DIR_CC in
19178  [\\/]* | ?:[\\/]*)
19179  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19180  ;;
19181  *)
19182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19183for as_dir in $PATH
19184do
19185  IFS=$as_save_IFS
19186  test -z "$as_dir" && as_dir=.
19187    for ac_exec_ext in '' $ac_executable_extensions; do
19188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19189    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19191    break 2
19192  fi
19193done
19194  done
19195IFS=$as_save_IFS
19196
19197  ;;
19198esac
19199fi
19200TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19201if test -n "$TOOLS_DIR_CC"; then
19202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19203$as_echo "$TOOLS_DIR_CC" >&6; }
19204else
19205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19206$as_echo "no" >&6; }
19207fi
19208
19209
19210  test -n "$TOOLS_DIR_CC" && break
19211done
19212
19213    CC=$TOOLS_DIR_CC
19214    PATH="$PATH_save"
19215  fi
19216
19217  # AC_PATH_PROGS can't be run multiple times with the same variable,
19218  # so create a new name for this run.
19219  if test "x$CC" = x; then
19220    for ac_prog in $COMPILER_CHECK_LIST
19221do
19222  # Extract the first word of "$ac_prog", so it can be a program name with args.
19223set dummy $ac_prog; ac_word=$2
19224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19225$as_echo_n "checking for $ac_word... " >&6; }
19226if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19227  $as_echo_n "(cached) " >&6
19228else
19229  case $POTENTIAL_CC in
19230  [\\/]* | ?:[\\/]*)
19231  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19232  ;;
19233  *)
19234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19235for as_dir in $PATH
19236do
19237  IFS=$as_save_IFS
19238  test -z "$as_dir" && as_dir=.
19239    for ac_exec_ext in '' $ac_executable_extensions; do
19240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19241    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19243    break 2
19244  fi
19245done
19246  done
19247IFS=$as_save_IFS
19248
19249  ;;
19250esac
19251fi
19252POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19253if test -n "$POTENTIAL_CC"; then
19254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19255$as_echo "$POTENTIAL_CC" >&6; }
19256else
19257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19258$as_echo "no" >&6; }
19259fi
19260
19261
19262  test -n "$POTENTIAL_CC" && break
19263done
19264
19265    CC=$POTENTIAL_CC
19266  fi
19267
19268  if test "x$CC" = x; then
19269
19270    # Print a helpful message on how to acquire the necessary build dependency.
19271    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19272    MISSING_DEPENDENCY=devkit
19273    PKGHANDLER_COMMAND=
19274
19275    case $PKGHANDLER in
19276	apt-get)
19277                apt_help     $MISSING_DEPENDENCY ;;
19278    yum)
19279                yum_help     $MISSING_DEPENDENCY ;;
19280	port)
19281                port_help    $MISSING_DEPENDENCY ;;
19282	pkgutil)
19283                pkgutil_help $MISSING_DEPENDENCY ;;
19284	pkgadd)
19285                pkgadd_help  $MISSING_DEPENDENCY ;;
19286    * )
19287      break ;;
19288    esac
19289
19290    if test "x$PKGHANDLER_COMMAND" != x; then
19291        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19292    fi
19293
19294      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19295  fi
19296
19297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19298
19299  # First separate the path from the arguments. This will split at the first
19300  # space.
19301  complete="$CC"
19302  path="${complete%% *}"
19303  tmp="$complete EOL"
19304  arguments="${tmp#* }"
19305
19306  # Input might be given as Windows format, start by converting to
19307  # unix format.
19308  new_path=`$CYGPATH -u "$path"`
19309
19310  # Now try to locate executable using which
19311  new_path=`$WHICH "$new_path" 2> /dev/null`
19312  # bat and cmd files are not always considered executable in cygwin causing which
19313  # to not find them
19314  if test "x$new_path" = x \
19315           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19316           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19317    new_path=`$CYGPATH -u "$path"`
19318  fi
19319  if test "x$new_path" = x; then
19320    # Oops. Which didn't find the executable.
19321    # The splitting of arguments from the executable at a space might have been incorrect,
19322    # since paths with space are more likely in Windows. Give it another try with the whole
19323    # argument.
19324    path="$complete"
19325    arguments="EOL"
19326    new_path=`$CYGPATH -u "$path"`
19327    new_path=`$WHICH "$new_path" 2> /dev/null`
19328    # bat and cmd files are not always considered executable in cygwin causing which
19329    # to not find them
19330    if test "x$new_path" = x \
19331             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19332             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19333      new_path=`$CYGPATH -u "$path"`
19334    fi
19335    if test "x$new_path" = x; then
19336      # It's still not found. Now this is an unrecoverable error.
19337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19338$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19339      has_space=`$ECHO "$complete" | $GREP " "`
19340      if test "x$has_space" != x; then
19341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19343      fi
19344      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19345    fi
19346  fi
19347
19348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19351  # "foo.exe" is OK but "foo" is an error.
19352  #
19353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19354  # It is also a way to make sure we got the proper file name for the real test later on.
19355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19356  if test "x$test_shortpath" = x; then
19357    # Short path failed, file does not exist as specified.
19358    # Try adding .exe or .cmd
19359    if test -f "${new_path}.exe"; then
19360       input_to_shortpath="${new_path}.exe"
19361    elif test -f "${new_path}.cmd"; then
19362       input_to_shortpath="${new_path}.cmd"
19363    else
19364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19365$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19368      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19369    fi
19370  else
19371    input_to_shortpath="$new_path"
19372  fi
19373
19374  # Call helper function which possibly converts this using DOS-style short mode.
19375  # If so, the updated path is stored in $new_path.
19376  new_path="$input_to_shortpath"
19377
19378  input_path="$input_to_shortpath"
19379  # Check if we need to convert this using DOS-style short mode. If the path
19380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19381  # take no chances and rewrite it.
19382  # Note: m4 eats our [], so we need to use [ and ] instead.
19383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19384  if test "x$has_forbidden_chars" != x; then
19385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19389      # Going to short mode and back again did indeed matter. Since short mode is
19390      # case insensitive, let's make it lowercase to improve readability.
19391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19392      # Now convert it back to Unix-stile (cygpath)
19393      input_path=`$CYGPATH -u "$shortmode_path"`
19394      new_path="$input_path"
19395    fi
19396  fi
19397
19398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19399  if test "x$test_cygdrive_prefix" = x; then
19400    # As a simple fix, exclude /usr/bin since it's not a real path.
19401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19403      # a path prefixed by /cygdrive for fixpath to work.
19404      new_path="$CYGWIN_ROOT_PATH$input_path"
19405    fi
19406  fi
19407
19408  # remove trailing .exe if any
19409  new_path="${new_path/%.exe/}"
19410
19411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19412
19413  # First separate the path from the arguments. This will split at the first
19414  # space.
19415  complete="$CC"
19416  path="${complete%% *}"
19417  tmp="$complete EOL"
19418  arguments="${tmp#* }"
19419
19420  # Input might be given as Windows format, start by converting to
19421  # unix format.
19422  new_path="$path"
19423
19424  windows_path="$new_path"
19425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19426    unix_path=`$CYGPATH -u "$windows_path"`
19427    new_path="$unix_path"
19428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19430    new_path="$unix_path"
19431  fi
19432
19433
19434  # Now try to locate executable using which
19435  new_path=`$WHICH "$new_path" 2> /dev/null`
19436
19437  if test "x$new_path" = x; then
19438    # Oops. Which didn't find the executable.
19439    # The splitting of arguments from the executable at a space might have been incorrect,
19440    # since paths with space are more likely in Windows. Give it another try with the whole
19441    # argument.
19442    path="$complete"
19443    arguments="EOL"
19444    new_path="$path"
19445
19446  windows_path="$new_path"
19447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19448    unix_path=`$CYGPATH -u "$windows_path"`
19449    new_path="$unix_path"
19450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19452    new_path="$unix_path"
19453  fi
19454
19455
19456    new_path=`$WHICH "$new_path" 2> /dev/null`
19457
19458    if test "x$new_path" = x; then
19459      # It's still not found. Now this is an unrecoverable error.
19460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19461$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19462      has_space=`$ECHO "$complete" | $GREP " "`
19463      if test "x$has_space" != x; then
19464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19466      fi
19467      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19468    fi
19469  fi
19470
19471  # Now new_path has a complete unix path to the binary
19472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19473    # Keep paths in /bin as-is, but remove trailing .exe if any
19474    new_path="${new_path/%.exe/}"
19475    # Do not save /bin paths to all_fixpath_prefixes!
19476  else
19477    # Not in mixed or Windows style, start by that.
19478    new_path=`cmd //c echo $new_path`
19479
19480  input_path="$new_path"
19481  # Check if we need to convert this using DOS-style short mode. If the path
19482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19483  # take no chances and rewrite it.
19484  # Note: m4 eats our [], so we need to use [ and ] instead.
19485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19486  if test "x$has_forbidden_chars" != x; then
19487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19489  fi
19490
19491    # Output is in $new_path
19492
19493  windows_path="$new_path"
19494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19495    unix_path=`$CYGPATH -u "$windows_path"`
19496    new_path="$unix_path"
19497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19499    new_path="$unix_path"
19500  fi
19501
19502    # remove trailing .exe if any
19503    new_path="${new_path/%.exe/}"
19504
19505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19507  fi
19508
19509  else
19510    # We're on a posix platform. Hooray! :)
19511    # First separate the path from the arguments. This will split at the first
19512    # space.
19513    complete="$CC"
19514    path="${complete%% *}"
19515    tmp="$complete EOL"
19516    arguments="${tmp#* }"
19517
19518    # Cannot rely on the command "which" here since it doesn't always work.
19519    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19520    if test -z "$is_absolute_path"; then
19521      # Path to executable is not absolute. Find it.
19522      IFS_save="$IFS"
19523      IFS=:
19524      for p in $PATH; do
19525        if test -f "$p/$path" && test -x "$p/$path"; then
19526          new_path="$p/$path"
19527          break
19528        fi
19529      done
19530      IFS="$IFS_save"
19531    else
19532      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19533$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19534      new_path="$path"
19535    fi
19536
19537    if test "x$new_path" = x; then
19538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19539$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19540        has_space=`$ECHO "$complete" | $GREP " "`
19541        if test "x$has_space" != x; then
19542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19544        fi
19545        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19546      fi
19547  fi
19548
19549      # Now join together the path and the arguments once again
19550      if test "x$arguments" != xEOL; then
19551        new_complete="$new_path ${arguments% *}"
19552      else
19553        new_complete="$new_path"
19554      fi
19555
19556  if test "x$complete" != "x$new_complete"; then
19557      CC="$new_complete"
19558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19559$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19560    fi
19561
19562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19563$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19564  TEST_COMPILER="$CC"
19565
19566    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19567        # Follow a chain of symbolic links. Use readlink
19568        # where it exists, else fall back to horribly
19569        # complicated shell code.
19570        if test "x$READLINK_TESTED" != yes; then
19571            # On MacOSX there is a readlink tool with a different
19572            # purpose than the GNU readlink tool. Check the found readlink.
19573            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19574            if test "x$ISGNU" = x; then
19575                 # A readlink that we do not know how to use.
19576                 # Are there other non-GNU readlinks out there?
19577                 READLINK_TESTED=yes
19578                 READLINK=
19579            fi
19580        fi
19581
19582        if test "x$READLINK" != x; then
19583            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19584        else
19585            # Save the current directory for restoring afterwards
19586            STARTDIR=$PWD
19587            COUNTER=0
19588            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19589            sym_link_file=`$BASENAME $TEST_COMPILER`
19590            cd $sym_link_dir
19591            # Use -P flag to resolve symlinks in directories.
19592            cd `$THEPWDCMD -P`
19593            sym_link_dir=`$THEPWDCMD -P`
19594            # Resolve file symlinks
19595            while test $COUNTER -lt 20; do
19596                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19597                if test "x$ISLINK" == x; then
19598                    # This is not a symbolic link! We are done!
19599                    break
19600                fi
19601                # Again resolve directory symlinks since the target of the just found
19602                # link could be in a different directory
19603                cd `$DIRNAME $ISLINK`
19604                sym_link_dir=`$THEPWDCMD -P`
19605                sym_link_file=`$BASENAME $ISLINK`
19606                let COUNTER=COUNTER+1
19607            done
19608            cd $STARTDIR
19609            TEST_COMPILER=$sym_link_dir/$sym_link_file
19610        fi
19611    fi
19612
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19614$as_echo "$TEST_COMPILER" >&6; }
19615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19616$as_echo_n "checking if CC is disguised ccache... " >&6; }
19617
19618  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19619  if test "x$COMPILER_BASENAME" = "xccache"; then
19620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19621$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19622    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19623    # We want to control ccache invocation ourselves, so ignore this cc and try
19624    # searching again.
19625
19626    # Remove the path to the fake ccache cc from the PATH
19627    RETRY_COMPILER_SAVED_PATH="$PATH"
19628    COMPILER_DIRNAME=`$DIRNAME $CC`
19629    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19630
19631    # Try again looking for our compiler
19632    if test -n "$ac_tool_prefix"; then
19633  for ac_prog in $COMPILER_CHECK_LIST
19634  do
19635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19638$as_echo_n "checking for $ac_word... " >&6; }
19639if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19640  $as_echo_n "(cached) " >&6
19641else
19642  if test -n "$PROPER_COMPILER_CC"; then
19643  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19644else
19645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19646for as_dir in $PATH
19647do
19648  IFS=$as_save_IFS
19649  test -z "$as_dir" && as_dir=.
19650    for ac_exec_ext in '' $ac_executable_extensions; do
19651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19652    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19654    break 2
19655  fi
19656done
19657  done
19658IFS=$as_save_IFS
19659
19660fi
19661fi
19662PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19663if test -n "$PROPER_COMPILER_CC"; then
19664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19665$as_echo "$PROPER_COMPILER_CC" >&6; }
19666else
19667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19668$as_echo "no" >&6; }
19669fi
19670
19671
19672    test -n "$PROPER_COMPILER_CC" && break
19673  done
19674fi
19675if test -z "$PROPER_COMPILER_CC"; then
19676  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19677  for ac_prog in $COMPILER_CHECK_LIST
19678do
19679  # Extract the first word of "$ac_prog", so it can be a program name with args.
19680set dummy $ac_prog; ac_word=$2
19681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19682$as_echo_n "checking for $ac_word... " >&6; }
19683if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19684  $as_echo_n "(cached) " >&6
19685else
19686  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19687  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19688else
19689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19690for as_dir in $PATH
19691do
19692  IFS=$as_save_IFS
19693  test -z "$as_dir" && as_dir=.
19694    for ac_exec_ext in '' $ac_executable_extensions; do
19695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19696    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19698    break 2
19699  fi
19700done
19701  done
19702IFS=$as_save_IFS
19703
19704fi
19705fi
19706ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19707if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19709$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19710else
19711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19712$as_echo "no" >&6; }
19713fi
19714
19715
19716  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19717done
19718
19719  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19720    PROPER_COMPILER_CC=""
19721  else
19722    case $cross_compiling:$ac_tool_warned in
19723yes:)
19724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19726ac_tool_warned=yes ;;
19727esac
19728    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19729  fi
19730fi
19731
19732
19733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19734
19735  # First separate the path from the arguments. This will split at the first
19736  # space.
19737  complete="$PROPER_COMPILER_CC"
19738  path="${complete%% *}"
19739  tmp="$complete EOL"
19740  arguments="${tmp#* }"
19741
19742  # Input might be given as Windows format, start by converting to
19743  # unix format.
19744  new_path=`$CYGPATH -u "$path"`
19745
19746  # Now try to locate executable using which
19747  new_path=`$WHICH "$new_path" 2> /dev/null`
19748  # bat and cmd files are not always considered executable in cygwin causing which
19749  # to not find them
19750  if test "x$new_path" = x \
19751           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19752           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19753    new_path=`$CYGPATH -u "$path"`
19754  fi
19755  if test "x$new_path" = x; then
19756    # Oops. Which didn't find the executable.
19757    # The splitting of arguments from the executable at a space might have been incorrect,
19758    # since paths with space are more likely in Windows. Give it another try with the whole
19759    # argument.
19760    path="$complete"
19761    arguments="EOL"
19762    new_path=`$CYGPATH -u "$path"`
19763    new_path=`$WHICH "$new_path" 2> /dev/null`
19764    # bat and cmd files are not always considered executable in cygwin causing which
19765    # to not find them
19766    if test "x$new_path" = x \
19767             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19768             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19769      new_path=`$CYGPATH -u "$path"`
19770    fi
19771    if test "x$new_path" = x; then
19772      # It's still not found. Now this is an unrecoverable error.
19773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19774$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19775      has_space=`$ECHO "$complete" | $GREP " "`
19776      if test "x$has_space" != x; then
19777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19779      fi
19780      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19781    fi
19782  fi
19783
19784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19787  # "foo.exe" is OK but "foo" is an error.
19788  #
19789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19790  # It is also a way to make sure we got the proper file name for the real test later on.
19791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19792  if test "x$test_shortpath" = x; then
19793    # Short path failed, file does not exist as specified.
19794    # Try adding .exe or .cmd
19795    if test -f "${new_path}.exe"; then
19796       input_to_shortpath="${new_path}.exe"
19797    elif test -f "${new_path}.cmd"; then
19798       input_to_shortpath="${new_path}.cmd"
19799    else
19800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19801$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19804      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19805    fi
19806  else
19807    input_to_shortpath="$new_path"
19808  fi
19809
19810  # Call helper function which possibly converts this using DOS-style short mode.
19811  # If so, the updated path is stored in $new_path.
19812  new_path="$input_to_shortpath"
19813
19814  input_path="$input_to_shortpath"
19815  # Check if we need to convert this using DOS-style short mode. If the path
19816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19817  # take no chances and rewrite it.
19818  # Note: m4 eats our [], so we need to use [ and ] instead.
19819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19820  if test "x$has_forbidden_chars" != x; then
19821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19825      # Going to short mode and back again did indeed matter. Since short mode is
19826      # case insensitive, let's make it lowercase to improve readability.
19827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19828      # Now convert it back to Unix-stile (cygpath)
19829      input_path=`$CYGPATH -u "$shortmode_path"`
19830      new_path="$input_path"
19831    fi
19832  fi
19833
19834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19835  if test "x$test_cygdrive_prefix" = x; then
19836    # As a simple fix, exclude /usr/bin since it's not a real path.
19837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19839      # a path prefixed by /cygdrive for fixpath to work.
19840      new_path="$CYGWIN_ROOT_PATH$input_path"
19841    fi
19842  fi
19843
19844  # remove trailing .exe if any
19845  new_path="${new_path/%.exe/}"
19846
19847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19848
19849  # First separate the path from the arguments. This will split at the first
19850  # space.
19851  complete="$PROPER_COMPILER_CC"
19852  path="${complete%% *}"
19853  tmp="$complete EOL"
19854  arguments="${tmp#* }"
19855
19856  # Input might be given as Windows format, start by converting to
19857  # unix format.
19858  new_path="$path"
19859
19860  windows_path="$new_path"
19861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19862    unix_path=`$CYGPATH -u "$windows_path"`
19863    new_path="$unix_path"
19864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19866    new_path="$unix_path"
19867  fi
19868
19869
19870  # Now try to locate executable using which
19871  new_path=`$WHICH "$new_path" 2> /dev/null`
19872
19873  if test "x$new_path" = x; then
19874    # Oops. Which didn't find the executable.
19875    # The splitting of arguments from the executable at a space might have been incorrect,
19876    # since paths with space are more likely in Windows. Give it another try with the whole
19877    # argument.
19878    path="$complete"
19879    arguments="EOL"
19880    new_path="$path"
19881
19882  windows_path="$new_path"
19883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19884    unix_path=`$CYGPATH -u "$windows_path"`
19885    new_path="$unix_path"
19886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19888    new_path="$unix_path"
19889  fi
19890
19891
19892    new_path=`$WHICH "$new_path" 2> /dev/null`
19893
19894    if test "x$new_path" = x; then
19895      # It's still not found. Now this is an unrecoverable error.
19896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19897$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19898      has_space=`$ECHO "$complete" | $GREP " "`
19899      if test "x$has_space" != x; then
19900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19902      fi
19903      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19904    fi
19905  fi
19906
19907  # Now new_path has a complete unix path to the binary
19908  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19909    # Keep paths in /bin as-is, but remove trailing .exe if any
19910    new_path="${new_path/%.exe/}"
19911    # Do not save /bin paths to all_fixpath_prefixes!
19912  else
19913    # Not in mixed or Windows style, start by that.
19914    new_path=`cmd //c echo $new_path`
19915
19916  input_path="$new_path"
19917  # Check if we need to convert this using DOS-style short mode. If the path
19918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19919  # take no chances and rewrite it.
19920  # Note: m4 eats our [], so we need to use [ and ] instead.
19921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19922  if test "x$has_forbidden_chars" != x; then
19923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19925  fi
19926
19927    # Output is in $new_path
19928
19929  windows_path="$new_path"
19930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19931    unix_path=`$CYGPATH -u "$windows_path"`
19932    new_path="$unix_path"
19933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19935    new_path="$unix_path"
19936  fi
19937
19938    # remove trailing .exe if any
19939    new_path="${new_path/%.exe/}"
19940
19941    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19942    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19943  fi
19944
19945  else
19946    # We're on a posix platform. Hooray! :)
19947    # First separate the path from the arguments. This will split at the first
19948    # space.
19949    complete="$PROPER_COMPILER_CC"
19950    path="${complete%% *}"
19951    tmp="$complete EOL"
19952    arguments="${tmp#* }"
19953
19954    # Cannot rely on the command "which" here since it doesn't always work.
19955    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19956    if test -z "$is_absolute_path"; then
19957      # Path to executable is not absolute. Find it.
19958      IFS_save="$IFS"
19959      IFS=:
19960      for p in $PATH; do
19961        if test -f "$p/$path" && test -x "$p/$path"; then
19962          new_path="$p/$path"
19963          break
19964        fi
19965      done
19966      IFS="$IFS_save"
19967    else
19968      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19969$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19970      new_path="$path"
19971    fi
19972
19973    if test "x$new_path" = x; then
19974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19975$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19976        has_space=`$ECHO "$complete" | $GREP " "`
19977        if test "x$has_space" != x; then
19978          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19979$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19980        fi
19981        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19982      fi
19983  fi
19984
19985      # Now join together the path and the arguments once again
19986      if test "x$arguments" != xEOL; then
19987        new_complete="$new_path ${arguments% *}"
19988      else
19989        new_complete="$new_path"
19990      fi
19991
19992  if test "x$complete" != "x$new_complete"; then
19993      PROPER_COMPILER_CC="$new_complete"
19994      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19995$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19996    fi
19997
19998    PATH="$RETRY_COMPILER_SAVED_PATH"
19999
20000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20001$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20002
20003    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20004        # Follow a chain of symbolic links. Use readlink
20005        # where it exists, else fall back to horribly
20006        # complicated shell code.
20007        if test "x$READLINK_TESTED" != yes; then
20008            # On MacOSX there is a readlink tool with a different
20009            # purpose than the GNU readlink tool. Check the found readlink.
20010            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20011            if test "x$ISGNU" = x; then
20012                 # A readlink that we do not know how to use.
20013                 # Are there other non-GNU readlinks out there?
20014                 READLINK_TESTED=yes
20015                 READLINK=
20016            fi
20017        fi
20018
20019        if test "x$READLINK" != x; then
20020            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20021        else
20022            # Save the current directory for restoring afterwards
20023            STARTDIR=$PWD
20024            COUNTER=0
20025            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20026            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20027            cd $sym_link_dir
20028            # Use -P flag to resolve symlinks in directories.
20029            cd `$THEPWDCMD -P`
20030            sym_link_dir=`$THEPWDCMD -P`
20031            # Resolve file symlinks
20032            while test $COUNTER -lt 20; do
20033                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20034                if test "x$ISLINK" == x; then
20035                    # This is not a symbolic link! We are done!
20036                    break
20037                fi
20038                # Again resolve directory symlinks since the target of the just found
20039                # link could be in a different directory
20040                cd `$DIRNAME $ISLINK`
20041                sym_link_dir=`$THEPWDCMD -P`
20042                sym_link_file=`$BASENAME $ISLINK`
20043                let COUNTER=COUNTER+1
20044            done
20045            cd $STARTDIR
20046            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20047        fi
20048    fi
20049
20050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20051$as_echo "$PROPER_COMPILER_CC" >&6; }
20052    CC="$PROPER_COMPILER_CC"
20053  else
20054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20055$as_echo "no, keeping CC" >&6; }
20056    CC="$TEST_COMPILER"
20057  fi
20058
20059  COMPILER=$CC
20060  COMPILER_NAME=$COMPILER_NAME
20061
20062  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20063    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20064    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20065    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20066    if test $? -ne 0; then
20067      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20068
20069      { $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
20070$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20071      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20072$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20073      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20074    else
20075      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20076      COMPILER_VENDOR="Sun Studio"
20077    fi
20078  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20079    # First line typically looks something like:
20080    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20081    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20082    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20083    COMPILER_VENDOR="Microsoft CL.EXE"
20084    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20085    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20086      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20087        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20088      fi
20089    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20090      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20091        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20092      fi
20093    fi
20094  else
20095    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20096    # Check that this is likely to be GCC.
20097    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20098    if test $? -ne 0; then
20099      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20100$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20101      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20102$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20103      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20104    fi
20105
20106    # First line typically looks something like:
20107    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20108    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20109    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20110  fi
20111  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20112  CC_VERSION="$COMPILER_VERSION"
20113  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20114  CC_VENDOR="$COMPILER_VENDOR"
20115
20116  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20117$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20118
20119
20120# Now that we have resolved CC ourself, let autoconf have its go at it
20121ac_ext=c
20122ac_cpp='$CPP $CPPFLAGS'
20123ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20124ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20125ac_compiler_gnu=$ac_cv_c_compiler_gnu
20126if test -n "$ac_tool_prefix"; then
20127  for ac_prog in $CC
20128  do
20129    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20130set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20132$as_echo_n "checking for $ac_word... " >&6; }
20133if ${ac_cv_prog_CC+:} false; then :
20134  $as_echo_n "(cached) " >&6
20135else
20136  if test -n "$CC"; then
20137  ac_cv_prog_CC="$CC" # Let the user override the test.
20138else
20139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20140for as_dir in $PATH
20141do
20142  IFS=$as_save_IFS
20143  test -z "$as_dir" && as_dir=.
20144    for ac_exec_ext in '' $ac_executable_extensions; do
20145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20146    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20148    break 2
20149  fi
20150done
20151  done
20152IFS=$as_save_IFS
20153
20154fi
20155fi
20156CC=$ac_cv_prog_CC
20157if test -n "$CC"; then
20158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20159$as_echo "$CC" >&6; }
20160else
20161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20162$as_echo "no" >&6; }
20163fi
20164
20165
20166    test -n "$CC" && break
20167  done
20168fi
20169if test -z "$CC"; then
20170  ac_ct_CC=$CC
20171  for ac_prog in $CC
20172do
20173  # Extract the first word of "$ac_prog", so it can be a program name with args.
20174set dummy $ac_prog; ac_word=$2
20175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20176$as_echo_n "checking for $ac_word... " >&6; }
20177if ${ac_cv_prog_ac_ct_CC+:} false; then :
20178  $as_echo_n "(cached) " >&6
20179else
20180  if test -n "$ac_ct_CC"; then
20181  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20182else
20183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20184for as_dir in $PATH
20185do
20186  IFS=$as_save_IFS
20187  test -z "$as_dir" && as_dir=.
20188    for ac_exec_ext in '' $ac_executable_extensions; do
20189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20190    ac_cv_prog_ac_ct_CC="$ac_prog"
20191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20192    break 2
20193  fi
20194done
20195  done
20196IFS=$as_save_IFS
20197
20198fi
20199fi
20200ac_ct_CC=$ac_cv_prog_ac_ct_CC
20201if test -n "$ac_ct_CC"; then
20202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20203$as_echo "$ac_ct_CC" >&6; }
20204else
20205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20206$as_echo "no" >&6; }
20207fi
20208
20209
20210  test -n "$ac_ct_CC" && break
20211done
20212
20213  if test "x$ac_ct_CC" = x; then
20214    CC=""
20215  else
20216    case $cross_compiling:$ac_tool_warned in
20217yes:)
20218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20220ac_tool_warned=yes ;;
20221esac
20222    CC=$ac_ct_CC
20223  fi
20224fi
20225
20226
20227test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20229as_fn_error $? "no acceptable C compiler found in \$PATH
20230See \`config.log' for more details" "$LINENO" 5; }
20231
20232# Provide some information about the compiler.
20233$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20234set X $ac_compile
20235ac_compiler=$2
20236for ac_option in --version -v -V -qversion; do
20237  { { ac_try="$ac_compiler $ac_option >&5"
20238case "(($ac_try" in
20239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20240  *) ac_try_echo=$ac_try;;
20241esac
20242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20243$as_echo "$ac_try_echo"; } >&5
20244  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20245  ac_status=$?
20246  if test -s conftest.err; then
20247    sed '10a\
20248... rest of stderr output deleted ...
20249         10q' conftest.err >conftest.er1
20250    cat conftest.er1 >&5
20251  fi
20252  rm -f conftest.er1 conftest.err
20253  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20254  test $ac_status = 0; }
20255done
20256
20257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20258/* end confdefs.h.  */
20259
20260int
20261main ()
20262{
20263
20264  ;
20265  return 0;
20266}
20267_ACEOF
20268ac_clean_files_save=$ac_clean_files
20269ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20270# Try to create an executable without -o first, disregard a.out.
20271# It will help us diagnose broken compilers, and finding out an intuition
20272# of exeext.
20273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20274$as_echo_n "checking whether the C compiler works... " >&6; }
20275ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20276
20277# The possible output files:
20278ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20279
20280ac_rmfiles=
20281for ac_file in $ac_files
20282do
20283  case $ac_file in
20284    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20285    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20286  esac
20287done
20288rm -f $ac_rmfiles
20289
20290if { { ac_try="$ac_link_default"
20291case "(($ac_try" in
20292  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20293  *) ac_try_echo=$ac_try;;
20294esac
20295eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20296$as_echo "$ac_try_echo"; } >&5
20297  (eval "$ac_link_default") 2>&5
20298  ac_status=$?
20299  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20300  test $ac_status = 0; }; then :
20301  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20302# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20303# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20304# so that the user can short-circuit this test for compilers unknown to
20305# Autoconf.
20306for ac_file in $ac_files ''
20307do
20308  test -f "$ac_file" || continue
20309  case $ac_file in
20310    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20311	;;
20312    [ab].out )
20313	# We found the default executable, but exeext='' is most
20314	# certainly right.
20315	break;;
20316    *.* )
20317	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20318	then :; else
20319	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20320	fi
20321	# We set ac_cv_exeext here because the later test for it is not
20322	# safe: cross compilers may not add the suffix if given an `-o'
20323	# argument, so we may need to know it at that point already.
20324	# Even if this section looks crufty: it has the advantage of
20325	# actually working.
20326	break;;
20327    * )
20328	break;;
20329  esac
20330done
20331test "$ac_cv_exeext" = no && ac_cv_exeext=
20332
20333else
20334  ac_file=''
20335fi
20336if test -z "$ac_file"; then :
20337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20338$as_echo "no" >&6; }
20339$as_echo "$as_me: failed program was:" >&5
20340sed 's/^/| /' conftest.$ac_ext >&5
20341
20342{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20344as_fn_error 77 "C compiler cannot create executables
20345See \`config.log' for more details" "$LINENO" 5; }
20346else
20347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20348$as_echo "yes" >&6; }
20349fi
20350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20351$as_echo_n "checking for C compiler default output file name... " >&6; }
20352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20353$as_echo "$ac_file" >&6; }
20354ac_exeext=$ac_cv_exeext
20355
20356rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20357ac_clean_files=$ac_clean_files_save
20358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20359$as_echo_n "checking for suffix of executables... " >&6; }
20360if { { ac_try="$ac_link"
20361case "(($ac_try" in
20362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20363  *) ac_try_echo=$ac_try;;
20364esac
20365eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20366$as_echo "$ac_try_echo"; } >&5
20367  (eval "$ac_link") 2>&5
20368  ac_status=$?
20369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20370  test $ac_status = 0; }; then :
20371  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20372# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20373# work properly (i.e., refer to `conftest.exe'), while it won't with
20374# `rm'.
20375for ac_file in conftest.exe conftest conftest.*; do
20376  test -f "$ac_file" || continue
20377  case $ac_file in
20378    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20379    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20380	  break;;
20381    * ) break;;
20382  esac
20383done
20384else
20385  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20387as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20388See \`config.log' for more details" "$LINENO" 5; }
20389fi
20390rm -f conftest conftest$ac_cv_exeext
20391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20392$as_echo "$ac_cv_exeext" >&6; }
20393
20394rm -f conftest.$ac_ext
20395EXEEXT=$ac_cv_exeext
20396ac_exeext=$EXEEXT
20397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20398/* end confdefs.h.  */
20399#include <stdio.h>
20400int
20401main ()
20402{
20403FILE *f = fopen ("conftest.out", "w");
20404 return ferror (f) || fclose (f) != 0;
20405
20406  ;
20407  return 0;
20408}
20409_ACEOF
20410ac_clean_files="$ac_clean_files conftest.out"
20411# Check that the compiler produces executables we can run.  If not, either
20412# the compiler is broken, or we cross compile.
20413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20414$as_echo_n "checking whether we are cross compiling... " >&6; }
20415if test "$cross_compiling" != yes; then
20416  { { ac_try="$ac_link"
20417case "(($ac_try" in
20418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20419  *) ac_try_echo=$ac_try;;
20420esac
20421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20422$as_echo "$ac_try_echo"; } >&5
20423  (eval "$ac_link") 2>&5
20424  ac_status=$?
20425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20426  test $ac_status = 0; }
20427  if { ac_try='./conftest$ac_cv_exeext'
20428  { { case "(($ac_try" in
20429  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20430  *) ac_try_echo=$ac_try;;
20431esac
20432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20433$as_echo "$ac_try_echo"; } >&5
20434  (eval "$ac_try") 2>&5
20435  ac_status=$?
20436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20437  test $ac_status = 0; }; }; then
20438    cross_compiling=no
20439  else
20440    if test "$cross_compiling" = maybe; then
20441	cross_compiling=yes
20442    else
20443	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20445as_fn_error $? "cannot run C compiled programs.
20446If you meant to cross compile, use \`--host'.
20447See \`config.log' for more details" "$LINENO" 5; }
20448    fi
20449  fi
20450fi
20451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20452$as_echo "$cross_compiling" >&6; }
20453
20454rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20455ac_clean_files=$ac_clean_files_save
20456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20457$as_echo_n "checking for suffix of object files... " >&6; }
20458if ${ac_cv_objext+:} false; then :
20459  $as_echo_n "(cached) " >&6
20460else
20461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20462/* end confdefs.h.  */
20463
20464int
20465main ()
20466{
20467
20468  ;
20469  return 0;
20470}
20471_ACEOF
20472rm -f conftest.o conftest.obj
20473if { { ac_try="$ac_compile"
20474case "(($ac_try" in
20475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20476  *) ac_try_echo=$ac_try;;
20477esac
20478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20479$as_echo "$ac_try_echo"; } >&5
20480  (eval "$ac_compile") 2>&5
20481  ac_status=$?
20482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20483  test $ac_status = 0; }; then :
20484  for ac_file in conftest.o conftest.obj conftest.*; do
20485  test -f "$ac_file" || continue;
20486  case $ac_file in
20487    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20488    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20489       break;;
20490  esac
20491done
20492else
20493  $as_echo "$as_me: failed program was:" >&5
20494sed 's/^/| /' conftest.$ac_ext >&5
20495
20496{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20498as_fn_error $? "cannot compute suffix of object files: cannot compile
20499See \`config.log' for more details" "$LINENO" 5; }
20500fi
20501rm -f conftest.$ac_cv_objext conftest.$ac_ext
20502fi
20503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20504$as_echo "$ac_cv_objext" >&6; }
20505OBJEXT=$ac_cv_objext
20506ac_objext=$OBJEXT
20507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20508$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20509if ${ac_cv_c_compiler_gnu+:} false; then :
20510  $as_echo_n "(cached) " >&6
20511else
20512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20513/* end confdefs.h.  */
20514
20515int
20516main ()
20517{
20518#ifndef __GNUC__
20519       choke me
20520#endif
20521
20522  ;
20523  return 0;
20524}
20525_ACEOF
20526if ac_fn_c_try_compile "$LINENO"; then :
20527  ac_compiler_gnu=yes
20528else
20529  ac_compiler_gnu=no
20530fi
20531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20532ac_cv_c_compiler_gnu=$ac_compiler_gnu
20533
20534fi
20535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20536$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20537if test $ac_compiler_gnu = yes; then
20538  GCC=yes
20539else
20540  GCC=
20541fi
20542ac_test_CFLAGS=${CFLAGS+set}
20543ac_save_CFLAGS=$CFLAGS
20544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20545$as_echo_n "checking whether $CC accepts -g... " >&6; }
20546if ${ac_cv_prog_cc_g+:} false; then :
20547  $as_echo_n "(cached) " >&6
20548else
20549  ac_save_c_werror_flag=$ac_c_werror_flag
20550   ac_c_werror_flag=yes
20551   ac_cv_prog_cc_g=no
20552   CFLAGS="-g"
20553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20554/* end confdefs.h.  */
20555
20556int
20557main ()
20558{
20559
20560  ;
20561  return 0;
20562}
20563_ACEOF
20564if ac_fn_c_try_compile "$LINENO"; then :
20565  ac_cv_prog_cc_g=yes
20566else
20567  CFLAGS=""
20568      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20569/* end confdefs.h.  */
20570
20571int
20572main ()
20573{
20574
20575  ;
20576  return 0;
20577}
20578_ACEOF
20579if ac_fn_c_try_compile "$LINENO"; then :
20580
20581else
20582  ac_c_werror_flag=$ac_save_c_werror_flag
20583	 CFLAGS="-g"
20584	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20585/* end confdefs.h.  */
20586
20587int
20588main ()
20589{
20590
20591  ;
20592  return 0;
20593}
20594_ACEOF
20595if ac_fn_c_try_compile "$LINENO"; then :
20596  ac_cv_prog_cc_g=yes
20597fi
20598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20599fi
20600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20601fi
20602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20603   ac_c_werror_flag=$ac_save_c_werror_flag
20604fi
20605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20606$as_echo "$ac_cv_prog_cc_g" >&6; }
20607if test "$ac_test_CFLAGS" = set; then
20608  CFLAGS=$ac_save_CFLAGS
20609elif test $ac_cv_prog_cc_g = yes; then
20610  if test "$GCC" = yes; then
20611    CFLAGS="-g -O2"
20612  else
20613    CFLAGS="-g"
20614  fi
20615else
20616  if test "$GCC" = yes; then
20617    CFLAGS="-O2"
20618  else
20619    CFLAGS=
20620  fi
20621fi
20622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20623$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20624if ${ac_cv_prog_cc_c89+:} false; then :
20625  $as_echo_n "(cached) " >&6
20626else
20627  ac_cv_prog_cc_c89=no
20628ac_save_CC=$CC
20629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20630/* end confdefs.h.  */
20631#include <stdarg.h>
20632#include <stdio.h>
20633struct stat;
20634/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20635struct buf { int x; };
20636FILE * (*rcsopen) (struct buf *, struct stat *, int);
20637static char *e (p, i)
20638     char **p;
20639     int i;
20640{
20641  return p[i];
20642}
20643static char *f (char * (*g) (char **, int), char **p, ...)
20644{
20645  char *s;
20646  va_list v;
20647  va_start (v,p);
20648  s = g (p, va_arg (v,int));
20649  va_end (v);
20650  return s;
20651}
20652
20653/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20654   function prototypes and stuff, but not '\xHH' hex character constants.
20655   These don't provoke an error unfortunately, instead are silently treated
20656   as 'x'.  The following induces an error, until -std is added to get
20657   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20658   array size at least.  It's necessary to write '\x00'==0 to get something
20659   that's true only with -std.  */
20660int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20661
20662/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20663   inside strings and character constants.  */
20664#define FOO(x) 'x'
20665int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20666
20667int test (int i, double x);
20668struct s1 {int (*f) (int a);};
20669struct s2 {int (*f) (double a);};
20670int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20671int argc;
20672char **argv;
20673int
20674main ()
20675{
20676return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20677  ;
20678  return 0;
20679}
20680_ACEOF
20681for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20682	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20683do
20684  CC="$ac_save_CC $ac_arg"
20685  if ac_fn_c_try_compile "$LINENO"; then :
20686  ac_cv_prog_cc_c89=$ac_arg
20687fi
20688rm -f core conftest.err conftest.$ac_objext
20689  test "x$ac_cv_prog_cc_c89" != "xno" && break
20690done
20691rm -f conftest.$ac_ext
20692CC=$ac_save_CC
20693
20694fi
20695# AC_CACHE_VAL
20696case "x$ac_cv_prog_cc_c89" in
20697  x)
20698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20699$as_echo "none needed" >&6; } ;;
20700  xno)
20701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20702$as_echo "unsupported" >&6; } ;;
20703  *)
20704    CC="$CC $ac_cv_prog_cc_c89"
20705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20706$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20707esac
20708if test "x$ac_cv_prog_cc_c89" != xno; then :
20709
20710fi
20711
20712ac_ext=cpp
20713ac_cpp='$CXXCPP $CPPFLAGS'
20714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20717
20718
20719### Locate C++ compiler (CXX)
20720
20721if test "x$CXX" != x; then
20722  COMPILER_CHECK_LIST="$CXX"
20723elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20724  COMPILER_CHECK_LIST="cl"
20725elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20726  COMPILER_CHECK_LIST="CC g++"
20727else
20728  COMPILER_CHECK_LIST="g++ CC"
20729fi
20730
20731
20732  COMPILER_NAME=C++
20733
20734  CXX=
20735  # If TOOLS_DIR is set, check for all compiler names in there first
20736  # before checking the rest of the PATH.
20737  if test -n "$TOOLS_DIR"; then
20738    PATH_save="$PATH"
20739    PATH="$TOOLS_DIR"
20740    for ac_prog in $COMPILER_CHECK_LIST
20741do
20742  # Extract the first word of "$ac_prog", so it can be a program name with args.
20743set dummy $ac_prog; ac_word=$2
20744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20745$as_echo_n "checking for $ac_word... " >&6; }
20746if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20747  $as_echo_n "(cached) " >&6
20748else
20749  case $TOOLS_DIR_CXX in
20750  [\\/]* | ?:[\\/]*)
20751  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20752  ;;
20753  *)
20754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20755for as_dir in $PATH
20756do
20757  IFS=$as_save_IFS
20758  test -z "$as_dir" && as_dir=.
20759    for ac_exec_ext in '' $ac_executable_extensions; do
20760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20761    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20763    break 2
20764  fi
20765done
20766  done
20767IFS=$as_save_IFS
20768
20769  ;;
20770esac
20771fi
20772TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20773if test -n "$TOOLS_DIR_CXX"; then
20774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20775$as_echo "$TOOLS_DIR_CXX" >&6; }
20776else
20777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20778$as_echo "no" >&6; }
20779fi
20780
20781
20782  test -n "$TOOLS_DIR_CXX" && break
20783done
20784
20785    CXX=$TOOLS_DIR_CXX
20786    PATH="$PATH_save"
20787  fi
20788
20789  # AC_PATH_PROGS can't be run multiple times with the same variable,
20790  # so create a new name for this run.
20791  if test "x$CXX" = x; then
20792    for ac_prog in $COMPILER_CHECK_LIST
20793do
20794  # Extract the first word of "$ac_prog", so it can be a program name with args.
20795set dummy $ac_prog; ac_word=$2
20796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20797$as_echo_n "checking for $ac_word... " >&6; }
20798if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20799  $as_echo_n "(cached) " >&6
20800else
20801  case $POTENTIAL_CXX in
20802  [\\/]* | ?:[\\/]*)
20803  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20804  ;;
20805  *)
20806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20807for as_dir in $PATH
20808do
20809  IFS=$as_save_IFS
20810  test -z "$as_dir" && as_dir=.
20811    for ac_exec_ext in '' $ac_executable_extensions; do
20812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20813    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20815    break 2
20816  fi
20817done
20818  done
20819IFS=$as_save_IFS
20820
20821  ;;
20822esac
20823fi
20824POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20825if test -n "$POTENTIAL_CXX"; then
20826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20827$as_echo "$POTENTIAL_CXX" >&6; }
20828else
20829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20830$as_echo "no" >&6; }
20831fi
20832
20833
20834  test -n "$POTENTIAL_CXX" && break
20835done
20836
20837    CXX=$POTENTIAL_CXX
20838  fi
20839
20840  if test "x$CXX" = x; then
20841
20842    # Print a helpful message on how to acquire the necessary build dependency.
20843    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20844    MISSING_DEPENDENCY=devkit
20845    PKGHANDLER_COMMAND=
20846
20847    case $PKGHANDLER in
20848	apt-get)
20849                apt_help     $MISSING_DEPENDENCY ;;
20850    yum)
20851                yum_help     $MISSING_DEPENDENCY ;;
20852	port)
20853                port_help    $MISSING_DEPENDENCY ;;
20854	pkgutil)
20855                pkgutil_help $MISSING_DEPENDENCY ;;
20856	pkgadd)
20857                pkgadd_help  $MISSING_DEPENDENCY ;;
20858    * )
20859      break ;;
20860    esac
20861
20862    if test "x$PKGHANDLER_COMMAND" != x; then
20863        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20864    fi
20865
20866      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20867  fi
20868
20869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20870
20871  # First separate the path from the arguments. This will split at the first
20872  # space.
20873  complete="$CXX"
20874  path="${complete%% *}"
20875  tmp="$complete EOL"
20876  arguments="${tmp#* }"
20877
20878  # Input might be given as Windows format, start by converting to
20879  # unix format.
20880  new_path=`$CYGPATH -u "$path"`
20881
20882  # Now try to locate executable using which
20883  new_path=`$WHICH "$new_path" 2> /dev/null`
20884  # bat and cmd files are not always considered executable in cygwin causing which
20885  # to not find them
20886  if test "x$new_path" = x \
20887           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20888           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20889    new_path=`$CYGPATH -u "$path"`
20890  fi
20891  if test "x$new_path" = x; then
20892    # Oops. Which didn't find the executable.
20893    # The splitting of arguments from the executable at a space might have been incorrect,
20894    # since paths with space are more likely in Windows. Give it another try with the whole
20895    # argument.
20896    path="$complete"
20897    arguments="EOL"
20898    new_path=`$CYGPATH -u "$path"`
20899    new_path=`$WHICH "$new_path" 2> /dev/null`
20900    # bat and cmd files are not always considered executable in cygwin causing which
20901    # to not find them
20902    if test "x$new_path" = x \
20903             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20904             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20905      new_path=`$CYGPATH -u "$path"`
20906    fi
20907    if test "x$new_path" = x; then
20908      # It's still not found. Now this is an unrecoverable error.
20909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20910$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20911      has_space=`$ECHO "$complete" | $GREP " "`
20912      if test "x$has_space" != x; then
20913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20915      fi
20916      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20917    fi
20918  fi
20919
20920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20923  # "foo.exe" is OK but "foo" is an error.
20924  #
20925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20926  # It is also a way to make sure we got the proper file name for the real test later on.
20927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20928  if test "x$test_shortpath" = x; then
20929    # Short path failed, file does not exist as specified.
20930    # Try adding .exe or .cmd
20931    if test -f "${new_path}.exe"; then
20932       input_to_shortpath="${new_path}.exe"
20933    elif test -f "${new_path}.cmd"; then
20934       input_to_shortpath="${new_path}.cmd"
20935    else
20936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20937$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20938      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20939$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20940      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20941    fi
20942  else
20943    input_to_shortpath="$new_path"
20944  fi
20945
20946  # Call helper function which possibly converts this using DOS-style short mode.
20947  # If so, the updated path is stored in $new_path.
20948  new_path="$input_to_shortpath"
20949
20950  input_path="$input_to_shortpath"
20951  # Check if we need to convert this using DOS-style short mode. If the path
20952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20953  # take no chances and rewrite it.
20954  # Note: m4 eats our [], so we need to use [ and ] instead.
20955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20956  if test "x$has_forbidden_chars" != x; then
20957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20961      # Going to short mode and back again did indeed matter. Since short mode is
20962      # case insensitive, let's make it lowercase to improve readability.
20963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20964      # Now convert it back to Unix-stile (cygpath)
20965      input_path=`$CYGPATH -u "$shortmode_path"`
20966      new_path="$input_path"
20967    fi
20968  fi
20969
20970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20971  if test "x$test_cygdrive_prefix" = x; then
20972    # As a simple fix, exclude /usr/bin since it's not a real path.
20973    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20975      # a path prefixed by /cygdrive for fixpath to work.
20976      new_path="$CYGWIN_ROOT_PATH$input_path"
20977    fi
20978  fi
20979
20980  # remove trailing .exe if any
20981  new_path="${new_path/%.exe/}"
20982
20983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20984
20985  # First separate the path from the arguments. This will split at the first
20986  # space.
20987  complete="$CXX"
20988  path="${complete%% *}"
20989  tmp="$complete EOL"
20990  arguments="${tmp#* }"
20991
20992  # Input might be given as Windows format, start by converting to
20993  # unix format.
20994  new_path="$path"
20995
20996  windows_path="$new_path"
20997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20998    unix_path=`$CYGPATH -u "$windows_path"`
20999    new_path="$unix_path"
21000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21002    new_path="$unix_path"
21003  fi
21004
21005
21006  # Now try to locate executable using which
21007  new_path=`$WHICH "$new_path" 2> /dev/null`
21008
21009  if test "x$new_path" = x; then
21010    # Oops. Which didn't find the executable.
21011    # The splitting of arguments from the executable at a space might have been incorrect,
21012    # since paths with space are more likely in Windows. Give it another try with the whole
21013    # argument.
21014    path="$complete"
21015    arguments="EOL"
21016    new_path="$path"
21017
21018  windows_path="$new_path"
21019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21020    unix_path=`$CYGPATH -u "$windows_path"`
21021    new_path="$unix_path"
21022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21024    new_path="$unix_path"
21025  fi
21026
21027
21028    new_path=`$WHICH "$new_path" 2> /dev/null`
21029
21030    if test "x$new_path" = x; then
21031      # It's still not found. Now this is an unrecoverable error.
21032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21033$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21034      has_space=`$ECHO "$complete" | $GREP " "`
21035      if test "x$has_space" != x; then
21036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21038      fi
21039      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21040    fi
21041  fi
21042
21043  # Now new_path has a complete unix path to the binary
21044  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21045    # Keep paths in /bin as-is, but remove trailing .exe if any
21046    new_path="${new_path/%.exe/}"
21047    # Do not save /bin paths to all_fixpath_prefixes!
21048  else
21049    # Not in mixed or Windows style, start by that.
21050    new_path=`cmd //c echo $new_path`
21051
21052  input_path="$new_path"
21053  # Check if we need to convert this using DOS-style short mode. If the path
21054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21055  # take no chances and rewrite it.
21056  # Note: m4 eats our [], so we need to use [ and ] instead.
21057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21058  if test "x$has_forbidden_chars" != x; then
21059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21061  fi
21062
21063    # Output is in $new_path
21064
21065  windows_path="$new_path"
21066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21067    unix_path=`$CYGPATH -u "$windows_path"`
21068    new_path="$unix_path"
21069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21071    new_path="$unix_path"
21072  fi
21073
21074    # remove trailing .exe if any
21075    new_path="${new_path/%.exe/}"
21076
21077    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21078    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21079  fi
21080
21081  else
21082    # We're on a posix platform. Hooray! :)
21083    # First separate the path from the arguments. This will split at the first
21084    # space.
21085    complete="$CXX"
21086    path="${complete%% *}"
21087    tmp="$complete EOL"
21088    arguments="${tmp#* }"
21089
21090    # Cannot rely on the command "which" here since it doesn't always work.
21091    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21092    if test -z "$is_absolute_path"; then
21093      # Path to executable is not absolute. Find it.
21094      IFS_save="$IFS"
21095      IFS=:
21096      for p in $PATH; do
21097        if test -f "$p/$path" && test -x "$p/$path"; then
21098          new_path="$p/$path"
21099          break
21100        fi
21101      done
21102      IFS="$IFS_save"
21103    else
21104      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21105$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21106      new_path="$path"
21107    fi
21108
21109    if test "x$new_path" = x; then
21110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21111$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21112        has_space=`$ECHO "$complete" | $GREP " "`
21113        if test "x$has_space" != x; then
21114          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21116        fi
21117        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21118      fi
21119  fi
21120
21121      # Now join together the path and the arguments once again
21122      if test "x$arguments" != xEOL; then
21123        new_complete="$new_path ${arguments% *}"
21124      else
21125        new_complete="$new_path"
21126      fi
21127
21128  if test "x$complete" != "x$new_complete"; then
21129      CXX="$new_complete"
21130      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21131$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21132    fi
21133
21134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21135$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21136  TEST_COMPILER="$CXX"
21137
21138    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21139        # Follow a chain of symbolic links. Use readlink
21140        # where it exists, else fall back to horribly
21141        # complicated shell code.
21142        if test "x$READLINK_TESTED" != yes; then
21143            # On MacOSX there is a readlink tool with a different
21144            # purpose than the GNU readlink tool. Check the found readlink.
21145            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21146            if test "x$ISGNU" = x; then
21147                 # A readlink that we do not know how to use.
21148                 # Are there other non-GNU readlinks out there?
21149                 READLINK_TESTED=yes
21150                 READLINK=
21151            fi
21152        fi
21153
21154        if test "x$READLINK" != x; then
21155            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21156        else
21157            # Save the current directory for restoring afterwards
21158            STARTDIR=$PWD
21159            COUNTER=0
21160            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21161            sym_link_file=`$BASENAME $TEST_COMPILER`
21162            cd $sym_link_dir
21163            # Use -P flag to resolve symlinks in directories.
21164            cd `$THEPWDCMD -P`
21165            sym_link_dir=`$THEPWDCMD -P`
21166            # Resolve file symlinks
21167            while test $COUNTER -lt 20; do
21168                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21169                if test "x$ISLINK" == x; then
21170                    # This is not a symbolic link! We are done!
21171                    break
21172                fi
21173                # Again resolve directory symlinks since the target of the just found
21174                # link could be in a different directory
21175                cd `$DIRNAME $ISLINK`
21176                sym_link_dir=`$THEPWDCMD -P`
21177                sym_link_file=`$BASENAME $ISLINK`
21178                let COUNTER=COUNTER+1
21179            done
21180            cd $STARTDIR
21181            TEST_COMPILER=$sym_link_dir/$sym_link_file
21182        fi
21183    fi
21184
21185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21186$as_echo "$TEST_COMPILER" >&6; }
21187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21188$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21189
21190  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21191  if test "x$COMPILER_BASENAME" = "xccache"; then
21192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21193$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21194    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21195    # We want to control ccache invocation ourselves, so ignore this cc and try
21196    # searching again.
21197
21198    # Remove the path to the fake ccache cc from the PATH
21199    RETRY_COMPILER_SAVED_PATH="$PATH"
21200    COMPILER_DIRNAME=`$DIRNAME $CXX`
21201    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21202
21203    # Try again looking for our compiler
21204    if test -n "$ac_tool_prefix"; then
21205  for ac_prog in $COMPILER_CHECK_LIST
21206  do
21207    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21208set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21210$as_echo_n "checking for $ac_word... " >&6; }
21211if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21212  $as_echo_n "(cached) " >&6
21213else
21214  if test -n "$PROPER_COMPILER_CXX"; then
21215  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21216else
21217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21218for as_dir in $PATH
21219do
21220  IFS=$as_save_IFS
21221  test -z "$as_dir" && as_dir=.
21222    for ac_exec_ext in '' $ac_executable_extensions; do
21223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21224    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21226    break 2
21227  fi
21228done
21229  done
21230IFS=$as_save_IFS
21231
21232fi
21233fi
21234PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21235if test -n "$PROPER_COMPILER_CXX"; then
21236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21237$as_echo "$PROPER_COMPILER_CXX" >&6; }
21238else
21239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21240$as_echo "no" >&6; }
21241fi
21242
21243
21244    test -n "$PROPER_COMPILER_CXX" && break
21245  done
21246fi
21247if test -z "$PROPER_COMPILER_CXX"; then
21248  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21249  for ac_prog in $COMPILER_CHECK_LIST
21250do
21251  # Extract the first word of "$ac_prog", so it can be a program name with args.
21252set dummy $ac_prog; ac_word=$2
21253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21254$as_echo_n "checking for $ac_word... " >&6; }
21255if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21256  $as_echo_n "(cached) " >&6
21257else
21258  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21259  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21260else
21261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21262for as_dir in $PATH
21263do
21264  IFS=$as_save_IFS
21265  test -z "$as_dir" && as_dir=.
21266    for ac_exec_ext in '' $ac_executable_extensions; do
21267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21268    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21270    break 2
21271  fi
21272done
21273  done
21274IFS=$as_save_IFS
21275
21276fi
21277fi
21278ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21279if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21281$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21282else
21283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21284$as_echo "no" >&6; }
21285fi
21286
21287
21288  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21289done
21290
21291  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21292    PROPER_COMPILER_CXX=""
21293  else
21294    case $cross_compiling:$ac_tool_warned in
21295yes:)
21296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21298ac_tool_warned=yes ;;
21299esac
21300    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21301  fi
21302fi
21303
21304
21305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21306
21307  # First separate the path from the arguments. This will split at the first
21308  # space.
21309  complete="$PROPER_COMPILER_CXX"
21310  path="${complete%% *}"
21311  tmp="$complete EOL"
21312  arguments="${tmp#* }"
21313
21314  # Input might be given as Windows format, start by converting to
21315  # unix format.
21316  new_path=`$CYGPATH -u "$path"`
21317
21318  # Now try to locate executable using which
21319  new_path=`$WHICH "$new_path" 2> /dev/null`
21320  # bat and cmd files are not always considered executable in cygwin causing which
21321  # to not find them
21322  if test "x$new_path" = x \
21323           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21324           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21325    new_path=`$CYGPATH -u "$path"`
21326  fi
21327  if test "x$new_path" = x; then
21328    # Oops. Which didn't find the executable.
21329    # The splitting of arguments from the executable at a space might have been incorrect,
21330    # since paths with space are more likely in Windows. Give it another try with the whole
21331    # argument.
21332    path="$complete"
21333    arguments="EOL"
21334    new_path=`$CYGPATH -u "$path"`
21335    new_path=`$WHICH "$new_path" 2> /dev/null`
21336    # bat and cmd files are not always considered executable in cygwin causing which
21337    # to not find them
21338    if test "x$new_path" = x \
21339             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21340             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21341      new_path=`$CYGPATH -u "$path"`
21342    fi
21343    if test "x$new_path" = x; then
21344      # It's still not found. Now this is an unrecoverable error.
21345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21346$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21347      has_space=`$ECHO "$complete" | $GREP " "`
21348      if test "x$has_space" != x; then
21349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21351      fi
21352      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21353    fi
21354  fi
21355
21356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21359  # "foo.exe" is OK but "foo" is an error.
21360  #
21361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21362  # It is also a way to make sure we got the proper file name for the real test later on.
21363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21364  if test "x$test_shortpath" = x; then
21365    # Short path failed, file does not exist as specified.
21366    # Try adding .exe or .cmd
21367    if test -f "${new_path}.exe"; then
21368       input_to_shortpath="${new_path}.exe"
21369    elif test -f "${new_path}.cmd"; then
21370       input_to_shortpath="${new_path}.cmd"
21371    else
21372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21373$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21376      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21377    fi
21378  else
21379    input_to_shortpath="$new_path"
21380  fi
21381
21382  # Call helper function which possibly converts this using DOS-style short mode.
21383  # If so, the updated path is stored in $new_path.
21384  new_path="$input_to_shortpath"
21385
21386  input_path="$input_to_shortpath"
21387  # Check if we need to convert this using DOS-style short mode. If the path
21388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21389  # take no chances and rewrite it.
21390  # Note: m4 eats our [], so we need to use [ and ] instead.
21391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21392  if test "x$has_forbidden_chars" != x; then
21393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21397      # Going to short mode and back again did indeed matter. Since short mode is
21398      # case insensitive, let's make it lowercase to improve readability.
21399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21400      # Now convert it back to Unix-stile (cygpath)
21401      input_path=`$CYGPATH -u "$shortmode_path"`
21402      new_path="$input_path"
21403    fi
21404  fi
21405
21406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21407  if test "x$test_cygdrive_prefix" = x; then
21408    # As a simple fix, exclude /usr/bin since it's not a real path.
21409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21411      # a path prefixed by /cygdrive for fixpath to work.
21412      new_path="$CYGWIN_ROOT_PATH$input_path"
21413    fi
21414  fi
21415
21416  # remove trailing .exe if any
21417  new_path="${new_path/%.exe/}"
21418
21419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21420
21421  # First separate the path from the arguments. This will split at the first
21422  # space.
21423  complete="$PROPER_COMPILER_CXX"
21424  path="${complete%% *}"
21425  tmp="$complete EOL"
21426  arguments="${tmp#* }"
21427
21428  # Input might be given as Windows format, start by converting to
21429  # unix format.
21430  new_path="$path"
21431
21432  windows_path="$new_path"
21433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21434    unix_path=`$CYGPATH -u "$windows_path"`
21435    new_path="$unix_path"
21436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21438    new_path="$unix_path"
21439  fi
21440
21441
21442  # Now try to locate executable using which
21443  new_path=`$WHICH "$new_path" 2> /dev/null`
21444
21445  if test "x$new_path" = x; then
21446    # Oops. Which didn't find the executable.
21447    # The splitting of arguments from the executable at a space might have been incorrect,
21448    # since paths with space are more likely in Windows. Give it another try with the whole
21449    # argument.
21450    path="$complete"
21451    arguments="EOL"
21452    new_path="$path"
21453
21454  windows_path="$new_path"
21455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21456    unix_path=`$CYGPATH -u "$windows_path"`
21457    new_path="$unix_path"
21458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21460    new_path="$unix_path"
21461  fi
21462
21463
21464    new_path=`$WHICH "$new_path" 2> /dev/null`
21465
21466    if test "x$new_path" = x; then
21467      # It's still not found. Now this is an unrecoverable error.
21468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21469$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21470      has_space=`$ECHO "$complete" | $GREP " "`
21471      if test "x$has_space" != x; then
21472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21474      fi
21475      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21476    fi
21477  fi
21478
21479  # Now new_path has a complete unix path to the binary
21480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21481    # Keep paths in /bin as-is, but remove trailing .exe if any
21482    new_path="${new_path/%.exe/}"
21483    # Do not save /bin paths to all_fixpath_prefixes!
21484  else
21485    # Not in mixed or Windows style, start by that.
21486    new_path=`cmd //c echo $new_path`
21487
21488  input_path="$new_path"
21489  # Check if we need to convert this using DOS-style short mode. If the path
21490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21491  # take no chances and rewrite it.
21492  # Note: m4 eats our [], so we need to use [ and ] instead.
21493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21494  if test "x$has_forbidden_chars" != x; then
21495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21497  fi
21498
21499    # Output is in $new_path
21500
21501  windows_path="$new_path"
21502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21503    unix_path=`$CYGPATH -u "$windows_path"`
21504    new_path="$unix_path"
21505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21507    new_path="$unix_path"
21508  fi
21509
21510    # remove trailing .exe if any
21511    new_path="${new_path/%.exe/}"
21512
21513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21515  fi
21516
21517  else
21518    # We're on a posix platform. Hooray! :)
21519    # First separate the path from the arguments. This will split at the first
21520    # space.
21521    complete="$PROPER_COMPILER_CXX"
21522    path="${complete%% *}"
21523    tmp="$complete EOL"
21524    arguments="${tmp#* }"
21525
21526    # Cannot rely on the command "which" here since it doesn't always work.
21527    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21528    if test -z "$is_absolute_path"; then
21529      # Path to executable is not absolute. Find it.
21530      IFS_save="$IFS"
21531      IFS=:
21532      for p in $PATH; do
21533        if test -f "$p/$path" && test -x "$p/$path"; then
21534          new_path="$p/$path"
21535          break
21536        fi
21537      done
21538      IFS="$IFS_save"
21539    else
21540      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21541$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21542      new_path="$path"
21543    fi
21544
21545    if test "x$new_path" = x; then
21546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21547$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21548        has_space=`$ECHO "$complete" | $GREP " "`
21549        if test "x$has_space" != x; then
21550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21552        fi
21553        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21554      fi
21555  fi
21556
21557      # Now join together the path and the arguments once again
21558      if test "x$arguments" != xEOL; then
21559        new_complete="$new_path ${arguments% *}"
21560      else
21561        new_complete="$new_path"
21562      fi
21563
21564  if test "x$complete" != "x$new_complete"; then
21565      PROPER_COMPILER_CXX="$new_complete"
21566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21567$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21568    fi
21569
21570    PATH="$RETRY_COMPILER_SAVED_PATH"
21571
21572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21573$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21574
21575    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21576        # Follow a chain of symbolic links. Use readlink
21577        # where it exists, else fall back to horribly
21578        # complicated shell code.
21579        if test "x$READLINK_TESTED" != yes; then
21580            # On MacOSX there is a readlink tool with a different
21581            # purpose than the GNU readlink tool. Check the found readlink.
21582            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21583            if test "x$ISGNU" = x; then
21584                 # A readlink that we do not know how to use.
21585                 # Are there other non-GNU readlinks out there?
21586                 READLINK_TESTED=yes
21587                 READLINK=
21588            fi
21589        fi
21590
21591        if test "x$READLINK" != x; then
21592            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21593        else
21594            # Save the current directory for restoring afterwards
21595            STARTDIR=$PWD
21596            COUNTER=0
21597            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21598            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21599            cd $sym_link_dir
21600            # Use -P flag to resolve symlinks in directories.
21601            cd `$THEPWDCMD -P`
21602            sym_link_dir=`$THEPWDCMD -P`
21603            # Resolve file symlinks
21604            while test $COUNTER -lt 20; do
21605                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21606                if test "x$ISLINK" == x; then
21607                    # This is not a symbolic link! We are done!
21608                    break
21609                fi
21610                # Again resolve directory symlinks since the target of the just found
21611                # link could be in a different directory
21612                cd `$DIRNAME $ISLINK`
21613                sym_link_dir=`$THEPWDCMD -P`
21614                sym_link_file=`$BASENAME $ISLINK`
21615                let COUNTER=COUNTER+1
21616            done
21617            cd $STARTDIR
21618            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21619        fi
21620    fi
21621
21622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21623$as_echo "$PROPER_COMPILER_CXX" >&6; }
21624    CXX="$PROPER_COMPILER_CXX"
21625  else
21626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21627$as_echo "no, keeping CXX" >&6; }
21628    CXX="$TEST_COMPILER"
21629  fi
21630
21631  COMPILER=$CXX
21632  COMPILER_NAME=$COMPILER_NAME
21633
21634  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21635    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21636    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21637    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21638    if test $? -ne 0; then
21639      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21640
21641      { $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
21642$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21643      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21644$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21645      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21646    else
21647      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21648      COMPILER_VENDOR="Sun Studio"
21649    fi
21650  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21651    # First line typically looks something like:
21652    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21653    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21654    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21655    COMPILER_VENDOR="Microsoft CL.EXE"
21656    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21657    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21658      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21659        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21660      fi
21661    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21662      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21663        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21664      fi
21665    fi
21666  else
21667    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21668    # Check that this is likely to be GCC.
21669    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21670    if test $? -ne 0; then
21671      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21674$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21675      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21676    fi
21677
21678    # First line typically looks something like:
21679    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21680    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21681    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21682  fi
21683  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21684  CXX_VERSION="$COMPILER_VERSION"
21685  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21686  CXX_VENDOR="$COMPILER_VENDOR"
21687
21688  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21689$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21690
21691
21692# Now that we have resolved CXX ourself, let autoconf have its go at it
21693ac_ext=cpp
21694ac_cpp='$CXXCPP $CPPFLAGS'
21695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21698if test -z "$CXX"; then
21699  if test -n "$CCC"; then
21700    CXX=$CCC
21701  else
21702    if test -n "$ac_tool_prefix"; then
21703  for ac_prog in $CXX
21704  do
21705    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21706set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21708$as_echo_n "checking for $ac_word... " >&6; }
21709if ${ac_cv_prog_CXX+:} false; then :
21710  $as_echo_n "(cached) " >&6
21711else
21712  if test -n "$CXX"; then
21713  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21714else
21715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21716for as_dir in $PATH
21717do
21718  IFS=$as_save_IFS
21719  test -z "$as_dir" && as_dir=.
21720    for ac_exec_ext in '' $ac_executable_extensions; do
21721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21722    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21724    break 2
21725  fi
21726done
21727  done
21728IFS=$as_save_IFS
21729
21730fi
21731fi
21732CXX=$ac_cv_prog_CXX
21733if test -n "$CXX"; then
21734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21735$as_echo "$CXX" >&6; }
21736else
21737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21738$as_echo "no" >&6; }
21739fi
21740
21741
21742    test -n "$CXX" && break
21743  done
21744fi
21745if test -z "$CXX"; then
21746  ac_ct_CXX=$CXX
21747  for ac_prog in $CXX
21748do
21749  # Extract the first word of "$ac_prog", so it can be a program name with args.
21750set dummy $ac_prog; ac_word=$2
21751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21752$as_echo_n "checking for $ac_word... " >&6; }
21753if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21754  $as_echo_n "(cached) " >&6
21755else
21756  if test -n "$ac_ct_CXX"; then
21757  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21758else
21759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21760for as_dir in $PATH
21761do
21762  IFS=$as_save_IFS
21763  test -z "$as_dir" && as_dir=.
21764    for ac_exec_ext in '' $ac_executable_extensions; do
21765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21766    ac_cv_prog_ac_ct_CXX="$ac_prog"
21767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21768    break 2
21769  fi
21770done
21771  done
21772IFS=$as_save_IFS
21773
21774fi
21775fi
21776ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21777if test -n "$ac_ct_CXX"; then
21778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21779$as_echo "$ac_ct_CXX" >&6; }
21780else
21781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21782$as_echo "no" >&6; }
21783fi
21784
21785
21786  test -n "$ac_ct_CXX" && break
21787done
21788
21789  if test "x$ac_ct_CXX" = x; then
21790    CXX="g++"
21791  else
21792    case $cross_compiling:$ac_tool_warned in
21793yes:)
21794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21796ac_tool_warned=yes ;;
21797esac
21798    CXX=$ac_ct_CXX
21799  fi
21800fi
21801
21802  fi
21803fi
21804# Provide some information about the compiler.
21805$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21806set X $ac_compile
21807ac_compiler=$2
21808for ac_option in --version -v -V -qversion; do
21809  { { ac_try="$ac_compiler $ac_option >&5"
21810case "(($ac_try" in
21811  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21812  *) ac_try_echo=$ac_try;;
21813esac
21814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21815$as_echo "$ac_try_echo"; } >&5
21816  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21817  ac_status=$?
21818  if test -s conftest.err; then
21819    sed '10a\
21820... rest of stderr output deleted ...
21821         10q' conftest.err >conftest.er1
21822    cat conftest.er1 >&5
21823  fi
21824  rm -f conftest.er1 conftest.err
21825  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21826  test $ac_status = 0; }
21827done
21828
21829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21830$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21831if ${ac_cv_cxx_compiler_gnu+:} false; then :
21832  $as_echo_n "(cached) " >&6
21833else
21834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21835/* end confdefs.h.  */
21836
21837int
21838main ()
21839{
21840#ifndef __GNUC__
21841       choke me
21842#endif
21843
21844  ;
21845  return 0;
21846}
21847_ACEOF
21848if ac_fn_cxx_try_compile "$LINENO"; then :
21849  ac_compiler_gnu=yes
21850else
21851  ac_compiler_gnu=no
21852fi
21853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21854ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21855
21856fi
21857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21858$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21859if test $ac_compiler_gnu = yes; then
21860  GXX=yes
21861else
21862  GXX=
21863fi
21864ac_test_CXXFLAGS=${CXXFLAGS+set}
21865ac_save_CXXFLAGS=$CXXFLAGS
21866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21867$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21868if ${ac_cv_prog_cxx_g+:} false; then :
21869  $as_echo_n "(cached) " >&6
21870else
21871  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21872   ac_cxx_werror_flag=yes
21873   ac_cv_prog_cxx_g=no
21874   CXXFLAGS="-g"
21875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21876/* end confdefs.h.  */
21877
21878int
21879main ()
21880{
21881
21882  ;
21883  return 0;
21884}
21885_ACEOF
21886if ac_fn_cxx_try_compile "$LINENO"; then :
21887  ac_cv_prog_cxx_g=yes
21888else
21889  CXXFLAGS=""
21890      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21891/* end confdefs.h.  */
21892
21893int
21894main ()
21895{
21896
21897  ;
21898  return 0;
21899}
21900_ACEOF
21901if ac_fn_cxx_try_compile "$LINENO"; then :
21902
21903else
21904  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21905	 CXXFLAGS="-g"
21906	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21907/* end confdefs.h.  */
21908
21909int
21910main ()
21911{
21912
21913  ;
21914  return 0;
21915}
21916_ACEOF
21917if ac_fn_cxx_try_compile "$LINENO"; then :
21918  ac_cv_prog_cxx_g=yes
21919fi
21920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21921fi
21922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21923fi
21924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21925   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21926fi
21927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21928$as_echo "$ac_cv_prog_cxx_g" >&6; }
21929if test "$ac_test_CXXFLAGS" = set; then
21930  CXXFLAGS=$ac_save_CXXFLAGS
21931elif test $ac_cv_prog_cxx_g = yes; then
21932  if test "$GXX" = yes; then
21933    CXXFLAGS="-g -O2"
21934  else
21935    CXXFLAGS="-g"
21936  fi
21937else
21938  if test "$GXX" = yes; then
21939    CXXFLAGS="-O2"
21940  else
21941    CXXFLAGS=
21942  fi
21943fi
21944ac_ext=cpp
21945ac_cpp='$CXXCPP $CPPFLAGS'
21946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21949
21950
21951### Locate other tools
21952
21953if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21954    ac_ext=m
21955ac_cpp='$OBJCPP $CPPFLAGS'
21956ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21957ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21958ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21959if test -n "$ac_tool_prefix"; then
21960  for ac_prog in gcc objcc objc cc CC
21961  do
21962    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21963set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21965$as_echo_n "checking for $ac_word... " >&6; }
21966if ${ac_cv_prog_OBJC+:} false; then :
21967  $as_echo_n "(cached) " >&6
21968else
21969  if test -n "$OBJC"; then
21970  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21971else
21972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21973for as_dir in $PATH
21974do
21975  IFS=$as_save_IFS
21976  test -z "$as_dir" && as_dir=.
21977    for ac_exec_ext in '' $ac_executable_extensions; do
21978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21979    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21981    break 2
21982  fi
21983done
21984  done
21985IFS=$as_save_IFS
21986
21987fi
21988fi
21989OBJC=$ac_cv_prog_OBJC
21990if test -n "$OBJC"; then
21991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21992$as_echo "$OBJC" >&6; }
21993else
21994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21995$as_echo "no" >&6; }
21996fi
21997
21998
21999    test -n "$OBJC" && break
22000  done
22001fi
22002if test -z "$OBJC"; then
22003  ac_ct_OBJC=$OBJC
22004  for ac_prog in gcc objcc objc cc CC
22005do
22006  # Extract the first word of "$ac_prog", so it can be a program name with args.
22007set dummy $ac_prog; ac_word=$2
22008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22009$as_echo_n "checking for $ac_word... " >&6; }
22010if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22011  $as_echo_n "(cached) " >&6
22012else
22013  if test -n "$ac_ct_OBJC"; then
22014  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22015else
22016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22017for as_dir in $PATH
22018do
22019  IFS=$as_save_IFS
22020  test -z "$as_dir" && as_dir=.
22021    for ac_exec_ext in '' $ac_executable_extensions; do
22022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22023    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22025    break 2
22026  fi
22027done
22028  done
22029IFS=$as_save_IFS
22030
22031fi
22032fi
22033ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22034if test -n "$ac_ct_OBJC"; then
22035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22036$as_echo "$ac_ct_OBJC" >&6; }
22037else
22038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22039$as_echo "no" >&6; }
22040fi
22041
22042
22043  test -n "$ac_ct_OBJC" && break
22044done
22045
22046  if test "x$ac_ct_OBJC" = x; then
22047    OBJC="gcc"
22048  else
22049    case $cross_compiling:$ac_tool_warned in
22050yes:)
22051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22053ac_tool_warned=yes ;;
22054esac
22055    OBJC=$ac_ct_OBJC
22056  fi
22057fi
22058
22059# Provide some information about the compiler.
22060$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22061set X $ac_compile
22062ac_compiler=$2
22063for ac_option in --version -v -V -qversion; do
22064  { { ac_try="$ac_compiler $ac_option >&5"
22065case "(($ac_try" in
22066  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22067  *) ac_try_echo=$ac_try;;
22068esac
22069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22070$as_echo "$ac_try_echo"; } >&5
22071  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22072  ac_status=$?
22073  if test -s conftest.err; then
22074    sed '10a\
22075... rest of stderr output deleted ...
22076         10q' conftest.err >conftest.er1
22077    cat conftest.er1 >&5
22078  fi
22079  rm -f conftest.er1 conftest.err
22080  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22081  test $ac_status = 0; }
22082done
22083
22084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22085$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22086if ${ac_cv_objc_compiler_gnu+:} false; then :
22087  $as_echo_n "(cached) " >&6
22088else
22089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22090/* end confdefs.h.  */
22091
22092int
22093main ()
22094{
22095#ifndef __GNUC__
22096       choke me
22097#endif
22098
22099  ;
22100  return 0;
22101}
22102_ACEOF
22103if ac_fn_objc_try_compile "$LINENO"; then :
22104  ac_compiler_gnu=yes
22105else
22106  ac_compiler_gnu=no
22107fi
22108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22109ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22110
22111fi
22112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22113$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22114if test $ac_compiler_gnu = yes; then
22115  GOBJC=yes
22116else
22117  GOBJC=
22118fi
22119ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22120ac_save_OBJCFLAGS=$OBJCFLAGS
22121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22122$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22123if ${ac_cv_prog_objc_g+:} false; then :
22124  $as_echo_n "(cached) " >&6
22125else
22126  ac_save_objc_werror_flag=$ac_objc_werror_flag
22127   ac_objc_werror_flag=yes
22128   ac_cv_prog_objc_g=no
22129   OBJCFLAGS="-g"
22130   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22131/* end confdefs.h.  */
22132
22133int
22134main ()
22135{
22136
22137  ;
22138  return 0;
22139}
22140_ACEOF
22141if ac_fn_objc_try_compile "$LINENO"; then :
22142  ac_cv_prog_objc_g=yes
22143else
22144  OBJCFLAGS=""
22145      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22146/* end confdefs.h.  */
22147
22148int
22149main ()
22150{
22151
22152  ;
22153  return 0;
22154}
22155_ACEOF
22156if ac_fn_objc_try_compile "$LINENO"; then :
22157
22158else
22159  ac_objc_werror_flag=$ac_save_objc_werror_flag
22160	 OBJCFLAGS="-g"
22161	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22162/* end confdefs.h.  */
22163
22164int
22165main ()
22166{
22167
22168  ;
22169  return 0;
22170}
22171_ACEOF
22172if ac_fn_objc_try_compile "$LINENO"; then :
22173  ac_cv_prog_objc_g=yes
22174fi
22175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22176fi
22177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22178fi
22179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22180   ac_objc_werror_flag=$ac_save_objc_werror_flag
22181fi
22182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22183$as_echo "$ac_cv_prog_objc_g" >&6; }
22184if test "$ac_test_OBJCFLAGS" = set; then
22185  OBJCFLAGS=$ac_save_OBJCFLAGS
22186elif test $ac_cv_prog_objc_g = yes; then
22187  if test "$GOBJC" = yes; then
22188    OBJCFLAGS="-g -O2"
22189  else
22190    OBJCFLAGS="-g"
22191  fi
22192else
22193  if test "$GOBJC" = yes; then
22194    OBJCFLAGS="-O2"
22195  else
22196    OBJCFLAGS=
22197  fi
22198fi
22199ac_ext=cpp
22200ac_cpp='$CXXCPP $CPPFLAGS'
22201ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22202ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22203ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22204
22205
22206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22207
22208  # First separate the path from the arguments. This will split at the first
22209  # space.
22210  complete="$OBJC"
22211  path="${complete%% *}"
22212  tmp="$complete EOL"
22213  arguments="${tmp#* }"
22214
22215  # Input might be given as Windows format, start by converting to
22216  # unix format.
22217  new_path=`$CYGPATH -u "$path"`
22218
22219  # Now try to locate executable using which
22220  new_path=`$WHICH "$new_path" 2> /dev/null`
22221  # bat and cmd files are not always considered executable in cygwin causing which
22222  # to not find them
22223  if test "x$new_path" = x \
22224           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22225           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22226    new_path=`$CYGPATH -u "$path"`
22227  fi
22228  if test "x$new_path" = x; then
22229    # Oops. Which didn't find the executable.
22230    # The splitting of arguments from the executable at a space might have been incorrect,
22231    # since paths with space are more likely in Windows. Give it another try with the whole
22232    # argument.
22233    path="$complete"
22234    arguments="EOL"
22235    new_path=`$CYGPATH -u "$path"`
22236    new_path=`$WHICH "$new_path" 2> /dev/null`
22237    # bat and cmd files are not always considered executable in cygwin causing which
22238    # to not find them
22239    if test "x$new_path" = x \
22240             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22241             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22242      new_path=`$CYGPATH -u "$path"`
22243    fi
22244    if test "x$new_path" = x; then
22245      # It's still not found. Now this is an unrecoverable error.
22246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22247$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22248      has_space=`$ECHO "$complete" | $GREP " "`
22249      if test "x$has_space" != x; then
22250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22252      fi
22253      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22254    fi
22255  fi
22256
22257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22260  # "foo.exe" is OK but "foo" is an error.
22261  #
22262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22263  # It is also a way to make sure we got the proper file name for the real test later on.
22264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22265  if test "x$test_shortpath" = x; then
22266    # Short path failed, file does not exist as specified.
22267    # Try adding .exe or .cmd
22268    if test -f "${new_path}.exe"; then
22269       input_to_shortpath="${new_path}.exe"
22270    elif test -f "${new_path}.cmd"; then
22271       input_to_shortpath="${new_path}.cmd"
22272    else
22273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22274$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22277      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22278    fi
22279  else
22280    input_to_shortpath="$new_path"
22281  fi
22282
22283  # Call helper function which possibly converts this using DOS-style short mode.
22284  # If so, the updated path is stored in $new_path.
22285  new_path="$input_to_shortpath"
22286
22287  input_path="$input_to_shortpath"
22288  # Check if we need to convert this using DOS-style short mode. If the path
22289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22290  # take no chances and rewrite it.
22291  # Note: m4 eats our [], so we need to use [ and ] instead.
22292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22293  if test "x$has_forbidden_chars" != x; then
22294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22298      # Going to short mode and back again did indeed matter. Since short mode is
22299      # case insensitive, let's make it lowercase to improve readability.
22300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22301      # Now convert it back to Unix-stile (cygpath)
22302      input_path=`$CYGPATH -u "$shortmode_path"`
22303      new_path="$input_path"
22304    fi
22305  fi
22306
22307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22308  if test "x$test_cygdrive_prefix" = x; then
22309    # As a simple fix, exclude /usr/bin since it's not a real path.
22310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22312      # a path prefixed by /cygdrive for fixpath to work.
22313      new_path="$CYGWIN_ROOT_PATH$input_path"
22314    fi
22315  fi
22316
22317  # remove trailing .exe if any
22318  new_path="${new_path/%.exe/}"
22319
22320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22321
22322  # First separate the path from the arguments. This will split at the first
22323  # space.
22324  complete="$OBJC"
22325  path="${complete%% *}"
22326  tmp="$complete EOL"
22327  arguments="${tmp#* }"
22328
22329  # Input might be given as Windows format, start by converting to
22330  # unix format.
22331  new_path="$path"
22332
22333  windows_path="$new_path"
22334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22335    unix_path=`$CYGPATH -u "$windows_path"`
22336    new_path="$unix_path"
22337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22339    new_path="$unix_path"
22340  fi
22341
22342
22343  # Now try to locate executable using which
22344  new_path=`$WHICH "$new_path" 2> /dev/null`
22345
22346  if test "x$new_path" = x; then
22347    # Oops. Which didn't find the executable.
22348    # The splitting of arguments from the executable at a space might have been incorrect,
22349    # since paths with space are more likely in Windows. Give it another try with the whole
22350    # argument.
22351    path="$complete"
22352    arguments="EOL"
22353    new_path="$path"
22354
22355  windows_path="$new_path"
22356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22357    unix_path=`$CYGPATH -u "$windows_path"`
22358    new_path="$unix_path"
22359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22361    new_path="$unix_path"
22362  fi
22363
22364
22365    new_path=`$WHICH "$new_path" 2> /dev/null`
22366
22367    if test "x$new_path" = x; then
22368      # It's still not found. Now this is an unrecoverable error.
22369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22370$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22371      has_space=`$ECHO "$complete" | $GREP " "`
22372      if test "x$has_space" != x; then
22373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22375      fi
22376      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22377    fi
22378  fi
22379
22380  # Now new_path has a complete unix path to the binary
22381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22382    # Keep paths in /bin as-is, but remove trailing .exe if any
22383    new_path="${new_path/%.exe/}"
22384    # Do not save /bin paths to all_fixpath_prefixes!
22385  else
22386    # Not in mixed or Windows style, start by that.
22387    new_path=`cmd //c echo $new_path`
22388
22389  input_path="$new_path"
22390  # Check if we need to convert this using DOS-style short mode. If the path
22391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22392  # take no chances and rewrite it.
22393  # Note: m4 eats our [], so we need to use [ and ] instead.
22394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22395  if test "x$has_forbidden_chars" != x; then
22396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22398  fi
22399
22400    # Output is in $new_path
22401
22402  windows_path="$new_path"
22403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22404    unix_path=`$CYGPATH -u "$windows_path"`
22405    new_path="$unix_path"
22406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22408    new_path="$unix_path"
22409  fi
22410
22411    # remove trailing .exe if any
22412    new_path="${new_path/%.exe/}"
22413
22414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22416  fi
22417
22418  else
22419    # We're on a posix platform. Hooray! :)
22420    # First separate the path from the arguments. This will split at the first
22421    # space.
22422    complete="$OBJC"
22423    path="${complete%% *}"
22424    tmp="$complete EOL"
22425    arguments="${tmp#* }"
22426
22427    # Cannot rely on the command "which" here since it doesn't always work.
22428    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22429    if test -z "$is_absolute_path"; then
22430      # Path to executable is not absolute. Find it.
22431      IFS_save="$IFS"
22432      IFS=:
22433      for p in $PATH; do
22434        if test -f "$p/$path" && test -x "$p/$path"; then
22435          new_path="$p/$path"
22436          break
22437        fi
22438      done
22439      IFS="$IFS_save"
22440    else
22441      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22442$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22443      new_path="$path"
22444    fi
22445
22446    if test "x$new_path" = x; then
22447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22448$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22449        has_space=`$ECHO "$complete" | $GREP " "`
22450        if test "x$has_space" != x; then
22451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22453        fi
22454        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22455      fi
22456  fi
22457
22458      # Now join together the path and the arguments once again
22459      if test "x$arguments" != xEOL; then
22460        new_complete="$new_path ${arguments% *}"
22461      else
22462        new_complete="$new_path"
22463      fi
22464
22465  if test "x$complete" != "x$new_complete"; then
22466      OBJC="$new_complete"
22467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22468$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22469    fi
22470
22471else
22472    OBJC=
22473fi
22474
22475# Restore the flags to the user specified values.
22476# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22477CFLAGS="$ORG_CFLAGS"
22478CXXFLAGS="$ORG_CXXFLAGS"
22479OBJCFLAGS="$ORG_OBJCFLAGS"
22480
22481LD="$CC"
22482LDEXE="$CC"
22483LDCXX="$CXX"
22484LDEXECXX="$CXX"
22485
22486# LDEXE is the linker to use, when creating executables.
22487
22488# Linking C++ libraries.
22489
22490# Linking C++ executables.
22491
22492
22493if test "x$OPENJDK_TARGET_OS" != xwindows; then
22494    if test -n "$ac_tool_prefix"; then
22495  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22496set dummy ${ac_tool_prefix}ar; ac_word=$2
22497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22498$as_echo_n "checking for $ac_word... " >&6; }
22499if ${ac_cv_prog_AR+:} false; then :
22500  $as_echo_n "(cached) " >&6
22501else
22502  if test -n "$AR"; then
22503  ac_cv_prog_AR="$AR" # Let the user override the test.
22504else
22505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22506for as_dir in $PATH
22507do
22508  IFS=$as_save_IFS
22509  test -z "$as_dir" && as_dir=.
22510    for ac_exec_ext in '' $ac_executable_extensions; do
22511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22512    ac_cv_prog_AR="${ac_tool_prefix}ar"
22513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22514    break 2
22515  fi
22516done
22517  done
22518IFS=$as_save_IFS
22519
22520fi
22521fi
22522AR=$ac_cv_prog_AR
22523if test -n "$AR"; then
22524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22525$as_echo "$AR" >&6; }
22526else
22527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22528$as_echo "no" >&6; }
22529fi
22530
22531
22532fi
22533if test -z "$ac_cv_prog_AR"; then
22534  ac_ct_AR=$AR
22535  # Extract the first word of "ar", so it can be a program name with args.
22536set dummy ar; ac_word=$2
22537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22538$as_echo_n "checking for $ac_word... " >&6; }
22539if ${ac_cv_prog_ac_ct_AR+:} false; then :
22540  $as_echo_n "(cached) " >&6
22541else
22542  if test -n "$ac_ct_AR"; then
22543  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22544else
22545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22546for as_dir in $PATH
22547do
22548  IFS=$as_save_IFS
22549  test -z "$as_dir" && as_dir=.
22550    for ac_exec_ext in '' $ac_executable_extensions; do
22551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22552    ac_cv_prog_ac_ct_AR="ar"
22553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22554    break 2
22555  fi
22556done
22557  done
22558IFS=$as_save_IFS
22559
22560fi
22561fi
22562ac_ct_AR=$ac_cv_prog_ac_ct_AR
22563if test -n "$ac_ct_AR"; then
22564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22565$as_echo "$ac_ct_AR" >&6; }
22566else
22567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22568$as_echo "no" >&6; }
22569fi
22570
22571  if test "x$ac_ct_AR" = x; then
22572    AR=""
22573  else
22574    case $cross_compiling:$ac_tool_warned in
22575yes:)
22576{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22577$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22578ac_tool_warned=yes ;;
22579esac
22580    AR=$ac_ct_AR
22581  fi
22582else
22583  AR="$ac_cv_prog_AR"
22584fi
22585
22586
22587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22588
22589  # First separate the path from the arguments. This will split at the first
22590  # space.
22591  complete="$AR"
22592  path="${complete%% *}"
22593  tmp="$complete EOL"
22594  arguments="${tmp#* }"
22595
22596  # Input might be given as Windows format, start by converting to
22597  # unix format.
22598  new_path=`$CYGPATH -u "$path"`
22599
22600  # Now try to locate executable using which
22601  new_path=`$WHICH "$new_path" 2> /dev/null`
22602  # bat and cmd files are not always considered executable in cygwin causing which
22603  # to not find them
22604  if test "x$new_path" = x \
22605           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22606           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22607    new_path=`$CYGPATH -u "$path"`
22608  fi
22609  if test "x$new_path" = x; then
22610    # Oops. Which didn't find the executable.
22611    # The splitting of arguments from the executable at a space might have been incorrect,
22612    # since paths with space are more likely in Windows. Give it another try with the whole
22613    # argument.
22614    path="$complete"
22615    arguments="EOL"
22616    new_path=`$CYGPATH -u "$path"`
22617    new_path=`$WHICH "$new_path" 2> /dev/null`
22618    # bat and cmd files are not always considered executable in cygwin causing which
22619    # to not find them
22620    if test "x$new_path" = x \
22621             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22622             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22623      new_path=`$CYGPATH -u "$path"`
22624    fi
22625    if test "x$new_path" = x; then
22626      # It's still not found. Now this is an unrecoverable error.
22627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22628$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22629      has_space=`$ECHO "$complete" | $GREP " "`
22630      if test "x$has_space" != x; then
22631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22633      fi
22634      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22635    fi
22636  fi
22637
22638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22641  # "foo.exe" is OK but "foo" is an error.
22642  #
22643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22644  # It is also a way to make sure we got the proper file name for the real test later on.
22645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22646  if test "x$test_shortpath" = x; then
22647    # Short path failed, file does not exist as specified.
22648    # Try adding .exe or .cmd
22649    if test -f "${new_path}.exe"; then
22650       input_to_shortpath="${new_path}.exe"
22651    elif test -f "${new_path}.cmd"; then
22652       input_to_shortpath="${new_path}.cmd"
22653    else
22654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22655$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22656      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22657$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22658      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22659    fi
22660  else
22661    input_to_shortpath="$new_path"
22662  fi
22663
22664  # Call helper function which possibly converts this using DOS-style short mode.
22665  # If so, the updated path is stored in $new_path.
22666  new_path="$input_to_shortpath"
22667
22668  input_path="$input_to_shortpath"
22669  # Check if we need to convert this using DOS-style short mode. If the path
22670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22671  # take no chances and rewrite it.
22672  # Note: m4 eats our [], so we need to use [ and ] instead.
22673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22674  if test "x$has_forbidden_chars" != x; then
22675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22679      # Going to short mode and back again did indeed matter. Since short mode is
22680      # case insensitive, let's make it lowercase to improve readability.
22681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22682      # Now convert it back to Unix-stile (cygpath)
22683      input_path=`$CYGPATH -u "$shortmode_path"`
22684      new_path="$input_path"
22685    fi
22686  fi
22687
22688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22689  if test "x$test_cygdrive_prefix" = x; then
22690    # As a simple fix, exclude /usr/bin since it's not a real path.
22691    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22693      # a path prefixed by /cygdrive for fixpath to work.
22694      new_path="$CYGWIN_ROOT_PATH$input_path"
22695    fi
22696  fi
22697
22698  # remove trailing .exe if any
22699  new_path="${new_path/%.exe/}"
22700
22701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702
22703  # First separate the path from the arguments. This will split at the first
22704  # space.
22705  complete="$AR"
22706  path="${complete%% *}"
22707  tmp="$complete EOL"
22708  arguments="${tmp#* }"
22709
22710  # Input might be given as Windows format, start by converting to
22711  # unix format.
22712  new_path="$path"
22713
22714  windows_path="$new_path"
22715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22716    unix_path=`$CYGPATH -u "$windows_path"`
22717    new_path="$unix_path"
22718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22720    new_path="$unix_path"
22721  fi
22722
22723
22724  # Now try to locate executable using which
22725  new_path=`$WHICH "$new_path" 2> /dev/null`
22726
22727  if test "x$new_path" = x; then
22728    # Oops. Which didn't find the executable.
22729    # The splitting of arguments from the executable at a space might have been incorrect,
22730    # since paths with space are more likely in Windows. Give it another try with the whole
22731    # argument.
22732    path="$complete"
22733    arguments="EOL"
22734    new_path="$path"
22735
22736  windows_path="$new_path"
22737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22738    unix_path=`$CYGPATH -u "$windows_path"`
22739    new_path="$unix_path"
22740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22742    new_path="$unix_path"
22743  fi
22744
22745
22746    new_path=`$WHICH "$new_path" 2> /dev/null`
22747
22748    if test "x$new_path" = x; then
22749      # It's still not found. Now this is an unrecoverable error.
22750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22751$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22752      has_space=`$ECHO "$complete" | $GREP " "`
22753      if test "x$has_space" != x; then
22754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22756      fi
22757      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22758    fi
22759  fi
22760
22761  # Now new_path has a complete unix path to the binary
22762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22763    # Keep paths in /bin as-is, but remove trailing .exe if any
22764    new_path="${new_path/%.exe/}"
22765    # Do not save /bin paths to all_fixpath_prefixes!
22766  else
22767    # Not in mixed or Windows style, start by that.
22768    new_path=`cmd //c echo $new_path`
22769
22770  input_path="$new_path"
22771  # Check if we need to convert this using DOS-style short mode. If the path
22772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22773  # take no chances and rewrite it.
22774  # Note: m4 eats our [], so we need to use [ and ] instead.
22775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22776  if test "x$has_forbidden_chars" != x; then
22777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22779  fi
22780
22781    # Output is in $new_path
22782
22783  windows_path="$new_path"
22784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22785    unix_path=`$CYGPATH -u "$windows_path"`
22786    new_path="$unix_path"
22787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22789    new_path="$unix_path"
22790  fi
22791
22792    # remove trailing .exe if any
22793    new_path="${new_path/%.exe/}"
22794
22795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22797  fi
22798
22799  else
22800    # We're on a posix platform. Hooray! :)
22801    # First separate the path from the arguments. This will split at the first
22802    # space.
22803    complete="$AR"
22804    path="${complete%% *}"
22805    tmp="$complete EOL"
22806    arguments="${tmp#* }"
22807
22808    # Cannot rely on the command "which" here since it doesn't always work.
22809    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22810    if test -z "$is_absolute_path"; then
22811      # Path to executable is not absolute. Find it.
22812      IFS_save="$IFS"
22813      IFS=:
22814      for p in $PATH; do
22815        if test -f "$p/$path" && test -x "$p/$path"; then
22816          new_path="$p/$path"
22817          break
22818        fi
22819      done
22820      IFS="$IFS_save"
22821    else
22822      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22823$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22824      new_path="$path"
22825    fi
22826
22827    if test "x$new_path" = x; then
22828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22829$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22830        has_space=`$ECHO "$complete" | $GREP " "`
22831        if test "x$has_space" != x; then
22832          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22833$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22834        fi
22835        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22836      fi
22837  fi
22838
22839      # Now join together the path and the arguments once again
22840      if test "x$arguments" != xEOL; then
22841        new_complete="$new_path ${arguments% *}"
22842      else
22843        new_complete="$new_path"
22844      fi
22845
22846  if test "x$complete" != "x$new_complete"; then
22847      AR="$new_complete"
22848      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22849$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22850    fi
22851
22852fi
22853if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22854    ARFLAGS="-r"
22855else
22856    ARFLAGS=""
22857fi
22858
22859
22860# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22861HOTSPOT_CXX="$CXX"
22862HOTSPOT_LD="$LD"
22863
22864
22865
22866COMPILER_NAME=gcc
22867COMPILER_TYPE=CC
22868if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22869
22870    # For now, assume that we are always compiling using cl.exe.
22871    CC_OUT_OPTION=-Fo
22872    EXE_OUT_OPTION=-out:
22873    LD_OUT_OPTION=-out:
22874    AR_OUT_OPTION=-out:
22875    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22876    # program for something completely different.
22877    # Extract the first word of "link", so it can be a program name with args.
22878set dummy link; ac_word=$2
22879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22880$as_echo_n "checking for $ac_word... " >&6; }
22881if ${ac_cv_prog_WINLD+:} false; then :
22882  $as_echo_n "(cached) " >&6
22883else
22884  if test -n "$WINLD"; then
22885  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22886else
22887  ac_prog_rejected=no
22888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22889for as_dir in $PATH
22890do
22891  IFS=$as_save_IFS
22892  test -z "$as_dir" && as_dir=.
22893    for ac_exec_ext in '' $ac_executable_extensions; do
22894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22895    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22896       ac_prog_rejected=yes
22897       continue
22898     fi
22899    ac_cv_prog_WINLD="link"
22900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22901    break 2
22902  fi
22903done
22904  done
22905IFS=$as_save_IFS
22906
22907if test $ac_prog_rejected = yes; then
22908  # We found a bogon in the path, so make sure we never use it.
22909  set dummy $ac_cv_prog_WINLD
22910  shift
22911  if test $# != 0; then
22912    # We chose a different compiler from the bogus one.
22913    # However, it has the same basename, so the bogon will be chosen
22914    # first if we set WINLD to just the basename; use the full file name.
22915    shift
22916    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22917  fi
22918fi
22919fi
22920fi
22921WINLD=$ac_cv_prog_WINLD
22922if test -n "$WINLD"; then
22923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22924$as_echo "$WINLD" >&6; }
22925else
22926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22927$as_echo "no" >&6; }
22928fi
22929
22930
22931    # Since we must ignore the first found link, WINLD will contain
22932    # the full path to the link.exe program.
22933
22934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22935
22936  # First separate the path from the arguments. This will split at the first
22937  # space.
22938  complete="$WINLD"
22939  path="${complete%% *}"
22940  tmp="$complete EOL"
22941  arguments="${tmp#* }"
22942
22943  # Input might be given as Windows format, start by converting to
22944  # unix format.
22945  new_path=`$CYGPATH -u "$path"`
22946
22947  # Now try to locate executable using which
22948  new_path=`$WHICH "$new_path" 2> /dev/null`
22949  # bat and cmd files are not always considered executable in cygwin causing which
22950  # to not find them
22951  if test "x$new_path" = x \
22952           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22953           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22954    new_path=`$CYGPATH -u "$path"`
22955  fi
22956  if test "x$new_path" = x; then
22957    # Oops. Which didn't find the executable.
22958    # The splitting of arguments from the executable at a space might have been incorrect,
22959    # since paths with space are more likely in Windows. Give it another try with the whole
22960    # argument.
22961    path="$complete"
22962    arguments="EOL"
22963    new_path=`$CYGPATH -u "$path"`
22964    new_path=`$WHICH "$new_path" 2> /dev/null`
22965    # bat and cmd files are not always considered executable in cygwin causing which
22966    # to not find them
22967    if test "x$new_path" = x \
22968             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22969             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22970      new_path=`$CYGPATH -u "$path"`
22971    fi
22972    if test "x$new_path" = x; then
22973      # It's still not found. Now this is an unrecoverable error.
22974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22975$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22976      has_space=`$ECHO "$complete" | $GREP " "`
22977      if test "x$has_space" != x; then
22978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22980      fi
22981      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22982    fi
22983  fi
22984
22985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22988  # "foo.exe" is OK but "foo" is an error.
22989  #
22990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22991  # It is also a way to make sure we got the proper file name for the real test later on.
22992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22993  if test "x$test_shortpath" = x; then
22994    # Short path failed, file does not exist as specified.
22995    # Try adding .exe or .cmd
22996    if test -f "${new_path}.exe"; then
22997       input_to_shortpath="${new_path}.exe"
22998    elif test -f "${new_path}.cmd"; then
22999       input_to_shortpath="${new_path}.cmd"
23000    else
23001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23002$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23005      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23006    fi
23007  else
23008    input_to_shortpath="$new_path"
23009  fi
23010
23011  # Call helper function which possibly converts this using DOS-style short mode.
23012  # If so, the updated path is stored in $new_path.
23013  new_path="$input_to_shortpath"
23014
23015  input_path="$input_to_shortpath"
23016  # Check if we need to convert this using DOS-style short mode. If the path
23017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23018  # take no chances and rewrite it.
23019  # Note: m4 eats our [], so we need to use [ and ] instead.
23020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23021  if test "x$has_forbidden_chars" != x; then
23022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23026      # Going to short mode and back again did indeed matter. Since short mode is
23027      # case insensitive, let's make it lowercase to improve readability.
23028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23029      # Now convert it back to Unix-stile (cygpath)
23030      input_path=`$CYGPATH -u "$shortmode_path"`
23031      new_path="$input_path"
23032    fi
23033  fi
23034
23035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23036  if test "x$test_cygdrive_prefix" = x; then
23037    # As a simple fix, exclude /usr/bin since it's not a real path.
23038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23040      # a path prefixed by /cygdrive for fixpath to work.
23041      new_path="$CYGWIN_ROOT_PATH$input_path"
23042    fi
23043  fi
23044
23045  # remove trailing .exe if any
23046  new_path="${new_path/%.exe/}"
23047
23048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23049
23050  # First separate the path from the arguments. This will split at the first
23051  # space.
23052  complete="$WINLD"
23053  path="${complete%% *}"
23054  tmp="$complete EOL"
23055  arguments="${tmp#* }"
23056
23057  # Input might be given as Windows format, start by converting to
23058  # unix format.
23059  new_path="$path"
23060
23061  windows_path="$new_path"
23062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23063    unix_path=`$CYGPATH -u "$windows_path"`
23064    new_path="$unix_path"
23065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23067    new_path="$unix_path"
23068  fi
23069
23070
23071  # Now try to locate executable using which
23072  new_path=`$WHICH "$new_path" 2> /dev/null`
23073
23074  if test "x$new_path" = x; then
23075    # Oops. Which didn't find the executable.
23076    # The splitting of arguments from the executable at a space might have been incorrect,
23077    # since paths with space are more likely in Windows. Give it another try with the whole
23078    # argument.
23079    path="$complete"
23080    arguments="EOL"
23081    new_path="$path"
23082
23083  windows_path="$new_path"
23084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23085    unix_path=`$CYGPATH -u "$windows_path"`
23086    new_path="$unix_path"
23087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23089    new_path="$unix_path"
23090  fi
23091
23092
23093    new_path=`$WHICH "$new_path" 2> /dev/null`
23094
23095    if test "x$new_path" = x; then
23096      # It's still not found. Now this is an unrecoverable error.
23097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23098$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23099      has_space=`$ECHO "$complete" | $GREP " "`
23100      if test "x$has_space" != x; then
23101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23103      fi
23104      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23105    fi
23106  fi
23107
23108  # Now new_path has a complete unix path to the binary
23109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23110    # Keep paths in /bin as-is, but remove trailing .exe if any
23111    new_path="${new_path/%.exe/}"
23112    # Do not save /bin paths to all_fixpath_prefixes!
23113  else
23114    # Not in mixed or Windows style, start by that.
23115    new_path=`cmd //c echo $new_path`
23116
23117  input_path="$new_path"
23118  # Check if we need to convert this using DOS-style short mode. If the path
23119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23120  # take no chances and rewrite it.
23121  # Note: m4 eats our [], so we need to use [ and ] instead.
23122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23123  if test "x$has_forbidden_chars" != x; then
23124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23126  fi
23127
23128    # Output is in $new_path
23129
23130  windows_path="$new_path"
23131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23132    unix_path=`$CYGPATH -u "$windows_path"`
23133    new_path="$unix_path"
23134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23136    new_path="$unix_path"
23137  fi
23138
23139    # remove trailing .exe if any
23140    new_path="${new_path/%.exe/}"
23141
23142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23144  fi
23145
23146  else
23147    # We're on a posix platform. Hooray! :)
23148    # First separate the path from the arguments. This will split at the first
23149    # space.
23150    complete="$WINLD"
23151    path="${complete%% *}"
23152    tmp="$complete EOL"
23153    arguments="${tmp#* }"
23154
23155    # Cannot rely on the command "which" here since it doesn't always work.
23156    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23157    if test -z "$is_absolute_path"; then
23158      # Path to executable is not absolute. Find it.
23159      IFS_save="$IFS"
23160      IFS=:
23161      for p in $PATH; do
23162        if test -f "$p/$path" && test -x "$p/$path"; then
23163          new_path="$p/$path"
23164          break
23165        fi
23166      done
23167      IFS="$IFS_save"
23168    else
23169      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23170$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23171      new_path="$path"
23172    fi
23173
23174    if test "x$new_path" = x; then
23175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23176$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23177        has_space=`$ECHO "$complete" | $GREP " "`
23178        if test "x$has_space" != x; then
23179          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23181        fi
23182        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23183      fi
23184  fi
23185
23186      # Now join together the path and the arguments once again
23187      if test "x$arguments" != xEOL; then
23188        new_complete="$new_path ${arguments% *}"
23189      else
23190        new_complete="$new_path"
23191      fi
23192
23193  if test "x$complete" != "x$new_complete"; then
23194      WINLD="$new_complete"
23195      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23196$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23197    fi
23198
23199    printf "Windows linker was found at $WINLD\n"
23200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23201$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23202    "$WINLD" --version > /dev/null
23203    if test $? -eq 0 ; then
23204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23205$as_echo "no" >&6; }
23206      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23207    else
23208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23209$as_echo "yes" >&6; }
23210    fi
23211    LD="$WINLD"
23212    LDEXE="$WINLD"
23213    LDCXX="$WINLD"
23214    LDEXECXX="$WINLD"
23215
23216    # Extract the first word of "mt", so it can be a program name with args.
23217set dummy mt; ac_word=$2
23218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23219$as_echo_n "checking for $ac_word... " >&6; }
23220if ${ac_cv_prog_MT+:} false; then :
23221  $as_echo_n "(cached) " >&6
23222else
23223  if test -n "$MT"; then
23224  ac_cv_prog_MT="$MT" # Let the user override the test.
23225else
23226  ac_prog_rejected=no
23227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23228for as_dir in $PATH
23229do
23230  IFS=$as_save_IFS
23231  test -z "$as_dir" && as_dir=.
23232    for ac_exec_ext in '' $ac_executable_extensions; do
23233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23234    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23235       ac_prog_rejected=yes
23236       continue
23237     fi
23238    ac_cv_prog_MT="mt"
23239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23240    break 2
23241  fi
23242done
23243  done
23244IFS=$as_save_IFS
23245
23246if test $ac_prog_rejected = yes; then
23247  # We found a bogon in the path, so make sure we never use it.
23248  set dummy $ac_cv_prog_MT
23249  shift
23250  if test $# != 0; then
23251    # We chose a different compiler from the bogus one.
23252    # However, it has the same basename, so the bogon will be chosen
23253    # first if we set MT to just the basename; use the full file name.
23254    shift
23255    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23256  fi
23257fi
23258fi
23259fi
23260MT=$ac_cv_prog_MT
23261if test -n "$MT"; then
23262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23263$as_echo "$MT" >&6; }
23264else
23265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23266$as_echo "no" >&6; }
23267fi
23268
23269
23270
23271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23272
23273  # First separate the path from the arguments. This will split at the first
23274  # space.
23275  complete="$MT"
23276  path="${complete%% *}"
23277  tmp="$complete EOL"
23278  arguments="${tmp#* }"
23279
23280  # Input might be given as Windows format, start by converting to
23281  # unix format.
23282  new_path=`$CYGPATH -u "$path"`
23283
23284  # Now try to locate executable using which
23285  new_path=`$WHICH "$new_path" 2> /dev/null`
23286  # bat and cmd files are not always considered executable in cygwin causing which
23287  # to not find them
23288  if test "x$new_path" = x \
23289           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23290           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23291    new_path=`$CYGPATH -u "$path"`
23292  fi
23293  if test "x$new_path" = x; then
23294    # Oops. Which didn't find the executable.
23295    # The splitting of arguments from the executable at a space might have been incorrect,
23296    # since paths with space are more likely in Windows. Give it another try with the whole
23297    # argument.
23298    path="$complete"
23299    arguments="EOL"
23300    new_path=`$CYGPATH -u "$path"`
23301    new_path=`$WHICH "$new_path" 2> /dev/null`
23302    # bat and cmd files are not always considered executable in cygwin causing which
23303    # to not find them
23304    if test "x$new_path" = x \
23305             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23306             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23307      new_path=`$CYGPATH -u "$path"`
23308    fi
23309    if test "x$new_path" = x; then
23310      # It's still not found. Now this is an unrecoverable error.
23311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23312$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23313      has_space=`$ECHO "$complete" | $GREP " "`
23314      if test "x$has_space" != x; then
23315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23317      fi
23318      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23319    fi
23320  fi
23321
23322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23325  # "foo.exe" is OK but "foo" is an error.
23326  #
23327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23328  # It is also a way to make sure we got the proper file name for the real test later on.
23329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23330  if test "x$test_shortpath" = x; then
23331    # Short path failed, file does not exist as specified.
23332    # Try adding .exe or .cmd
23333    if test -f "${new_path}.exe"; then
23334       input_to_shortpath="${new_path}.exe"
23335    elif test -f "${new_path}.cmd"; then
23336       input_to_shortpath="${new_path}.cmd"
23337    else
23338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23339$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23342      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23343    fi
23344  else
23345    input_to_shortpath="$new_path"
23346  fi
23347
23348  # Call helper function which possibly converts this using DOS-style short mode.
23349  # If so, the updated path is stored in $new_path.
23350  new_path="$input_to_shortpath"
23351
23352  input_path="$input_to_shortpath"
23353  # Check if we need to convert this using DOS-style short mode. If the path
23354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23355  # take no chances and rewrite it.
23356  # Note: m4 eats our [], so we need to use [ and ] instead.
23357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23358  if test "x$has_forbidden_chars" != x; then
23359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23363      # Going to short mode and back again did indeed matter. Since short mode is
23364      # case insensitive, let's make it lowercase to improve readability.
23365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23366      # Now convert it back to Unix-stile (cygpath)
23367      input_path=`$CYGPATH -u "$shortmode_path"`
23368      new_path="$input_path"
23369    fi
23370  fi
23371
23372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23373  if test "x$test_cygdrive_prefix" = x; then
23374    # As a simple fix, exclude /usr/bin since it's not a real path.
23375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23377      # a path prefixed by /cygdrive for fixpath to work.
23378      new_path="$CYGWIN_ROOT_PATH$input_path"
23379    fi
23380  fi
23381
23382  # remove trailing .exe if any
23383  new_path="${new_path/%.exe/}"
23384
23385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23386
23387  # First separate the path from the arguments. This will split at the first
23388  # space.
23389  complete="$MT"
23390  path="${complete%% *}"
23391  tmp="$complete EOL"
23392  arguments="${tmp#* }"
23393
23394  # Input might be given as Windows format, start by converting to
23395  # unix format.
23396  new_path="$path"
23397
23398  windows_path="$new_path"
23399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23400    unix_path=`$CYGPATH -u "$windows_path"`
23401    new_path="$unix_path"
23402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23404    new_path="$unix_path"
23405  fi
23406
23407
23408  # Now try to locate executable using which
23409  new_path=`$WHICH "$new_path" 2> /dev/null`
23410
23411  if test "x$new_path" = x; then
23412    # Oops. Which didn't find the executable.
23413    # The splitting of arguments from the executable at a space might have been incorrect,
23414    # since paths with space are more likely in Windows. Give it another try with the whole
23415    # argument.
23416    path="$complete"
23417    arguments="EOL"
23418    new_path="$path"
23419
23420  windows_path="$new_path"
23421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23422    unix_path=`$CYGPATH -u "$windows_path"`
23423    new_path="$unix_path"
23424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23426    new_path="$unix_path"
23427  fi
23428
23429
23430    new_path=`$WHICH "$new_path" 2> /dev/null`
23431
23432    if test "x$new_path" = x; then
23433      # It's still not found. Now this is an unrecoverable error.
23434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23435$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23436      has_space=`$ECHO "$complete" | $GREP " "`
23437      if test "x$has_space" != x; then
23438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23440      fi
23441      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23442    fi
23443  fi
23444
23445  # Now new_path has a complete unix path to the binary
23446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23447    # Keep paths in /bin as-is, but remove trailing .exe if any
23448    new_path="${new_path/%.exe/}"
23449    # Do not save /bin paths to all_fixpath_prefixes!
23450  else
23451    # Not in mixed or Windows style, start by that.
23452    new_path=`cmd //c echo $new_path`
23453
23454  input_path="$new_path"
23455  # Check if we need to convert this using DOS-style short mode. If the path
23456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23457  # take no chances and rewrite it.
23458  # Note: m4 eats our [], so we need to use [ and ] instead.
23459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23460  if test "x$has_forbidden_chars" != x; then
23461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23463  fi
23464
23465    # Output is in $new_path
23466
23467  windows_path="$new_path"
23468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23469    unix_path=`$CYGPATH -u "$windows_path"`
23470    new_path="$unix_path"
23471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23473    new_path="$unix_path"
23474  fi
23475
23476    # remove trailing .exe if any
23477    new_path="${new_path/%.exe/}"
23478
23479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23481  fi
23482
23483  else
23484    # We're on a posix platform. Hooray! :)
23485    # First separate the path from the arguments. This will split at the first
23486    # space.
23487    complete="$MT"
23488    path="${complete%% *}"
23489    tmp="$complete EOL"
23490    arguments="${tmp#* }"
23491
23492    # Cannot rely on the command "which" here since it doesn't always work.
23493    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23494    if test -z "$is_absolute_path"; then
23495      # Path to executable is not absolute. Find it.
23496      IFS_save="$IFS"
23497      IFS=:
23498      for p in $PATH; do
23499        if test -f "$p/$path" && test -x "$p/$path"; then
23500          new_path="$p/$path"
23501          break
23502        fi
23503      done
23504      IFS="$IFS_save"
23505    else
23506      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23507$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23508      new_path="$path"
23509    fi
23510
23511    if test "x$new_path" = x; then
23512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23513$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23514        has_space=`$ECHO "$complete" | $GREP " "`
23515        if test "x$has_space" != x; then
23516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23518        fi
23519        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23520      fi
23521  fi
23522
23523      # Now join together the path and the arguments once again
23524      if test "x$arguments" != xEOL; then
23525        new_complete="$new_path ${arguments% *}"
23526      else
23527        new_complete="$new_path"
23528      fi
23529
23530  if test "x$complete" != "x$new_complete"; then
23531      MT="$new_complete"
23532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23533$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23534    fi
23535
23536    # The resource compiler
23537    # Extract the first word of "rc", so it can be a program name with args.
23538set dummy rc; ac_word=$2
23539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23540$as_echo_n "checking for $ac_word... " >&6; }
23541if ${ac_cv_prog_RC+:} false; then :
23542  $as_echo_n "(cached) " >&6
23543else
23544  if test -n "$RC"; then
23545  ac_cv_prog_RC="$RC" # Let the user override the test.
23546else
23547  ac_prog_rejected=no
23548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23549for as_dir in $PATH
23550do
23551  IFS=$as_save_IFS
23552  test -z "$as_dir" && as_dir=.
23553    for ac_exec_ext in '' $ac_executable_extensions; do
23554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23555    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23556       ac_prog_rejected=yes
23557       continue
23558     fi
23559    ac_cv_prog_RC="rc"
23560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23561    break 2
23562  fi
23563done
23564  done
23565IFS=$as_save_IFS
23566
23567if test $ac_prog_rejected = yes; then
23568  # We found a bogon in the path, so make sure we never use it.
23569  set dummy $ac_cv_prog_RC
23570  shift
23571  if test $# != 0; then
23572    # We chose a different compiler from the bogus one.
23573    # However, it has the same basename, so the bogon will be chosen
23574    # first if we set RC to just the basename; use the full file name.
23575    shift
23576    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23577  fi
23578fi
23579fi
23580fi
23581RC=$ac_cv_prog_RC
23582if test -n "$RC"; then
23583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23584$as_echo "$RC" >&6; }
23585else
23586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23587$as_echo "no" >&6; }
23588fi
23589
23590
23591
23592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23593
23594  # First separate the path from the arguments. This will split at the first
23595  # space.
23596  complete="$RC"
23597  path="${complete%% *}"
23598  tmp="$complete EOL"
23599  arguments="${tmp#* }"
23600
23601  # Input might be given as Windows format, start by converting to
23602  # unix format.
23603  new_path=`$CYGPATH -u "$path"`
23604
23605  # Now try to locate executable using which
23606  new_path=`$WHICH "$new_path" 2> /dev/null`
23607  # bat and cmd files are not always considered executable in cygwin causing which
23608  # to not find them
23609  if test "x$new_path" = x \
23610           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23611           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23612    new_path=`$CYGPATH -u "$path"`
23613  fi
23614  if test "x$new_path" = x; then
23615    # Oops. Which didn't find the executable.
23616    # The splitting of arguments from the executable at a space might have been incorrect,
23617    # since paths with space are more likely in Windows. Give it another try with the whole
23618    # argument.
23619    path="$complete"
23620    arguments="EOL"
23621    new_path=`$CYGPATH -u "$path"`
23622    new_path=`$WHICH "$new_path" 2> /dev/null`
23623    # bat and cmd files are not always considered executable in cygwin causing which
23624    # to not find them
23625    if test "x$new_path" = x \
23626             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23627             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23628      new_path=`$CYGPATH -u "$path"`
23629    fi
23630    if test "x$new_path" = x; then
23631      # It's still not found. Now this is an unrecoverable error.
23632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23633$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23634      has_space=`$ECHO "$complete" | $GREP " "`
23635      if test "x$has_space" != x; then
23636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23638      fi
23639      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23640    fi
23641  fi
23642
23643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23646  # "foo.exe" is OK but "foo" is an error.
23647  #
23648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23649  # It is also a way to make sure we got the proper file name for the real test later on.
23650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23651  if test "x$test_shortpath" = x; then
23652    # Short path failed, file does not exist as specified.
23653    # Try adding .exe or .cmd
23654    if test -f "${new_path}.exe"; then
23655       input_to_shortpath="${new_path}.exe"
23656    elif test -f "${new_path}.cmd"; then
23657       input_to_shortpath="${new_path}.cmd"
23658    else
23659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23660$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23661      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23662$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23663      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23664    fi
23665  else
23666    input_to_shortpath="$new_path"
23667  fi
23668
23669  # Call helper function which possibly converts this using DOS-style short mode.
23670  # If so, the updated path is stored in $new_path.
23671  new_path="$input_to_shortpath"
23672
23673  input_path="$input_to_shortpath"
23674  # Check if we need to convert this using DOS-style short mode. If the path
23675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23676  # take no chances and rewrite it.
23677  # Note: m4 eats our [], so we need to use [ and ] instead.
23678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23679  if test "x$has_forbidden_chars" != x; then
23680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23684      # Going to short mode and back again did indeed matter. Since short mode is
23685      # case insensitive, let's make it lowercase to improve readability.
23686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23687      # Now convert it back to Unix-stile (cygpath)
23688      input_path=`$CYGPATH -u "$shortmode_path"`
23689      new_path="$input_path"
23690    fi
23691  fi
23692
23693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23694  if test "x$test_cygdrive_prefix" = x; then
23695    # As a simple fix, exclude /usr/bin since it's not a real path.
23696    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23698      # a path prefixed by /cygdrive for fixpath to work.
23699      new_path="$CYGWIN_ROOT_PATH$input_path"
23700    fi
23701  fi
23702
23703  # remove trailing .exe if any
23704  new_path="${new_path/%.exe/}"
23705
23706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23707
23708  # First separate the path from the arguments. This will split at the first
23709  # space.
23710  complete="$RC"
23711  path="${complete%% *}"
23712  tmp="$complete EOL"
23713  arguments="${tmp#* }"
23714
23715  # Input might be given as Windows format, start by converting to
23716  # unix format.
23717  new_path="$path"
23718
23719  windows_path="$new_path"
23720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23721    unix_path=`$CYGPATH -u "$windows_path"`
23722    new_path="$unix_path"
23723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23725    new_path="$unix_path"
23726  fi
23727
23728
23729  # Now try to locate executable using which
23730  new_path=`$WHICH "$new_path" 2> /dev/null`
23731
23732  if test "x$new_path" = x; then
23733    # Oops. Which didn't find the executable.
23734    # The splitting of arguments from the executable at a space might have been incorrect,
23735    # since paths with space are more likely in Windows. Give it another try with the whole
23736    # argument.
23737    path="$complete"
23738    arguments="EOL"
23739    new_path="$path"
23740
23741  windows_path="$new_path"
23742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23743    unix_path=`$CYGPATH -u "$windows_path"`
23744    new_path="$unix_path"
23745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23747    new_path="$unix_path"
23748  fi
23749
23750
23751    new_path=`$WHICH "$new_path" 2> /dev/null`
23752
23753    if test "x$new_path" = x; then
23754      # It's still not found. Now this is an unrecoverable error.
23755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23756$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23757      has_space=`$ECHO "$complete" | $GREP " "`
23758      if test "x$has_space" != x; then
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23761      fi
23762      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23763    fi
23764  fi
23765
23766  # Now new_path has a complete unix path to the binary
23767  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23768    # Keep paths in /bin as-is, but remove trailing .exe if any
23769    new_path="${new_path/%.exe/}"
23770    # Do not save /bin paths to all_fixpath_prefixes!
23771  else
23772    # Not in mixed or Windows style, start by that.
23773    new_path=`cmd //c echo $new_path`
23774
23775  input_path="$new_path"
23776  # Check if we need to convert this using DOS-style short mode. If the path
23777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23778  # take no chances and rewrite it.
23779  # Note: m4 eats our [], so we need to use [ and ] instead.
23780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23781  if test "x$has_forbidden_chars" != x; then
23782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23784  fi
23785
23786    # Output is in $new_path
23787
23788  windows_path="$new_path"
23789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23790    unix_path=`$CYGPATH -u "$windows_path"`
23791    new_path="$unix_path"
23792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23794    new_path="$unix_path"
23795  fi
23796
23797    # remove trailing .exe if any
23798    new_path="${new_path/%.exe/}"
23799
23800    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23801    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23802  fi
23803
23804  else
23805    # We're on a posix platform. Hooray! :)
23806    # First separate the path from the arguments. This will split at the first
23807    # space.
23808    complete="$RC"
23809    path="${complete%% *}"
23810    tmp="$complete EOL"
23811    arguments="${tmp#* }"
23812
23813    # Cannot rely on the command "which" here since it doesn't always work.
23814    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23815    if test -z "$is_absolute_path"; then
23816      # Path to executable is not absolute. Find it.
23817      IFS_save="$IFS"
23818      IFS=:
23819      for p in $PATH; do
23820        if test -f "$p/$path" && test -x "$p/$path"; then
23821          new_path="$p/$path"
23822          break
23823        fi
23824      done
23825      IFS="$IFS_save"
23826    else
23827      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23828$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23829      new_path="$path"
23830    fi
23831
23832    if test "x$new_path" = x; then
23833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23834$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23835        has_space=`$ECHO "$complete" | $GREP " "`
23836        if test "x$has_space" != x; then
23837          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23839        fi
23840        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23841      fi
23842  fi
23843
23844      # Now join together the path and the arguments once again
23845      if test "x$arguments" != xEOL; then
23846        new_complete="$new_path ${arguments% *}"
23847      else
23848        new_complete="$new_path"
23849      fi
23850
23851  if test "x$complete" != "x$new_complete"; then
23852      RC="$new_complete"
23853      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23854$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23855    fi
23856
23857
23858    # For hotspot, we need these in Windows mixed path,
23859    # so rewrite them all. Need added .exe suffix.
23860    HOTSPOT_CXX="$CXX.exe"
23861    HOTSPOT_LD="$LD.exe"
23862    HOTSPOT_MT="$MT.exe"
23863    HOTSPOT_RC="$RC.exe"
23864
23865  unix_path="$HOTSPOT_CXX"
23866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23867    windows_path=`$CYGPATH -m "$unix_path"`
23868    HOTSPOT_CXX="$windows_path"
23869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23870    windows_path=`cmd //c echo $unix_path`
23871    HOTSPOT_CXX="$windows_path"
23872  fi
23873
23874
23875  unix_path="$HOTSPOT_LD"
23876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23877    windows_path=`$CYGPATH -m "$unix_path"`
23878    HOTSPOT_LD="$windows_path"
23879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23880    windows_path=`cmd //c echo $unix_path`
23881    HOTSPOT_LD="$windows_path"
23882  fi
23883
23884
23885  unix_path="$HOTSPOT_MT"
23886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23887    windows_path=`$CYGPATH -m "$unix_path"`
23888    HOTSPOT_MT="$windows_path"
23889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23890    windows_path=`cmd //c echo $unix_path`
23891    HOTSPOT_MT="$windows_path"
23892  fi
23893
23894
23895  unix_path="$HOTSPOT_RC"
23896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23897    windows_path=`$CYGPATH -m "$unix_path"`
23898    HOTSPOT_RC="$windows_path"
23899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23900    windows_path=`cmd //c echo $unix_path`
23901    HOTSPOT_RC="$windows_path"
23902  fi
23903
23904
23905
23906
23907    RC_FLAGS="-nologo -l 0x409 -r"
23908    if test "x$VARIANT" = xOPT; then :
23909
23910        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23911
23912fi
23913
23914    # The version variables used to create RC_FLAGS may be overridden
23915    # in a custom configure script, or possibly the command line.
23916    # Let those variables be expanded at make time in spec.gmk.
23917    # The \$ are escaped to the shell, and the $(...) variables
23918    # are evaluated by make.
23919    RC_FLAGS="$RC_FLAGS \
23920        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23921        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23922        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23923        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23924        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23925        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23926        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23927
23928    # lib.exe is used to create static libraries.
23929    # Extract the first word of "lib", so it can be a program name with args.
23930set dummy lib; ac_word=$2
23931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23932$as_echo_n "checking for $ac_word... " >&6; }
23933if ${ac_cv_prog_WINAR+:} false; then :
23934  $as_echo_n "(cached) " >&6
23935else
23936  if test -n "$WINAR"; then
23937  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23938else
23939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23940for as_dir in $PATH
23941do
23942  IFS=$as_save_IFS
23943  test -z "$as_dir" && as_dir=.
23944    for ac_exec_ext in '' $ac_executable_extensions; do
23945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23946    ac_cv_prog_WINAR="lib"
23947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23948    break 2
23949  fi
23950done
23951  done
23952IFS=$as_save_IFS
23953
23954fi
23955fi
23956WINAR=$ac_cv_prog_WINAR
23957if test -n "$WINAR"; then
23958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23959$as_echo "$WINAR" >&6; }
23960else
23961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23962$as_echo "no" >&6; }
23963fi
23964
23965
23966
23967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23968
23969  # First separate the path from the arguments. This will split at the first
23970  # space.
23971  complete="$WINAR"
23972  path="${complete%% *}"
23973  tmp="$complete EOL"
23974  arguments="${tmp#* }"
23975
23976  # Input might be given as Windows format, start by converting to
23977  # unix format.
23978  new_path=`$CYGPATH -u "$path"`
23979
23980  # Now try to locate executable using which
23981  new_path=`$WHICH "$new_path" 2> /dev/null`
23982  # bat and cmd files are not always considered executable in cygwin causing which
23983  # to not find them
23984  if test "x$new_path" = x \
23985           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23986           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23987    new_path=`$CYGPATH -u "$path"`
23988  fi
23989  if test "x$new_path" = x; then
23990    # Oops. Which didn't find the executable.
23991    # The splitting of arguments from the executable at a space might have been incorrect,
23992    # since paths with space are more likely in Windows. Give it another try with the whole
23993    # argument.
23994    path="$complete"
23995    arguments="EOL"
23996    new_path=`$CYGPATH -u "$path"`
23997    new_path=`$WHICH "$new_path" 2> /dev/null`
23998    # bat and cmd files are not always considered executable in cygwin causing which
23999    # to not find them
24000    if test "x$new_path" = x \
24001             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24002             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24003      new_path=`$CYGPATH -u "$path"`
24004    fi
24005    if test "x$new_path" = x; then
24006      # It's still not found. Now this is an unrecoverable error.
24007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24008$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24009      has_space=`$ECHO "$complete" | $GREP " "`
24010      if test "x$has_space" != x; then
24011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24013      fi
24014      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24015    fi
24016  fi
24017
24018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24021  # "foo.exe" is OK but "foo" is an error.
24022  #
24023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24024  # It is also a way to make sure we got the proper file name for the real test later on.
24025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24026  if test "x$test_shortpath" = x; then
24027    # Short path failed, file does not exist as specified.
24028    # Try adding .exe or .cmd
24029    if test -f "${new_path}.exe"; then
24030       input_to_shortpath="${new_path}.exe"
24031    elif test -f "${new_path}.cmd"; then
24032       input_to_shortpath="${new_path}.cmd"
24033    else
24034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24035$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24038      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24039    fi
24040  else
24041    input_to_shortpath="$new_path"
24042  fi
24043
24044  # Call helper function which possibly converts this using DOS-style short mode.
24045  # If so, the updated path is stored in $new_path.
24046  new_path="$input_to_shortpath"
24047
24048  input_path="$input_to_shortpath"
24049  # Check if we need to convert this using DOS-style short mode. If the path
24050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24051  # take no chances and rewrite it.
24052  # Note: m4 eats our [], so we need to use [ and ] instead.
24053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24054  if test "x$has_forbidden_chars" != x; then
24055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24059      # Going to short mode and back again did indeed matter. Since short mode is
24060      # case insensitive, let's make it lowercase to improve readability.
24061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24062      # Now convert it back to Unix-stile (cygpath)
24063      input_path=`$CYGPATH -u "$shortmode_path"`
24064      new_path="$input_path"
24065    fi
24066  fi
24067
24068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24069  if test "x$test_cygdrive_prefix" = x; then
24070    # As a simple fix, exclude /usr/bin since it's not a real path.
24071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24073      # a path prefixed by /cygdrive for fixpath to work.
24074      new_path="$CYGWIN_ROOT_PATH$input_path"
24075    fi
24076  fi
24077
24078  # remove trailing .exe if any
24079  new_path="${new_path/%.exe/}"
24080
24081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24082
24083  # First separate the path from the arguments. This will split at the first
24084  # space.
24085  complete="$WINAR"
24086  path="${complete%% *}"
24087  tmp="$complete EOL"
24088  arguments="${tmp#* }"
24089
24090  # Input might be given as Windows format, start by converting to
24091  # unix format.
24092  new_path="$path"
24093
24094  windows_path="$new_path"
24095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24096    unix_path=`$CYGPATH -u "$windows_path"`
24097    new_path="$unix_path"
24098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24100    new_path="$unix_path"
24101  fi
24102
24103
24104  # Now try to locate executable using which
24105  new_path=`$WHICH "$new_path" 2> /dev/null`
24106
24107  if test "x$new_path" = x; then
24108    # Oops. Which didn't find the executable.
24109    # The splitting of arguments from the executable at a space might have been incorrect,
24110    # since paths with space are more likely in Windows. Give it another try with the whole
24111    # argument.
24112    path="$complete"
24113    arguments="EOL"
24114    new_path="$path"
24115
24116  windows_path="$new_path"
24117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24118    unix_path=`$CYGPATH -u "$windows_path"`
24119    new_path="$unix_path"
24120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24122    new_path="$unix_path"
24123  fi
24124
24125
24126    new_path=`$WHICH "$new_path" 2> /dev/null`
24127
24128    if test "x$new_path" = x; then
24129      # It's still not found. Now this is an unrecoverable error.
24130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24131$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24132      has_space=`$ECHO "$complete" | $GREP " "`
24133      if test "x$has_space" != x; then
24134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24136      fi
24137      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24138    fi
24139  fi
24140
24141  # Now new_path has a complete unix path to the binary
24142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24143    # Keep paths in /bin as-is, but remove trailing .exe if any
24144    new_path="${new_path/%.exe/}"
24145    # Do not save /bin paths to all_fixpath_prefixes!
24146  else
24147    # Not in mixed or Windows style, start by that.
24148    new_path=`cmd //c echo $new_path`
24149
24150  input_path="$new_path"
24151  # Check if we need to convert this using DOS-style short mode. If the path
24152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24153  # take no chances and rewrite it.
24154  # Note: m4 eats our [], so we need to use [ and ] instead.
24155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24156  if test "x$has_forbidden_chars" != x; then
24157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24159  fi
24160
24161    # Output is in $new_path
24162
24163  windows_path="$new_path"
24164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24165    unix_path=`$CYGPATH -u "$windows_path"`
24166    new_path="$unix_path"
24167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24169    new_path="$unix_path"
24170  fi
24171
24172    # remove trailing .exe if any
24173    new_path="${new_path/%.exe/}"
24174
24175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24177  fi
24178
24179  else
24180    # We're on a posix platform. Hooray! :)
24181    # First separate the path from the arguments. This will split at the first
24182    # space.
24183    complete="$WINAR"
24184    path="${complete%% *}"
24185    tmp="$complete EOL"
24186    arguments="${tmp#* }"
24187
24188    # Cannot rely on the command "which" here since it doesn't always work.
24189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24190    if test -z "$is_absolute_path"; then
24191      # Path to executable is not absolute. Find it.
24192      IFS_save="$IFS"
24193      IFS=:
24194      for p in $PATH; do
24195        if test -f "$p/$path" && test -x "$p/$path"; then
24196          new_path="$p/$path"
24197          break
24198        fi
24199      done
24200      IFS="$IFS_save"
24201    else
24202      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24203$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24204      new_path="$path"
24205    fi
24206
24207    if test "x$new_path" = x; then
24208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24209$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24210        has_space=`$ECHO "$complete" | $GREP " "`
24211        if test "x$has_space" != x; then
24212          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24214        fi
24215        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24216      fi
24217  fi
24218
24219      # Now join together the path and the arguments once again
24220      if test "x$arguments" != xEOL; then
24221        new_complete="$new_path ${arguments% *}"
24222      else
24223        new_complete="$new_path"
24224      fi
24225
24226  if test "x$complete" != "x$new_complete"; then
24227      WINAR="$new_complete"
24228      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24229$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24230    fi
24231
24232    AR="$WINAR"
24233    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24234
24235    # Extract the first word of "dumpbin", so it can be a program name with args.
24236set dummy dumpbin; ac_word=$2
24237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24238$as_echo_n "checking for $ac_word... " >&6; }
24239if ${ac_cv_prog_DUMPBIN+:} false; then :
24240  $as_echo_n "(cached) " >&6
24241else
24242  if test -n "$DUMPBIN"; then
24243  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24244else
24245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24246for as_dir in $PATH
24247do
24248  IFS=$as_save_IFS
24249  test -z "$as_dir" && as_dir=.
24250    for ac_exec_ext in '' $ac_executable_extensions; do
24251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24252    ac_cv_prog_DUMPBIN="dumpbin"
24253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24254    break 2
24255  fi
24256done
24257  done
24258IFS=$as_save_IFS
24259
24260fi
24261fi
24262DUMPBIN=$ac_cv_prog_DUMPBIN
24263if test -n "$DUMPBIN"; then
24264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24265$as_echo "$DUMPBIN" >&6; }
24266else
24267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24268$as_echo "no" >&6; }
24269fi
24270
24271
24272
24273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24274
24275  # First separate the path from the arguments. This will split at the first
24276  # space.
24277  complete="$DUMPBIN"
24278  path="${complete%% *}"
24279  tmp="$complete EOL"
24280  arguments="${tmp#* }"
24281
24282  # Input might be given as Windows format, start by converting to
24283  # unix format.
24284  new_path=`$CYGPATH -u "$path"`
24285
24286  # Now try to locate executable using which
24287  new_path=`$WHICH "$new_path" 2> /dev/null`
24288  # bat and cmd files are not always considered executable in cygwin causing which
24289  # to not find them
24290  if test "x$new_path" = x \
24291           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24292           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24293    new_path=`$CYGPATH -u "$path"`
24294  fi
24295  if test "x$new_path" = x; then
24296    # Oops. Which didn't find the executable.
24297    # The splitting of arguments from the executable at a space might have been incorrect,
24298    # since paths with space are more likely in Windows. Give it another try with the whole
24299    # argument.
24300    path="$complete"
24301    arguments="EOL"
24302    new_path=`$CYGPATH -u "$path"`
24303    new_path=`$WHICH "$new_path" 2> /dev/null`
24304    # bat and cmd files are not always considered executable in cygwin causing which
24305    # to not find them
24306    if test "x$new_path" = x \
24307             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24308             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24309      new_path=`$CYGPATH -u "$path"`
24310    fi
24311    if test "x$new_path" = x; then
24312      # It's still not found. Now this is an unrecoverable error.
24313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24314$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24315      has_space=`$ECHO "$complete" | $GREP " "`
24316      if test "x$has_space" != x; then
24317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24319      fi
24320      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24321    fi
24322  fi
24323
24324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24327  # "foo.exe" is OK but "foo" is an error.
24328  #
24329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24330  # It is also a way to make sure we got the proper file name for the real test later on.
24331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24332  if test "x$test_shortpath" = x; then
24333    # Short path failed, file does not exist as specified.
24334    # Try adding .exe or .cmd
24335    if test -f "${new_path}.exe"; then
24336       input_to_shortpath="${new_path}.exe"
24337    elif test -f "${new_path}.cmd"; then
24338       input_to_shortpath="${new_path}.cmd"
24339    else
24340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24341$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24344      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24345    fi
24346  else
24347    input_to_shortpath="$new_path"
24348  fi
24349
24350  # Call helper function which possibly converts this using DOS-style short mode.
24351  # If so, the updated path is stored in $new_path.
24352  new_path="$input_to_shortpath"
24353
24354  input_path="$input_to_shortpath"
24355  # Check if we need to convert this using DOS-style short mode. If the path
24356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24357  # take no chances and rewrite it.
24358  # Note: m4 eats our [], so we need to use [ and ] instead.
24359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24360  if test "x$has_forbidden_chars" != x; then
24361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24365      # Going to short mode and back again did indeed matter. Since short mode is
24366      # case insensitive, let's make it lowercase to improve readability.
24367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24368      # Now convert it back to Unix-stile (cygpath)
24369      input_path=`$CYGPATH -u "$shortmode_path"`
24370      new_path="$input_path"
24371    fi
24372  fi
24373
24374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24375  if test "x$test_cygdrive_prefix" = x; then
24376    # As a simple fix, exclude /usr/bin since it's not a real path.
24377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24379      # a path prefixed by /cygdrive for fixpath to work.
24380      new_path="$CYGWIN_ROOT_PATH$input_path"
24381    fi
24382  fi
24383
24384  # remove trailing .exe if any
24385  new_path="${new_path/%.exe/}"
24386
24387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24388
24389  # First separate the path from the arguments. This will split at the first
24390  # space.
24391  complete="$DUMPBIN"
24392  path="${complete%% *}"
24393  tmp="$complete EOL"
24394  arguments="${tmp#* }"
24395
24396  # Input might be given as Windows format, start by converting to
24397  # unix format.
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  # Now try to locate executable using which
24411  new_path=`$WHICH "$new_path" 2> /dev/null`
24412
24413  if test "x$new_path" = x; then
24414    # Oops. Which didn't find the executable.
24415    # The splitting of arguments from the executable at a space might have been incorrect,
24416    # since paths with space are more likely in Windows. Give it another try with the whole
24417    # argument.
24418    path="$complete"
24419    arguments="EOL"
24420    new_path="$path"
24421
24422  windows_path="$new_path"
24423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24424    unix_path=`$CYGPATH -u "$windows_path"`
24425    new_path="$unix_path"
24426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24428    new_path="$unix_path"
24429  fi
24430
24431
24432    new_path=`$WHICH "$new_path" 2> /dev/null`
24433
24434    if test "x$new_path" = x; then
24435      # It's still not found. Now this is an unrecoverable error.
24436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24437$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24438      has_space=`$ECHO "$complete" | $GREP " "`
24439      if test "x$has_space" != x; then
24440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24442      fi
24443      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24444    fi
24445  fi
24446
24447  # Now new_path has a complete unix path to the binary
24448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24449    # Keep paths in /bin as-is, but remove trailing .exe if any
24450    new_path="${new_path/%.exe/}"
24451    # Do not save /bin paths to all_fixpath_prefixes!
24452  else
24453    # Not in mixed or Windows style, start by that.
24454    new_path=`cmd //c echo $new_path`
24455
24456  input_path="$new_path"
24457  # Check if we need to convert this using DOS-style short mode. If the path
24458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24459  # take no chances and rewrite it.
24460  # Note: m4 eats our [], so we need to use [ and ] instead.
24461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24462  if test "x$has_forbidden_chars" != x; then
24463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24465  fi
24466
24467    # Output is in $new_path
24468
24469  windows_path="$new_path"
24470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24471    unix_path=`$CYGPATH -u "$windows_path"`
24472    new_path="$unix_path"
24473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24475    new_path="$unix_path"
24476  fi
24477
24478    # remove trailing .exe if any
24479    new_path="${new_path/%.exe/}"
24480
24481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24483  fi
24484
24485  else
24486    # We're on a posix platform. Hooray! :)
24487    # First separate the path from the arguments. This will split at the first
24488    # space.
24489    complete="$DUMPBIN"
24490    path="${complete%% *}"
24491    tmp="$complete EOL"
24492    arguments="${tmp#* }"
24493
24494    # Cannot rely on the command "which" here since it doesn't always work.
24495    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24496    if test -z "$is_absolute_path"; then
24497      # Path to executable is not absolute. Find it.
24498      IFS_save="$IFS"
24499      IFS=:
24500      for p in $PATH; do
24501        if test -f "$p/$path" && test -x "$p/$path"; then
24502          new_path="$p/$path"
24503          break
24504        fi
24505      done
24506      IFS="$IFS_save"
24507    else
24508      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24509$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24510      new_path="$path"
24511    fi
24512
24513    if test "x$new_path" = x; then
24514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24515$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24516        has_space=`$ECHO "$complete" | $GREP " "`
24517        if test "x$has_space" != x; then
24518          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24519$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24520        fi
24521        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24522      fi
24523  fi
24524
24525      # Now join together the path and the arguments once again
24526      if test "x$arguments" != xEOL; then
24527        new_complete="$new_path ${arguments% *}"
24528      else
24529        new_complete="$new_path"
24530      fi
24531
24532  if test "x$complete" != "x$new_complete"; then
24533      DUMPBIN="$new_complete"
24534      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24535$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24536    fi
24537
24538
24539    COMPILER_TYPE=CL
24540    CCXXFLAGS="$CCXXFLAGS -nologo"
24541
24542fi
24543
24544
24545
24546ac_ext=c
24547ac_cpp='$CPP $CPPFLAGS'
24548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24550ac_compiler_gnu=$ac_cv_c_compiler_gnu
24551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24552$as_echo_n "checking how to run the C preprocessor... " >&6; }
24553# On Suns, sometimes $CPP names a directory.
24554if test -n "$CPP" && test -d "$CPP"; then
24555  CPP=
24556fi
24557if test -z "$CPP"; then
24558  if ${ac_cv_prog_CPP+:} false; then :
24559  $as_echo_n "(cached) " >&6
24560else
24561      # Double quotes because CPP needs to be expanded
24562    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24563    do
24564      ac_preproc_ok=false
24565for ac_c_preproc_warn_flag in '' yes
24566do
24567  # Use a header file that comes with gcc, so configuring glibc
24568  # with a fresh cross-compiler works.
24569  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24570  # <limits.h> exists even on freestanding compilers.
24571  # On the NeXT, cc -E runs the code through the compiler's parser,
24572  # not just through cpp. "Syntax error" is here to catch this case.
24573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24574/* end confdefs.h.  */
24575#ifdef __STDC__
24576# include <limits.h>
24577#else
24578# include <assert.h>
24579#endif
24580		     Syntax error
24581_ACEOF
24582if ac_fn_c_try_cpp "$LINENO"; then :
24583
24584else
24585  # Broken: fails on valid input.
24586continue
24587fi
24588rm -f conftest.err conftest.i conftest.$ac_ext
24589
24590  # OK, works on sane cases.  Now check whether nonexistent headers
24591  # can be detected and how.
24592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24593/* end confdefs.h.  */
24594#include <ac_nonexistent.h>
24595_ACEOF
24596if ac_fn_c_try_cpp "$LINENO"; then :
24597  # Broken: success on invalid input.
24598continue
24599else
24600  # Passes both tests.
24601ac_preproc_ok=:
24602break
24603fi
24604rm -f conftest.err conftest.i conftest.$ac_ext
24605
24606done
24607# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24608rm -f conftest.i conftest.err conftest.$ac_ext
24609if $ac_preproc_ok; then :
24610  break
24611fi
24612
24613    done
24614    ac_cv_prog_CPP=$CPP
24615
24616fi
24617  CPP=$ac_cv_prog_CPP
24618else
24619  ac_cv_prog_CPP=$CPP
24620fi
24621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24622$as_echo "$CPP" >&6; }
24623ac_preproc_ok=false
24624for ac_c_preproc_warn_flag in '' yes
24625do
24626  # Use a header file that comes with gcc, so configuring glibc
24627  # with a fresh cross-compiler works.
24628  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24629  # <limits.h> exists even on freestanding compilers.
24630  # On the NeXT, cc -E runs the code through the compiler's parser,
24631  # not just through cpp. "Syntax error" is here to catch this case.
24632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24633/* end confdefs.h.  */
24634#ifdef __STDC__
24635# include <limits.h>
24636#else
24637# include <assert.h>
24638#endif
24639		     Syntax error
24640_ACEOF
24641if ac_fn_c_try_cpp "$LINENO"; then :
24642
24643else
24644  # Broken: fails on valid input.
24645continue
24646fi
24647rm -f conftest.err conftest.i conftest.$ac_ext
24648
24649  # OK, works on sane cases.  Now check whether nonexistent headers
24650  # can be detected and how.
24651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24652/* end confdefs.h.  */
24653#include <ac_nonexistent.h>
24654_ACEOF
24655if ac_fn_c_try_cpp "$LINENO"; then :
24656  # Broken: success on invalid input.
24657continue
24658else
24659  # Passes both tests.
24660ac_preproc_ok=:
24661break
24662fi
24663rm -f conftest.err conftest.i conftest.$ac_ext
24664
24665done
24666# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24667rm -f conftest.i conftest.err conftest.$ac_ext
24668if $ac_preproc_ok; then :
24669
24670else
24671  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24673as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24674See \`config.log' for more details" "$LINENO" 5; }
24675fi
24676
24677ac_ext=cpp
24678ac_cpp='$CXXCPP $CPPFLAGS'
24679ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24680ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24681ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24682
24683
24684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24685
24686  # First separate the path from the arguments. This will split at the first
24687  # space.
24688  complete="$CPP"
24689  path="${complete%% *}"
24690  tmp="$complete EOL"
24691  arguments="${tmp#* }"
24692
24693  # Input might be given as Windows format, start by converting to
24694  # unix format.
24695  new_path=`$CYGPATH -u "$path"`
24696
24697  # Now try to locate executable using which
24698  new_path=`$WHICH "$new_path" 2> /dev/null`
24699  # bat and cmd files are not always considered executable in cygwin causing which
24700  # to not find them
24701  if test "x$new_path" = x \
24702           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24703           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24704    new_path=`$CYGPATH -u "$path"`
24705  fi
24706  if test "x$new_path" = x; then
24707    # Oops. Which didn't find the executable.
24708    # The splitting of arguments from the executable at a space might have been incorrect,
24709    # since paths with space are more likely in Windows. Give it another try with the whole
24710    # argument.
24711    path="$complete"
24712    arguments="EOL"
24713    new_path=`$CYGPATH -u "$path"`
24714    new_path=`$WHICH "$new_path" 2> /dev/null`
24715    # bat and cmd files are not always considered executable in cygwin causing which
24716    # to not find them
24717    if test "x$new_path" = x \
24718             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24719             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24720      new_path=`$CYGPATH -u "$path"`
24721    fi
24722    if test "x$new_path" = x; then
24723      # It's still not found. Now this is an unrecoverable error.
24724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24725$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24726      has_space=`$ECHO "$complete" | $GREP " "`
24727      if test "x$has_space" != x; then
24728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24730      fi
24731      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24732    fi
24733  fi
24734
24735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24738  # "foo.exe" is OK but "foo" is an error.
24739  #
24740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24741  # It is also a way to make sure we got the proper file name for the real test later on.
24742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24743  if test "x$test_shortpath" = x; then
24744    # Short path failed, file does not exist as specified.
24745    # Try adding .exe or .cmd
24746    if test -f "${new_path}.exe"; then
24747       input_to_shortpath="${new_path}.exe"
24748    elif test -f "${new_path}.cmd"; then
24749       input_to_shortpath="${new_path}.cmd"
24750    else
24751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24752$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24755      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24756    fi
24757  else
24758    input_to_shortpath="$new_path"
24759  fi
24760
24761  # Call helper function which possibly converts this using DOS-style short mode.
24762  # If so, the updated path is stored in $new_path.
24763  new_path="$input_to_shortpath"
24764
24765  input_path="$input_to_shortpath"
24766  # Check if we need to convert this using DOS-style short mode. If the path
24767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24768  # take no chances and rewrite it.
24769  # Note: m4 eats our [], so we need to use [ and ] instead.
24770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24771  if test "x$has_forbidden_chars" != x; then
24772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24776      # Going to short mode and back again did indeed matter. Since short mode is
24777      # case insensitive, let's make it lowercase to improve readability.
24778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24779      # Now convert it back to Unix-stile (cygpath)
24780      input_path=`$CYGPATH -u "$shortmode_path"`
24781      new_path="$input_path"
24782    fi
24783  fi
24784
24785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24786  if test "x$test_cygdrive_prefix" = x; then
24787    # As a simple fix, exclude /usr/bin since it's not a real path.
24788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24790      # a path prefixed by /cygdrive for fixpath to work.
24791      new_path="$CYGWIN_ROOT_PATH$input_path"
24792    fi
24793  fi
24794
24795  # remove trailing .exe if any
24796  new_path="${new_path/%.exe/}"
24797
24798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24799
24800  # First separate the path from the arguments. This will split at the first
24801  # space.
24802  complete="$CPP"
24803  path="${complete%% *}"
24804  tmp="$complete EOL"
24805  arguments="${tmp#* }"
24806
24807  # Input might be given as Windows format, start by converting to
24808  # unix format.
24809  new_path="$path"
24810
24811  windows_path="$new_path"
24812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24813    unix_path=`$CYGPATH -u "$windows_path"`
24814    new_path="$unix_path"
24815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24817    new_path="$unix_path"
24818  fi
24819
24820
24821  # Now try to locate executable using which
24822  new_path=`$WHICH "$new_path" 2> /dev/null`
24823
24824  if test "x$new_path" = x; then
24825    # Oops. Which didn't find the executable.
24826    # The splitting of arguments from the executable at a space might have been incorrect,
24827    # since paths with space are more likely in Windows. Give it another try with the whole
24828    # argument.
24829    path="$complete"
24830    arguments="EOL"
24831    new_path="$path"
24832
24833  windows_path="$new_path"
24834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24835    unix_path=`$CYGPATH -u "$windows_path"`
24836    new_path="$unix_path"
24837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24839    new_path="$unix_path"
24840  fi
24841
24842
24843    new_path=`$WHICH "$new_path" 2> /dev/null`
24844
24845    if test "x$new_path" = x; then
24846      # It's still not found. Now this is an unrecoverable error.
24847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24848$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24849      has_space=`$ECHO "$complete" | $GREP " "`
24850      if test "x$has_space" != x; then
24851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24853      fi
24854      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24855    fi
24856  fi
24857
24858  # Now new_path has a complete unix path to the binary
24859  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24860    # Keep paths in /bin as-is, but remove trailing .exe if any
24861    new_path="${new_path/%.exe/}"
24862    # Do not save /bin paths to all_fixpath_prefixes!
24863  else
24864    # Not in mixed or Windows style, start by that.
24865    new_path=`cmd //c echo $new_path`
24866
24867  input_path="$new_path"
24868  # Check if we need to convert this using DOS-style short mode. If the path
24869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24870  # take no chances and rewrite it.
24871  # Note: m4 eats our [], so we need to use [ and ] instead.
24872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24873  if test "x$has_forbidden_chars" != x; then
24874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24876  fi
24877
24878    # Output is in $new_path
24879
24880  windows_path="$new_path"
24881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24882    unix_path=`$CYGPATH -u "$windows_path"`
24883    new_path="$unix_path"
24884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24886    new_path="$unix_path"
24887  fi
24888
24889    # remove trailing .exe if any
24890    new_path="${new_path/%.exe/}"
24891
24892    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24893    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24894  fi
24895
24896  else
24897    # We're on a posix platform. Hooray! :)
24898    # First separate the path from the arguments. This will split at the first
24899    # space.
24900    complete="$CPP"
24901    path="${complete%% *}"
24902    tmp="$complete EOL"
24903    arguments="${tmp#* }"
24904
24905    # Cannot rely on the command "which" here since it doesn't always work.
24906    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24907    if test -z "$is_absolute_path"; then
24908      # Path to executable is not absolute. Find it.
24909      IFS_save="$IFS"
24910      IFS=:
24911      for p in $PATH; do
24912        if test -f "$p/$path" && test -x "$p/$path"; then
24913          new_path="$p/$path"
24914          break
24915        fi
24916      done
24917      IFS="$IFS_save"
24918    else
24919      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24920$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24921      new_path="$path"
24922    fi
24923
24924    if test "x$new_path" = x; then
24925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24926$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24927        has_space=`$ECHO "$complete" | $GREP " "`
24928        if test "x$has_space" != x; then
24929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24931        fi
24932        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24933      fi
24934  fi
24935
24936      # Now join together the path and the arguments once again
24937      if test "x$arguments" != xEOL; then
24938        new_complete="$new_path ${arguments% *}"
24939      else
24940        new_complete="$new_path"
24941      fi
24942
24943  if test "x$complete" != "x$new_complete"; then
24944      CPP="$new_complete"
24945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24946$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24947    fi
24948
24949
24950ac_ext=cpp
24951ac_cpp='$CXXCPP $CPPFLAGS'
24952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24956$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24957if test -z "$CXXCPP"; then
24958  if ${ac_cv_prog_CXXCPP+:} false; then :
24959  $as_echo_n "(cached) " >&6
24960else
24961      # Double quotes because CXXCPP needs to be expanded
24962    for CXXCPP in "$CXX -E" "/lib/cpp"
24963    do
24964      ac_preproc_ok=false
24965for ac_cxx_preproc_warn_flag in '' yes
24966do
24967  # Use a header file that comes with gcc, so configuring glibc
24968  # with a fresh cross-compiler works.
24969  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24970  # <limits.h> exists even on freestanding compilers.
24971  # On the NeXT, cc -E runs the code through the compiler's parser,
24972  # not just through cpp. "Syntax error" is here to catch this case.
24973  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24974/* end confdefs.h.  */
24975#ifdef __STDC__
24976# include <limits.h>
24977#else
24978# include <assert.h>
24979#endif
24980		     Syntax error
24981_ACEOF
24982if ac_fn_cxx_try_cpp "$LINENO"; then :
24983
24984else
24985  # Broken: fails on valid input.
24986continue
24987fi
24988rm -f conftest.err conftest.i conftest.$ac_ext
24989
24990  # OK, works on sane cases.  Now check whether nonexistent headers
24991  # can be detected and how.
24992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24993/* end confdefs.h.  */
24994#include <ac_nonexistent.h>
24995_ACEOF
24996if ac_fn_cxx_try_cpp "$LINENO"; then :
24997  # Broken: success on invalid input.
24998continue
24999else
25000  # Passes both tests.
25001ac_preproc_ok=:
25002break
25003fi
25004rm -f conftest.err conftest.i conftest.$ac_ext
25005
25006done
25007# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25008rm -f conftest.i conftest.err conftest.$ac_ext
25009if $ac_preproc_ok; then :
25010  break
25011fi
25012
25013    done
25014    ac_cv_prog_CXXCPP=$CXXCPP
25015
25016fi
25017  CXXCPP=$ac_cv_prog_CXXCPP
25018else
25019  ac_cv_prog_CXXCPP=$CXXCPP
25020fi
25021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25022$as_echo "$CXXCPP" >&6; }
25023ac_preproc_ok=false
25024for ac_cxx_preproc_warn_flag in '' yes
25025do
25026  # Use a header file that comes with gcc, so configuring glibc
25027  # with a fresh cross-compiler works.
25028  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25029  # <limits.h> exists even on freestanding compilers.
25030  # On the NeXT, cc -E runs the code through the compiler's parser,
25031  # not just through cpp. "Syntax error" is here to catch this case.
25032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25033/* end confdefs.h.  */
25034#ifdef __STDC__
25035# include <limits.h>
25036#else
25037# include <assert.h>
25038#endif
25039		     Syntax error
25040_ACEOF
25041if ac_fn_cxx_try_cpp "$LINENO"; then :
25042
25043else
25044  # Broken: fails on valid input.
25045continue
25046fi
25047rm -f conftest.err conftest.i conftest.$ac_ext
25048
25049  # OK, works on sane cases.  Now check whether nonexistent headers
25050  # can be detected and how.
25051  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25052/* end confdefs.h.  */
25053#include <ac_nonexistent.h>
25054_ACEOF
25055if ac_fn_cxx_try_cpp "$LINENO"; then :
25056  # Broken: success on invalid input.
25057continue
25058else
25059  # Passes both tests.
25060ac_preproc_ok=:
25061break
25062fi
25063rm -f conftest.err conftest.i conftest.$ac_ext
25064
25065done
25066# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25067rm -f conftest.i conftest.err conftest.$ac_ext
25068if $ac_preproc_ok; then :
25069
25070else
25071  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25073as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25074See \`config.log' for more details" "$LINENO" 5; }
25075fi
25076
25077ac_ext=cpp
25078ac_cpp='$CXXCPP $CPPFLAGS'
25079ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25080ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25081ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25082
25083
25084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25085
25086  # First separate the path from the arguments. This will split at the first
25087  # space.
25088  complete="$CXXCPP"
25089  path="${complete%% *}"
25090  tmp="$complete EOL"
25091  arguments="${tmp#* }"
25092
25093  # Input might be given as Windows format, start by converting to
25094  # unix format.
25095  new_path=`$CYGPATH -u "$path"`
25096
25097  # Now try to locate executable using which
25098  new_path=`$WHICH "$new_path" 2> /dev/null`
25099  # bat and cmd files are not always considered executable in cygwin causing which
25100  # to not find them
25101  if test "x$new_path" = x \
25102           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25103           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25104    new_path=`$CYGPATH -u "$path"`
25105  fi
25106  if test "x$new_path" = x; then
25107    # Oops. Which didn't find the executable.
25108    # The splitting of arguments from the executable at a space might have been incorrect,
25109    # since paths with space are more likely in Windows. Give it another try with the whole
25110    # argument.
25111    path="$complete"
25112    arguments="EOL"
25113    new_path=`$CYGPATH -u "$path"`
25114    new_path=`$WHICH "$new_path" 2> /dev/null`
25115    # bat and cmd files are not always considered executable in cygwin causing which
25116    # to not find them
25117    if test "x$new_path" = x \
25118             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25119             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25120      new_path=`$CYGPATH -u "$path"`
25121    fi
25122    if test "x$new_path" = x; then
25123      # It's still not found. Now this is an unrecoverable error.
25124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25125$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25126      has_space=`$ECHO "$complete" | $GREP " "`
25127      if test "x$has_space" != x; then
25128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25130      fi
25131      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25132    fi
25133  fi
25134
25135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25138  # "foo.exe" is OK but "foo" is an error.
25139  #
25140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25141  # It is also a way to make sure we got the proper file name for the real test later on.
25142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25143  if test "x$test_shortpath" = x; then
25144    # Short path failed, file does not exist as specified.
25145    # Try adding .exe or .cmd
25146    if test -f "${new_path}.exe"; then
25147       input_to_shortpath="${new_path}.exe"
25148    elif test -f "${new_path}.cmd"; then
25149       input_to_shortpath="${new_path}.cmd"
25150    else
25151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25152$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25153      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25154$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25155      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25156    fi
25157  else
25158    input_to_shortpath="$new_path"
25159  fi
25160
25161  # Call helper function which possibly converts this using DOS-style short mode.
25162  # If so, the updated path is stored in $new_path.
25163  new_path="$input_to_shortpath"
25164
25165  input_path="$input_to_shortpath"
25166  # Check if we need to convert this using DOS-style short mode. If the path
25167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25168  # take no chances and rewrite it.
25169  # Note: m4 eats our [], so we need to use [ and ] instead.
25170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25171  if test "x$has_forbidden_chars" != x; then
25172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25176      # Going to short mode and back again did indeed matter. Since short mode is
25177      # case insensitive, let's make it lowercase to improve readability.
25178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25179      # Now convert it back to Unix-stile (cygpath)
25180      input_path=`$CYGPATH -u "$shortmode_path"`
25181      new_path="$input_path"
25182    fi
25183  fi
25184
25185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25186  if test "x$test_cygdrive_prefix" = x; then
25187    # As a simple fix, exclude /usr/bin since it's not a real path.
25188    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25190      # a path prefixed by /cygdrive for fixpath to work.
25191      new_path="$CYGWIN_ROOT_PATH$input_path"
25192    fi
25193  fi
25194
25195  # remove trailing .exe if any
25196  new_path="${new_path/%.exe/}"
25197
25198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25199
25200  # First separate the path from the arguments. This will split at the first
25201  # space.
25202  complete="$CXXCPP"
25203  path="${complete%% *}"
25204  tmp="$complete EOL"
25205  arguments="${tmp#* }"
25206
25207  # Input might be given as Windows format, start by converting to
25208  # unix format.
25209  new_path="$path"
25210
25211  windows_path="$new_path"
25212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25213    unix_path=`$CYGPATH -u "$windows_path"`
25214    new_path="$unix_path"
25215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25217    new_path="$unix_path"
25218  fi
25219
25220
25221  # Now try to locate executable using which
25222  new_path=`$WHICH "$new_path" 2> /dev/null`
25223
25224  if test "x$new_path" = x; then
25225    # Oops. Which didn't find the executable.
25226    # The splitting of arguments from the executable at a space might have been incorrect,
25227    # since paths with space are more likely in Windows. Give it another try with the whole
25228    # argument.
25229    path="$complete"
25230    arguments="EOL"
25231    new_path="$path"
25232
25233  windows_path="$new_path"
25234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25235    unix_path=`$CYGPATH -u "$windows_path"`
25236    new_path="$unix_path"
25237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25239    new_path="$unix_path"
25240  fi
25241
25242
25243    new_path=`$WHICH "$new_path" 2> /dev/null`
25244
25245    if test "x$new_path" = x; then
25246      # It's still not found. Now this is an unrecoverable error.
25247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25248$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25249      has_space=`$ECHO "$complete" | $GREP " "`
25250      if test "x$has_space" != x; then
25251        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25252$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25253      fi
25254      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25255    fi
25256  fi
25257
25258  # Now new_path has a complete unix path to the binary
25259  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25260    # Keep paths in /bin as-is, but remove trailing .exe if any
25261    new_path="${new_path/%.exe/}"
25262    # Do not save /bin paths to all_fixpath_prefixes!
25263  else
25264    # Not in mixed or Windows style, start by that.
25265    new_path=`cmd //c echo $new_path`
25266
25267  input_path="$new_path"
25268  # Check if we need to convert this using DOS-style short mode. If the path
25269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25270  # take no chances and rewrite it.
25271  # Note: m4 eats our [], so we need to use [ and ] instead.
25272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25273  if test "x$has_forbidden_chars" != x; then
25274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25276  fi
25277
25278    # Output is in $new_path
25279
25280  windows_path="$new_path"
25281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25282    unix_path=`$CYGPATH -u "$windows_path"`
25283    new_path="$unix_path"
25284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25286    new_path="$unix_path"
25287  fi
25288
25289    # remove trailing .exe if any
25290    new_path="${new_path/%.exe/}"
25291
25292    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25293    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25294  fi
25295
25296  else
25297    # We're on a posix platform. Hooray! :)
25298    # First separate the path from the arguments. This will split at the first
25299    # space.
25300    complete="$CXXCPP"
25301    path="${complete%% *}"
25302    tmp="$complete EOL"
25303    arguments="${tmp#* }"
25304
25305    # Cannot rely on the command "which" here since it doesn't always work.
25306    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25307    if test -z "$is_absolute_path"; then
25308      # Path to executable is not absolute. Find it.
25309      IFS_save="$IFS"
25310      IFS=:
25311      for p in $PATH; do
25312        if test -f "$p/$path" && test -x "$p/$path"; then
25313          new_path="$p/$path"
25314          break
25315        fi
25316      done
25317      IFS="$IFS_save"
25318    else
25319      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25320$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25321      new_path="$path"
25322    fi
25323
25324    if test "x$new_path" = x; then
25325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25326$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25327        has_space=`$ECHO "$complete" | $GREP " "`
25328        if test "x$has_space" != x; then
25329          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25330$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25331        fi
25332        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25333      fi
25334  fi
25335
25336      # Now join together the path and the arguments once again
25337      if test "x$arguments" != xEOL; then
25338        new_complete="$new_path ${arguments% *}"
25339      else
25340        new_complete="$new_path"
25341      fi
25342
25343  if test "x$complete" != "x$new_complete"; then
25344      CXXCPP="$new_complete"
25345      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25346$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25347    fi
25348
25349
25350if test "x$COMPILE_TYPE" != "xcross"; then
25351    # If we are not cross compiling, use the same compilers for
25352    # building the build platform executables. The cross-compilation
25353    # case needed to be done earlier, but this can only be done after
25354    # the native tools have been localized.
25355    BUILD_CC="$CC"
25356    BUILD_CXX="$CXX"
25357    BUILD_LD="$LD"
25358fi
25359
25360# for solaris we really need solaris tools, and not gnu equivalent
25361#   these seems to normally reside in /usr/ccs/bin so add that to path before
25362#   starting to probe
25363#
25364#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25365#         so that it can be overriden --with-tools-dir
25366if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25367    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25368fi
25369
25370# Find the right assembler.
25371if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25372    # Extract the first word of "as", so it can be a program name with args.
25373set dummy as; ac_word=$2
25374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25375$as_echo_n "checking for $ac_word... " >&6; }
25376if ${ac_cv_path_AS+:} false; then :
25377  $as_echo_n "(cached) " >&6
25378else
25379  case $AS in
25380  [\\/]* | ?:[\\/]*)
25381  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25382  ;;
25383  *)
25384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25385for as_dir in $PATH
25386do
25387  IFS=$as_save_IFS
25388  test -z "$as_dir" && as_dir=.
25389    for ac_exec_ext in '' $ac_executable_extensions; do
25390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25391    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25393    break 2
25394  fi
25395done
25396  done
25397IFS=$as_save_IFS
25398
25399  ;;
25400esac
25401fi
25402AS=$ac_cv_path_AS
25403if test -n "$AS"; then
25404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25405$as_echo "$AS" >&6; }
25406else
25407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25408$as_echo "no" >&6; }
25409fi
25410
25411
25412
25413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25414
25415  # First separate the path from the arguments. This will split at the first
25416  # space.
25417  complete="$AS"
25418  path="${complete%% *}"
25419  tmp="$complete EOL"
25420  arguments="${tmp#* }"
25421
25422  # Input might be given as Windows format, start by converting to
25423  # unix format.
25424  new_path=`$CYGPATH -u "$path"`
25425
25426  # Now try to locate executable using which
25427  new_path=`$WHICH "$new_path" 2> /dev/null`
25428  # bat and cmd files are not always considered executable in cygwin causing which
25429  # to not find them
25430  if test "x$new_path" = x \
25431           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25432           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25433    new_path=`$CYGPATH -u "$path"`
25434  fi
25435  if test "x$new_path" = x; then
25436    # Oops. Which didn't find the executable.
25437    # The splitting of arguments from the executable at a space might have been incorrect,
25438    # since paths with space are more likely in Windows. Give it another try with the whole
25439    # argument.
25440    path="$complete"
25441    arguments="EOL"
25442    new_path=`$CYGPATH -u "$path"`
25443    new_path=`$WHICH "$new_path" 2> /dev/null`
25444    # bat and cmd files are not always considered executable in cygwin causing which
25445    # to not find them
25446    if test "x$new_path" = x \
25447             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25448             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25449      new_path=`$CYGPATH -u "$path"`
25450    fi
25451    if test "x$new_path" = x; then
25452      # It's still not found. Now this is an unrecoverable error.
25453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25454$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25455      has_space=`$ECHO "$complete" | $GREP " "`
25456      if test "x$has_space" != x; then
25457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25459      fi
25460      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25461    fi
25462  fi
25463
25464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25467  # "foo.exe" is OK but "foo" is an error.
25468  #
25469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25470  # It is also a way to make sure we got the proper file name for the real test later on.
25471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25472  if test "x$test_shortpath" = x; then
25473    # Short path failed, file does not exist as specified.
25474    # Try adding .exe or .cmd
25475    if test -f "${new_path}.exe"; then
25476       input_to_shortpath="${new_path}.exe"
25477    elif test -f "${new_path}.cmd"; then
25478       input_to_shortpath="${new_path}.cmd"
25479    else
25480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25481$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25482      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25483$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25484      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25485    fi
25486  else
25487    input_to_shortpath="$new_path"
25488  fi
25489
25490  # Call helper function which possibly converts this using DOS-style short mode.
25491  # If so, the updated path is stored in $new_path.
25492  new_path="$input_to_shortpath"
25493
25494  input_path="$input_to_shortpath"
25495  # Check if we need to convert this using DOS-style short mode. If the path
25496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25497  # take no chances and rewrite it.
25498  # Note: m4 eats our [], so we need to use [ and ] instead.
25499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25500  if test "x$has_forbidden_chars" != x; then
25501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25505      # Going to short mode and back again did indeed matter. Since short mode is
25506      # case insensitive, let's make it lowercase to improve readability.
25507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25508      # Now convert it back to Unix-stile (cygpath)
25509      input_path=`$CYGPATH -u "$shortmode_path"`
25510      new_path="$input_path"
25511    fi
25512  fi
25513
25514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25515  if test "x$test_cygdrive_prefix" = x; then
25516    # As a simple fix, exclude /usr/bin since it's not a real path.
25517    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25519      # a path prefixed by /cygdrive for fixpath to work.
25520      new_path="$CYGWIN_ROOT_PATH$input_path"
25521    fi
25522  fi
25523
25524  # remove trailing .exe if any
25525  new_path="${new_path/%.exe/}"
25526
25527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25528
25529  # First separate the path from the arguments. This will split at the first
25530  # space.
25531  complete="$AS"
25532  path="${complete%% *}"
25533  tmp="$complete EOL"
25534  arguments="${tmp#* }"
25535
25536  # Input might be given as Windows format, start by converting to
25537  # unix format.
25538  new_path="$path"
25539
25540  windows_path="$new_path"
25541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25542    unix_path=`$CYGPATH -u "$windows_path"`
25543    new_path="$unix_path"
25544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25546    new_path="$unix_path"
25547  fi
25548
25549
25550  # Now try to locate executable using which
25551  new_path=`$WHICH "$new_path" 2> /dev/null`
25552
25553  if test "x$new_path" = x; then
25554    # Oops. Which didn't find the executable.
25555    # The splitting of arguments from the executable at a space might have been incorrect,
25556    # since paths with space are more likely in Windows. Give it another try with the whole
25557    # argument.
25558    path="$complete"
25559    arguments="EOL"
25560    new_path="$path"
25561
25562  windows_path="$new_path"
25563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25564    unix_path=`$CYGPATH -u "$windows_path"`
25565    new_path="$unix_path"
25566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25568    new_path="$unix_path"
25569  fi
25570
25571
25572    new_path=`$WHICH "$new_path" 2> /dev/null`
25573
25574    if test "x$new_path" = x; then
25575      # It's still not found. Now this is an unrecoverable error.
25576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25577$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25578      has_space=`$ECHO "$complete" | $GREP " "`
25579      if test "x$has_space" != x; then
25580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25582      fi
25583      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25584    fi
25585  fi
25586
25587  # Now new_path has a complete unix path to the binary
25588  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25589    # Keep paths in /bin as-is, but remove trailing .exe if any
25590    new_path="${new_path/%.exe/}"
25591    # Do not save /bin paths to all_fixpath_prefixes!
25592  else
25593    # Not in mixed or Windows style, start by that.
25594    new_path=`cmd //c echo $new_path`
25595
25596  input_path="$new_path"
25597  # Check if we need to convert this using DOS-style short mode. If the path
25598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25599  # take no chances and rewrite it.
25600  # Note: m4 eats our [], so we need to use [ and ] instead.
25601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25602  if test "x$has_forbidden_chars" != x; then
25603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25605  fi
25606
25607    # Output is in $new_path
25608
25609  windows_path="$new_path"
25610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25611    unix_path=`$CYGPATH -u "$windows_path"`
25612    new_path="$unix_path"
25613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25615    new_path="$unix_path"
25616  fi
25617
25618    # remove trailing .exe if any
25619    new_path="${new_path/%.exe/}"
25620
25621    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25622    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25623  fi
25624
25625  else
25626    # We're on a posix platform. Hooray! :)
25627    # First separate the path from the arguments. This will split at the first
25628    # space.
25629    complete="$AS"
25630    path="${complete%% *}"
25631    tmp="$complete EOL"
25632    arguments="${tmp#* }"
25633
25634    # Cannot rely on the command "which" here since it doesn't always work.
25635    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25636    if test -z "$is_absolute_path"; then
25637      # Path to executable is not absolute. Find it.
25638      IFS_save="$IFS"
25639      IFS=:
25640      for p in $PATH; do
25641        if test -f "$p/$path" && test -x "$p/$path"; then
25642          new_path="$p/$path"
25643          break
25644        fi
25645      done
25646      IFS="$IFS_save"
25647    else
25648      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25649$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25650      new_path="$path"
25651    fi
25652
25653    if test "x$new_path" = x; then
25654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25655$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25656        has_space=`$ECHO "$complete" | $GREP " "`
25657        if test "x$has_space" != x; then
25658          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25659$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25660        fi
25661        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25662      fi
25663  fi
25664
25665      # Now join together the path and the arguments once again
25666      if test "x$arguments" != xEOL; then
25667        new_complete="$new_path ${arguments% *}"
25668      else
25669        new_complete="$new_path"
25670      fi
25671
25672  if test "x$complete" != "x$new_complete"; then
25673      AS="$new_complete"
25674      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25675$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25676    fi
25677
25678else
25679    AS="$CC -c"
25680fi
25681
25682
25683if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25684    # Extract the first word of "nm", so it can be a program name with args.
25685set dummy nm; ac_word=$2
25686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25687$as_echo_n "checking for $ac_word... " >&6; }
25688if ${ac_cv_path_NM+:} false; then :
25689  $as_echo_n "(cached) " >&6
25690else
25691  case $NM in
25692  [\\/]* | ?:[\\/]*)
25693  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25694  ;;
25695  *)
25696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25697for as_dir in $PATH
25698do
25699  IFS=$as_save_IFS
25700  test -z "$as_dir" && as_dir=.
25701    for ac_exec_ext in '' $ac_executable_extensions; do
25702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25703    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25705    break 2
25706  fi
25707done
25708  done
25709IFS=$as_save_IFS
25710
25711  ;;
25712esac
25713fi
25714NM=$ac_cv_path_NM
25715if test -n "$NM"; then
25716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25717$as_echo "$NM" >&6; }
25718else
25719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25720$as_echo "no" >&6; }
25721fi
25722
25723
25724
25725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25726
25727  # First separate the path from the arguments. This will split at the first
25728  # space.
25729  complete="$NM"
25730  path="${complete%% *}"
25731  tmp="$complete EOL"
25732  arguments="${tmp#* }"
25733
25734  # Input might be given as Windows format, start by converting to
25735  # unix format.
25736  new_path=`$CYGPATH -u "$path"`
25737
25738  # Now try to locate executable using which
25739  new_path=`$WHICH "$new_path" 2> /dev/null`
25740  # bat and cmd files are not always considered executable in cygwin causing which
25741  # to not find them
25742  if test "x$new_path" = x \
25743           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25744           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25745    new_path=`$CYGPATH -u "$path"`
25746  fi
25747  if test "x$new_path" = x; then
25748    # Oops. Which didn't find the executable.
25749    # The splitting of arguments from the executable at a space might have been incorrect,
25750    # since paths with space are more likely in Windows. Give it another try with the whole
25751    # argument.
25752    path="$complete"
25753    arguments="EOL"
25754    new_path=`$CYGPATH -u "$path"`
25755    new_path=`$WHICH "$new_path" 2> /dev/null`
25756    # bat and cmd files are not always considered executable in cygwin causing which
25757    # to not find them
25758    if test "x$new_path" = x \
25759             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25760             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25761      new_path=`$CYGPATH -u "$path"`
25762    fi
25763    if test "x$new_path" = x; then
25764      # It's still not found. Now this is an unrecoverable error.
25765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25766$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25767      has_space=`$ECHO "$complete" | $GREP " "`
25768      if test "x$has_space" != x; then
25769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25771      fi
25772      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25773    fi
25774  fi
25775
25776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25779  # "foo.exe" is OK but "foo" is an error.
25780  #
25781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25782  # It is also a way to make sure we got the proper file name for the real test later on.
25783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25784  if test "x$test_shortpath" = x; then
25785    # Short path failed, file does not exist as specified.
25786    # Try adding .exe or .cmd
25787    if test -f "${new_path}.exe"; then
25788       input_to_shortpath="${new_path}.exe"
25789    elif test -f "${new_path}.cmd"; then
25790       input_to_shortpath="${new_path}.cmd"
25791    else
25792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25793$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25796      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25797    fi
25798  else
25799    input_to_shortpath="$new_path"
25800  fi
25801
25802  # Call helper function which possibly converts this using DOS-style short mode.
25803  # If so, the updated path is stored in $new_path.
25804  new_path="$input_to_shortpath"
25805
25806  input_path="$input_to_shortpath"
25807  # Check if we need to convert this using DOS-style short mode. If the path
25808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25809  # take no chances and rewrite it.
25810  # Note: m4 eats our [], so we need to use [ and ] instead.
25811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25812  if test "x$has_forbidden_chars" != x; then
25813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25817      # Going to short mode and back again did indeed matter. Since short mode is
25818      # case insensitive, let's make it lowercase to improve readability.
25819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25820      # Now convert it back to Unix-stile (cygpath)
25821      input_path=`$CYGPATH -u "$shortmode_path"`
25822      new_path="$input_path"
25823    fi
25824  fi
25825
25826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25827  if test "x$test_cygdrive_prefix" = x; then
25828    # As a simple fix, exclude /usr/bin since it's not a real path.
25829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25831      # a path prefixed by /cygdrive for fixpath to work.
25832      new_path="$CYGWIN_ROOT_PATH$input_path"
25833    fi
25834  fi
25835
25836  # remove trailing .exe if any
25837  new_path="${new_path/%.exe/}"
25838
25839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25840
25841  # First separate the path from the arguments. This will split at the first
25842  # space.
25843  complete="$NM"
25844  path="${complete%% *}"
25845  tmp="$complete EOL"
25846  arguments="${tmp#* }"
25847
25848  # Input might be given as Windows format, start by converting to
25849  # unix format.
25850  new_path="$path"
25851
25852  windows_path="$new_path"
25853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25854    unix_path=`$CYGPATH -u "$windows_path"`
25855    new_path="$unix_path"
25856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25858    new_path="$unix_path"
25859  fi
25860
25861
25862  # Now try to locate executable using which
25863  new_path=`$WHICH "$new_path" 2> /dev/null`
25864
25865  if test "x$new_path" = x; then
25866    # Oops. Which didn't find the executable.
25867    # The splitting of arguments from the executable at a space might have been incorrect,
25868    # since paths with space are more likely in Windows. Give it another try with the whole
25869    # argument.
25870    path="$complete"
25871    arguments="EOL"
25872    new_path="$path"
25873
25874  windows_path="$new_path"
25875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25876    unix_path=`$CYGPATH -u "$windows_path"`
25877    new_path="$unix_path"
25878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25880    new_path="$unix_path"
25881  fi
25882
25883
25884    new_path=`$WHICH "$new_path" 2> /dev/null`
25885
25886    if test "x$new_path" = x; then
25887      # It's still not found. Now this is an unrecoverable error.
25888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25889$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25890      has_space=`$ECHO "$complete" | $GREP " "`
25891      if test "x$has_space" != x; then
25892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25894      fi
25895      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25896    fi
25897  fi
25898
25899  # Now new_path has a complete unix path to the binary
25900  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25901    # Keep paths in /bin as-is, but remove trailing .exe if any
25902    new_path="${new_path/%.exe/}"
25903    # Do not save /bin paths to all_fixpath_prefixes!
25904  else
25905    # Not in mixed or Windows style, start by that.
25906    new_path=`cmd //c echo $new_path`
25907
25908  input_path="$new_path"
25909  # Check if we need to convert this using DOS-style short mode. If the path
25910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25911  # take no chances and rewrite it.
25912  # Note: m4 eats our [], so we need to use [ and ] instead.
25913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25914  if test "x$has_forbidden_chars" != x; then
25915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25917  fi
25918
25919    # Output is in $new_path
25920
25921  windows_path="$new_path"
25922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25923    unix_path=`$CYGPATH -u "$windows_path"`
25924    new_path="$unix_path"
25925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25927    new_path="$unix_path"
25928  fi
25929
25930    # remove trailing .exe if any
25931    new_path="${new_path/%.exe/}"
25932
25933    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25934    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25935  fi
25936
25937  else
25938    # We're on a posix platform. Hooray! :)
25939    # First separate the path from the arguments. This will split at the first
25940    # space.
25941    complete="$NM"
25942    path="${complete%% *}"
25943    tmp="$complete EOL"
25944    arguments="${tmp#* }"
25945
25946    # Cannot rely on the command "which" here since it doesn't always work.
25947    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25948    if test -z "$is_absolute_path"; then
25949      # Path to executable is not absolute. Find it.
25950      IFS_save="$IFS"
25951      IFS=:
25952      for p in $PATH; do
25953        if test -f "$p/$path" && test -x "$p/$path"; then
25954          new_path="$p/$path"
25955          break
25956        fi
25957      done
25958      IFS="$IFS_save"
25959    else
25960      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25961$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25962      new_path="$path"
25963    fi
25964
25965    if test "x$new_path" = x; then
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25967$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25968        has_space=`$ECHO "$complete" | $GREP " "`
25969        if test "x$has_space" != x; then
25970          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25971$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25972        fi
25973        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25974      fi
25975  fi
25976
25977      # Now join together the path and the arguments once again
25978      if test "x$arguments" != xEOL; then
25979        new_complete="$new_path ${arguments% *}"
25980      else
25981        new_complete="$new_path"
25982      fi
25983
25984  if test "x$complete" != "x$new_complete"; then
25985      NM="$new_complete"
25986      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25987$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25988    fi
25989
25990    # Extract the first word of "gnm", so it can be a program name with args.
25991set dummy gnm; ac_word=$2
25992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25993$as_echo_n "checking for $ac_word... " >&6; }
25994if ${ac_cv_path_GNM+:} false; then :
25995  $as_echo_n "(cached) " >&6
25996else
25997  case $GNM in
25998  [\\/]* | ?:[\\/]*)
25999  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26000  ;;
26001  *)
26002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26003for as_dir in $PATH
26004do
26005  IFS=$as_save_IFS
26006  test -z "$as_dir" && as_dir=.
26007    for ac_exec_ext in '' $ac_executable_extensions; do
26008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26009    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26011    break 2
26012  fi
26013done
26014  done
26015IFS=$as_save_IFS
26016
26017  ;;
26018esac
26019fi
26020GNM=$ac_cv_path_GNM
26021if test -n "$GNM"; then
26022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26023$as_echo "$GNM" >&6; }
26024else
26025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26026$as_echo "no" >&6; }
26027fi
26028
26029
26030
26031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26032
26033  # First separate the path from the arguments. This will split at the first
26034  # space.
26035  complete="$GNM"
26036  path="${complete%% *}"
26037  tmp="$complete EOL"
26038  arguments="${tmp#* }"
26039
26040  # Input might be given as Windows format, start by converting to
26041  # unix format.
26042  new_path=`$CYGPATH -u "$path"`
26043
26044  # Now try to locate executable using which
26045  new_path=`$WHICH "$new_path" 2> /dev/null`
26046  # bat and cmd files are not always considered executable in cygwin causing which
26047  # to not find them
26048  if test "x$new_path" = x \
26049           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26050           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26051    new_path=`$CYGPATH -u "$path"`
26052  fi
26053  if test "x$new_path" = x; then
26054    # Oops. Which didn't find the executable.
26055    # The splitting of arguments from the executable at a space might have been incorrect,
26056    # since paths with space are more likely in Windows. Give it another try with the whole
26057    # argument.
26058    path="$complete"
26059    arguments="EOL"
26060    new_path=`$CYGPATH -u "$path"`
26061    new_path=`$WHICH "$new_path" 2> /dev/null`
26062    # bat and cmd files are not always considered executable in cygwin causing which
26063    # to not find them
26064    if test "x$new_path" = x \
26065             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26066             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26067      new_path=`$CYGPATH -u "$path"`
26068    fi
26069    if test "x$new_path" = x; then
26070      # It's still not found. Now this is an unrecoverable error.
26071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26072$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26073      has_space=`$ECHO "$complete" | $GREP " "`
26074      if test "x$has_space" != x; then
26075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26077      fi
26078      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26079    fi
26080  fi
26081
26082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26085  # "foo.exe" is OK but "foo" is an error.
26086  #
26087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26088  # It is also a way to make sure we got the proper file name for the real test later on.
26089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26090  if test "x$test_shortpath" = x; then
26091    # Short path failed, file does not exist as specified.
26092    # Try adding .exe or .cmd
26093    if test -f "${new_path}.exe"; then
26094       input_to_shortpath="${new_path}.exe"
26095    elif test -f "${new_path}.cmd"; then
26096       input_to_shortpath="${new_path}.cmd"
26097    else
26098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26099$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26102      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26103    fi
26104  else
26105    input_to_shortpath="$new_path"
26106  fi
26107
26108  # Call helper function which possibly converts this using DOS-style short mode.
26109  # If so, the updated path is stored in $new_path.
26110  new_path="$input_to_shortpath"
26111
26112  input_path="$input_to_shortpath"
26113  # Check if we need to convert this using DOS-style short mode. If the path
26114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26115  # take no chances and rewrite it.
26116  # Note: m4 eats our [], so we need to use [ and ] instead.
26117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26118  if test "x$has_forbidden_chars" != x; then
26119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26123      # Going to short mode and back again did indeed matter. Since short mode is
26124      # case insensitive, let's make it lowercase to improve readability.
26125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26126      # Now convert it back to Unix-stile (cygpath)
26127      input_path=`$CYGPATH -u "$shortmode_path"`
26128      new_path="$input_path"
26129    fi
26130  fi
26131
26132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26133  if test "x$test_cygdrive_prefix" = x; then
26134    # As a simple fix, exclude /usr/bin since it's not a real path.
26135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26137      # a path prefixed by /cygdrive for fixpath to work.
26138      new_path="$CYGWIN_ROOT_PATH$input_path"
26139    fi
26140  fi
26141
26142  # remove trailing .exe if any
26143  new_path="${new_path/%.exe/}"
26144
26145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26146
26147  # First separate the path from the arguments. This will split at the first
26148  # space.
26149  complete="$GNM"
26150  path="${complete%% *}"
26151  tmp="$complete EOL"
26152  arguments="${tmp#* }"
26153
26154  # Input might be given as Windows format, start by converting to
26155  # unix format.
26156  new_path="$path"
26157
26158  windows_path="$new_path"
26159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26160    unix_path=`$CYGPATH -u "$windows_path"`
26161    new_path="$unix_path"
26162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26164    new_path="$unix_path"
26165  fi
26166
26167
26168  # Now try to locate executable using which
26169  new_path=`$WHICH "$new_path" 2> /dev/null`
26170
26171  if test "x$new_path" = x; then
26172    # Oops. Which didn't find the executable.
26173    # The splitting of arguments from the executable at a space might have been incorrect,
26174    # since paths with space are more likely in Windows. Give it another try with the whole
26175    # argument.
26176    path="$complete"
26177    arguments="EOL"
26178    new_path="$path"
26179
26180  windows_path="$new_path"
26181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26182    unix_path=`$CYGPATH -u "$windows_path"`
26183    new_path="$unix_path"
26184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26186    new_path="$unix_path"
26187  fi
26188
26189
26190    new_path=`$WHICH "$new_path" 2> /dev/null`
26191
26192    if test "x$new_path" = x; then
26193      # It's still not found. Now this is an unrecoverable error.
26194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26195$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26196      has_space=`$ECHO "$complete" | $GREP " "`
26197      if test "x$has_space" != x; then
26198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26200      fi
26201      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26202    fi
26203  fi
26204
26205  # Now new_path has a complete unix path to the binary
26206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26207    # Keep paths in /bin as-is, but remove trailing .exe if any
26208    new_path="${new_path/%.exe/}"
26209    # Do not save /bin paths to all_fixpath_prefixes!
26210  else
26211    # Not in mixed or Windows style, start by that.
26212    new_path=`cmd //c echo $new_path`
26213
26214  input_path="$new_path"
26215  # Check if we need to convert this using DOS-style short mode. If the path
26216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26217  # take no chances and rewrite it.
26218  # Note: m4 eats our [], so we need to use [ and ] instead.
26219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26220  if test "x$has_forbidden_chars" != x; then
26221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26223  fi
26224
26225    # Output is in $new_path
26226
26227  windows_path="$new_path"
26228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26229    unix_path=`$CYGPATH -u "$windows_path"`
26230    new_path="$unix_path"
26231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26233    new_path="$unix_path"
26234  fi
26235
26236    # remove trailing .exe if any
26237    new_path="${new_path/%.exe/}"
26238
26239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26241  fi
26242
26243  else
26244    # We're on a posix platform. Hooray! :)
26245    # First separate the path from the arguments. This will split at the first
26246    # space.
26247    complete="$GNM"
26248    path="${complete%% *}"
26249    tmp="$complete EOL"
26250    arguments="${tmp#* }"
26251
26252    # Cannot rely on the command "which" here since it doesn't always work.
26253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26254    if test -z "$is_absolute_path"; then
26255      # Path to executable is not absolute. Find it.
26256      IFS_save="$IFS"
26257      IFS=:
26258      for p in $PATH; do
26259        if test -f "$p/$path" && test -x "$p/$path"; then
26260          new_path="$p/$path"
26261          break
26262        fi
26263      done
26264      IFS="$IFS_save"
26265    else
26266      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26267$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26268      new_path="$path"
26269    fi
26270
26271    if test "x$new_path" = x; then
26272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26273$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26274        has_space=`$ECHO "$complete" | $GREP " "`
26275        if test "x$has_space" != x; then
26276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26278        fi
26279        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26280      fi
26281  fi
26282
26283      # Now join together the path and the arguments once again
26284      if test "x$arguments" != xEOL; then
26285        new_complete="$new_path ${arguments% *}"
26286      else
26287        new_complete="$new_path"
26288      fi
26289
26290  if test "x$complete" != "x$new_complete"; then
26291      GNM="$new_complete"
26292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26293$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26294    fi
26295
26296    # Extract the first word of "strip", so it can be a program name with args.
26297set dummy strip; ac_word=$2
26298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26299$as_echo_n "checking for $ac_word... " >&6; }
26300if ${ac_cv_path_STRIP+:} false; then :
26301  $as_echo_n "(cached) " >&6
26302else
26303  case $STRIP in
26304  [\\/]* | ?:[\\/]*)
26305  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26306  ;;
26307  *)
26308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26309for as_dir in $PATH
26310do
26311  IFS=$as_save_IFS
26312  test -z "$as_dir" && as_dir=.
26313    for ac_exec_ext in '' $ac_executable_extensions; do
26314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26315    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26317    break 2
26318  fi
26319done
26320  done
26321IFS=$as_save_IFS
26322
26323  ;;
26324esac
26325fi
26326STRIP=$ac_cv_path_STRIP
26327if test -n "$STRIP"; then
26328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26329$as_echo "$STRIP" >&6; }
26330else
26331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26332$as_echo "no" >&6; }
26333fi
26334
26335
26336
26337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26338
26339  # First separate the path from the arguments. This will split at the first
26340  # space.
26341  complete="$STRIP"
26342  path="${complete%% *}"
26343  tmp="$complete EOL"
26344  arguments="${tmp#* }"
26345
26346  # Input might be given as Windows format, start by converting to
26347  # unix format.
26348  new_path=`$CYGPATH -u "$path"`
26349
26350  # Now try to locate executable using which
26351  new_path=`$WHICH "$new_path" 2> /dev/null`
26352  # bat and cmd files are not always considered executable in cygwin causing which
26353  # to not find them
26354  if test "x$new_path" = x \
26355           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26356           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26357    new_path=`$CYGPATH -u "$path"`
26358  fi
26359  if test "x$new_path" = x; then
26360    # Oops. Which didn't find the executable.
26361    # The splitting of arguments from the executable at a space might have been incorrect,
26362    # since paths with space are more likely in Windows. Give it another try with the whole
26363    # argument.
26364    path="$complete"
26365    arguments="EOL"
26366    new_path=`$CYGPATH -u "$path"`
26367    new_path=`$WHICH "$new_path" 2> /dev/null`
26368    # bat and cmd files are not always considered executable in cygwin causing which
26369    # to not find them
26370    if test "x$new_path" = x \
26371             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26372             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26373      new_path=`$CYGPATH -u "$path"`
26374    fi
26375    if test "x$new_path" = x; then
26376      # It's still not found. Now this is an unrecoverable error.
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26378$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26379      has_space=`$ECHO "$complete" | $GREP " "`
26380      if test "x$has_space" != x; then
26381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26383      fi
26384      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26385    fi
26386  fi
26387
26388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26391  # "foo.exe" is OK but "foo" is an error.
26392  #
26393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26394  # It is also a way to make sure we got the proper file name for the real test later on.
26395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26396  if test "x$test_shortpath" = x; then
26397    # Short path failed, file does not exist as specified.
26398    # Try adding .exe or .cmd
26399    if test -f "${new_path}.exe"; then
26400       input_to_shortpath="${new_path}.exe"
26401    elif test -f "${new_path}.cmd"; then
26402       input_to_shortpath="${new_path}.cmd"
26403    else
26404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26405$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26408      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26409    fi
26410  else
26411    input_to_shortpath="$new_path"
26412  fi
26413
26414  # Call helper function which possibly converts this using DOS-style short mode.
26415  # If so, the updated path is stored in $new_path.
26416  new_path="$input_to_shortpath"
26417
26418  input_path="$input_to_shortpath"
26419  # Check if we need to convert this using DOS-style short mode. If the path
26420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26421  # take no chances and rewrite it.
26422  # Note: m4 eats our [], so we need to use [ and ] instead.
26423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26424  if test "x$has_forbidden_chars" != x; then
26425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26429      # Going to short mode and back again did indeed matter. Since short mode is
26430      # case insensitive, let's make it lowercase to improve readability.
26431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26432      # Now convert it back to Unix-stile (cygpath)
26433      input_path=`$CYGPATH -u "$shortmode_path"`
26434      new_path="$input_path"
26435    fi
26436  fi
26437
26438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26439  if test "x$test_cygdrive_prefix" = x; then
26440    # As a simple fix, exclude /usr/bin since it's not a real path.
26441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26443      # a path prefixed by /cygdrive for fixpath to work.
26444      new_path="$CYGWIN_ROOT_PATH$input_path"
26445    fi
26446  fi
26447
26448  # remove trailing .exe if any
26449  new_path="${new_path/%.exe/}"
26450
26451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26452
26453  # First separate the path from the arguments. This will split at the first
26454  # space.
26455  complete="$STRIP"
26456  path="${complete%% *}"
26457  tmp="$complete EOL"
26458  arguments="${tmp#* }"
26459
26460  # Input might be given as Windows format, start by converting to
26461  # unix format.
26462  new_path="$path"
26463
26464  windows_path="$new_path"
26465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26466    unix_path=`$CYGPATH -u "$windows_path"`
26467    new_path="$unix_path"
26468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26470    new_path="$unix_path"
26471  fi
26472
26473
26474  # Now try to locate executable using which
26475  new_path=`$WHICH "$new_path" 2> /dev/null`
26476
26477  if test "x$new_path" = x; then
26478    # Oops. Which didn't find the executable.
26479    # The splitting of arguments from the executable at a space might have been incorrect,
26480    # since paths with space are more likely in Windows. Give it another try with the whole
26481    # argument.
26482    path="$complete"
26483    arguments="EOL"
26484    new_path="$path"
26485
26486  windows_path="$new_path"
26487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488    unix_path=`$CYGPATH -u "$windows_path"`
26489    new_path="$unix_path"
26490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26492    new_path="$unix_path"
26493  fi
26494
26495
26496    new_path=`$WHICH "$new_path" 2> /dev/null`
26497
26498    if test "x$new_path" = x; then
26499      # It's still not found. Now this is an unrecoverable error.
26500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26501$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26502      has_space=`$ECHO "$complete" | $GREP " "`
26503      if test "x$has_space" != x; then
26504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26506      fi
26507      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26508    fi
26509  fi
26510
26511  # Now new_path has a complete unix path to the binary
26512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26513    # Keep paths in /bin as-is, but remove trailing .exe if any
26514    new_path="${new_path/%.exe/}"
26515    # Do not save /bin paths to all_fixpath_prefixes!
26516  else
26517    # Not in mixed or Windows style, start by that.
26518    new_path=`cmd //c echo $new_path`
26519
26520  input_path="$new_path"
26521  # Check if we need to convert this using DOS-style short mode. If the path
26522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26523  # take no chances and rewrite it.
26524  # Note: m4 eats our [], so we need to use [ and ] instead.
26525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26526  if test "x$has_forbidden_chars" != x; then
26527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26529  fi
26530
26531    # Output is in $new_path
26532
26533  windows_path="$new_path"
26534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26535    unix_path=`$CYGPATH -u "$windows_path"`
26536    new_path="$unix_path"
26537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26539    new_path="$unix_path"
26540  fi
26541
26542    # remove trailing .exe if any
26543    new_path="${new_path/%.exe/}"
26544
26545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26547  fi
26548
26549  else
26550    # We're on a posix platform. Hooray! :)
26551    # First separate the path from the arguments. This will split at the first
26552    # space.
26553    complete="$STRIP"
26554    path="${complete%% *}"
26555    tmp="$complete EOL"
26556    arguments="${tmp#* }"
26557
26558    # Cannot rely on the command "which" here since it doesn't always work.
26559    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26560    if test -z "$is_absolute_path"; then
26561      # Path to executable is not absolute. Find it.
26562      IFS_save="$IFS"
26563      IFS=:
26564      for p in $PATH; do
26565        if test -f "$p/$path" && test -x "$p/$path"; then
26566          new_path="$p/$path"
26567          break
26568        fi
26569      done
26570      IFS="$IFS_save"
26571    else
26572      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26573$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26574      new_path="$path"
26575    fi
26576
26577    if test "x$new_path" = x; then
26578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26579$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26580        has_space=`$ECHO "$complete" | $GREP " "`
26581        if test "x$has_space" != x; then
26582          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26584        fi
26585        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26586      fi
26587  fi
26588
26589      # Now join together the path and the arguments once again
26590      if test "x$arguments" != xEOL; then
26591        new_complete="$new_path ${arguments% *}"
26592      else
26593        new_complete="$new_path"
26594      fi
26595
26596  if test "x$complete" != "x$new_complete"; then
26597      STRIP="$new_complete"
26598      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26599$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26600    fi
26601
26602    # Extract the first word of "mcs", so it can be a program name with args.
26603set dummy mcs; ac_word=$2
26604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26605$as_echo_n "checking for $ac_word... " >&6; }
26606if ${ac_cv_path_MCS+:} false; then :
26607  $as_echo_n "(cached) " >&6
26608else
26609  case $MCS in
26610  [\\/]* | ?:[\\/]*)
26611  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26612  ;;
26613  *)
26614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26615for as_dir in $PATH
26616do
26617  IFS=$as_save_IFS
26618  test -z "$as_dir" && as_dir=.
26619    for ac_exec_ext in '' $ac_executable_extensions; do
26620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26621    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26623    break 2
26624  fi
26625done
26626  done
26627IFS=$as_save_IFS
26628
26629  ;;
26630esac
26631fi
26632MCS=$ac_cv_path_MCS
26633if test -n "$MCS"; then
26634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26635$as_echo "$MCS" >&6; }
26636else
26637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26638$as_echo "no" >&6; }
26639fi
26640
26641
26642
26643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26644
26645  # First separate the path from the arguments. This will split at the first
26646  # space.
26647  complete="$MCS"
26648  path="${complete%% *}"
26649  tmp="$complete EOL"
26650  arguments="${tmp#* }"
26651
26652  # Input might be given as Windows format, start by converting to
26653  # unix format.
26654  new_path=`$CYGPATH -u "$path"`
26655
26656  # Now try to locate executable using which
26657  new_path=`$WHICH "$new_path" 2> /dev/null`
26658  # bat and cmd files are not always considered executable in cygwin causing which
26659  # to not find them
26660  if test "x$new_path" = x \
26661           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26662           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26663    new_path=`$CYGPATH -u "$path"`
26664  fi
26665  if test "x$new_path" = x; then
26666    # Oops. Which didn't find the executable.
26667    # The splitting of arguments from the executable at a space might have been incorrect,
26668    # since paths with space are more likely in Windows. Give it another try with the whole
26669    # argument.
26670    path="$complete"
26671    arguments="EOL"
26672    new_path=`$CYGPATH -u "$path"`
26673    new_path=`$WHICH "$new_path" 2> /dev/null`
26674    # bat and cmd files are not always considered executable in cygwin causing which
26675    # to not find them
26676    if test "x$new_path" = x \
26677             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26678             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26679      new_path=`$CYGPATH -u "$path"`
26680    fi
26681    if test "x$new_path" = x; then
26682      # It's still not found. Now this is an unrecoverable error.
26683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26684$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26685      has_space=`$ECHO "$complete" | $GREP " "`
26686      if test "x$has_space" != x; then
26687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26689      fi
26690      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26691    fi
26692  fi
26693
26694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26697  # "foo.exe" is OK but "foo" is an error.
26698  #
26699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26700  # It is also a way to make sure we got the proper file name for the real test later on.
26701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26702  if test "x$test_shortpath" = x; then
26703    # Short path failed, file does not exist as specified.
26704    # Try adding .exe or .cmd
26705    if test -f "${new_path}.exe"; then
26706       input_to_shortpath="${new_path}.exe"
26707    elif test -f "${new_path}.cmd"; then
26708       input_to_shortpath="${new_path}.cmd"
26709    else
26710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26711$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26714      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26715    fi
26716  else
26717    input_to_shortpath="$new_path"
26718  fi
26719
26720  # Call helper function which possibly converts this using DOS-style short mode.
26721  # If so, the updated path is stored in $new_path.
26722  new_path="$input_to_shortpath"
26723
26724  input_path="$input_to_shortpath"
26725  # Check if we need to convert this using DOS-style short mode. If the path
26726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26727  # take no chances and rewrite it.
26728  # Note: m4 eats our [], so we need to use [ and ] instead.
26729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26730  if test "x$has_forbidden_chars" != x; then
26731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26735      # Going to short mode and back again did indeed matter. Since short mode is
26736      # case insensitive, let's make it lowercase to improve readability.
26737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26738      # Now convert it back to Unix-stile (cygpath)
26739      input_path=`$CYGPATH -u "$shortmode_path"`
26740      new_path="$input_path"
26741    fi
26742  fi
26743
26744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26745  if test "x$test_cygdrive_prefix" = x; then
26746    # As a simple fix, exclude /usr/bin since it's not a real path.
26747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26749      # a path prefixed by /cygdrive for fixpath to work.
26750      new_path="$CYGWIN_ROOT_PATH$input_path"
26751    fi
26752  fi
26753
26754  # remove trailing .exe if any
26755  new_path="${new_path/%.exe/}"
26756
26757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26758
26759  # First separate the path from the arguments. This will split at the first
26760  # space.
26761  complete="$MCS"
26762  path="${complete%% *}"
26763  tmp="$complete EOL"
26764  arguments="${tmp#* }"
26765
26766  # Input might be given as Windows format, start by converting to
26767  # unix format.
26768  new_path="$path"
26769
26770  windows_path="$new_path"
26771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26772    unix_path=`$CYGPATH -u "$windows_path"`
26773    new_path="$unix_path"
26774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26776    new_path="$unix_path"
26777  fi
26778
26779
26780  # Now try to locate executable using which
26781  new_path=`$WHICH "$new_path" 2> /dev/null`
26782
26783  if test "x$new_path" = x; then
26784    # Oops. Which didn't find the executable.
26785    # The splitting of arguments from the executable at a space might have been incorrect,
26786    # since paths with space are more likely in Windows. Give it another try with the whole
26787    # argument.
26788    path="$complete"
26789    arguments="EOL"
26790    new_path="$path"
26791
26792  windows_path="$new_path"
26793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26794    unix_path=`$CYGPATH -u "$windows_path"`
26795    new_path="$unix_path"
26796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26798    new_path="$unix_path"
26799  fi
26800
26801
26802    new_path=`$WHICH "$new_path" 2> /dev/null`
26803
26804    if test "x$new_path" = x; then
26805      # It's still not found. Now this is an unrecoverable error.
26806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26807$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26808      has_space=`$ECHO "$complete" | $GREP " "`
26809      if test "x$has_space" != x; then
26810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26812      fi
26813      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26814    fi
26815  fi
26816
26817  # Now new_path has a complete unix path to the binary
26818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26819    # Keep paths in /bin as-is, but remove trailing .exe if any
26820    new_path="${new_path/%.exe/}"
26821    # Do not save /bin paths to all_fixpath_prefixes!
26822  else
26823    # Not in mixed or Windows style, start by that.
26824    new_path=`cmd //c echo $new_path`
26825
26826  input_path="$new_path"
26827  # Check if we need to convert this using DOS-style short mode. If the path
26828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26829  # take no chances and rewrite it.
26830  # Note: m4 eats our [], so we need to use [ and ] instead.
26831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26832  if test "x$has_forbidden_chars" != x; then
26833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26835  fi
26836
26837    # Output is in $new_path
26838
26839  windows_path="$new_path"
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841    unix_path=`$CYGPATH -u "$windows_path"`
26842    new_path="$unix_path"
26843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26845    new_path="$unix_path"
26846  fi
26847
26848    # remove trailing .exe if any
26849    new_path="${new_path/%.exe/}"
26850
26851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26853  fi
26854
26855  else
26856    # We're on a posix platform. Hooray! :)
26857    # First separate the path from the arguments. This will split at the first
26858    # space.
26859    complete="$MCS"
26860    path="${complete%% *}"
26861    tmp="$complete EOL"
26862    arguments="${tmp#* }"
26863
26864    # Cannot rely on the command "which" here since it doesn't always work.
26865    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26866    if test -z "$is_absolute_path"; then
26867      # Path to executable is not absolute. Find it.
26868      IFS_save="$IFS"
26869      IFS=:
26870      for p in $PATH; do
26871        if test -f "$p/$path" && test -x "$p/$path"; then
26872          new_path="$p/$path"
26873          break
26874        fi
26875      done
26876      IFS="$IFS_save"
26877    else
26878      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26879$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26880      new_path="$path"
26881    fi
26882
26883    if test "x$new_path" = x; then
26884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26885$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26886        has_space=`$ECHO "$complete" | $GREP " "`
26887        if test "x$has_space" != x; then
26888          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26889$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26890        fi
26891        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26892      fi
26893  fi
26894
26895      # Now join together the path and the arguments once again
26896      if test "x$arguments" != xEOL; then
26897        new_complete="$new_path ${arguments% *}"
26898      else
26899        new_complete="$new_path"
26900      fi
26901
26902  if test "x$complete" != "x$new_complete"; then
26903      MCS="$new_complete"
26904      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26905$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26906    fi
26907
26908elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26909    if test -n "$ac_tool_prefix"; then
26910  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26911set dummy ${ac_tool_prefix}nm; ac_word=$2
26912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26913$as_echo_n "checking for $ac_word... " >&6; }
26914if ${ac_cv_prog_NM+:} false; then :
26915  $as_echo_n "(cached) " >&6
26916else
26917  if test -n "$NM"; then
26918  ac_cv_prog_NM="$NM" # Let the user override the test.
26919else
26920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26921for as_dir in $PATH
26922do
26923  IFS=$as_save_IFS
26924  test -z "$as_dir" && as_dir=.
26925    for ac_exec_ext in '' $ac_executable_extensions; do
26926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26927    ac_cv_prog_NM="${ac_tool_prefix}nm"
26928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26929    break 2
26930  fi
26931done
26932  done
26933IFS=$as_save_IFS
26934
26935fi
26936fi
26937NM=$ac_cv_prog_NM
26938if test -n "$NM"; then
26939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26940$as_echo "$NM" >&6; }
26941else
26942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26943$as_echo "no" >&6; }
26944fi
26945
26946
26947fi
26948if test -z "$ac_cv_prog_NM"; then
26949  ac_ct_NM=$NM
26950  # Extract the first word of "nm", so it can be a program name with args.
26951set dummy nm; ac_word=$2
26952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26953$as_echo_n "checking for $ac_word... " >&6; }
26954if ${ac_cv_prog_ac_ct_NM+:} false; then :
26955  $as_echo_n "(cached) " >&6
26956else
26957  if test -n "$ac_ct_NM"; then
26958  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26959else
26960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26961for as_dir in $PATH
26962do
26963  IFS=$as_save_IFS
26964  test -z "$as_dir" && as_dir=.
26965    for ac_exec_ext in '' $ac_executable_extensions; do
26966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26967    ac_cv_prog_ac_ct_NM="nm"
26968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26969    break 2
26970  fi
26971done
26972  done
26973IFS=$as_save_IFS
26974
26975fi
26976fi
26977ac_ct_NM=$ac_cv_prog_ac_ct_NM
26978if test -n "$ac_ct_NM"; then
26979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26980$as_echo "$ac_ct_NM" >&6; }
26981else
26982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26983$as_echo "no" >&6; }
26984fi
26985
26986  if test "x$ac_ct_NM" = x; then
26987    NM=""
26988  else
26989    case $cross_compiling:$ac_tool_warned in
26990yes:)
26991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26993ac_tool_warned=yes ;;
26994esac
26995    NM=$ac_ct_NM
26996  fi
26997else
26998  NM="$ac_cv_prog_NM"
26999fi
27000
27001
27002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27003
27004  # First separate the path from the arguments. This will split at the first
27005  # space.
27006  complete="$NM"
27007  path="${complete%% *}"
27008  tmp="$complete EOL"
27009  arguments="${tmp#* }"
27010
27011  # Input might be given as Windows format, start by converting to
27012  # unix format.
27013  new_path=`$CYGPATH -u "$path"`
27014
27015  # Now try to locate executable using which
27016  new_path=`$WHICH "$new_path" 2> /dev/null`
27017  # bat and cmd files are not always considered executable in cygwin causing which
27018  # to not find them
27019  if test "x$new_path" = x \
27020           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27021           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27022    new_path=`$CYGPATH -u "$path"`
27023  fi
27024  if test "x$new_path" = x; then
27025    # Oops. Which didn't find the executable.
27026    # The splitting of arguments from the executable at a space might have been incorrect,
27027    # since paths with space are more likely in Windows. Give it another try with the whole
27028    # argument.
27029    path="$complete"
27030    arguments="EOL"
27031    new_path=`$CYGPATH -u "$path"`
27032    new_path=`$WHICH "$new_path" 2> /dev/null`
27033    # bat and cmd files are not always considered executable in cygwin causing which
27034    # to not find them
27035    if test "x$new_path" = x \
27036             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27037             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27038      new_path=`$CYGPATH -u "$path"`
27039    fi
27040    if test "x$new_path" = x; then
27041      # It's still not found. Now this is an unrecoverable error.
27042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27043$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27044      has_space=`$ECHO "$complete" | $GREP " "`
27045      if test "x$has_space" != x; then
27046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27048      fi
27049      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27050    fi
27051  fi
27052
27053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27056  # "foo.exe" is OK but "foo" is an error.
27057  #
27058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27059  # It is also a way to make sure we got the proper file name for the real test later on.
27060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27061  if test "x$test_shortpath" = x; then
27062    # Short path failed, file does not exist as specified.
27063    # Try adding .exe or .cmd
27064    if test -f "${new_path}.exe"; then
27065       input_to_shortpath="${new_path}.exe"
27066    elif test -f "${new_path}.cmd"; then
27067       input_to_shortpath="${new_path}.cmd"
27068    else
27069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27070$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27073      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27074    fi
27075  else
27076    input_to_shortpath="$new_path"
27077  fi
27078
27079  # Call helper function which possibly converts this using DOS-style short mode.
27080  # If so, the updated path is stored in $new_path.
27081  new_path="$input_to_shortpath"
27082
27083  input_path="$input_to_shortpath"
27084  # Check if we need to convert this using DOS-style short mode. If the path
27085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27086  # take no chances and rewrite it.
27087  # Note: m4 eats our [], so we need to use [ and ] instead.
27088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27089  if test "x$has_forbidden_chars" != x; then
27090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27094      # Going to short mode and back again did indeed matter. Since short mode is
27095      # case insensitive, let's make it lowercase to improve readability.
27096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27097      # Now convert it back to Unix-stile (cygpath)
27098      input_path=`$CYGPATH -u "$shortmode_path"`
27099      new_path="$input_path"
27100    fi
27101  fi
27102
27103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27104  if test "x$test_cygdrive_prefix" = x; then
27105    # As a simple fix, exclude /usr/bin since it's not a real path.
27106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27108      # a path prefixed by /cygdrive for fixpath to work.
27109      new_path="$CYGWIN_ROOT_PATH$input_path"
27110    fi
27111  fi
27112
27113  # remove trailing .exe if any
27114  new_path="${new_path/%.exe/}"
27115
27116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27117
27118  # First separate the path from the arguments. This will split at the first
27119  # space.
27120  complete="$NM"
27121  path="${complete%% *}"
27122  tmp="$complete EOL"
27123  arguments="${tmp#* }"
27124
27125  # Input might be given as Windows format, start by converting to
27126  # unix format.
27127  new_path="$path"
27128
27129  windows_path="$new_path"
27130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27131    unix_path=`$CYGPATH -u "$windows_path"`
27132    new_path="$unix_path"
27133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27135    new_path="$unix_path"
27136  fi
27137
27138
27139  # Now try to locate executable using which
27140  new_path=`$WHICH "$new_path" 2> /dev/null`
27141
27142  if test "x$new_path" = x; then
27143    # Oops. Which didn't find the executable.
27144    # The splitting of arguments from the executable at a space might have been incorrect,
27145    # since paths with space are more likely in Windows. Give it another try with the whole
27146    # argument.
27147    path="$complete"
27148    arguments="EOL"
27149    new_path="$path"
27150
27151  windows_path="$new_path"
27152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27153    unix_path=`$CYGPATH -u "$windows_path"`
27154    new_path="$unix_path"
27155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27157    new_path="$unix_path"
27158  fi
27159
27160
27161    new_path=`$WHICH "$new_path" 2> /dev/null`
27162
27163    if test "x$new_path" = x; then
27164      # It's still not found. Now this is an unrecoverable error.
27165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27166$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27167      has_space=`$ECHO "$complete" | $GREP " "`
27168      if test "x$has_space" != x; then
27169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27171      fi
27172      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27173    fi
27174  fi
27175
27176  # Now new_path has a complete unix path to the binary
27177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27178    # Keep paths in /bin as-is, but remove trailing .exe if any
27179    new_path="${new_path/%.exe/}"
27180    # Do not save /bin paths to all_fixpath_prefixes!
27181  else
27182    # Not in mixed or Windows style, start by that.
27183    new_path=`cmd //c echo $new_path`
27184
27185  input_path="$new_path"
27186  # Check if we need to convert this using DOS-style short mode. If the path
27187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27188  # take no chances and rewrite it.
27189  # Note: m4 eats our [], so we need to use [ and ] instead.
27190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27191  if test "x$has_forbidden_chars" != x; then
27192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27194  fi
27195
27196    # Output is in $new_path
27197
27198  windows_path="$new_path"
27199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27200    unix_path=`$CYGPATH -u "$windows_path"`
27201    new_path="$unix_path"
27202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27204    new_path="$unix_path"
27205  fi
27206
27207    # remove trailing .exe if any
27208    new_path="${new_path/%.exe/}"
27209
27210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27212  fi
27213
27214  else
27215    # We're on a posix platform. Hooray! :)
27216    # First separate the path from the arguments. This will split at the first
27217    # space.
27218    complete="$NM"
27219    path="${complete%% *}"
27220    tmp="$complete EOL"
27221    arguments="${tmp#* }"
27222
27223    # Cannot rely on the command "which" here since it doesn't always work.
27224    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27225    if test -z "$is_absolute_path"; then
27226      # Path to executable is not absolute. Find it.
27227      IFS_save="$IFS"
27228      IFS=:
27229      for p in $PATH; do
27230        if test -f "$p/$path" && test -x "$p/$path"; then
27231          new_path="$p/$path"
27232          break
27233        fi
27234      done
27235      IFS="$IFS_save"
27236    else
27237      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27238$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27239      new_path="$path"
27240    fi
27241
27242    if test "x$new_path" = x; then
27243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27244$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27245        has_space=`$ECHO "$complete" | $GREP " "`
27246        if test "x$has_space" != x; then
27247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27249        fi
27250        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27251      fi
27252  fi
27253
27254      # Now join together the path and the arguments once again
27255      if test "x$arguments" != xEOL; then
27256        new_complete="$new_path ${arguments% *}"
27257      else
27258        new_complete="$new_path"
27259      fi
27260
27261  if test "x$complete" != "x$new_complete"; then
27262      NM="$new_complete"
27263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27264$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27265    fi
27266
27267    GNM="$NM"
27268
27269    if test -n "$ac_tool_prefix"; then
27270  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27271set dummy ${ac_tool_prefix}strip; ac_word=$2
27272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27273$as_echo_n "checking for $ac_word... " >&6; }
27274if ${ac_cv_prog_STRIP+:} false; then :
27275  $as_echo_n "(cached) " >&6
27276else
27277  if test -n "$STRIP"; then
27278  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27279else
27280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27281for as_dir in $PATH
27282do
27283  IFS=$as_save_IFS
27284  test -z "$as_dir" && as_dir=.
27285    for ac_exec_ext in '' $ac_executable_extensions; do
27286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27287    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27289    break 2
27290  fi
27291done
27292  done
27293IFS=$as_save_IFS
27294
27295fi
27296fi
27297STRIP=$ac_cv_prog_STRIP
27298if test -n "$STRIP"; then
27299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27300$as_echo "$STRIP" >&6; }
27301else
27302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27303$as_echo "no" >&6; }
27304fi
27305
27306
27307fi
27308if test -z "$ac_cv_prog_STRIP"; then
27309  ac_ct_STRIP=$STRIP
27310  # Extract the first word of "strip", so it can be a program name with args.
27311set dummy strip; ac_word=$2
27312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27313$as_echo_n "checking for $ac_word... " >&6; }
27314if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27315  $as_echo_n "(cached) " >&6
27316else
27317  if test -n "$ac_ct_STRIP"; then
27318  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27319else
27320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27321for as_dir in $PATH
27322do
27323  IFS=$as_save_IFS
27324  test -z "$as_dir" && as_dir=.
27325    for ac_exec_ext in '' $ac_executable_extensions; do
27326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27327    ac_cv_prog_ac_ct_STRIP="strip"
27328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27329    break 2
27330  fi
27331done
27332  done
27333IFS=$as_save_IFS
27334
27335fi
27336fi
27337ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27338if test -n "$ac_ct_STRIP"; then
27339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27340$as_echo "$ac_ct_STRIP" >&6; }
27341else
27342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27343$as_echo "no" >&6; }
27344fi
27345
27346  if test "x$ac_ct_STRIP" = x; then
27347    STRIP=""
27348  else
27349    case $cross_compiling:$ac_tool_warned in
27350yes:)
27351{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27352$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27353ac_tool_warned=yes ;;
27354esac
27355    STRIP=$ac_ct_STRIP
27356  fi
27357else
27358  STRIP="$ac_cv_prog_STRIP"
27359fi
27360
27361
27362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27363
27364  # First separate the path from the arguments. This will split at the first
27365  # space.
27366  complete="$STRIP"
27367  path="${complete%% *}"
27368  tmp="$complete EOL"
27369  arguments="${tmp#* }"
27370
27371  # Input might be given as Windows format, start by converting to
27372  # unix format.
27373  new_path=`$CYGPATH -u "$path"`
27374
27375  # Now try to locate executable using which
27376  new_path=`$WHICH "$new_path" 2> /dev/null`
27377  # bat and cmd files are not always considered executable in cygwin causing which
27378  # to not find them
27379  if test "x$new_path" = x \
27380           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27381           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27382    new_path=`$CYGPATH -u "$path"`
27383  fi
27384  if test "x$new_path" = x; then
27385    # Oops. Which didn't find the executable.
27386    # The splitting of arguments from the executable at a space might have been incorrect,
27387    # since paths with space are more likely in Windows. Give it another try with the whole
27388    # argument.
27389    path="$complete"
27390    arguments="EOL"
27391    new_path=`$CYGPATH -u "$path"`
27392    new_path=`$WHICH "$new_path" 2> /dev/null`
27393    # bat and cmd files are not always considered executable in cygwin causing which
27394    # to not find them
27395    if test "x$new_path" = x \
27396             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27397             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27398      new_path=`$CYGPATH -u "$path"`
27399    fi
27400    if test "x$new_path" = x; then
27401      # It's still not found. Now this is an unrecoverable error.
27402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27403$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27404      has_space=`$ECHO "$complete" | $GREP " "`
27405      if test "x$has_space" != x; then
27406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27408      fi
27409      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27410    fi
27411  fi
27412
27413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27416  # "foo.exe" is OK but "foo" is an error.
27417  #
27418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27419  # It is also a way to make sure we got the proper file name for the real test later on.
27420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27421  if test "x$test_shortpath" = x; then
27422    # Short path failed, file does not exist as specified.
27423    # Try adding .exe or .cmd
27424    if test -f "${new_path}.exe"; then
27425       input_to_shortpath="${new_path}.exe"
27426    elif test -f "${new_path}.cmd"; then
27427       input_to_shortpath="${new_path}.cmd"
27428    else
27429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27430$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27433      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27434    fi
27435  else
27436    input_to_shortpath="$new_path"
27437  fi
27438
27439  # Call helper function which possibly converts this using DOS-style short mode.
27440  # If so, the updated path is stored in $new_path.
27441  new_path="$input_to_shortpath"
27442
27443  input_path="$input_to_shortpath"
27444  # Check if we need to convert this using DOS-style short mode. If the path
27445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27446  # take no chances and rewrite it.
27447  # Note: m4 eats our [], so we need to use [ and ] instead.
27448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27449  if test "x$has_forbidden_chars" != x; then
27450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27454      # Going to short mode and back again did indeed matter. Since short mode is
27455      # case insensitive, let's make it lowercase to improve readability.
27456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27457      # Now convert it back to Unix-stile (cygpath)
27458      input_path=`$CYGPATH -u "$shortmode_path"`
27459      new_path="$input_path"
27460    fi
27461  fi
27462
27463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27464  if test "x$test_cygdrive_prefix" = x; then
27465    # As a simple fix, exclude /usr/bin since it's not a real path.
27466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27468      # a path prefixed by /cygdrive for fixpath to work.
27469      new_path="$CYGWIN_ROOT_PATH$input_path"
27470    fi
27471  fi
27472
27473  # remove trailing .exe if any
27474  new_path="${new_path/%.exe/}"
27475
27476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27477
27478  # First separate the path from the arguments. This will split at the first
27479  # space.
27480  complete="$STRIP"
27481  path="${complete%% *}"
27482  tmp="$complete EOL"
27483  arguments="${tmp#* }"
27484
27485  # Input might be given as Windows format, start by converting to
27486  # unix format.
27487  new_path="$path"
27488
27489  windows_path="$new_path"
27490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27491    unix_path=`$CYGPATH -u "$windows_path"`
27492    new_path="$unix_path"
27493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27495    new_path="$unix_path"
27496  fi
27497
27498
27499  # Now try to locate executable using which
27500  new_path=`$WHICH "$new_path" 2> /dev/null`
27501
27502  if test "x$new_path" = x; then
27503    # Oops. Which didn't find the executable.
27504    # The splitting of arguments from the executable at a space might have been incorrect,
27505    # since paths with space are more likely in Windows. Give it another try with the whole
27506    # argument.
27507    path="$complete"
27508    arguments="EOL"
27509    new_path="$path"
27510
27511  windows_path="$new_path"
27512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27513    unix_path=`$CYGPATH -u "$windows_path"`
27514    new_path="$unix_path"
27515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27517    new_path="$unix_path"
27518  fi
27519
27520
27521    new_path=`$WHICH "$new_path" 2> /dev/null`
27522
27523    if test "x$new_path" = x; then
27524      # It's still not found. Now this is an unrecoverable error.
27525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27526$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27527      has_space=`$ECHO "$complete" | $GREP " "`
27528      if test "x$has_space" != x; then
27529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27531      fi
27532      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27533    fi
27534  fi
27535
27536  # Now new_path has a complete unix path to the binary
27537  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27538    # Keep paths in /bin as-is, but remove trailing .exe if any
27539    new_path="${new_path/%.exe/}"
27540    # Do not save /bin paths to all_fixpath_prefixes!
27541  else
27542    # Not in mixed or Windows style, start by that.
27543    new_path=`cmd //c echo $new_path`
27544
27545  input_path="$new_path"
27546  # Check if we need to convert this using DOS-style short mode. If the path
27547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27548  # take no chances and rewrite it.
27549  # Note: m4 eats our [], so we need to use [ and ] instead.
27550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27551  if test "x$has_forbidden_chars" != x; then
27552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27554  fi
27555
27556    # Output is in $new_path
27557
27558  windows_path="$new_path"
27559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27560    unix_path=`$CYGPATH -u "$windows_path"`
27561    new_path="$unix_path"
27562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27564    new_path="$unix_path"
27565  fi
27566
27567    # remove trailing .exe if any
27568    new_path="${new_path/%.exe/}"
27569
27570    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27571    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27572  fi
27573
27574  else
27575    # We're on a posix platform. Hooray! :)
27576    # First separate the path from the arguments. This will split at the first
27577    # space.
27578    complete="$STRIP"
27579    path="${complete%% *}"
27580    tmp="$complete EOL"
27581    arguments="${tmp#* }"
27582
27583    # Cannot rely on the command "which" here since it doesn't always work.
27584    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27585    if test -z "$is_absolute_path"; then
27586      # Path to executable is not absolute. Find it.
27587      IFS_save="$IFS"
27588      IFS=:
27589      for p in $PATH; do
27590        if test -f "$p/$path" && test -x "$p/$path"; then
27591          new_path="$p/$path"
27592          break
27593        fi
27594      done
27595      IFS="$IFS_save"
27596    else
27597      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27598$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27599      new_path="$path"
27600    fi
27601
27602    if test "x$new_path" = x; then
27603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27604$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27605        has_space=`$ECHO "$complete" | $GREP " "`
27606        if test "x$has_space" != x; then
27607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27609        fi
27610        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27611      fi
27612  fi
27613
27614      # Now join together the path and the arguments once again
27615      if test "x$arguments" != xEOL; then
27616        new_complete="$new_path ${arguments% *}"
27617      else
27618        new_complete="$new_path"
27619      fi
27620
27621  if test "x$complete" != "x$new_complete"; then
27622      STRIP="$new_complete"
27623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27624$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27625    fi
27626
27627fi
27628
27629# objcopy is used for moving debug symbols to separate files when
27630# full debug symbols are enabled.
27631if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27632    if test -n "$ac_tool_prefix"; then
27633  for ac_prog in gobjcopy objcopy
27634  do
27635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27638$as_echo_n "checking for $ac_word... " >&6; }
27639if ${ac_cv_prog_OBJCOPY+:} false; then :
27640  $as_echo_n "(cached) " >&6
27641else
27642  if test -n "$OBJCOPY"; then
27643  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27644else
27645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27646for as_dir in $PATH
27647do
27648  IFS=$as_save_IFS
27649  test -z "$as_dir" && as_dir=.
27650    for ac_exec_ext in '' $ac_executable_extensions; do
27651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27652    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27654    break 2
27655  fi
27656done
27657  done
27658IFS=$as_save_IFS
27659
27660fi
27661fi
27662OBJCOPY=$ac_cv_prog_OBJCOPY
27663if test -n "$OBJCOPY"; then
27664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27665$as_echo "$OBJCOPY" >&6; }
27666else
27667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27668$as_echo "no" >&6; }
27669fi
27670
27671
27672    test -n "$OBJCOPY" && break
27673  done
27674fi
27675if test -z "$OBJCOPY"; then
27676  ac_ct_OBJCOPY=$OBJCOPY
27677  for ac_prog in gobjcopy objcopy
27678do
27679  # Extract the first word of "$ac_prog", so it can be a program name with args.
27680set dummy $ac_prog; ac_word=$2
27681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27682$as_echo_n "checking for $ac_word... " >&6; }
27683if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27684  $as_echo_n "(cached) " >&6
27685else
27686  if test -n "$ac_ct_OBJCOPY"; then
27687  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27688else
27689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27690for as_dir in $PATH
27691do
27692  IFS=$as_save_IFS
27693  test -z "$as_dir" && as_dir=.
27694    for ac_exec_ext in '' $ac_executable_extensions; do
27695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27696    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27698    break 2
27699  fi
27700done
27701  done
27702IFS=$as_save_IFS
27703
27704fi
27705fi
27706ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27707if test -n "$ac_ct_OBJCOPY"; then
27708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27709$as_echo "$ac_ct_OBJCOPY" >&6; }
27710else
27711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27712$as_echo "no" >&6; }
27713fi
27714
27715
27716  test -n "$ac_ct_OBJCOPY" && break
27717done
27718
27719  if test "x$ac_ct_OBJCOPY" = x; then
27720    OBJCOPY=""
27721  else
27722    case $cross_compiling:$ac_tool_warned in
27723yes:)
27724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27726ac_tool_warned=yes ;;
27727esac
27728    OBJCOPY=$ac_ct_OBJCOPY
27729  fi
27730fi
27731
27732    # Only call fixup if objcopy was found.
27733    if test -n "$OBJCOPY"; then
27734
27735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27736
27737  # First separate the path from the arguments. This will split at the first
27738  # space.
27739  complete="$OBJCOPY"
27740  path="${complete%% *}"
27741  tmp="$complete EOL"
27742  arguments="${tmp#* }"
27743
27744  # Input might be given as Windows format, start by converting to
27745  # unix format.
27746  new_path=`$CYGPATH -u "$path"`
27747
27748  # Now try to locate executable using which
27749  new_path=`$WHICH "$new_path" 2> /dev/null`
27750  # bat and cmd files are not always considered executable in cygwin causing which
27751  # to not find them
27752  if test "x$new_path" = x \
27753           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27754           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27755    new_path=`$CYGPATH -u "$path"`
27756  fi
27757  if test "x$new_path" = x; then
27758    # Oops. Which didn't find the executable.
27759    # The splitting of arguments from the executable at a space might have been incorrect,
27760    # since paths with space are more likely in Windows. Give it another try with the whole
27761    # argument.
27762    path="$complete"
27763    arguments="EOL"
27764    new_path=`$CYGPATH -u "$path"`
27765    new_path=`$WHICH "$new_path" 2> /dev/null`
27766    # bat and cmd files are not always considered executable in cygwin causing which
27767    # to not find them
27768    if test "x$new_path" = x \
27769             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27770             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27771      new_path=`$CYGPATH -u "$path"`
27772    fi
27773    if test "x$new_path" = x; then
27774      # It's still not found. Now this is an unrecoverable error.
27775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27776$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27777      has_space=`$ECHO "$complete" | $GREP " "`
27778      if test "x$has_space" != x; then
27779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27781      fi
27782      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27783    fi
27784  fi
27785
27786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27789  # "foo.exe" is OK but "foo" is an error.
27790  #
27791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27792  # It is also a way to make sure we got the proper file name for the real test later on.
27793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27794  if test "x$test_shortpath" = x; then
27795    # Short path failed, file does not exist as specified.
27796    # Try adding .exe or .cmd
27797    if test -f "${new_path}.exe"; then
27798       input_to_shortpath="${new_path}.exe"
27799    elif test -f "${new_path}.cmd"; then
27800       input_to_shortpath="${new_path}.cmd"
27801    else
27802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27803$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27804      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27805$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27806      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27807    fi
27808  else
27809    input_to_shortpath="$new_path"
27810  fi
27811
27812  # Call helper function which possibly converts this using DOS-style short mode.
27813  # If so, the updated path is stored in $new_path.
27814  new_path="$input_to_shortpath"
27815
27816  input_path="$input_to_shortpath"
27817  # Check if we need to convert this using DOS-style short mode. If the path
27818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27819  # take no chances and rewrite it.
27820  # Note: m4 eats our [], so we need to use [ and ] instead.
27821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27822  if test "x$has_forbidden_chars" != x; then
27823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27827      # Going to short mode and back again did indeed matter. Since short mode is
27828      # case insensitive, let's make it lowercase to improve readability.
27829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27830      # Now convert it back to Unix-stile (cygpath)
27831      input_path=`$CYGPATH -u "$shortmode_path"`
27832      new_path="$input_path"
27833    fi
27834  fi
27835
27836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27837  if test "x$test_cygdrive_prefix" = x; then
27838    # As a simple fix, exclude /usr/bin since it's not a real path.
27839    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27841      # a path prefixed by /cygdrive for fixpath to work.
27842      new_path="$CYGWIN_ROOT_PATH$input_path"
27843    fi
27844  fi
27845
27846  # remove trailing .exe if any
27847  new_path="${new_path/%.exe/}"
27848
27849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27850
27851  # First separate the path from the arguments. This will split at the first
27852  # space.
27853  complete="$OBJCOPY"
27854  path="${complete%% *}"
27855  tmp="$complete EOL"
27856  arguments="${tmp#* }"
27857
27858  # Input might be given as Windows format, start by converting to
27859  # unix format.
27860  new_path="$path"
27861
27862  windows_path="$new_path"
27863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27864    unix_path=`$CYGPATH -u "$windows_path"`
27865    new_path="$unix_path"
27866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27868    new_path="$unix_path"
27869  fi
27870
27871
27872  # Now try to locate executable using which
27873  new_path=`$WHICH "$new_path" 2> /dev/null`
27874
27875  if test "x$new_path" = x; then
27876    # Oops. Which didn't find the executable.
27877    # The splitting of arguments from the executable at a space might have been incorrect,
27878    # since paths with space are more likely in Windows. Give it another try with the whole
27879    # argument.
27880    path="$complete"
27881    arguments="EOL"
27882    new_path="$path"
27883
27884  windows_path="$new_path"
27885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27886    unix_path=`$CYGPATH -u "$windows_path"`
27887    new_path="$unix_path"
27888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27890    new_path="$unix_path"
27891  fi
27892
27893
27894    new_path=`$WHICH "$new_path" 2> /dev/null`
27895
27896    if test "x$new_path" = x; then
27897      # It's still not found. Now this is an unrecoverable error.
27898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27899$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27900      has_space=`$ECHO "$complete" | $GREP " "`
27901      if test "x$has_space" != x; then
27902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27904      fi
27905      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27906    fi
27907  fi
27908
27909  # Now new_path has a complete unix path to the binary
27910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27911    # Keep paths in /bin as-is, but remove trailing .exe if any
27912    new_path="${new_path/%.exe/}"
27913    # Do not save /bin paths to all_fixpath_prefixes!
27914  else
27915    # Not in mixed or Windows style, start by that.
27916    new_path=`cmd //c echo $new_path`
27917
27918  input_path="$new_path"
27919  # Check if we need to convert this using DOS-style short mode. If the path
27920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27921  # take no chances and rewrite it.
27922  # Note: m4 eats our [], so we need to use [ and ] instead.
27923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27924  if test "x$has_forbidden_chars" != x; then
27925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27927  fi
27928
27929    # Output is in $new_path
27930
27931  windows_path="$new_path"
27932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27933    unix_path=`$CYGPATH -u "$windows_path"`
27934    new_path="$unix_path"
27935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27937    new_path="$unix_path"
27938  fi
27939
27940    # remove trailing .exe if any
27941    new_path="${new_path/%.exe/}"
27942
27943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27945  fi
27946
27947  else
27948    # We're on a posix platform. Hooray! :)
27949    # First separate the path from the arguments. This will split at the first
27950    # space.
27951    complete="$OBJCOPY"
27952    path="${complete%% *}"
27953    tmp="$complete EOL"
27954    arguments="${tmp#* }"
27955
27956    # Cannot rely on the command "which" here since it doesn't always work.
27957    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27958    if test -z "$is_absolute_path"; then
27959      # Path to executable is not absolute. Find it.
27960      IFS_save="$IFS"
27961      IFS=:
27962      for p in $PATH; do
27963        if test -f "$p/$path" && test -x "$p/$path"; then
27964          new_path="$p/$path"
27965          break
27966        fi
27967      done
27968      IFS="$IFS_save"
27969    else
27970      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27971$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27972      new_path="$path"
27973    fi
27974
27975    if test "x$new_path" = x; then
27976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27977$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27978        has_space=`$ECHO "$complete" | $GREP " "`
27979        if test "x$has_space" != x; then
27980          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27982        fi
27983        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27984      fi
27985  fi
27986
27987      # Now join together the path and the arguments once again
27988      if test "x$arguments" != xEOL; then
27989        new_complete="$new_path ${arguments% *}"
27990      else
27991        new_complete="$new_path"
27992      fi
27993
27994  if test "x$complete" != "x$new_complete"; then
27995      OBJCOPY="$new_complete"
27996      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27997$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27998    fi
27999
28000    fi
28001fi
28002
28003if test -n "$ac_tool_prefix"; then
28004  for ac_prog in gobjdump objdump
28005  do
28006    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28007set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28009$as_echo_n "checking for $ac_word... " >&6; }
28010if ${ac_cv_prog_OBJDUMP+:} false; then :
28011  $as_echo_n "(cached) " >&6
28012else
28013  if test -n "$OBJDUMP"; then
28014  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28015else
28016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28017for as_dir in $PATH
28018do
28019  IFS=$as_save_IFS
28020  test -z "$as_dir" && as_dir=.
28021    for ac_exec_ext in '' $ac_executable_extensions; do
28022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28023    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28025    break 2
28026  fi
28027done
28028  done
28029IFS=$as_save_IFS
28030
28031fi
28032fi
28033OBJDUMP=$ac_cv_prog_OBJDUMP
28034if test -n "$OBJDUMP"; then
28035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28036$as_echo "$OBJDUMP" >&6; }
28037else
28038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28039$as_echo "no" >&6; }
28040fi
28041
28042
28043    test -n "$OBJDUMP" && break
28044  done
28045fi
28046if test -z "$OBJDUMP"; then
28047  ac_ct_OBJDUMP=$OBJDUMP
28048  for ac_prog in gobjdump objdump
28049do
28050  # Extract the first word of "$ac_prog", so it can be a program name with args.
28051set dummy $ac_prog; ac_word=$2
28052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28053$as_echo_n "checking for $ac_word... " >&6; }
28054if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28055  $as_echo_n "(cached) " >&6
28056else
28057  if test -n "$ac_ct_OBJDUMP"; then
28058  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28059else
28060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28061for as_dir in $PATH
28062do
28063  IFS=$as_save_IFS
28064  test -z "$as_dir" && as_dir=.
28065    for ac_exec_ext in '' $ac_executable_extensions; do
28066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28067    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28069    break 2
28070  fi
28071done
28072  done
28073IFS=$as_save_IFS
28074
28075fi
28076fi
28077ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28078if test -n "$ac_ct_OBJDUMP"; then
28079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28080$as_echo "$ac_ct_OBJDUMP" >&6; }
28081else
28082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28083$as_echo "no" >&6; }
28084fi
28085
28086
28087  test -n "$ac_ct_OBJDUMP" && break
28088done
28089
28090  if test "x$ac_ct_OBJDUMP" = x; then
28091    OBJDUMP=""
28092  else
28093    case $cross_compiling:$ac_tool_warned in
28094yes:)
28095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28097ac_tool_warned=yes ;;
28098esac
28099    OBJDUMP=$ac_ct_OBJDUMP
28100  fi
28101fi
28102
28103if test "x$OBJDUMP" != x; then
28104  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28105
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107
28108  # First separate the path from the arguments. This will split at the first
28109  # space.
28110  complete="$OBJDUMP"
28111  path="${complete%% *}"
28112  tmp="$complete EOL"
28113  arguments="${tmp#* }"
28114
28115  # Input might be given as Windows format, start by converting to
28116  # unix format.
28117  new_path=`$CYGPATH -u "$path"`
28118
28119  # Now try to locate executable using which
28120  new_path=`$WHICH "$new_path" 2> /dev/null`
28121  # bat and cmd files are not always considered executable in cygwin causing which
28122  # to not find them
28123  if test "x$new_path" = x \
28124           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28125           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28126    new_path=`$CYGPATH -u "$path"`
28127  fi
28128  if test "x$new_path" = x; then
28129    # Oops. Which didn't find the executable.
28130    # The splitting of arguments from the executable at a space might have been incorrect,
28131    # since paths with space are more likely in Windows. Give it another try with the whole
28132    # argument.
28133    path="$complete"
28134    arguments="EOL"
28135    new_path=`$CYGPATH -u "$path"`
28136    new_path=`$WHICH "$new_path" 2> /dev/null`
28137    # bat and cmd files are not always considered executable in cygwin causing which
28138    # to not find them
28139    if test "x$new_path" = x \
28140             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28141             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28142      new_path=`$CYGPATH -u "$path"`
28143    fi
28144    if test "x$new_path" = x; then
28145      # It's still not found. Now this is an unrecoverable error.
28146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28147$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28148      has_space=`$ECHO "$complete" | $GREP " "`
28149      if test "x$has_space" != x; then
28150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28152      fi
28153      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28154    fi
28155  fi
28156
28157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28160  # "foo.exe" is OK but "foo" is an error.
28161  #
28162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28163  # It is also a way to make sure we got the proper file name for the real test later on.
28164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28165  if test "x$test_shortpath" = x; then
28166    # Short path failed, file does not exist as specified.
28167    # Try adding .exe or .cmd
28168    if test -f "${new_path}.exe"; then
28169       input_to_shortpath="${new_path}.exe"
28170    elif test -f "${new_path}.cmd"; then
28171       input_to_shortpath="${new_path}.cmd"
28172    else
28173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28174$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28175      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28176$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28177      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28178    fi
28179  else
28180    input_to_shortpath="$new_path"
28181  fi
28182
28183  # Call helper function which possibly converts this using DOS-style short mode.
28184  # If so, the updated path is stored in $new_path.
28185  new_path="$input_to_shortpath"
28186
28187  input_path="$input_to_shortpath"
28188  # Check if we need to convert this using DOS-style short mode. If the path
28189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28190  # take no chances and rewrite it.
28191  # Note: m4 eats our [], so we need to use [ and ] instead.
28192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28193  if test "x$has_forbidden_chars" != x; then
28194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28198      # Going to short mode and back again did indeed matter. Since short mode is
28199      # case insensitive, let's make it lowercase to improve readability.
28200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28201      # Now convert it back to Unix-stile (cygpath)
28202      input_path=`$CYGPATH -u "$shortmode_path"`
28203      new_path="$input_path"
28204    fi
28205  fi
28206
28207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28208  if test "x$test_cygdrive_prefix" = x; then
28209    # As a simple fix, exclude /usr/bin since it's not a real path.
28210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28212      # a path prefixed by /cygdrive for fixpath to work.
28213      new_path="$CYGWIN_ROOT_PATH$input_path"
28214    fi
28215  fi
28216
28217  # remove trailing .exe if any
28218  new_path="${new_path/%.exe/}"
28219
28220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28221
28222  # First separate the path from the arguments. This will split at the first
28223  # space.
28224  complete="$OBJDUMP"
28225  path="${complete%% *}"
28226  tmp="$complete EOL"
28227  arguments="${tmp#* }"
28228
28229  # Input might be given as Windows format, start by converting to
28230  # unix format.
28231  new_path="$path"
28232
28233  windows_path="$new_path"
28234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28235    unix_path=`$CYGPATH -u "$windows_path"`
28236    new_path="$unix_path"
28237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28239    new_path="$unix_path"
28240  fi
28241
28242
28243  # Now try to locate executable using which
28244  new_path=`$WHICH "$new_path" 2> /dev/null`
28245
28246  if test "x$new_path" = x; then
28247    # Oops. Which didn't find the executable.
28248    # The splitting of arguments from the executable at a space might have been incorrect,
28249    # since paths with space are more likely in Windows. Give it another try with the whole
28250    # argument.
28251    path="$complete"
28252    arguments="EOL"
28253    new_path="$path"
28254
28255  windows_path="$new_path"
28256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28257    unix_path=`$CYGPATH -u "$windows_path"`
28258    new_path="$unix_path"
28259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28261    new_path="$unix_path"
28262  fi
28263
28264
28265    new_path=`$WHICH "$new_path" 2> /dev/null`
28266
28267    if test "x$new_path" = x; then
28268      # It's still not found. Now this is an unrecoverable error.
28269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28270$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28271      has_space=`$ECHO "$complete" | $GREP " "`
28272      if test "x$has_space" != x; then
28273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28275      fi
28276      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28277    fi
28278  fi
28279
28280  # Now new_path has a complete unix path to the binary
28281  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28282    # Keep paths in /bin as-is, but remove trailing .exe if any
28283    new_path="${new_path/%.exe/}"
28284    # Do not save /bin paths to all_fixpath_prefixes!
28285  else
28286    # Not in mixed or Windows style, start by that.
28287    new_path=`cmd //c echo $new_path`
28288
28289  input_path="$new_path"
28290  # Check if we need to convert this using DOS-style short mode. If the path
28291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28292  # take no chances and rewrite it.
28293  # Note: m4 eats our [], so we need to use [ and ] instead.
28294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28295  if test "x$has_forbidden_chars" != x; then
28296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28298  fi
28299
28300    # Output is in $new_path
28301
28302  windows_path="$new_path"
28303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28304    unix_path=`$CYGPATH -u "$windows_path"`
28305    new_path="$unix_path"
28306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28308    new_path="$unix_path"
28309  fi
28310
28311    # remove trailing .exe if any
28312    new_path="${new_path/%.exe/}"
28313
28314    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28315    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28316  fi
28317
28318  else
28319    # We're on a posix platform. Hooray! :)
28320    # First separate the path from the arguments. This will split at the first
28321    # space.
28322    complete="$OBJDUMP"
28323    path="${complete%% *}"
28324    tmp="$complete EOL"
28325    arguments="${tmp#* }"
28326
28327    # Cannot rely on the command "which" here since it doesn't always work.
28328    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28329    if test -z "$is_absolute_path"; then
28330      # Path to executable is not absolute. Find it.
28331      IFS_save="$IFS"
28332      IFS=:
28333      for p in $PATH; do
28334        if test -f "$p/$path" && test -x "$p/$path"; then
28335          new_path="$p/$path"
28336          break
28337        fi
28338      done
28339      IFS="$IFS_save"
28340    else
28341      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28342$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28343      new_path="$path"
28344    fi
28345
28346    if test "x$new_path" = x; then
28347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28348$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28349        has_space=`$ECHO "$complete" | $GREP " "`
28350        if test "x$has_space" != x; then
28351          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28352$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28353        fi
28354        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28355      fi
28356  fi
28357
28358      # Now join together the path and the arguments once again
28359      if test "x$arguments" != xEOL; then
28360        new_complete="$new_path ${arguments% *}"
28361      else
28362        new_complete="$new_path"
28363      fi
28364
28365  if test "x$complete" != "x$new_complete"; then
28366      OBJDUMP="$new_complete"
28367      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28368$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28369    fi
28370
28371fi
28372
28373if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28374   # Extract the first word of "lipo", so it can be a program name with args.
28375set dummy lipo; ac_word=$2
28376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28377$as_echo_n "checking for $ac_word... " >&6; }
28378if ${ac_cv_path_LIPO+:} false; then :
28379  $as_echo_n "(cached) " >&6
28380else
28381  case $LIPO in
28382  [\\/]* | ?:[\\/]*)
28383  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28384  ;;
28385  *)
28386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28387for as_dir in $PATH
28388do
28389  IFS=$as_save_IFS
28390  test -z "$as_dir" && as_dir=.
28391    for ac_exec_ext in '' $ac_executable_extensions; do
28392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28393    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28395    break 2
28396  fi
28397done
28398  done
28399IFS=$as_save_IFS
28400
28401  ;;
28402esac
28403fi
28404LIPO=$ac_cv_path_LIPO
28405if test -n "$LIPO"; then
28406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28407$as_echo "$LIPO" >&6; }
28408else
28409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28410$as_echo "no" >&6; }
28411fi
28412
28413
28414
28415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28416
28417  # First separate the path from the arguments. This will split at the first
28418  # space.
28419  complete="$LIPO"
28420  path="${complete%% *}"
28421  tmp="$complete EOL"
28422  arguments="${tmp#* }"
28423
28424  # Input might be given as Windows format, start by converting to
28425  # unix format.
28426  new_path=`$CYGPATH -u "$path"`
28427
28428  # Now try to locate executable using which
28429  new_path=`$WHICH "$new_path" 2> /dev/null`
28430  # bat and cmd files are not always considered executable in cygwin causing which
28431  # to not find them
28432  if test "x$new_path" = x \
28433           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28434           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28435    new_path=`$CYGPATH -u "$path"`
28436  fi
28437  if test "x$new_path" = x; then
28438    # Oops. Which didn't find the executable.
28439    # The splitting of arguments from the executable at a space might have been incorrect,
28440    # since paths with space are more likely in Windows. Give it another try with the whole
28441    # argument.
28442    path="$complete"
28443    arguments="EOL"
28444    new_path=`$CYGPATH -u "$path"`
28445    new_path=`$WHICH "$new_path" 2> /dev/null`
28446    # bat and cmd files are not always considered executable in cygwin causing which
28447    # to not find them
28448    if test "x$new_path" = x \
28449             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28450             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28451      new_path=`$CYGPATH -u "$path"`
28452    fi
28453    if test "x$new_path" = x; then
28454      # It's still not found. Now this is an unrecoverable error.
28455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28456$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28457      has_space=`$ECHO "$complete" | $GREP " "`
28458      if test "x$has_space" != x; then
28459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28461      fi
28462      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28463    fi
28464  fi
28465
28466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28469  # "foo.exe" is OK but "foo" is an error.
28470  #
28471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28472  # It is also a way to make sure we got the proper file name for the real test later on.
28473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28474  if test "x$test_shortpath" = x; then
28475    # Short path failed, file does not exist as specified.
28476    # Try adding .exe or .cmd
28477    if test -f "${new_path}.exe"; then
28478       input_to_shortpath="${new_path}.exe"
28479    elif test -f "${new_path}.cmd"; then
28480       input_to_shortpath="${new_path}.cmd"
28481    else
28482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28483$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28484      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28485$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28486      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28487    fi
28488  else
28489    input_to_shortpath="$new_path"
28490  fi
28491
28492  # Call helper function which possibly converts this using DOS-style short mode.
28493  # If so, the updated path is stored in $new_path.
28494  new_path="$input_to_shortpath"
28495
28496  input_path="$input_to_shortpath"
28497  # Check if we need to convert this using DOS-style short mode. If the path
28498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28499  # take no chances and rewrite it.
28500  # Note: m4 eats our [], so we need to use [ and ] instead.
28501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28502  if test "x$has_forbidden_chars" != x; then
28503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28507      # Going to short mode and back again did indeed matter. Since short mode is
28508      # case insensitive, let's make it lowercase to improve readability.
28509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28510      # Now convert it back to Unix-stile (cygpath)
28511      input_path=`$CYGPATH -u "$shortmode_path"`
28512      new_path="$input_path"
28513    fi
28514  fi
28515
28516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28517  if test "x$test_cygdrive_prefix" = x; then
28518    # As a simple fix, exclude /usr/bin since it's not a real path.
28519    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28521      # a path prefixed by /cygdrive for fixpath to work.
28522      new_path="$CYGWIN_ROOT_PATH$input_path"
28523    fi
28524  fi
28525
28526  # remove trailing .exe if any
28527  new_path="${new_path/%.exe/}"
28528
28529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28530
28531  # First separate the path from the arguments. This will split at the first
28532  # space.
28533  complete="$LIPO"
28534  path="${complete%% *}"
28535  tmp="$complete EOL"
28536  arguments="${tmp#* }"
28537
28538  # Input might be given as Windows format, start by converting to
28539  # unix format.
28540  new_path="$path"
28541
28542  windows_path="$new_path"
28543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28544    unix_path=`$CYGPATH -u "$windows_path"`
28545    new_path="$unix_path"
28546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28548    new_path="$unix_path"
28549  fi
28550
28551
28552  # Now try to locate executable using which
28553  new_path=`$WHICH "$new_path" 2> /dev/null`
28554
28555  if test "x$new_path" = x; then
28556    # Oops. Which didn't find the executable.
28557    # The splitting of arguments from the executable at a space might have been incorrect,
28558    # since paths with space are more likely in Windows. Give it another try with the whole
28559    # argument.
28560    path="$complete"
28561    arguments="EOL"
28562    new_path="$path"
28563
28564  windows_path="$new_path"
28565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28566    unix_path=`$CYGPATH -u "$windows_path"`
28567    new_path="$unix_path"
28568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28570    new_path="$unix_path"
28571  fi
28572
28573
28574    new_path=`$WHICH "$new_path" 2> /dev/null`
28575
28576    if test "x$new_path" = x; then
28577      # It's still not found. Now this is an unrecoverable error.
28578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28579$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28580      has_space=`$ECHO "$complete" | $GREP " "`
28581      if test "x$has_space" != x; then
28582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28584      fi
28585      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28586    fi
28587  fi
28588
28589  # Now new_path has a complete unix path to the binary
28590  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28591    # Keep paths in /bin as-is, but remove trailing .exe if any
28592    new_path="${new_path/%.exe/}"
28593    # Do not save /bin paths to all_fixpath_prefixes!
28594  else
28595    # Not in mixed or Windows style, start by that.
28596    new_path=`cmd //c echo $new_path`
28597
28598  input_path="$new_path"
28599  # Check if we need to convert this using DOS-style short mode. If the path
28600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28601  # take no chances and rewrite it.
28602  # Note: m4 eats our [], so we need to use [ and ] instead.
28603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28604  if test "x$has_forbidden_chars" != x; then
28605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28607  fi
28608
28609    # Output is in $new_path
28610
28611  windows_path="$new_path"
28612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28613    unix_path=`$CYGPATH -u "$windows_path"`
28614    new_path="$unix_path"
28615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28617    new_path="$unix_path"
28618  fi
28619
28620    # remove trailing .exe if any
28621    new_path="${new_path/%.exe/}"
28622
28623    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28624    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28625  fi
28626
28627  else
28628    # We're on a posix platform. Hooray! :)
28629    # First separate the path from the arguments. This will split at the first
28630    # space.
28631    complete="$LIPO"
28632    path="${complete%% *}"
28633    tmp="$complete EOL"
28634    arguments="${tmp#* }"
28635
28636    # Cannot rely on the command "which" here since it doesn't always work.
28637    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28638    if test -z "$is_absolute_path"; then
28639      # Path to executable is not absolute. Find it.
28640      IFS_save="$IFS"
28641      IFS=:
28642      for p in $PATH; do
28643        if test -f "$p/$path" && test -x "$p/$path"; then
28644          new_path="$p/$path"
28645          break
28646        fi
28647      done
28648      IFS="$IFS_save"
28649    else
28650      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28651$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28652      new_path="$path"
28653    fi
28654
28655    if test "x$new_path" = x; then
28656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28657$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28658        has_space=`$ECHO "$complete" | $GREP " "`
28659        if test "x$has_space" != x; then
28660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28662        fi
28663        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28664      fi
28665  fi
28666
28667      # Now join together the path and the arguments once again
28668      if test "x$arguments" != xEOL; then
28669        new_complete="$new_path ${arguments% *}"
28670      else
28671        new_complete="$new_path"
28672      fi
28673
28674  if test "x$complete" != "x$new_complete"; then
28675      LIPO="$new_complete"
28676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28677$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28678    fi
28679
28680fi
28681
28682
28683
28684# Restore old path without tools dir
28685PATH="$OLD_PATH"
28686
28687
28688# FIXME: Currently we must test this after paths but before flags. Fix!
28689
28690# And we can test some aspects on the target using configure macros.
28691
28692
28693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28694$as_echo_n "checking for ANSI C header files... " >&6; }
28695if ${ac_cv_header_stdc+:} false; then :
28696  $as_echo_n "(cached) " >&6
28697else
28698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28699/* end confdefs.h.  */
28700#include <stdlib.h>
28701#include <stdarg.h>
28702#include <string.h>
28703#include <float.h>
28704
28705int
28706main ()
28707{
28708
28709  ;
28710  return 0;
28711}
28712_ACEOF
28713if ac_fn_cxx_try_compile "$LINENO"; then :
28714  ac_cv_header_stdc=yes
28715else
28716  ac_cv_header_stdc=no
28717fi
28718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28719
28720if test $ac_cv_header_stdc = yes; then
28721  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28723/* end confdefs.h.  */
28724#include <string.h>
28725
28726_ACEOF
28727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28728  $EGREP "memchr" >/dev/null 2>&1; then :
28729
28730else
28731  ac_cv_header_stdc=no
28732fi
28733rm -f conftest*
28734
28735fi
28736
28737if test $ac_cv_header_stdc = yes; then
28738  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28740/* end confdefs.h.  */
28741#include <stdlib.h>
28742
28743_ACEOF
28744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28745  $EGREP "free" >/dev/null 2>&1; then :
28746
28747else
28748  ac_cv_header_stdc=no
28749fi
28750rm -f conftest*
28751
28752fi
28753
28754if test $ac_cv_header_stdc = yes; then
28755  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28756  if test "$cross_compiling" = yes; then :
28757  :
28758else
28759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28760/* end confdefs.h.  */
28761#include <ctype.h>
28762#include <stdlib.h>
28763#if ((' ' & 0x0FF) == 0x020)
28764# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28765# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28766#else
28767# define ISLOWER(c) \
28768		   (('a' <= (c) && (c) <= 'i') \
28769		     || ('j' <= (c) && (c) <= 'r') \
28770		     || ('s' <= (c) && (c) <= 'z'))
28771# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28772#endif
28773
28774#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28775int
28776main ()
28777{
28778  int i;
28779  for (i = 0; i < 256; i++)
28780    if (XOR (islower (i), ISLOWER (i))
28781	|| toupper (i) != TOUPPER (i))
28782      return 2;
28783  return 0;
28784}
28785_ACEOF
28786if ac_fn_cxx_try_run "$LINENO"; then :
28787
28788else
28789  ac_cv_header_stdc=no
28790fi
28791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28792  conftest.$ac_objext conftest.beam conftest.$ac_ext
28793fi
28794
28795fi
28796fi
28797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28798$as_echo "$ac_cv_header_stdc" >&6; }
28799if test $ac_cv_header_stdc = yes; then
28800
28801$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28802
28803fi
28804
28805# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28806for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28807		  inttypes.h stdint.h unistd.h
28808do :
28809  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28810ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28811"
28812if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28813  cat >>confdefs.h <<_ACEOF
28814#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28815_ACEOF
28816
28817fi
28818
28819done
28820
28821
28822
28823###############################################################################
28824#
28825# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28826# (The JVM can use 32 or 64 bit Java pointers but that decision
28827# is made at runtime.)
28828#
28829
28830if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28831  # Always specify -m flags on Solaris
28832
28833  # keep track of c/cxx flags that we added outselves...
28834  #   to prevent emitting warning...
28835  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28836
28837
28838  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28839  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28840  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28841
28842  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28843  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28844  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28845
28846elif test "x$COMPILE_TYPE" = xreduced; then
28847  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28848    # Specify -m if running reduced on other Posix platforms
28849
28850  # keep track of c/cxx flags that we added outselves...
28851  #   to prevent emitting warning...
28852  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28853
28854
28855  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28856  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28857  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28858
28859  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28860  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28861  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28862
28863  fi
28864fi
28865
28866# Make compilation sanity check
28867for ac_header in stdio.h
28868do :
28869  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28870if test "x$ac_cv_header_stdio_h" = xyes; then :
28871  cat >>confdefs.h <<_ACEOF
28872#define HAVE_STDIO_H 1
28873_ACEOF
28874
28875else
28876
28877  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28878$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28879  if test "x$COMPILE_TYPE" = xreduced; then
28880    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28881$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28882  elif test "x$COMPILE_TYPE" = xcross; then
28883    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28884$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28885  fi
28886  as_fn_error $? "Cannot continue." "$LINENO" 5
28887
28888fi
28889
28890done
28891
28892
28893# The cast to long int works around a bug in the HP C Compiler
28894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28896# This bug is HP SR number 8606223364.
28897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28898$as_echo_n "checking size of int *... " >&6; }
28899if ${ac_cv_sizeof_int_p+:} false; then :
28900  $as_echo_n "(cached) " >&6
28901else
28902  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28903
28904else
28905  if test "$ac_cv_type_int_p" = yes; then
28906     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28908as_fn_error 77 "cannot compute sizeof (int *)
28909See \`config.log' for more details" "$LINENO" 5; }
28910   else
28911     ac_cv_sizeof_int_p=0
28912   fi
28913fi
28914
28915fi
28916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28917$as_echo "$ac_cv_sizeof_int_p" >&6; }
28918
28919
28920
28921cat >>confdefs.h <<_ACEOF
28922#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28923_ACEOF
28924
28925
28926
28927if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28928  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28929  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28930fi
28931
28932if test "x$SIZEOF_INT_P" = x; then
28933    # The test failed, lets stick to the assumed value.
28934    { $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
28935$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28936else
28937    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28938
28939    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28940        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
28941    fi
28942fi
28943
28944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28945$as_echo_n "checking for target address size... " >&6; }
28946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28947$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28948
28949
28950###############################################################################
28951#
28952# Is the target little of big endian?
28953#
28954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28955$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28956if ${ac_cv_c_bigendian+:} false; then :
28957  $as_echo_n "(cached) " >&6
28958else
28959  ac_cv_c_bigendian=unknown
28960    # See if we're dealing with a universal compiler.
28961    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28962/* end confdefs.h.  */
28963#ifndef __APPLE_CC__
28964	       not a universal capable compiler
28965	     #endif
28966	     typedef int dummy;
28967
28968_ACEOF
28969if ac_fn_cxx_try_compile "$LINENO"; then :
28970
28971	# Check for potential -arch flags.  It is not universal unless
28972	# there are at least two -arch flags with different values.
28973	ac_arch=
28974	ac_prev=
28975	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28976	 if test -n "$ac_prev"; then
28977	   case $ac_word in
28978	     i?86 | x86_64 | ppc | ppc64)
28979	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28980		 ac_arch=$ac_word
28981	       else
28982		 ac_cv_c_bigendian=universal
28983		 break
28984	       fi
28985	       ;;
28986	   esac
28987	   ac_prev=
28988	 elif test "x$ac_word" = "x-arch"; then
28989	   ac_prev=arch
28990	 fi
28991       done
28992fi
28993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28994    if test $ac_cv_c_bigendian = unknown; then
28995      # See if sys/param.h defines the BYTE_ORDER macro.
28996      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28997/* end confdefs.h.  */
28998#include <sys/types.h>
28999	     #include <sys/param.h>
29000
29001int
29002main ()
29003{
29004#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29005		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29006		     && LITTLE_ENDIAN)
29007	      bogus endian macros
29008	     #endif
29009
29010  ;
29011  return 0;
29012}
29013_ACEOF
29014if ac_fn_cxx_try_compile "$LINENO"; then :
29015  # It does; now see whether it defined to BIG_ENDIAN or not.
29016	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29017/* end confdefs.h.  */
29018#include <sys/types.h>
29019		#include <sys/param.h>
29020
29021int
29022main ()
29023{
29024#if BYTE_ORDER != BIG_ENDIAN
29025		 not big endian
29026		#endif
29027
29028  ;
29029  return 0;
29030}
29031_ACEOF
29032if ac_fn_cxx_try_compile "$LINENO"; then :
29033  ac_cv_c_bigendian=yes
29034else
29035  ac_cv_c_bigendian=no
29036fi
29037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29038fi
29039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29040    fi
29041    if test $ac_cv_c_bigendian = unknown; then
29042      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29043      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29044/* end confdefs.h.  */
29045#include <limits.h>
29046
29047int
29048main ()
29049{
29050#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29051	      bogus endian macros
29052	     #endif
29053
29054  ;
29055  return 0;
29056}
29057_ACEOF
29058if ac_fn_cxx_try_compile "$LINENO"; then :
29059  # It does; now see whether it defined to _BIG_ENDIAN or not.
29060	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29061/* end confdefs.h.  */
29062#include <limits.h>
29063
29064int
29065main ()
29066{
29067#ifndef _BIG_ENDIAN
29068		 not big endian
29069		#endif
29070
29071  ;
29072  return 0;
29073}
29074_ACEOF
29075if ac_fn_cxx_try_compile "$LINENO"; then :
29076  ac_cv_c_bigendian=yes
29077else
29078  ac_cv_c_bigendian=no
29079fi
29080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29081fi
29082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29083    fi
29084    if test $ac_cv_c_bigendian = unknown; then
29085      # Compile a test program.
29086      if test "$cross_compiling" = yes; then :
29087  # Try to guess by grepping values from an object file.
29088	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29089/* end confdefs.h.  */
29090short int ascii_mm[] =
29091		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29092		short int ascii_ii[] =
29093		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29094		int use_ascii (int i) {
29095		  return ascii_mm[i] + ascii_ii[i];
29096		}
29097		short int ebcdic_ii[] =
29098		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29099		short int ebcdic_mm[] =
29100		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29101		int use_ebcdic (int i) {
29102		  return ebcdic_mm[i] + ebcdic_ii[i];
29103		}
29104		extern int foo;
29105
29106int
29107main ()
29108{
29109return use_ascii (foo) == use_ebcdic (foo);
29110  ;
29111  return 0;
29112}
29113_ACEOF
29114if ac_fn_cxx_try_compile "$LINENO"; then :
29115  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29116	      ac_cv_c_bigendian=yes
29117	    fi
29118	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29119	      if test "$ac_cv_c_bigendian" = unknown; then
29120		ac_cv_c_bigendian=no
29121	      else
29122		# finding both strings is unlikely to happen, but who knows?
29123		ac_cv_c_bigendian=unknown
29124	      fi
29125	    fi
29126fi
29127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29128else
29129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29130/* end confdefs.h.  */
29131$ac_includes_default
29132int
29133main ()
29134{
29135
29136	     /* Are we little or big endian?  From Harbison&Steele.  */
29137	     union
29138	     {
29139	       long int l;
29140	       char c[sizeof (long int)];
29141	     } u;
29142	     u.l = 1;
29143	     return u.c[sizeof (long int) - 1] == 1;
29144
29145  ;
29146  return 0;
29147}
29148_ACEOF
29149if ac_fn_cxx_try_run "$LINENO"; then :
29150  ac_cv_c_bigendian=no
29151else
29152  ac_cv_c_bigendian=yes
29153fi
29154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29155  conftest.$ac_objext conftest.beam conftest.$ac_ext
29156fi
29157
29158    fi
29159fi
29160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29161$as_echo "$ac_cv_c_bigendian" >&6; }
29162 case $ac_cv_c_bigendian in #(
29163   yes)
29164     ENDIAN="big";; #(
29165   no)
29166     ENDIAN="little" ;; #(
29167   universal)
29168     ENDIAN="universal_endianness"
29169     ;; #(
29170   *)
29171     ENDIAN="unknown" ;;
29172 esac
29173
29174
29175if test "x$ENDIAN" = xuniversal_endianness; then
29176    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29177fi
29178if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29179    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
29180fi
29181
29182
29183# Configure flags for the tools
29184
29185
29186###############################################################################
29187#
29188# How to compile shared libraries.
29189#
29190
29191if test "x$GCC" = xyes; then
29192    COMPILER_NAME=gcc
29193    PICFLAG="-fPIC"
29194    LIBRARY_PREFIX=lib
29195    SHARED_LIBRARY='lib$1.so'
29196    STATIC_LIBRARY='lib$1.a'
29197    SHARED_LIBRARY_FLAGS="-shared"
29198    SHARED_LIBRARY_SUFFIX='.so'
29199    STATIC_LIBRARY_SUFFIX='.a'
29200    OBJ_SUFFIX='.o'
29201    EXE_SUFFIX=''
29202    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29203    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29204    C_FLAG_REORDER=''
29205    CXX_FLAG_REORDER=''
29206    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29207    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29208    LD="$CC"
29209    LDEXE="$CC"
29210    LDCXX="$CXX"
29211    LDEXECXX="$CXX"
29212    POST_STRIP_CMD="$STRIP -g"
29213
29214    # Linking is different on MacOSX
29215    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29216        # Might change in the future to clang.
29217        COMPILER_NAME=gcc
29218        SHARED_LIBRARY='lib$1.dylib'
29219        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29220        SHARED_LIBRARY_SUFFIX='.dylib'
29221        EXE_SUFFIX=''
29222        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29223        SET_SHARED_LIBRARY_MAPFILE=''
29224        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29225        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29226        POST_STRIP_CMD="$STRIP -S"
29227    fi
29228else
29229    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29230        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29231        COMPILER_NAME=ossc
29232        PICFLAG="-KPIC"
29233        LIBRARY_PREFIX=lib
29234        SHARED_LIBRARY='lib$1.so'
29235        STATIC_LIBRARY='lib$1.a'
29236        SHARED_LIBRARY_FLAGS="-G"
29237        SHARED_LIBRARY_SUFFIX='.so'
29238        STATIC_LIBRARY_SUFFIX='.a'
29239        OBJ_SUFFIX='.o'
29240        EXE_SUFFIX=''
29241        SET_SHARED_LIBRARY_NAME=''
29242        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29243	C_FLAG_REORDER='-xF'
29244	CXX_FLAG_REORDER='-xF'
29245        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29246        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29247        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29248        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29249        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29250        POST_STRIP_CMD="$STRIP -x"
29251        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29252    fi
29253    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29254        # If it is not gcc, then assume it is the MS Visual Studio compiler
29255        COMPILER_NAME=cl
29256        PICFLAG=""
29257        LIBRARY_PREFIX=
29258        SHARED_LIBRARY='$1.dll'
29259        STATIC_LIBRARY='$1.lib'
29260        SHARED_LIBRARY_FLAGS="-LD"
29261        SHARED_LIBRARY_SUFFIX='.dll'
29262        STATIC_LIBRARY_SUFFIX='.lib'
29263        OBJ_SUFFIX='.obj'
29264        EXE_SUFFIX='.exe'
29265        SET_SHARED_LIBRARY_NAME=''
29266        SET_SHARED_LIBRARY_MAPFILE=''
29267        SET_SHARED_LIBRARY_ORIGIN=''
29268        SET_EXECUTABLE_ORIGIN=''
29269    fi
29270fi
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290# The (cross) compiler is now configured, we can now test capabilities
29291# of the target platform.
29292
29293
29294
29295###############################################################################
29296#
29297# Setup the opt flags for different compilers
29298# and different operating systems.
29299#
29300
29301#
29302# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29303#
29304if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29305    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29306    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29307    CFLAGS="$CFLAGS -mstackrealign"
29308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29309$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29310    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29311/* end confdefs.h.  */
29312int main() { return 0; }
29313_ACEOF
29314if ac_fn_cxx_try_link "$LINENO"; then :
29315
29316		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29317$as_echo "yes" >&6; }
29318
29319else
29320
29321		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29322$as_echo "no" >&6; }
29323	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29324
29325fi
29326rm -f core conftest.err conftest.$ac_objext \
29327    conftest$ac_exeext conftest.$ac_ext
29328fi
29329
29330C_FLAG_DEPS="-MMD -MF"
29331CXX_FLAG_DEPS="-MMD -MF"
29332
29333case $COMPILER_TYPE in
29334  CC )
29335    case $COMPILER_NAME in
29336      gcc )
29337      	case $OPENJDK_TARGET_OS in
29338	  macosx )
29339	    # On MacOSX we optimize for size, something
29340	    # we should do for all platforms?
29341	    C_O_FLAG_HI="-Os"
29342	    C_O_FLAG_NORM="-Os"
29343	    C_O_FLAG_NONE=""
29344	    ;;
29345	  *)
29346	    C_O_FLAG_HI="-O3"
29347	    C_O_FLAG_NORM="-O2"
29348	    C_O_FLAG_NONE="-O0"
29349	    ;;
29350	esac
29351        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29352        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29353        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29354        CFLAGS_DEBUG_SYMBOLS="-g"
29355        CXXFLAGS_DEBUG_SYMBOLS="-g"
29356        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29357            CFLAGS_DEBUG_SYMBOLS="-g1"
29358            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29359        fi
29360        ;;
29361      ossc )
29362        #
29363        # Forte has different names for this with their C++ compiler...
29364        #
29365        C_FLAG_DEPS="-xMMD -xMF"
29366        CXX_FLAG_DEPS="-xMMD -xMF"
29367
29368        # Extra options used with HIGHEST
29369        #
29370        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29371        #          done with care, there are some assumptions below that need to
29372        #          be understood about the use of pointers, and IEEE behavior.
29373        #
29374        # Use non-standard floating point mode (not IEEE 754)
29375        CC_HIGHEST="$CC_HIGHEST -fns"
29376        # Do some simplification of floating point arithmetic (not IEEE 754)
29377        CC_HIGHEST="$CC_HIGHEST -fsimple"
29378        # Use single precision floating point with 'float'
29379        CC_HIGHEST="$CC_HIGHEST -fsingle"
29380        # Assume memory references via basic pointer types do not alias
29381        #   (Source with excessing pointer casting and data access with mixed
29382        #    pointer types are not recommended)
29383        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29384        # Use intrinsic or inline versions for math/std functions
29385        #   (If you expect perfect errno behavior, do not use this)
29386        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29387        # Loop data dependency optimizations (need -xO3 or higher)
29388        CC_HIGHEST="$CC_HIGHEST -xdepend"
29389        # Pointer parameters to functions do not overlap
29390        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29391        #    If you pass in multiple pointers to the same data, do not use this)
29392        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29393        # Inline some library routines
29394        #   (If you expect perfect errno behavior, do not use this)
29395        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29396        # Use optimized math routines
29397        #   (If you expect perfect errno behavior, do not use this)
29398        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29399        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29400
29401        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29402          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29403          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29404        fi
29405
29406        case $OPENJDK_TARGET_CPU_ARCH in
29407          x86)
29408            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29409            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29410            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29411            C_O_FLAG_NONE="-xregs=no%frameptr"
29412            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29413            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29414            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29415            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29416            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29417               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29418               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29419            fi
29420            ;;
29421          sparc)
29422            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29423            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29424            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29425            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29426            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29427            C_O_FLAG_NONE=""
29428            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29429            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29430            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29431            CXX_O_FLAG_NONE=""
29432            ;;
29433        esac
29434
29435    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29436    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29437    esac
29438    ;;
29439  CL )
29440    C_O_FLAG_HIGHEST="-O2"
29441    C_O_FLAG_HI="-O1"
29442    C_O_FLAG_NORM="-O1"
29443    C_O_FLAG_NONE="-Od"
29444    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29445    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29446    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29447    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29448    ;;
29449esac
29450
29451if test -z "$C_O_FLAG_HIGHEST"; then
29452   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29453fi
29454
29455if test -z "$CXX_O_FLAG_HIGHEST"; then
29456   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29457fi
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29473   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29474$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29475fi
29476
29477if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29478   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29479$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29480fi
29481
29482if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29483   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29484$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29485fi
29486
29487
29488# Check whether --with-extra-cflags was given.
29489if test "${with_extra_cflags+set}" = set; then :
29490  withval=$with_extra_cflags;
29491fi
29492
29493
29494
29495# Check whether --with-extra-cxxflags was given.
29496if test "${with_extra_cxxflags+set}" = set; then :
29497  withval=$with_extra_cxxflags;
29498fi
29499
29500
29501
29502# Check whether --with-extra-ldflags was given.
29503if test "${with_extra_ldflags+set}" = set; then :
29504  withval=$with_extra_ldflags;
29505fi
29506
29507
29508CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29509CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29510LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29511
29512# Hotspot needs these set in their legacy form
29513LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29514LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29515LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29516
29517
29518
29519
29520
29521###############################################################################
29522#
29523# Now setup the CFLAGS and LDFLAGS for the JDK build.
29524# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29525#
29526case $COMPILER_NAME in
29527      gcc )
29528      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29529                          -pipe \
29530                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29531	  case $OPENJDK_TARGET_CPU_ARCH in
29532	  arm )
29533            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29534	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29535	  ;;
29536	  ppc )
29537            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29538	  ;;
29539	  * )
29540	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29541	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29542          ;;
29543	  esac
29544          ;;
29545      ossc )
29546          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29547          case $OPENJDK_TARGET_CPU_ARCH in
29548          x86 )
29549            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29550       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29551          ;;
29552          esac
29553
29554      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29555      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29556
29557          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29558          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29559          ;;
29560      cl )
29561          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29562               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29563	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29564	       -DWIN32 -DIAL"
29565          case $OPENJDK_TARGET_CPU in
29566              x86 )
29567                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29568                  ;;
29569              x86_64 )
29570                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29571                  ;;
29572          esac
29573          ;;
29574esac
29575
29576###############################################################################
29577
29578# Adjust flags according to debug level.
29579case $DEBUG_LEVEL in
29580      fastdebug )
29581              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29582              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29583	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29584	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29585	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29586	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29587              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29588              ;;
29589      slowdebug )
29590              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29591              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29592	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29593	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29594	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29595	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29596              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29597              ;;
29598esac
29599
29600CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29601
29602# The package path is used only on macosx?
29603PACKAGE_PATH=/opt/local
29604
29605
29606if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29607    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29608    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29609    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29610    #   Note: -Dmacro         is the same as    #define macro 1
29611    #         -Dmacro=	    is the same as    #define macro
29612    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29613        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29614    else
29615        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29616    fi
29617else
29618    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29619fi
29620if test "x$OPENJDK_TARGET_OS" = xlinux; then
29621    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29622fi
29623if test "x$OPENJDK_TARGET_OS" = xwindows; then
29624    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29625fi
29626if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29627    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29628fi
29629if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29630    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29631    # Setting these parameters makes it an error to link to macosx APIs that are
29632    # newer than the given OS version and makes the linked binaries compatible even
29633    # if built on a newer version of the OS.
29634    # The expected format is X.Y.Z
29635    MACOSX_VERSION_MIN=10.7.0
29636
29637    # The macro takes the version with no dots, ex: 1070
29638    # Let the flags variables get resolved in make for easier override on make
29639    # command line.
29640    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29641    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29642fi
29643if test "x$OPENJDK_TARGET_OS" = xbsd; then
29644    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29645fi
29646if test "x$DEBUG_LEVEL" = xrelease; then
29647    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29648    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29649        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29650    fi
29651else
29652    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29653fi
29654
29655CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29656CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29657
29658CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29659        -I${JDK_OUTPUTDIR}/include \
29660        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29661        -I${JDK_TOPDIR}/src/share/javavm/export \
29662        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29663        -I${JDK_TOPDIR}/src/share/native/common \
29664        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29665
29666# The shared libraries are compiled using the picflag.
29667CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29668CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29669
29670# Executable flags
29671CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29672CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29673
29674# Now this is odd. The JDK native libraries have to link against libjvm.so
29675# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29676# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29677# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29678# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29679# libraries will link to whatever is in memory. Yuck.
29680#
29681# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29682if test "x$COMPILER_NAME" = xcl; then
29683    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29684    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29685        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29686    fi
29687    # TODO: make -debug optional "--disable-full-debug-symbols"
29688    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29689    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29690    LDFLAGS_JDKLIB_SUFFIX=""
29691    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29692        LDFLAGS_STACK_SIZE=1048576
29693    else
29694        LDFLAGS_STACK_SIZE=327680
29695    fi
29696    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29697else
29698    if test "x$COMPILER_NAME" = xgcc; then
29699        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29700        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29701        if test -n "$HAS_GNU_HASH"; then
29702            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29703        fi
29704        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29705          # And since we now know that the linker is gnu, then add -z defs, to forbid
29706          # undefined symbols in object files.
29707          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29708          if test "x$DEBUG_LEVEL" = "xrelease"; then
29709              # When building release libraries, tell the linker optimize them.
29710              # Should this be supplied to the OSS linker as well?
29711              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29712          fi
29713        fi
29714    fi
29715    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29716                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29717
29718    # On some platforms (mac) the linker warns about non existing -L dirs.
29719    # Add server first if available. Linking aginst client does not always produce the same results.
29720    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29721    # Default to server for other variants.
29722    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29723        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29724    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29725        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29726    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29727        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29728    else
29729        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29730    fi
29731
29732    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29733    if test "x$COMPILER_NAME" = xossc; then
29734        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29735    fi
29736
29737    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29738    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29739        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29740    fi
29741fi
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757  # Some Zero and Shark settings.
29758  # ZERO_ARCHFLAG tells the compiler which mode to build for
29759  case "${OPENJDK_TARGET_CPU}" in
29760    s390)
29761      ZERO_ARCHFLAG="-m31"
29762      ;;
29763    *)
29764      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29765  esac
29766
29767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29768$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29769  supports=yes
29770
29771  saved_cflags="$CFLAGS"
29772  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29773  ac_ext=c
29774ac_cpp='$CPP $CPPFLAGS'
29775ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29776ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29777ac_compiler_gnu=$ac_cv_c_compiler_gnu
29778
29779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29780/* end confdefs.h.  */
29781
29782    int i;
29783
29784_ACEOF
29785if ac_fn_c_try_compile "$LINENO"; then :
29786
29787else
29788  supports=no
29789fi
29790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29791  ac_ext=cpp
29792ac_cpp='$CXXCPP $CPPFLAGS'
29793ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29794ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29795ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29796
29797  CFLAGS="$saved_cflags"
29798
29799  saved_cxxflags="$CXXFLAGS"
29800  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29801  ac_ext=cpp
29802ac_cpp='$CXXCPP $CPPFLAGS'
29803ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29804ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29805ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29806
29807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29808/* end confdefs.h.  */
29809
29810    int i;
29811
29812_ACEOF
29813if ac_fn_cxx_try_compile "$LINENO"; then :
29814
29815else
29816  supports=no
29817fi
29818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29819  ac_ext=cpp
29820ac_cpp='$CXXCPP $CPPFLAGS'
29821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29824
29825  CXXFLAGS="$saved_cxxflags"
29826
29827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29828$as_echo "$supports" >&6; }
29829  if test "x$supports" = "xyes" ; then
29830    :
29831  else
29832    ZERO_ARCHFLAG=""
29833  fi
29834
29835
29836
29837  # Check that the compiler supports -mX flags
29838  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29839
29840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29841$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29842  supports=yes
29843
29844  saved_cflags="$CFLAGS"
29845  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29846  ac_ext=c
29847ac_cpp='$CPP $CPPFLAGS'
29848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29850ac_compiler_gnu=$ac_cv_c_compiler_gnu
29851
29852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29853/* end confdefs.h.  */
29854
29855    int i;
29856
29857_ACEOF
29858if ac_fn_c_try_compile "$LINENO"; then :
29859
29860else
29861  supports=no
29862fi
29863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29864  ac_ext=cpp
29865ac_cpp='$CXXCPP $CPPFLAGS'
29866ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29867ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29868ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29869
29870  CFLAGS="$saved_cflags"
29871
29872  saved_cxxflags="$CXXFLAGS"
29873  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29874  ac_ext=cpp
29875ac_cpp='$CXXCPP $CPPFLAGS'
29876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29879
29880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29881/* end confdefs.h.  */
29882
29883    int i;
29884
29885_ACEOF
29886if ac_fn_cxx_try_compile "$LINENO"; then :
29887
29888else
29889  supports=no
29890fi
29891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29892  ac_ext=cpp
29893ac_cpp='$CXXCPP $CPPFLAGS'
29894ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29895ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29896ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29897
29898  CXXFLAGS="$saved_cxxflags"
29899
29900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29901$as_echo "$supports" >&6; }
29902  if test "x$supports" = "xyes" ; then
29903    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29904  else
29905    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29906  fi
29907
29908
29909
29910
29911# Setup debug symbols (need objcopy from the toolchain for that)
29912
29913#
29914# ENABLE_DEBUG_SYMBOLS
29915# This must be done after the toolchain is setup, since we're looking at objcopy.
29916#
29917# Check whether --enable-debug-symbols was given.
29918if test "${enable_debug_symbols+set}" = set; then :
29919  enableval=$enable_debug_symbols;
29920fi
29921
29922
29923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29924$as_echo_n "checking if we should generate debug symbols... " >&6; }
29925
29926if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29927   # explicit enabling of enable-debug-symbols and can't find objcopy
29928   #   this is an error
29929   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29930fi
29931
29932if test "x$enable_debug_symbols" = "xyes"; then
29933  ENABLE_DEBUG_SYMBOLS=true
29934elif test "x$enable_debug_symbols" = "xno"; then
29935  ENABLE_DEBUG_SYMBOLS=false
29936else
29937  # default on macosx is false
29938  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29939    ENABLE_DEBUG_SYMBOLS=false
29940  # Default is on if objcopy is found, otherwise off
29941  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29942    ENABLE_DEBUG_SYMBOLS=true
29943  else
29944    ENABLE_DEBUG_SYMBOLS=false
29945  fi
29946fi
29947
29948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29949$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29950
29951#
29952# ZIP_DEBUGINFO_FILES
29953#
29954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29955$as_echo_n "checking if we should zip debug-info files... " >&6; }
29956# Check whether --enable-zip-debug-info was given.
29957if test "${enable_zip_debug_info+set}" = set; then :
29958  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29959else
29960  enable_zip_debug_info="yes"
29961fi
29962
29963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29964$as_echo "${enable_zip_debug_info}" >&6; }
29965
29966if test "x${enable_zip_debug_info}" = "xno"; then
29967   ZIP_DEBUGINFO_FILES=false
29968else
29969   ZIP_DEBUGINFO_FILES=true
29970fi
29971
29972
29973
29974
29975
29976
29977
29978###############################################################################
29979#
29980# Check dependencies for external and internal libraries.
29981#
29982###############################################################################
29983
29984
29985
29986###############################################################################
29987#
29988# OS specific settings that we never will need to probe.
29989#
29990if test "x$OPENJDK_TARGET_OS" = xlinux; then
29991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29992$as_echo_n "checking what is not needed on Linux?... " >&6; }
29993    PULSE_NOT_NEEDED=yes
29994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29995$as_echo "pulse" >&6; }
29996fi
29997
29998if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30000$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30001    ALSA_NOT_NEEDED=yes
30002    PULSE_NOT_NEEDED=yes
30003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30004$as_echo "alsa pulse" >&6; }
30005fi
30006
30007if test "x$OPENJDK_TARGET_OS" = xwindows; then
30008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30009$as_echo_n "checking what is not needed on Windows?... " >&6; }
30010    CUPS_NOT_NEEDED=yes
30011    ALSA_NOT_NEEDED=yes
30012    PULSE_NOT_NEEDED=yes
30013    X11_NOT_NEEDED=yes
30014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30015$as_echo "alsa cups pulse x11" >&6; }
30016fi
30017
30018if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30020$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30021    ALSA_NOT_NEEDED=yes
30022    PULSE_NOT_NEEDED=yes
30023    X11_NOT_NEEDED=yes
30024    FREETYPE2_NOT_NEEDED=yes
30025    # If the java runtime framework is disabled, then we need X11.
30026    # This will be adjusted below.
30027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30028$as_echo "alsa pulse x11" >&6; }
30029fi
30030
30031if test "x$OPENJDK_TARGET_OS" = xbsd; then
30032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30033$as_echo_n "checking what is not needed on bsd?... " >&6; }
30034    ALSA_NOT_NEEDED=yes
30035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30036$as_echo "alsa" >&6; }
30037fi
30038
30039if test "x$OPENJDK" = "xfalse"; then
30040    FREETYPE2_NOT_NEEDED=yes
30041fi
30042
30043if test "x$SUPPORT_HEADFUL" = xno; then
30044    X11_NOT_NEEDED=yes
30045fi
30046
30047###############################################################################
30048#
30049# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30050# that uses this API.
30051#
30052# Check whether --enable-macosx-runtime-support was given.
30053if test "${enable_macosx_runtime_support+set}" = set; then :
30054  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30055else
30056  MACOSX_RUNTIME_SUPPORT="no"
30057fi
30058
30059
30060USE_MACOSX_RUNTIME_SUPPORT=no
30061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30062$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30063if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30064    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30065        MACOSX_RUNTIME_SUPPORT=yes
30066        USE_MACOSX_RUNTIME_SUPPORT=yes
30067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30068$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30069    else
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30071$as_echo "yes, but explicitly disabled." >&6; }
30072    fi
30073else
30074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30075$as_echo "no" >&6; }
30076fi
30077
30078if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30080$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30081    X11_NOT_NEEDED=
30082    FREETYPE2_NOT_NEEDED=
30083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30084$as_echo "alsa pulse" >&6; }
30085fi
30086
30087
30088
30089###############################################################################
30090#
30091# Check for X Windows
30092#
30093
30094# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30095# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30096# --x-libraries for the sysroot, if that seems to be correct.
30097if test "x$SYS_ROOT" != "x/"; then
30098  if test "x$x_includes" = xNONE; then
30099    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30100      x_includes="$SYS_ROOT/usr/X11R6/include"
30101    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30102      x_includes="$SYS_ROOT/usr/include"
30103    fi
30104  fi
30105  if test "x$x_libraries" = xNONE; then
30106    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30107      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30108    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30109      x_libraries="$SYS_ROOT/usr/lib64"
30110    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30111      x_libraries="$SYS_ROOT/usr/lib"
30112    fi
30113  fi
30114fi
30115
30116# Now let autoconf do it's magic
30117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30118$as_echo_n "checking for X... " >&6; }
30119
30120
30121# Check whether --with-x was given.
30122if test "${with_x+set}" = set; then :
30123  withval=$with_x;
30124fi
30125
30126# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30127if test "x$with_x" = xno; then
30128  # The user explicitly disabled X.
30129  have_x=disabled
30130else
30131  case $x_includes,$x_libraries in #(
30132    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30133    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30134  $as_echo_n "(cached) " >&6
30135else
30136  # One or both of the vars are not set, and there is no cached value.
30137ac_x_includes=no ac_x_libraries=no
30138rm -f -r conftest.dir
30139if mkdir conftest.dir; then
30140  cd conftest.dir
30141  cat >Imakefile <<'_ACEOF'
30142incroot:
30143	@echo incroot='${INCROOT}'
30144usrlibdir:
30145	@echo usrlibdir='${USRLIBDIR}'
30146libdir:
30147	@echo libdir='${LIBDIR}'
30148_ACEOF
30149  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30150    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30151    for ac_var in incroot usrlibdir libdir; do
30152      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30153    done
30154    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30155    for ac_extension in a so sl dylib la dll; do
30156      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30157	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30158	ac_im_usrlibdir=$ac_im_libdir; break
30159      fi
30160    done
30161    # Screen out bogus values from the imake configuration.  They are
30162    # bogus both because they are the default anyway, and because
30163    # using them would break gcc on systems where it needs fixed includes.
30164    case $ac_im_incroot in
30165	/usr/include) ac_x_includes= ;;
30166	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30167    esac
30168    case $ac_im_usrlibdir in
30169	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30170	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30171    esac
30172  fi
30173  cd ..
30174  rm -f -r conftest.dir
30175fi
30176
30177# Standard set of common directories for X headers.
30178# Check X11 before X11Rn because it is often a symlink to the current release.
30179ac_x_header_dirs='
30180/usr/X11/include
30181/usr/X11R7/include
30182/usr/X11R6/include
30183/usr/X11R5/include
30184/usr/X11R4/include
30185
30186/usr/include/X11
30187/usr/include/X11R7
30188/usr/include/X11R6
30189/usr/include/X11R5
30190/usr/include/X11R4
30191
30192/usr/local/X11/include
30193/usr/local/X11R7/include
30194/usr/local/X11R6/include
30195/usr/local/X11R5/include
30196/usr/local/X11R4/include
30197
30198/usr/local/include/X11
30199/usr/local/include/X11R7
30200/usr/local/include/X11R6
30201/usr/local/include/X11R5
30202/usr/local/include/X11R4
30203
30204/usr/X386/include
30205/usr/x386/include
30206/usr/XFree86/include/X11
30207
30208/usr/include
30209/usr/local/include
30210/usr/unsupported/include
30211/usr/athena/include
30212/usr/local/x11r5/include
30213/usr/lpp/Xamples/include
30214
30215/usr/openwin/include
30216/usr/openwin/share/include'
30217
30218if test "$ac_x_includes" = no; then
30219  # Guess where to find include files, by looking for Xlib.h.
30220  # First, try using that file with no special directory specified.
30221  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30222/* end confdefs.h.  */
30223#include <X11/Xlib.h>
30224_ACEOF
30225if ac_fn_cxx_try_cpp "$LINENO"; then :
30226  # We can compile using X headers with no special include directory.
30227ac_x_includes=
30228else
30229  for ac_dir in $ac_x_header_dirs; do
30230  if test -r "$ac_dir/X11/Xlib.h"; then
30231    ac_x_includes=$ac_dir
30232    break
30233  fi
30234done
30235fi
30236rm -f conftest.err conftest.i conftest.$ac_ext
30237fi # $ac_x_includes = no
30238
30239if test "$ac_x_libraries" = no; then
30240  # Check for the libraries.
30241  # See if we find them without any special options.
30242  # Don't add to $LIBS permanently.
30243  ac_save_LIBS=$LIBS
30244  LIBS="-lX11 $LIBS"
30245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30246/* end confdefs.h.  */
30247#include <X11/Xlib.h>
30248int
30249main ()
30250{
30251XrmInitialize ()
30252  ;
30253  return 0;
30254}
30255_ACEOF
30256if ac_fn_cxx_try_link "$LINENO"; then :
30257  LIBS=$ac_save_LIBS
30258# We can link X programs with no special library path.
30259ac_x_libraries=
30260else
30261  LIBS=$ac_save_LIBS
30262for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30263do
30264  # Don't even attempt the hair of trying to link an X program!
30265  for ac_extension in a so sl dylib la dll; do
30266    if test -r "$ac_dir/libX11.$ac_extension"; then
30267      ac_x_libraries=$ac_dir
30268      break 2
30269    fi
30270  done
30271done
30272fi
30273rm -f core conftest.err conftest.$ac_objext \
30274    conftest$ac_exeext conftest.$ac_ext
30275fi # $ac_x_libraries = no
30276
30277case $ac_x_includes,$ac_x_libraries in #(
30278  no,* | *,no | *\'*)
30279    # Didn't find X, or a directory has "'" in its name.
30280    ac_cv_have_x="have_x=no";; #(
30281  *)
30282    # Record where we found X for the cache.
30283    ac_cv_have_x="have_x=yes\
30284	ac_x_includes='$ac_x_includes'\
30285	ac_x_libraries='$ac_x_libraries'"
30286esac
30287fi
30288;; #(
30289    *) have_x=yes;;
30290  esac
30291  eval "$ac_cv_have_x"
30292fi # $with_x != no
30293
30294if test "$have_x" != yes; then
30295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30296$as_echo "$have_x" >&6; }
30297  no_x=yes
30298else
30299  # If each of the values was on the command line, it overrides each guess.
30300  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30301  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30302  # Update the cache value to reflect the command line values.
30303  ac_cv_have_x="have_x=yes\
30304	ac_x_includes='$x_includes'\
30305	ac_x_libraries='$x_libraries'"
30306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30307$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30308fi
30309
30310if test "$no_x" = yes; then
30311  # Not all programs may use this symbol, but it does not hurt to define it.
30312
30313$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30314
30315  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30316else
30317  if test -n "$x_includes"; then
30318    X_CFLAGS="$X_CFLAGS -I$x_includes"
30319  fi
30320
30321  # It would also be nice to do this for all -L options, not just this one.
30322  if test -n "$x_libraries"; then
30323    X_LIBS="$X_LIBS -L$x_libraries"
30324    # For Solaris; some versions of Sun CC require a space after -R and
30325    # others require no space.  Words are not sufficient . . . .
30326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30327$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30328    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30329    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30330    ac_cxx_werror_flag=yes
30331    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30332/* end confdefs.h.  */
30333
30334int
30335main ()
30336{
30337
30338  ;
30339  return 0;
30340}
30341_ACEOF
30342if ac_fn_cxx_try_link "$LINENO"; then :
30343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30344$as_echo "no" >&6; }
30345       X_LIBS="$X_LIBS -R$x_libraries"
30346else
30347  LIBS="$ac_xsave_LIBS -R $x_libraries"
30348       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30349/* end confdefs.h.  */
30350
30351int
30352main ()
30353{
30354
30355  ;
30356  return 0;
30357}
30358_ACEOF
30359if ac_fn_cxx_try_link "$LINENO"; then :
30360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30361$as_echo "yes" >&6; }
30362	  X_LIBS="$X_LIBS -R $x_libraries"
30363else
30364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30365$as_echo "neither works" >&6; }
30366fi
30367rm -f core conftest.err conftest.$ac_objext \
30368    conftest$ac_exeext conftest.$ac_ext
30369fi
30370rm -f core conftest.err conftest.$ac_objext \
30371    conftest$ac_exeext conftest.$ac_ext
30372    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30373    LIBS=$ac_xsave_LIBS
30374  fi
30375
30376  # Check for system-dependent libraries X programs must link with.
30377  # Do this before checking for the system-independent R6 libraries
30378  # (-lICE), since we may need -lsocket or whatever for X linking.
30379
30380  if test "$ISC" = yes; then
30381    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30382  else
30383    # Martyn Johnson says this is needed for Ultrix, if the X
30384    # libraries were built with DECnet support.  And Karl Berry says
30385    # the Alpha needs dnet_stub (dnet does not exist).
30386    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30387    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30388/* end confdefs.h.  */
30389
30390/* Override any GCC internal prototype to avoid an error.
30391   Use char because int might match the return type of a GCC
30392   builtin and then its argument prototype would still apply.  */
30393#ifdef __cplusplus
30394extern "C"
30395#endif
30396char XOpenDisplay ();
30397int
30398main ()
30399{
30400return XOpenDisplay ();
30401  ;
30402  return 0;
30403}
30404_ACEOF
30405if ac_fn_cxx_try_link "$LINENO"; then :
30406
30407else
30408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30409$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30410if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30411  $as_echo_n "(cached) " >&6
30412else
30413  ac_check_lib_save_LIBS=$LIBS
30414LIBS="-ldnet  $LIBS"
30415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30416/* end confdefs.h.  */
30417
30418/* Override any GCC internal prototype to avoid an error.
30419   Use char because int might match the return type of a GCC
30420   builtin and then its argument prototype would still apply.  */
30421#ifdef __cplusplus
30422extern "C"
30423#endif
30424char dnet_ntoa ();
30425int
30426main ()
30427{
30428return dnet_ntoa ();
30429  ;
30430  return 0;
30431}
30432_ACEOF
30433if ac_fn_cxx_try_link "$LINENO"; then :
30434  ac_cv_lib_dnet_dnet_ntoa=yes
30435else
30436  ac_cv_lib_dnet_dnet_ntoa=no
30437fi
30438rm -f core conftest.err conftest.$ac_objext \
30439    conftest$ac_exeext conftest.$ac_ext
30440LIBS=$ac_check_lib_save_LIBS
30441fi
30442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30443$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30444if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30445  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30446fi
30447
30448    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30450$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30451if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30452  $as_echo_n "(cached) " >&6
30453else
30454  ac_check_lib_save_LIBS=$LIBS
30455LIBS="-ldnet_stub  $LIBS"
30456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30457/* end confdefs.h.  */
30458
30459/* Override any GCC internal prototype to avoid an error.
30460   Use char because int might match the return type of a GCC
30461   builtin and then its argument prototype would still apply.  */
30462#ifdef __cplusplus
30463extern "C"
30464#endif
30465char dnet_ntoa ();
30466int
30467main ()
30468{
30469return dnet_ntoa ();
30470  ;
30471  return 0;
30472}
30473_ACEOF
30474if ac_fn_cxx_try_link "$LINENO"; then :
30475  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30476else
30477  ac_cv_lib_dnet_stub_dnet_ntoa=no
30478fi
30479rm -f core conftest.err conftest.$ac_objext \
30480    conftest$ac_exeext conftest.$ac_ext
30481LIBS=$ac_check_lib_save_LIBS
30482fi
30483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30484$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30485if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30486  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30487fi
30488
30489    fi
30490fi
30491rm -f core conftest.err conftest.$ac_objext \
30492    conftest$ac_exeext conftest.$ac_ext
30493    LIBS="$ac_xsave_LIBS"
30494
30495    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30496    # to get the SysV transport functions.
30497    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30498    # needs -lnsl.
30499    # The nsl library prevents programs from opening the X display
30500    # on Irix 5.2, according to T.E. Dickey.
30501    # The functions gethostbyname, getservbyname, and inet_addr are
30502    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30503    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30504if test "x$ac_cv_func_gethostbyname" = xyes; then :
30505
30506fi
30507
30508    if test $ac_cv_func_gethostbyname = no; then
30509      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30510$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30511if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30512  $as_echo_n "(cached) " >&6
30513else
30514  ac_check_lib_save_LIBS=$LIBS
30515LIBS="-lnsl  $LIBS"
30516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30517/* end confdefs.h.  */
30518
30519/* Override any GCC internal prototype to avoid an error.
30520   Use char because int might match the return type of a GCC
30521   builtin and then its argument prototype would still apply.  */
30522#ifdef __cplusplus
30523extern "C"
30524#endif
30525char gethostbyname ();
30526int
30527main ()
30528{
30529return gethostbyname ();
30530  ;
30531  return 0;
30532}
30533_ACEOF
30534if ac_fn_cxx_try_link "$LINENO"; then :
30535  ac_cv_lib_nsl_gethostbyname=yes
30536else
30537  ac_cv_lib_nsl_gethostbyname=no
30538fi
30539rm -f core conftest.err conftest.$ac_objext \
30540    conftest$ac_exeext conftest.$ac_ext
30541LIBS=$ac_check_lib_save_LIBS
30542fi
30543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30544$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30545if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30546  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30547fi
30548
30549      if test $ac_cv_lib_nsl_gethostbyname = no; then
30550	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30551$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30552if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30553  $as_echo_n "(cached) " >&6
30554else
30555  ac_check_lib_save_LIBS=$LIBS
30556LIBS="-lbsd  $LIBS"
30557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30558/* end confdefs.h.  */
30559
30560/* Override any GCC internal prototype to avoid an error.
30561   Use char because int might match the return type of a GCC
30562   builtin and then its argument prototype would still apply.  */
30563#ifdef __cplusplus
30564extern "C"
30565#endif
30566char gethostbyname ();
30567int
30568main ()
30569{
30570return gethostbyname ();
30571  ;
30572  return 0;
30573}
30574_ACEOF
30575if ac_fn_cxx_try_link "$LINENO"; then :
30576  ac_cv_lib_bsd_gethostbyname=yes
30577else
30578  ac_cv_lib_bsd_gethostbyname=no
30579fi
30580rm -f core conftest.err conftest.$ac_objext \
30581    conftest$ac_exeext conftest.$ac_ext
30582LIBS=$ac_check_lib_save_LIBS
30583fi
30584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30585$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30586if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30587  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30588fi
30589
30590      fi
30591    fi
30592
30593    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30594    # socket/setsockopt and other routines are undefined under SCO ODT
30595    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30596    # on later versions), says Simon Leinen: it contains gethostby*
30597    # variants that don't use the name server (or something).  -lsocket
30598    # must be given before -lnsl if both are needed.  We assume that
30599    # if connect needs -lnsl, so does gethostbyname.
30600    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30601if test "x$ac_cv_func_connect" = xyes; then :
30602
30603fi
30604
30605    if test $ac_cv_func_connect = no; then
30606      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30607$as_echo_n "checking for connect in -lsocket... " >&6; }
30608if ${ac_cv_lib_socket_connect+:} false; then :
30609  $as_echo_n "(cached) " >&6
30610else
30611  ac_check_lib_save_LIBS=$LIBS
30612LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30614/* end confdefs.h.  */
30615
30616/* Override any GCC internal prototype to avoid an error.
30617   Use char because int might match the return type of a GCC
30618   builtin and then its argument prototype would still apply.  */
30619#ifdef __cplusplus
30620extern "C"
30621#endif
30622char connect ();
30623int
30624main ()
30625{
30626return connect ();
30627  ;
30628  return 0;
30629}
30630_ACEOF
30631if ac_fn_cxx_try_link "$LINENO"; then :
30632  ac_cv_lib_socket_connect=yes
30633else
30634  ac_cv_lib_socket_connect=no
30635fi
30636rm -f core conftest.err conftest.$ac_objext \
30637    conftest$ac_exeext conftest.$ac_ext
30638LIBS=$ac_check_lib_save_LIBS
30639fi
30640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30641$as_echo "$ac_cv_lib_socket_connect" >&6; }
30642if test "x$ac_cv_lib_socket_connect" = xyes; then :
30643  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30644fi
30645
30646    fi
30647
30648    # Guillermo Gomez says -lposix is necessary on A/UX.
30649    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30650if test "x$ac_cv_func_remove" = xyes; then :
30651
30652fi
30653
30654    if test $ac_cv_func_remove = no; then
30655      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30656$as_echo_n "checking for remove in -lposix... " >&6; }
30657if ${ac_cv_lib_posix_remove+:} false; then :
30658  $as_echo_n "(cached) " >&6
30659else
30660  ac_check_lib_save_LIBS=$LIBS
30661LIBS="-lposix  $LIBS"
30662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30663/* end confdefs.h.  */
30664
30665/* Override any GCC internal prototype to avoid an error.
30666   Use char because int might match the return type of a GCC
30667   builtin and then its argument prototype would still apply.  */
30668#ifdef __cplusplus
30669extern "C"
30670#endif
30671char remove ();
30672int
30673main ()
30674{
30675return remove ();
30676  ;
30677  return 0;
30678}
30679_ACEOF
30680if ac_fn_cxx_try_link "$LINENO"; then :
30681  ac_cv_lib_posix_remove=yes
30682else
30683  ac_cv_lib_posix_remove=no
30684fi
30685rm -f core conftest.err conftest.$ac_objext \
30686    conftest$ac_exeext conftest.$ac_ext
30687LIBS=$ac_check_lib_save_LIBS
30688fi
30689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30690$as_echo "$ac_cv_lib_posix_remove" >&6; }
30691if test "x$ac_cv_lib_posix_remove" = xyes; then :
30692  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30693fi
30694
30695    fi
30696
30697    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30698    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30699if test "x$ac_cv_func_shmat" = xyes; then :
30700
30701fi
30702
30703    if test $ac_cv_func_shmat = no; then
30704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30705$as_echo_n "checking for shmat in -lipc... " >&6; }
30706if ${ac_cv_lib_ipc_shmat+:} false; then :
30707  $as_echo_n "(cached) " >&6
30708else
30709  ac_check_lib_save_LIBS=$LIBS
30710LIBS="-lipc  $LIBS"
30711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30712/* end confdefs.h.  */
30713
30714/* Override any GCC internal prototype to avoid an error.
30715   Use char because int might match the return type of a GCC
30716   builtin and then its argument prototype would still apply.  */
30717#ifdef __cplusplus
30718extern "C"
30719#endif
30720char shmat ();
30721int
30722main ()
30723{
30724return shmat ();
30725  ;
30726  return 0;
30727}
30728_ACEOF
30729if ac_fn_cxx_try_link "$LINENO"; then :
30730  ac_cv_lib_ipc_shmat=yes
30731else
30732  ac_cv_lib_ipc_shmat=no
30733fi
30734rm -f core conftest.err conftest.$ac_objext \
30735    conftest$ac_exeext conftest.$ac_ext
30736LIBS=$ac_check_lib_save_LIBS
30737fi
30738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30739$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30740if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30741  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30742fi
30743
30744    fi
30745  fi
30746
30747  # Check for libraries that X11R6 Xt/Xaw programs need.
30748  ac_save_LDFLAGS=$LDFLAGS
30749  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30750  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30751  # check for ICE first), but we must link in the order -lSM -lICE or
30752  # we get undefined symbols.  So assume we have SM if we have ICE.
30753  # These have to be linked with before -lX11, unlike the other
30754  # libraries we check for below, so use a different variable.
30755  # John Interrante, Karl Berry
30756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30757$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30758if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30759  $as_echo_n "(cached) " >&6
30760else
30761  ac_check_lib_save_LIBS=$LIBS
30762LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30764/* end confdefs.h.  */
30765
30766/* Override any GCC internal prototype to avoid an error.
30767   Use char because int might match the return type of a GCC
30768   builtin and then its argument prototype would still apply.  */
30769#ifdef __cplusplus
30770extern "C"
30771#endif
30772char IceConnectionNumber ();
30773int
30774main ()
30775{
30776return IceConnectionNumber ();
30777  ;
30778  return 0;
30779}
30780_ACEOF
30781if ac_fn_cxx_try_link "$LINENO"; then :
30782  ac_cv_lib_ICE_IceConnectionNumber=yes
30783else
30784  ac_cv_lib_ICE_IceConnectionNumber=no
30785fi
30786rm -f core conftest.err conftest.$ac_objext \
30787    conftest$ac_exeext conftest.$ac_ext
30788LIBS=$ac_check_lib_save_LIBS
30789fi
30790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30791$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30792if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30793  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30794fi
30795
30796  LDFLAGS=$ac_save_LDFLAGS
30797
30798fi
30799
30800
30801# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30802# this doesn't make sense so we remove it.
30803if test "x$COMPILE_TYPE" = xcross; then
30804  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30805fi
30806
30807if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30808
30809    # Print a helpful message on how to acquire the necessary build dependency.
30810    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30811    MISSING_DEPENDENCY=x11
30812    PKGHANDLER_COMMAND=
30813
30814    case $PKGHANDLER in
30815	apt-get)
30816                apt_help     $MISSING_DEPENDENCY ;;
30817    yum)
30818                yum_help     $MISSING_DEPENDENCY ;;
30819	port)
30820                port_help    $MISSING_DEPENDENCY ;;
30821	pkgutil)
30822                pkgutil_help $MISSING_DEPENDENCY ;;
30823	pkgadd)
30824                pkgadd_help  $MISSING_DEPENDENCY ;;
30825    * )
30826      break ;;
30827    esac
30828
30829    if test "x$PKGHANDLER_COMMAND" != x; then
30830        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30831    fi
30832
30833    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30834fi
30835
30836# Some of the old makefiles require a setting of OPENWIN_HOME
30837# Since the X11R6 directory has disappeared on later Linuxes,
30838# we need to probe for it.
30839if test "x$OPENJDK_TARGET_OS" = xlinux; then
30840    if test -d "$SYS_ROOT/usr/X11R6"; then
30841        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30842    elif test -d "$SYS_ROOT/usr/include/X11"; then
30843        OPENWIN_HOME="$SYS_ROOT/usr"
30844    fi
30845fi
30846if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30847    OPENWIN_HOME="/usr/openwin"
30848fi
30849
30850
30851
30852#
30853# Weird Sol10 something check...TODO change to try compile
30854#
30855if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30856  if test "`uname -r`" = "5.10"; then
30857     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30858     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30859     fi
30860  fi
30861fi
30862
30863ac_ext=c
30864ac_cpp='$CPP $CPPFLAGS'
30865ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30866ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30867ac_compiler_gnu=$ac_cv_c_compiler_gnu
30868
30869OLD_CFLAGS="$CFLAGS"
30870CFLAGS="$CFLAGS $X_CFLAGS"
30871
30872# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30873for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30874do :
30875  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30876ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30877                   # include <X11/Xutil.h>
30878
30879"
30880if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30881  cat >>confdefs.h <<_ACEOF
30882#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30883_ACEOF
30884 X11_A_OK=yes
30885else
30886  X11_A_OK=no; break
30887fi
30888
30889done
30890
30891
30892CFLAGS="$OLD_CFLAGS"
30893ac_ext=cpp
30894ac_cpp='$CXXCPP $CPPFLAGS'
30895ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30896ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30897ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30898
30899
30900if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30901
30902    # Print a helpful message on how to acquire the necessary build dependency.
30903    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30904    MISSING_DEPENDENCY=x11
30905    PKGHANDLER_COMMAND=
30906
30907    case $PKGHANDLER in
30908	apt-get)
30909                apt_help     $MISSING_DEPENDENCY ;;
30910    yum)
30911                yum_help     $MISSING_DEPENDENCY ;;
30912	port)
30913                port_help    $MISSING_DEPENDENCY ;;
30914	pkgutil)
30915                pkgutil_help $MISSING_DEPENDENCY ;;
30916	pkgadd)
30917                pkgadd_help  $MISSING_DEPENDENCY ;;
30918    * )
30919      break ;;
30920    esac
30921
30922    if test "x$PKGHANDLER_COMMAND" != x; then
30923        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30924    fi
30925
30926    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30927fi
30928
30929
30930
30931
30932
30933
30934###############################################################################
30935#
30936# The common unix printing system cups is used to print from java.
30937#
30938
30939# Check whether --with-cups was given.
30940if test "${with_cups+set}" = set; then :
30941  withval=$with_cups;
30942fi
30943
30944
30945# Check whether --with-cups-include was given.
30946if test "${with_cups_include+set}" = set; then :
30947  withval=$with_cups_include;
30948fi
30949
30950
30951if test "x$CUPS_NOT_NEEDED" = xyes; then
30952	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30953		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30954$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30955	fi
30956	CUPS_CFLAGS=
30957else
30958	CUPS_FOUND=no
30959
30960	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30961	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30962	fi
30963
30964	if test "x${with_cups}" != x; then
30965	    CUPS_CFLAGS="-I${with_cups}/include"
30966	    CUPS_FOUND=yes
30967	fi
30968	if test "x${with_cups_include}" != x; then
30969	    CUPS_CFLAGS="-I${with_cups_include}"
30970	    CUPS_FOUND=yes
30971	fi
30972	if test "x$CUPS_FOUND" = xno; then
30973
30974
30975    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30976        # Source the builddeps file again, to make sure it uses the latest variables!
30977        . $builddepsfile
30978        # Look for a target and build machine specific resource!
30979        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30980        if test "x$resource" = x; then
30981            # Ok, lets instead look for a target specific resource
30982            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30983        fi
30984        if test "x$resource" = x; then
30985            # Ok, lets instead look for a build specific resource
30986            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30987        fi
30988        if test "x$resource" = x; then
30989            # Ok, lets instead look for a generic resource
30990            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30991            resource=${builddep_cups}
30992        fi
30993        if test "x$resource" != x; then
30994            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30995$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30996	    # If the resource in the builddeps.conf file is an existing directory,
30997	    # for example /java/linux/cups
30998	    if test -d ${resource}; then
30999	       depdir=${resource}
31000	    else
31001
31002# cups is for example mymodule
31003# $resource is for example libs/general/libmymod_1_2_3.zip
31004# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31005# $with_builddeps_dir is for example /localhome/builddeps
31006# depdir is the name of the variable into which we store the depdir, eg MYMOD
31007# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31008# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31009    filename=`basename $resource`
31010    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31011    filebase=${filename%%.*}
31012    extension=${filename#*.}
31013    installdir=$with_builddeps_dir/$filebase
31014    if test ! -f $installdir/$filename.unpacked; then
31015        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31016$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31017        if test ! -d $installdir; then
31018            mkdir -p $installdir
31019        fi
31020        if test ! -d $installdir; then
31021            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31022        fi
31023        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31024        touch $tmpfile
31025        if test ! -f $tmpfile; then
31026            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31027        fi
31028
31029    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31030    # $tmpfile is the local file name for the downloaded file.
31031    VALID_TOOL=no
31032    if test "x$BDEPS_FTP" = xwget; then
31033       VALID_TOOL=yes
31034       wget -O $tmpfile $with_builddeps_server/$resource
31035    fi
31036    if test "x$BDEPS_FTP" = xlftp; then
31037       VALID_TOOL=yes
31038       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31039    fi
31040    if test "x$BDEPS_FTP" = xftp; then
31041        VALID_TOOL=yes
31042        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31043        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31044        FTPUSERPWD=${FTPSERVER%%@*}
31045        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31046            FTPUSER=${userpwd%%:*}
31047            FTPPWD=${userpwd#*@}
31048            FTPSERVER=${FTPSERVER#*@}
31049        else
31050            FTPUSER=ftp
31051            FTPPWD=ftp
31052        fi
31053        # the "pass" command does not work on some
31054        # ftp clients (read ftp.exe) but if it works,
31055        # passive mode is better!
31056        (\
31057            echo "user $FTPUSER $FTPPWD"        ;\
31058            echo "pass"                         ;\
31059            echo "bin"                          ;\
31060            echo "get $FTPPATH $tmpfile"              ;\
31061        ) | ftp -in $FTPSERVER
31062    fi
31063    if test "x$VALID_TOOL" != xyes; then
31064       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31065    fi
31066
31067        mv $tmpfile $installdir/$filename
31068        if test ! -s $installdir/$filename; then
31069            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31070        fi
31071        case "$extension" in
31072            zip)  echo "Unzipping $installdir/$filename..."
31073               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31074            ;;
31075            tar.gz) echo "Untaring $installdir/$filename..."
31076               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31077            ;;
31078            tgz) echo "Untaring $installdir/$filename..."
31079               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31080            ;;
31081            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31082            ;;
31083        esac
31084    fi
31085    if test -f $installdir/$filename.unpacked; then
31086        depdir=$installdir
31087    fi
31088
31089	    fi
31090            # Source the builddeps file again, because in the previous command, the depdir
31091            # was updated to point at the current build dependency install directory.
31092            . $builddepsfile
31093            # Now extract variables from the builddeps.conf files.
31094            theroot=${builddep_cups_ROOT}
31095            thecflags=${builddep_cups_CFLAGS}
31096            thelibs=${builddep_cups_LIBS}
31097            if test "x$depdir" = x; then
31098                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31099            fi
31100            CUPS=$depdir
31101            if test "x$theroot" != x; then
31102               CUPS="$theroot"
31103            fi
31104            if test "x$thecflags" != x; then
31105               CUPS_CFLAGS="$thecflags"
31106            fi
31107            if test "x$thelibs" != x; then
31108               CUPS_LIBS="$thelibs"
31109            fi
31110            CUPS_FOUND=yes
31111
31112        fi
31113
31114    fi
31115
31116	fi
31117	if test "x$CUPS_FOUND" = xno; then
31118	    # Are the cups headers installed in the default /usr/include location?
31119	    for ac_header in cups/cups.h cups/ppd.h
31120do :
31121  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31122ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31123if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31124  cat >>confdefs.h <<_ACEOF
31125#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31126_ACEOF
31127 CUPS_FOUND=yes
31128	                      CUPS_CFLAGS=
31129	                      DEFAULT_CUPS=yes
31130fi
31131
31132done
31133
31134	fi
31135	if test "x$CUPS_FOUND" = xno; then
31136	    # Getting nervous now? Lets poke around for standard Solaris third-party
31137	    # package installation locations.
31138	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31139$as_echo_n "checking for cups headers... " >&6; }
31140	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31141	       # An SFW package seems to be installed!
31142	       CUPS_FOUND=yes
31143	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31144	    elif test -s /opt/csw/include/cups/cups.h; then
31145	       # A CSW package seems to be installed!
31146	       CUPS_FOUND=yes
31147	       CUPS_CFLAGS="-I/opt/csw/include"
31148	    fi
31149	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31150$as_echo "$CUPS_FOUND" >&6; }
31151	fi
31152	if test "x$CUPS_FOUND" = xno; then
31153
31154    # Print a helpful message on how to acquire the necessary build dependency.
31155    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31156    MISSING_DEPENDENCY=cups
31157    PKGHANDLER_COMMAND=
31158
31159    case $PKGHANDLER in
31160	apt-get)
31161                apt_help     $MISSING_DEPENDENCY ;;
31162    yum)
31163                yum_help     $MISSING_DEPENDENCY ;;
31164	port)
31165                port_help    $MISSING_DEPENDENCY ;;
31166	pkgutil)
31167                pkgutil_help $MISSING_DEPENDENCY ;;
31168	pkgadd)
31169                pkgadd_help  $MISSING_DEPENDENCY ;;
31170    * )
31171      break ;;
31172    esac
31173
31174    if test "x$PKGHANDLER_COMMAND" != x; then
31175        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31176    fi
31177
31178	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31179	fi
31180fi
31181
31182
31183
31184
31185
31186
31187###############################################################################
31188#
31189# The ubiquitous freetype2 library is used to render fonts.
31190#
31191
31192# Check whether --with-freetype was given.
31193if test "${with_freetype+set}" = set; then :
31194  withval=$with_freetype;
31195fi
31196
31197
31198# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31199USING_SYSTEM_FT_LIB=false
31200
31201if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31202	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31203		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31204$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31205	fi
31206	FREETYPE2_CFLAGS=
31207	FREETYPE2_LIBS=
31208        FREETYPE2_LIB_PATH=
31209else
31210	FREETYPE2_FOUND=no
31211
31212	if test "x$with_freetype" != x; then
31213
31214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31215
31216  # Input might be given as Windows format, start by converting to
31217  # unix format.
31218  path="$with_freetype"
31219  new_path=`$CYGPATH -u "$path"`
31220
31221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31224  # "foo.exe" is OK but "foo" is an error.
31225  #
31226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31227  # It is also a way to make sure we got the proper file name for the real test later on.
31228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31229  if test "x$test_shortpath" = x; then
31230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31231$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31232    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31233  fi
31234
31235  # Call helper function which possibly converts this using DOS-style short mode.
31236  # If so, the updated path is stored in $new_path.
31237
31238  input_path="$new_path"
31239  # Check if we need to convert this using DOS-style short mode. If the path
31240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31241  # take no chances and rewrite it.
31242  # Note: m4 eats our [], so we need to use [ and ] instead.
31243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31244  if test "x$has_forbidden_chars" != x; then
31245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31249      # Going to short mode and back again did indeed matter. Since short mode is
31250      # case insensitive, let's make it lowercase to improve readability.
31251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31252      # Now convert it back to Unix-stile (cygpath)
31253      input_path=`$CYGPATH -u "$shortmode_path"`
31254      new_path="$input_path"
31255    fi
31256  fi
31257
31258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31259  if test "x$test_cygdrive_prefix" = x; then
31260    # As a simple fix, exclude /usr/bin since it's not a real path.
31261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31263      # a path prefixed by /cygdrive for fixpath to work.
31264      new_path="$CYGWIN_ROOT_PATH$input_path"
31265    fi
31266  fi
31267
31268
31269  if test "x$path" != "x$new_path"; then
31270    with_freetype="$new_path"
31271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31272$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31273  fi
31274
31275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31276
31277  path="$with_freetype"
31278  has_colon=`$ECHO $path | $GREP ^.:`
31279  new_path="$path"
31280  if test "x$has_colon" = x; then
31281    # Not in mixed or Windows style, start by that.
31282    new_path=`cmd //c echo $path`
31283  fi
31284
31285
31286  input_path="$new_path"
31287  # Check if we need to convert this using DOS-style short mode. If the path
31288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31289  # take no chances and rewrite it.
31290  # Note: m4 eats our [], so we need to use [ and ] instead.
31291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31292  if test "x$has_forbidden_chars" != x; then
31293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31295  fi
31296
31297
31298  windows_path="$new_path"
31299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31300    unix_path=`$CYGPATH -u "$windows_path"`
31301    new_path="$unix_path"
31302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31304    new_path="$unix_path"
31305  fi
31306
31307  if test "x$path" != "x$new_path"; then
31308    with_freetype="$new_path"
31309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31310$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31311  fi
31312
31313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31315
31316  else
31317    # We're on a posix platform. Hooray! :)
31318    path="$with_freetype"
31319    has_space=`$ECHO "$path" | $GREP " "`
31320    if test "x$has_space" != x; then
31321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31322$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31324    fi
31325
31326    # Use eval to expand a potential ~
31327    eval path="$path"
31328    if test ! -f "$path" && test ! -d "$path"; then
31329      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31330    fi
31331
31332    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31333  fi
31334
31335	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31336            FREETYPE2_LIB_PATH="$with_freetype/lib"
31337            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31338                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31339                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31340            fi
31341            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31342                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31343            fi
31344	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31345            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31346                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31347            fi
31348 	    FREETYPE2_FOUND=yes
31349   	    if test "x$FREETYPE2_FOUND" = xyes; then
31350	        # Verify that the directories exist
31351                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31352		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31353		fi
31354	        # List the contents of the lib.
31355		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31356                if test "x$FREETYPELIB" = x; then
31357		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31358		fi
31359	        # Check one h-file
31360                if ! test -s "$with_freetype/include/ft2build.h"; then
31361		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31362		fi
31363            fi
31364        fi
31365	if test "x$FREETYPE2_FOUND" = xno; then
31366
31367
31368    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31369        # Source the builddeps file again, to make sure it uses the latest variables!
31370        . $builddepsfile
31371        # Look for a target and build machine specific resource!
31372        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31373        if test "x$resource" = x; then
31374            # Ok, lets instead look for a target specific resource
31375            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31376        fi
31377        if test "x$resource" = x; then
31378            # Ok, lets instead look for a build specific resource
31379            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31380        fi
31381        if test "x$resource" = x; then
31382            # Ok, lets instead look for a generic resource
31383            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31384            resource=${builddep_freetype2}
31385        fi
31386        if test "x$resource" != x; then
31387            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31388$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31389	    # If the resource in the builddeps.conf file is an existing directory,
31390	    # for example /java/linux/cups
31391	    if test -d ${resource}; then
31392	       depdir=${resource}
31393	    else
31394
31395# freetype2 is for example mymodule
31396# $resource is for example libs/general/libmymod_1_2_3.zip
31397# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31398# $with_builddeps_dir is for example /localhome/builddeps
31399# depdir is the name of the variable into which we store the depdir, eg MYMOD
31400# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31401# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31402    filename=`basename $resource`
31403    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31404    filebase=${filename%%.*}
31405    extension=${filename#*.}
31406    installdir=$with_builddeps_dir/$filebase
31407    if test ! -f $installdir/$filename.unpacked; then
31408        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31409$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31410        if test ! -d $installdir; then
31411            mkdir -p $installdir
31412        fi
31413        if test ! -d $installdir; then
31414            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31415        fi
31416        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31417        touch $tmpfile
31418        if test ! -f $tmpfile; then
31419            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31420        fi
31421
31422    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31423    # $tmpfile is the local file name for the downloaded file.
31424    VALID_TOOL=no
31425    if test "x$BDEPS_FTP" = xwget; then
31426       VALID_TOOL=yes
31427       wget -O $tmpfile $with_builddeps_server/$resource
31428    fi
31429    if test "x$BDEPS_FTP" = xlftp; then
31430       VALID_TOOL=yes
31431       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31432    fi
31433    if test "x$BDEPS_FTP" = xftp; then
31434        VALID_TOOL=yes
31435        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31436        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31437        FTPUSERPWD=${FTPSERVER%%@*}
31438        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31439            FTPUSER=${userpwd%%:*}
31440            FTPPWD=${userpwd#*@}
31441            FTPSERVER=${FTPSERVER#*@}
31442        else
31443            FTPUSER=ftp
31444            FTPPWD=ftp
31445        fi
31446        # the "pass" command does not work on some
31447        # ftp clients (read ftp.exe) but if it works,
31448        # passive mode is better!
31449        (\
31450            echo "user $FTPUSER $FTPPWD"        ;\
31451            echo "pass"                         ;\
31452            echo "bin"                          ;\
31453            echo "get $FTPPATH $tmpfile"              ;\
31454        ) | ftp -in $FTPSERVER
31455    fi
31456    if test "x$VALID_TOOL" != xyes; then
31457       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31458    fi
31459
31460        mv $tmpfile $installdir/$filename
31461        if test ! -s $installdir/$filename; then
31462            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31463        fi
31464        case "$extension" in
31465            zip)  echo "Unzipping $installdir/$filename..."
31466               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31467            ;;
31468            tar.gz) echo "Untaring $installdir/$filename..."
31469               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31470            ;;
31471            tgz) echo "Untaring $installdir/$filename..."
31472               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31473            ;;
31474            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31475            ;;
31476        esac
31477    fi
31478    if test -f $installdir/$filename.unpacked; then
31479        depdir=$installdir
31480    fi
31481
31482	    fi
31483            # Source the builddeps file again, because in the previous command, the depdir
31484            # was updated to point at the current build dependency install directory.
31485            . $builddepsfile
31486            # Now extract variables from the builddeps.conf files.
31487            theroot=${builddep_freetype2_ROOT}
31488            thecflags=${builddep_freetype2_CFLAGS}
31489            thelibs=${builddep_freetype2_LIBS}
31490            if test "x$depdir" = x; then
31491                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31492            fi
31493            FREETYPE2=$depdir
31494            if test "x$theroot" != x; then
31495               FREETYPE2="$theroot"
31496            fi
31497            if test "x$thecflags" != x; then
31498               FREETYPE2_CFLAGS="$thecflags"
31499            fi
31500            if test "x$thelibs" != x; then
31501               FREETYPE2_LIBS="$thelibs"
31502            fi
31503            FREETYPE2_FOUND=yes
31504            else FREETYPE2_FOUND=no
31505
31506        fi
31507        else FREETYPE2_FOUND=no
31508
31509    fi
31510
31511            USING_SYSTEM_FT_LIB=true
31512	fi
31513	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31514            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31515
31516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31517
31518  # Input might be given as Windows format, start by converting to
31519  # unix format.
31520  path="$FREETYPELOCATION"
31521  new_path=`$CYGPATH -u "$path"`
31522
31523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31526  # "foo.exe" is OK but "foo" is an error.
31527  #
31528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31529  # It is also a way to make sure we got the proper file name for the real test later on.
31530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31531  if test "x$test_shortpath" = x; then
31532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31533$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31534    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31535  fi
31536
31537  # Call helper function which possibly converts this using DOS-style short mode.
31538  # If so, the updated path is stored in $new_path.
31539
31540  input_path="$new_path"
31541  # Check if we need to convert this using DOS-style short mode. If the path
31542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31543  # take no chances and rewrite it.
31544  # Note: m4 eats our [], so we need to use [ and ] instead.
31545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31546  if test "x$has_forbidden_chars" != x; then
31547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31551      # Going to short mode and back again did indeed matter. Since short mode is
31552      # case insensitive, let's make it lowercase to improve readability.
31553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31554      # Now convert it back to Unix-stile (cygpath)
31555      input_path=`$CYGPATH -u "$shortmode_path"`
31556      new_path="$input_path"
31557    fi
31558  fi
31559
31560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31561  if test "x$test_cygdrive_prefix" = x; then
31562    # As a simple fix, exclude /usr/bin since it's not a real path.
31563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31565      # a path prefixed by /cygdrive for fixpath to work.
31566      new_path="$CYGWIN_ROOT_PATH$input_path"
31567    fi
31568  fi
31569
31570
31571  if test "x$path" != "x$new_path"; then
31572    FREETYPELOCATION="$new_path"
31573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31574$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31575  fi
31576
31577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31578
31579  path="$FREETYPELOCATION"
31580  has_colon=`$ECHO $path | $GREP ^.:`
31581  new_path="$path"
31582  if test "x$has_colon" = x; then
31583    # Not in mixed or Windows style, start by that.
31584    new_path=`cmd //c echo $path`
31585  fi
31586
31587
31588  input_path="$new_path"
31589  # Check if we need to convert this using DOS-style short mode. If the path
31590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31591  # take no chances and rewrite it.
31592  # Note: m4 eats our [], so we need to use [ and ] instead.
31593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31594  if test "x$has_forbidden_chars" != x; then
31595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31597  fi
31598
31599
31600  windows_path="$new_path"
31601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31602    unix_path=`$CYGPATH -u "$windows_path"`
31603    new_path="$unix_path"
31604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31606    new_path="$unix_path"
31607  fi
31608
31609  if test "x$path" != "x$new_path"; then
31610    FREETYPELOCATION="$new_path"
31611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31612$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31613  fi
31614
31615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31617
31618  else
31619    # We're on a posix platform. Hooray! :)
31620    path="$FREETYPELOCATION"
31621    has_space=`$ECHO "$path" | $GREP " "`
31622    if test "x$has_space" != x; then
31623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31624$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31625      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31626    fi
31627
31628    # Use eval to expand a potential ~
31629    eval path="$path"
31630    if test ! -f "$path" && test ! -d "$path"; then
31631      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31632    fi
31633
31634    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31635  fi
31636
31637	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31638$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31639	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31640	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31641	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31642 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31643                if ! test -s "$FREETYPE2_LIBS"; then
31644		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31645		fi
31646                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31647		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31648		fi
31649                USING_SYSTEM_FT_LIB=true
31650                FREETYPE2_FOUND=yes
31651	    fi
31652	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31653$as_echo "$FREETYPE2_FOUND" >&6; }
31654        fi
31655	if test "x$FREETYPE2_FOUND" = xno; then
31656
31657pkg_failed=no
31658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31659$as_echo_n "checking for FREETYPE2... " >&6; }
31660
31661if test -n "$FREETYPE2_CFLAGS"; then
31662    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31663 elif test -n "$PKG_CONFIG"; then
31664    if test -n "$PKG_CONFIG" && \
31665    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31666  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31667  ac_status=$?
31668  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31669  test $ac_status = 0; }; then
31670  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31671else
31672  pkg_failed=yes
31673fi
31674 else
31675    pkg_failed=untried
31676fi
31677if test -n "$FREETYPE2_LIBS"; then
31678    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31679 elif test -n "$PKG_CONFIG"; then
31680    if test -n "$PKG_CONFIG" && \
31681    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31682  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31683  ac_status=$?
31684  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31685  test $ac_status = 0; }; then
31686  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31687else
31688  pkg_failed=yes
31689fi
31690 else
31691    pkg_failed=untried
31692fi
31693
31694
31695
31696if test $pkg_failed = yes; then
31697
31698if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31699        _pkg_short_errors_supported=yes
31700else
31701        _pkg_short_errors_supported=no
31702fi
31703        if test $_pkg_short_errors_supported = yes; then
31704	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31705        else
31706	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31707        fi
31708	# Put the nasty error message in config.log where it belongs
31709	echo "$FREETYPE2_PKG_ERRORS" >&5
31710
31711	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31712$as_echo "no" >&6; }
31713                FREETYPE2_FOUND=no
31714elif test $pkg_failed = untried; then
31715	FREETYPE2_FOUND=no
31716else
31717	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31718	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31720$as_echo "yes" >&6; }
31721	FREETYPE2_FOUND=yes
31722fi
31723            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31724            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31725            USING_SYSTEM_FT_LIB=true
31726            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31727            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31728              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31729            fi
31730	fi
31731	if test "x$FREETYPE2_FOUND" = xno; then
31732	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31733$as_echo_n "checking for freetype in some standard locations... " >&6; }
31734
31735	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31736	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31737	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31738	    fi
31739	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31740	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31741	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31742	    fi
31743
31744	    PREV_CXXCFLAGS="$CXXFLAGS"
31745	    PREV_LDFLAGS="$LDFLAGS"
31746	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31747	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31748	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31749/* end confdefs.h.  */
31750#include<ft2build.h>
31751	                    #include FT_FREETYPE_H
31752	                   int main() { return 0; }
31753
31754_ACEOF
31755if ac_fn_cxx_try_link "$LINENO"; then :
31756
31757	                      # Yes, the default cflags and libs did the trick.
31758	                      FREETYPE2_FOUND=yes
31759	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31760	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31761
31762else
31763
31764	                      FREETYPE2_FOUND=no
31765
31766fi
31767rm -f core conftest.err conftest.$ac_objext \
31768    conftest$ac_exeext conftest.$ac_ext
31769            CXXCFLAGS="$PREV_CXXFLAGS"
31770	    LDFLAGS="$PREV_LDFLAGS"
31771	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31772$as_echo "$FREETYPE2_FOUND" >&6; }
31773            USING_SYSTEM_FT_LIB=true
31774	fi
31775	if test "x$FREETYPE2_FOUND" = xno; then
31776
31777    # Print a helpful message on how to acquire the necessary build dependency.
31778    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31779    MISSING_DEPENDENCY=freetype2
31780    PKGHANDLER_COMMAND=
31781
31782    case $PKGHANDLER in
31783	apt-get)
31784                apt_help     $MISSING_DEPENDENCY ;;
31785    yum)
31786                yum_help     $MISSING_DEPENDENCY ;;
31787	port)
31788                port_help    $MISSING_DEPENDENCY ;;
31789	pkgutil)
31790                pkgutil_help $MISSING_DEPENDENCY ;;
31791	pkgadd)
31792                pkgadd_help  $MISSING_DEPENDENCY ;;
31793    * )
31794      break ;;
31795    esac
31796
31797    if test "x$PKGHANDLER_COMMAND" != x; then
31798        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31799    fi
31800
31801		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31802	fi
31803
31804        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31805            # AC_CHECK_LIB does not support use of cl.exe
31806            PREV_LDFLAGS="$LDFLAGS"
31807            LDFLAGS="$FREETYPE2_LIBS"
31808            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31809$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31810if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31811  $as_echo_n "(cached) " >&6
31812else
31813  ac_check_lib_save_LIBS=$LIBS
31814LIBS="-lfreetype  $LIBS"
31815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31816/* end confdefs.h.  */
31817
31818/* Override any GCC internal prototype to avoid an error.
31819   Use char because int might match the return type of a GCC
31820   builtin and then its argument prototype would still apply.  */
31821#ifdef __cplusplus
31822extern "C"
31823#endif
31824char FT_Init_FreeType ();
31825int
31826main ()
31827{
31828return FT_Init_FreeType ();
31829  ;
31830  return 0;
31831}
31832_ACEOF
31833if ac_fn_cxx_try_link "$LINENO"; then :
31834  ac_cv_lib_freetype_FT_Init_FreeType=yes
31835else
31836  ac_cv_lib_freetype_FT_Init_FreeType=no
31837fi
31838rm -f core conftest.err conftest.$ac_objext \
31839    conftest$ac_exeext conftest.$ac_ext
31840LIBS=$ac_check_lib_save_LIBS
31841fi
31842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31843$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31844if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31845  FREETYPE2_FOUND=true
31846else
31847  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31848fi
31849
31850            LDFLAGS="$PREV_LDFLAGS"
31851        fi
31852fi
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862###############################################################################
31863#
31864# Check for alsa headers and libraries. Used on Linux/GNU systems.
31865#
31866
31867# Check whether --with-alsa was given.
31868if test "${with_alsa+set}" = set; then :
31869  withval=$with_alsa;
31870fi
31871
31872
31873# Check whether --with-alsa-include was given.
31874if test "${with_alsa_include+set}" = set; then :
31875  withval=$with_alsa_include;
31876fi
31877
31878
31879# Check whether --with-alsa-lib was given.
31880if test "${with_alsa_lib+set}" = set; then :
31881  withval=$with_alsa_lib;
31882fi
31883
31884
31885if test "x$ALSA_NOT_NEEDED" = xyes; then
31886	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31887		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31888$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31889	fi
31890	ALSA_CFLAGS=
31891	ALSA_LIBS=
31892else
31893	ALSA_FOUND=no
31894
31895	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31896	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31897	fi
31898
31899	if test "x${with_alsa}" != x; then
31900	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31901	    ALSA_CFLAGS="-I${with_alsa}/include"
31902	    ALSA_FOUND=yes
31903	fi
31904	if test "x${with_alsa_include}" != x; then
31905	    ALSA_CFLAGS="-I${with_alsa_include}"
31906	    ALSA_FOUND=yes
31907	fi
31908	if test "x${with_alsa_lib}" != x; then
31909	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31910	    ALSA_FOUND=yes
31911	fi
31912	if test "x$ALSA_FOUND" = xno; then
31913
31914
31915    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31916        # Source the builddeps file again, to make sure it uses the latest variables!
31917        . $builddepsfile
31918        # Look for a target and build machine specific resource!
31919        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31920        if test "x$resource" = x; then
31921            # Ok, lets instead look for a target specific resource
31922            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31923        fi
31924        if test "x$resource" = x; then
31925            # Ok, lets instead look for a build specific resource
31926            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31927        fi
31928        if test "x$resource" = x; then
31929            # Ok, lets instead look for a generic resource
31930            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31931            resource=${builddep_alsa}
31932        fi
31933        if test "x$resource" != x; then
31934            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31935$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31936	    # If the resource in the builddeps.conf file is an existing directory,
31937	    # for example /java/linux/cups
31938	    if test -d ${resource}; then
31939	       depdir=${resource}
31940	    else
31941
31942# alsa is for example mymodule
31943# $resource is for example libs/general/libmymod_1_2_3.zip
31944# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31945# $with_builddeps_dir is for example /localhome/builddeps
31946# depdir is the name of the variable into which we store the depdir, eg MYMOD
31947# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31948# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31949    filename=`basename $resource`
31950    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31951    filebase=${filename%%.*}
31952    extension=${filename#*.}
31953    installdir=$with_builddeps_dir/$filebase
31954    if test ! -f $installdir/$filename.unpacked; then
31955        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31956$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31957        if test ! -d $installdir; then
31958            mkdir -p $installdir
31959        fi
31960        if test ! -d $installdir; then
31961            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31962        fi
31963        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31964        touch $tmpfile
31965        if test ! -f $tmpfile; then
31966            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31967        fi
31968
31969    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31970    # $tmpfile is the local file name for the downloaded file.
31971    VALID_TOOL=no
31972    if test "x$BDEPS_FTP" = xwget; then
31973       VALID_TOOL=yes
31974       wget -O $tmpfile $with_builddeps_server/$resource
31975    fi
31976    if test "x$BDEPS_FTP" = xlftp; then
31977       VALID_TOOL=yes
31978       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31979    fi
31980    if test "x$BDEPS_FTP" = xftp; then
31981        VALID_TOOL=yes
31982        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31983        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31984        FTPUSERPWD=${FTPSERVER%%@*}
31985        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31986            FTPUSER=${userpwd%%:*}
31987            FTPPWD=${userpwd#*@}
31988            FTPSERVER=${FTPSERVER#*@}
31989        else
31990            FTPUSER=ftp
31991            FTPPWD=ftp
31992        fi
31993        # the "pass" command does not work on some
31994        # ftp clients (read ftp.exe) but if it works,
31995        # passive mode is better!
31996        (\
31997            echo "user $FTPUSER $FTPPWD"        ;\
31998            echo "pass"                         ;\
31999            echo "bin"                          ;\
32000            echo "get $FTPPATH $tmpfile"              ;\
32001        ) | ftp -in $FTPSERVER
32002    fi
32003    if test "x$VALID_TOOL" != xyes; then
32004       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32005    fi
32006
32007        mv $tmpfile $installdir/$filename
32008        if test ! -s $installdir/$filename; then
32009            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32010        fi
32011        case "$extension" in
32012            zip)  echo "Unzipping $installdir/$filename..."
32013               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32014            ;;
32015            tar.gz) echo "Untaring $installdir/$filename..."
32016               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32017            ;;
32018            tgz) echo "Untaring $installdir/$filename..."
32019               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32020            ;;
32021            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32022            ;;
32023        esac
32024    fi
32025    if test -f $installdir/$filename.unpacked; then
32026        depdir=$installdir
32027    fi
32028
32029	    fi
32030            # Source the builddeps file again, because in the previous command, the depdir
32031            # was updated to point at the current build dependency install directory.
32032            . $builddepsfile
32033            # Now extract variables from the builddeps.conf files.
32034            theroot=${builddep_alsa_ROOT}
32035            thecflags=${builddep_alsa_CFLAGS}
32036            thelibs=${builddep_alsa_LIBS}
32037            if test "x$depdir" = x; then
32038                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32039            fi
32040            ALSA=$depdir
32041            if test "x$theroot" != x; then
32042               ALSA="$theroot"
32043            fi
32044            if test "x$thecflags" != x; then
32045               ALSA_CFLAGS="$thecflags"
32046            fi
32047            if test "x$thelibs" != x; then
32048               ALSA_LIBS="$thelibs"
32049            fi
32050            ALSA_FOUND=yes
32051            else ALSA_FOUND=no
32052
32053        fi
32054        else ALSA_FOUND=no
32055
32056    fi
32057
32058	fi
32059	if test "x$ALSA_FOUND" = xno; then
32060
32061pkg_failed=no
32062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32063$as_echo_n "checking for ALSA... " >&6; }
32064
32065if test -n "$ALSA_CFLAGS"; then
32066    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32067 elif test -n "$PKG_CONFIG"; then
32068    if test -n "$PKG_CONFIG" && \
32069    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32070  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32071  ac_status=$?
32072  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32073  test $ac_status = 0; }; then
32074  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32075else
32076  pkg_failed=yes
32077fi
32078 else
32079    pkg_failed=untried
32080fi
32081if test -n "$ALSA_LIBS"; then
32082    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32083 elif test -n "$PKG_CONFIG"; then
32084    if test -n "$PKG_CONFIG" && \
32085    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32086  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32087  ac_status=$?
32088  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32089  test $ac_status = 0; }; then
32090  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32091else
32092  pkg_failed=yes
32093fi
32094 else
32095    pkg_failed=untried
32096fi
32097
32098
32099
32100if test $pkg_failed = yes; then
32101
32102if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32103        _pkg_short_errors_supported=yes
32104else
32105        _pkg_short_errors_supported=no
32106fi
32107        if test $_pkg_short_errors_supported = yes; then
32108	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32109        else
32110	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32111        fi
32112	# Put the nasty error message in config.log where it belongs
32113	echo "$ALSA_PKG_ERRORS" >&5
32114
32115	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32116$as_echo "no" >&6; }
32117                ALSA_FOUND=no
32118elif test $pkg_failed = untried; then
32119	ALSA_FOUND=no
32120else
32121	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32122	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32124$as_echo "yes" >&6; }
32125	ALSA_FOUND=yes
32126fi
32127	fi
32128	if test "x$ALSA_FOUND" = xno; then
32129	    for ac_header in alsa/asoundlib.h
32130do :
32131  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32132if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32133  cat >>confdefs.h <<_ACEOF
32134#define HAVE_ALSA_ASOUNDLIB_H 1
32135_ACEOF
32136 ALSA_FOUND=yes
32137	                      ALSA_CFLAGS=-Iignoreme
32138	                      ALSA_LIBS=-lasound
32139	                      DEFAULT_ALSA=yes
32140else
32141  ALSA_FOUND=no
32142fi
32143
32144done
32145
32146	fi
32147	if test "x$ALSA_FOUND" = xno; then
32148
32149    # Print a helpful message on how to acquire the necessary build dependency.
32150    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32151    MISSING_DEPENDENCY=alsa
32152    PKGHANDLER_COMMAND=
32153
32154    case $PKGHANDLER in
32155	apt-get)
32156                apt_help     $MISSING_DEPENDENCY ;;
32157    yum)
32158                yum_help     $MISSING_DEPENDENCY ;;
32159	port)
32160                port_help    $MISSING_DEPENDENCY ;;
32161	pkgutil)
32162                pkgutil_help $MISSING_DEPENDENCY ;;
32163	pkgadd)
32164                pkgadd_help  $MISSING_DEPENDENCY ;;
32165    * )
32166      break ;;
32167    esac
32168
32169    if test "x$PKGHANDLER_COMMAND" != x; then
32170        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32171    fi
32172
32173	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32174	fi
32175fi
32176
32177
32178
32179
32180
32181
32182
32183###############################################################################
32184#
32185# Check for the jpeg library
32186#
32187
32188USE_EXTERNAL_LIBJPEG=true
32189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32190$as_echo_n "checking for main in -ljpeg... " >&6; }
32191if ${ac_cv_lib_jpeg_main+:} false; then :
32192  $as_echo_n "(cached) " >&6
32193else
32194  ac_check_lib_save_LIBS=$LIBS
32195LIBS="-ljpeg  $LIBS"
32196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32197/* end confdefs.h.  */
32198
32199
32200int
32201main ()
32202{
32203return main ();
32204  ;
32205  return 0;
32206}
32207_ACEOF
32208if ac_fn_cxx_try_link "$LINENO"; then :
32209  ac_cv_lib_jpeg_main=yes
32210else
32211  ac_cv_lib_jpeg_main=no
32212fi
32213rm -f core conftest.err conftest.$ac_objext \
32214    conftest$ac_exeext conftest.$ac_ext
32215LIBS=$ac_check_lib_save_LIBS
32216fi
32217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32218$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32219if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32220  cat >>confdefs.h <<_ACEOF
32221#define HAVE_LIBJPEG 1
32222_ACEOF
32223
32224  LIBS="-ljpeg $LIBS"
32225
32226else
32227   USE_EXTERNAL_LIBJPEG=false
32228               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32229$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32230
32231fi
32232
32233
32234
32235###############################################################################
32236#
32237# Check for the gif library
32238#
32239
32240
32241# Check whether --with-giflib was given.
32242if test "${with_giflib+set}" = set; then :
32243  withval=$with_giflib;
32244fi
32245
32246
32247
32248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32249$as_echo_n "checking for which giflib to use... " >&6; }
32250
32251# default is bundled
32252DEFAULT_GIFLIB=bundled
32253
32254#
32255# if user didn't specify, use DEFAULT_GIFLIB
32256#
32257if test "x${with_giflib}" = "x"; then
32258    with_giflib=${DEFAULT_GIFLIB}
32259fi
32260
32261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32262$as_echo "${with_giflib}" >&6; }
32263
32264if test "x${with_giflib}" = "xbundled"; then
32265    USE_EXTERNAL_LIBGIF=false
32266elif test "x${with_giflib}" = "xsystem"; then
32267    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32268if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32269
32270else
32271   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32272fi
32273
32274
32275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32276$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32277if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32278  $as_echo_n "(cached) " >&6
32279else
32280  ac_check_lib_save_LIBS=$LIBS
32281LIBS="-lgif  $LIBS"
32282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32283/* end confdefs.h.  */
32284
32285/* Override any GCC internal prototype to avoid an error.
32286   Use char because int might match the return type of a GCC
32287   builtin and then its argument prototype would still apply.  */
32288#ifdef __cplusplus
32289extern "C"
32290#endif
32291char DGifGetCode ();
32292int
32293main ()
32294{
32295return DGifGetCode ();
32296  ;
32297  return 0;
32298}
32299_ACEOF
32300if ac_fn_cxx_try_link "$LINENO"; then :
32301  ac_cv_lib_gif_DGifGetCode=yes
32302else
32303  ac_cv_lib_gif_DGifGetCode=no
32304fi
32305rm -f core conftest.err conftest.$ac_objext \
32306    conftest$ac_exeext conftest.$ac_ext
32307LIBS=$ac_check_lib_save_LIBS
32308fi
32309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32310$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32311if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32312  cat >>confdefs.h <<_ACEOF
32313#define HAVE_LIBGIF 1
32314_ACEOF
32315
32316  LIBS="-lgif $LIBS"
32317
32318else
32319   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32320fi
32321
32322
32323    USE_EXTERNAL_LIBGIF=true
32324else
32325    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32326fi
32327
32328
32329###############################################################################
32330#
32331# Check for the zlib library
32332#
32333
32334
32335# Check whether --with-zlib was given.
32336if test "${with_zlib+set}" = set; then :
32337  withval=$with_zlib;
32338fi
32339
32340
32341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32342$as_echo_n "checking for compress in -lz... " >&6; }
32343if ${ac_cv_lib_z_compress+:} false; then :
32344  $as_echo_n "(cached) " >&6
32345else
32346  ac_check_lib_save_LIBS=$LIBS
32347LIBS="-lz  $LIBS"
32348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32349/* end confdefs.h.  */
32350
32351/* Override any GCC internal prototype to avoid an error.
32352   Use char because int might match the return type of a GCC
32353   builtin and then its argument prototype would still apply.  */
32354#ifdef __cplusplus
32355extern "C"
32356#endif
32357char compress ();
32358int
32359main ()
32360{
32361return compress ();
32362  ;
32363  return 0;
32364}
32365_ACEOF
32366if ac_fn_cxx_try_link "$LINENO"; then :
32367  ac_cv_lib_z_compress=yes
32368else
32369  ac_cv_lib_z_compress=no
32370fi
32371rm -f core conftest.err conftest.$ac_objext \
32372    conftest$ac_exeext conftest.$ac_ext
32373LIBS=$ac_check_lib_save_LIBS
32374fi
32375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32376$as_echo "$ac_cv_lib_z_compress" >&6; }
32377if test "x$ac_cv_lib_z_compress" = xyes; then :
32378   ZLIB_FOUND=yes
32379else
32380   ZLIB_FOUND=no
32381fi
32382
32383
32384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32385$as_echo_n "checking for which zlib to use... " >&6; }
32386
32387DEFAULT_ZLIB=bundled
32388if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32389#
32390# On macosx default is system...on others default is
32391#
32392    DEFAULT_ZLIB=system
32393fi
32394
32395if test "x${ZLIB_FOUND}" != "xyes"; then
32396#
32397# If we don't find any system...set default to bundled
32398#
32399    DEFAULT_ZLIB=bundled
32400fi
32401
32402#
32403# If user didn't specify, use DEFAULT_ZLIB
32404#
32405if test "x${with_zlib}" = "x"; then
32406    with_zlib=${DEFAULT_ZLIB}
32407fi
32408
32409if test "x${with_zlib}" = "xbundled"; then
32410    USE_EXTERNAL_LIBZ=false
32411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32412$as_echo "bundled" >&6; }
32413elif test "x${with_zlib}" = "xsystem"; then
32414    if test "x${ZLIB_FOUND}" = "xyes"; then
32415        USE_EXTERNAL_LIBZ=true
32416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32417$as_echo "system" >&6; }
32418    else
32419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32420$as_echo "system not found" >&6; }
32421        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32422    fi
32423else
32424    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32425fi
32426
32427
32428
32429###############################################################################
32430LIBZIP_CAN_USE_MMAP=true
32431
32432
32433
32434###############################################################################
32435#
32436# Check if altzone exists in time.h
32437#
32438
32439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32440/* end confdefs.h.  */
32441#include <time.h>
32442int
32443main ()
32444{
32445return (int)altzone;
32446  ;
32447  return 0;
32448}
32449_ACEOF
32450if ac_fn_cxx_try_link "$LINENO"; then :
32451  has_altzone=yes
32452else
32453  has_altzone=no
32454fi
32455rm -f core conftest.err conftest.$ac_objext \
32456    conftest$ac_exeext conftest.$ac_ext
32457if test "x$has_altzone" = xyes; then
32458
32459$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32460
32461fi
32462
32463###############################################################################
32464#
32465# Check the maths library
32466#
32467
32468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32469$as_echo_n "checking for cos in -lm... " >&6; }
32470if ${ac_cv_lib_m_cos+:} false; then :
32471  $as_echo_n "(cached) " >&6
32472else
32473  ac_check_lib_save_LIBS=$LIBS
32474LIBS="-lm  $LIBS"
32475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32476/* end confdefs.h.  */
32477
32478/* Override any GCC internal prototype to avoid an error.
32479   Use char because int might match the return type of a GCC
32480   builtin and then its argument prototype would still apply.  */
32481#ifdef __cplusplus
32482extern "C"
32483#endif
32484char cos ();
32485int
32486main ()
32487{
32488return cos ();
32489  ;
32490  return 0;
32491}
32492_ACEOF
32493if ac_fn_cxx_try_link "$LINENO"; then :
32494  ac_cv_lib_m_cos=yes
32495else
32496  ac_cv_lib_m_cos=no
32497fi
32498rm -f core conftest.err conftest.$ac_objext \
32499    conftest$ac_exeext conftest.$ac_ext
32500LIBS=$ac_check_lib_save_LIBS
32501fi
32502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32503$as_echo "$ac_cv_lib_m_cos" >&6; }
32504if test "x$ac_cv_lib_m_cos" = xyes; then :
32505  cat >>confdefs.h <<_ACEOF
32506#define HAVE_LIBM 1
32507_ACEOF
32508
32509  LIBS="-lm $LIBS"
32510
32511else
32512
32513                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32514$as_echo "$as_me: Maths library was not found" >&6;}
32515
32516fi
32517
32518
32519
32520###############################################################################
32521#
32522# Check for libdl.so
32523
32524save_LIBS="$LIBS"
32525LIBS=""
32526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32527$as_echo_n "checking for dlopen in -ldl... " >&6; }
32528if ${ac_cv_lib_dl_dlopen+:} false; then :
32529  $as_echo_n "(cached) " >&6
32530else
32531  ac_check_lib_save_LIBS=$LIBS
32532LIBS="-ldl  $LIBS"
32533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32534/* end confdefs.h.  */
32535
32536/* Override any GCC internal prototype to avoid an error.
32537   Use char because int might match the return type of a GCC
32538   builtin and then its argument prototype would still apply.  */
32539#ifdef __cplusplus
32540extern "C"
32541#endif
32542char dlopen ();
32543int
32544main ()
32545{
32546return dlopen ();
32547  ;
32548  return 0;
32549}
32550_ACEOF
32551if ac_fn_cxx_try_link "$LINENO"; then :
32552  ac_cv_lib_dl_dlopen=yes
32553else
32554  ac_cv_lib_dl_dlopen=no
32555fi
32556rm -f core conftest.err conftest.$ac_objext \
32557    conftest$ac_exeext conftest.$ac_ext
32558LIBS=$ac_check_lib_save_LIBS
32559fi
32560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32561$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32562if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32563  cat >>confdefs.h <<_ACEOF
32564#define HAVE_LIBDL 1
32565_ACEOF
32566
32567  LIBS="-ldl $LIBS"
32568
32569fi
32570
32571LIBDL="$LIBS"
32572
32573LIBS="$save_LIBS"
32574
32575
32576
32577###############################################################################
32578#
32579# statically link libstdc++ before C++ ABI is stablized on Linux unless
32580# dynamic build is configured on command line.
32581#
32582
32583# Check whether --with-stdc++lib was given.
32584if test "${with_stdc__lib+set}" = set; then :
32585  withval=$with_stdc__lib;
32586    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32587        && test "x$with_stdc__lib" != xdefault; then
32588      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32589    fi
32590
32591else
32592  with_stdc__lib=default
32593
32594fi
32595
32596
32597if test "x$OPENJDK_TARGET_OS" = xlinux; then
32598    # Test if -lstdc++ works.
32599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32600$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32601    ac_ext=cpp
32602ac_cpp='$CXXCPP $CPPFLAGS'
32603ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32604ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32605ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32606
32607    OLD_CXXFLAGS="$CXXFLAGS"
32608    CXXFLAGS="$CXXFLAGS -lstdc++"
32609    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32610/* end confdefs.h.  */
32611
32612int
32613main ()
32614{
32615return 0;
32616  ;
32617  return 0;
32618}
32619_ACEOF
32620if ac_fn_cxx_try_link "$LINENO"; then :
32621  has_dynamic_libstdcxx=yes
32622else
32623  has_dynamic_libstdcxx=no
32624fi
32625rm -f core conftest.err conftest.$ac_objext \
32626    conftest$ac_exeext conftest.$ac_ext
32627    CXXFLAGS="$OLD_CXXFLAGS"
32628    ac_ext=cpp
32629ac_cpp='$CXXCPP $CPPFLAGS'
32630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32633
32634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32635$as_echo "$has_dynamic_libstdcxx" >&6; }
32636
32637    # Test if stdc++ can be linked statically.
32638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32639$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32640    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32641    ac_ext=cpp
32642ac_cpp='$CXXCPP $CPPFLAGS'
32643ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32644ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32645ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32646
32647    OLD_LIBS="$LIBS"
32648    OLD_CXX="$CXX"
32649    LIBS="$STATIC_STDCXX_FLAGS"
32650    CXX="$CC"
32651    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32652/* end confdefs.h.  */
32653
32654int
32655main ()
32656{
32657return 0;
32658  ;
32659  return 0;
32660}
32661_ACEOF
32662if ac_fn_cxx_try_link "$LINENO"; then :
32663  has_static_libstdcxx=yes
32664else
32665  has_static_libstdcxx=no
32666fi
32667rm -f core conftest.err conftest.$ac_objext \
32668    conftest$ac_exeext conftest.$ac_ext
32669    LIBS="$OLD_LIBS"
32670    CXX="$OLD_CXX"
32671    ac_ext=cpp
32672ac_cpp='$CXXCPP $CPPFLAGS'
32673ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32674ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32675ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32676
32677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32678$as_echo "$has_static_libstdcxx" >&6; }
32679
32680    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32681        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32682    fi
32683
32684    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32685        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32686    fi
32687
32688    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32689        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32690    fi
32691
32692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32693$as_echo_n "checking how to link with libstdc++... " >&6; }
32694    # If dynamic was requested, it's available since it would fail above otherwise.
32695    # If dynamic wasn't requested, go with static unless it isn't available.
32696    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32697        LIBCXX="$LIBCXX -lstdc++"
32698        LDCXX="$CXX"
32699        STATIC_CXX_SETTING="STATIC_CXX=false"
32700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32701$as_echo "dynamic" >&6; }
32702    else
32703        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32704        LDCXX="$CC"
32705        STATIC_CXX_SETTING="STATIC_CXX=true"
32706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32707$as_echo "static" >&6; }
32708    fi
32709fi
32710
32711
32712if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32713    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32714
32715pkg_failed=no
32716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32717$as_echo_n "checking for LIBFFI... " >&6; }
32718
32719if test -n "$LIBFFI_CFLAGS"; then
32720    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32721 elif test -n "$PKG_CONFIG"; then
32722    if test -n "$PKG_CONFIG" && \
32723    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32724  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32725  ac_status=$?
32726  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32727  test $ac_status = 0; }; then
32728  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32729else
32730  pkg_failed=yes
32731fi
32732 else
32733    pkg_failed=untried
32734fi
32735if test -n "$LIBFFI_LIBS"; then
32736    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32737 elif test -n "$PKG_CONFIG"; then
32738    if test -n "$PKG_CONFIG" && \
32739    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32740  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32741  ac_status=$?
32742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32743  test $ac_status = 0; }; then
32744  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32745else
32746  pkg_failed=yes
32747fi
32748 else
32749    pkg_failed=untried
32750fi
32751
32752
32753
32754if test $pkg_failed = yes; then
32755
32756if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32757        _pkg_short_errors_supported=yes
32758else
32759        _pkg_short_errors_supported=no
32760fi
32761        if test $_pkg_short_errors_supported = yes; then
32762	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32763        else
32764	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32765        fi
32766	# Put the nasty error message in config.log where it belongs
32767	echo "$LIBFFI_PKG_ERRORS" >&5
32768
32769	as_fn_error $? "Package requirements (libffi) were not met:
32770
32771$LIBFFI_PKG_ERRORS
32772
32773Consider adjusting the PKG_CONFIG_PATH environment variable if you
32774installed software in a non-standard prefix.
32775
32776Alternatively, you may set the environment variables LIBFFI_CFLAGS
32777and LIBFFI_LIBS to avoid the need to call pkg-config.
32778See the pkg-config man page for more details.
32779" "$LINENO" 5
32780elif test $pkg_failed = untried; then
32781	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32783as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32784is in your PATH or set the PKG_CONFIG environment variable to the full
32785path to pkg-config.
32786
32787Alternatively, you may set the environment variables LIBFFI_CFLAGS
32788and LIBFFI_LIBS to avoid the need to call pkg-config.
32789See the pkg-config man page for more details.
32790
32791To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32792See \`config.log' for more details" "$LINENO" 5; }
32793else
32794	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32795	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32797$as_echo "yes" >&6; }
32798	:
32799fi
32800
32801fi
32802
32803if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32804    # Extract the first word of "llvm-config", so it can be a program name with args.
32805set dummy llvm-config; ac_word=$2
32806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32807$as_echo_n "checking for $ac_word... " >&6; }
32808if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32809  $as_echo_n "(cached) " >&6
32810else
32811  if test -n "$LLVM_CONFIG"; then
32812  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32813else
32814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32815for as_dir in $PATH
32816do
32817  IFS=$as_save_IFS
32818  test -z "$as_dir" && as_dir=.
32819    for ac_exec_ext in '' $ac_executable_extensions; do
32820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32821    ac_cv_prog_LLVM_CONFIG="llvm-config"
32822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32823    break 2
32824  fi
32825done
32826  done
32827IFS=$as_save_IFS
32828
32829fi
32830fi
32831LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32832if test -n "$LLVM_CONFIG"; then
32833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32834$as_echo "$LLVM_CONFIG" >&6; }
32835else
32836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32837$as_echo "no" >&6; }
32838fi
32839
32840
32841
32842    if test "x$LLVM_CONFIG" != xllvm-config; then
32843        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32844    fi
32845
32846    llvm_components="jit mcjit engine nativecodegen native"
32847    unset LLVM_CFLAGS
32848    for flag in $("$LLVM_CONFIG" --cxxflags); do
32849      if echo "${flag}" | grep -q '^-[ID]'; then
32850        if test "${flag}" != "-D_DEBUG" ; then
32851          if test "${LLVM_CFLAGS}" != "" ; then
32852            LLVM_CFLAGS="${LLVM_CFLAGS} "
32853          fi
32854          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32855        fi
32856      fi
32857    done
32858    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32859    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32860
32861    unset LLVM_LDFLAGS
32862    for flag in $("${LLVM_CONFIG}" --ldflags); do
32863      if echo "${flag}" | grep -q '^-L'; then
32864        if test "${LLVM_LDFLAGS}" != ""; then
32865          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32866        fi
32867        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32868      fi
32869    done
32870
32871    unset LLVM_LIBS
32872    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32873      if echo "${flag}" | grep -q '^-l'; then
32874        if test "${LLVM_LIBS}" != ""; then
32875          LLVM_LIBS="${LLVM_LIBS} "
32876        fi
32877        LLVM_LIBS="${LLVM_LIBS}${flag}"
32878      fi
32879    done
32880
32881
32882
32883
32884fi
32885
32886# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32887if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32888    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32889fi
32890
32891# TODO better (platform agnostic) test
32892if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32893    LIBCXX="-lstdc++"
32894fi
32895
32896
32897
32898
32899
32900# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32901
32902# When using cygwin or msys, we need a wrapper binary that renames
32903# /cygdrive/c/ arguments into c:/ arguments and peeks into
32904# @files and rewrites these too! This wrapper binary is
32905# called fixpath.
32906FIXPATH=
32907if test "x$OPENJDK_BUILD_OS" = xwindows; then
32908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32909$as_echo_n "checking if fixpath can be created... " >&6; }
32910    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32911    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32912    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32913      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32914      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32915      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32916      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32917    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32918      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32919      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32920
32921      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32922      # @ was chosen as separator to minimize risk of other tools messing around with it
32923      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32924      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32925
32926      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32927    fi
32928    rm -f $OUTPUT_ROOT/fixpath*
32929    cd $OUTPUT_ROOT
32930    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32931    cd $CURDIR
32932
32933    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32935$as_echo "no" >&6; }
32936        cat $OUTPUT_ROOT/fixpath1.log
32937        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32938    fi
32939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32940$as_echo "yes" >&6; }
32941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32942$as_echo_n "checking if fixpath.exe works... " >&6; }
32943    cd $OUTPUT_ROOT
32944    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32945    cd $CURDIR
32946    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32948$as_echo "no" >&6; }
32949        cat $OUTPUT_ROOT/fixpath2.log
32950        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32951    fi
32952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32953$as_echo "yes" >&6; }
32954    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32955fi
32956
32957
32958
32959
32960###############################################################################
32961#
32962# We need to do some final tweaking, when everything else is done.
32963#
32964###############################################################################
32965
32966
32967HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32968
32969
32970# The name of the Service Agent jar.
32971SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32972if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32973  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32974fi
32975
32976
32977
32978
32979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32980$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32981
32982if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32983    ENABLE_INTREE_EC=yes
32984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32985$as_echo "yes" >&6; }
32986else
32987    ENABLE_INTREE_EC=no
32988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32989$as_echo "no" >&6; }
32990fi
32991
32992
32993
32994
32995###############################################################################
32996#
32997# Configure parts of the build that only affect the build performance,
32998# not the result.
32999#
33000###############################################################################
33001
33002
33003  # How many cores do we have on this build system?
33004
33005# Check whether --with-num-cores was given.
33006if test "${with_num_cores+set}" = set; then :
33007  withval=$with_num_cores;
33008fi
33009
33010  if test "x$with_num_cores" = x; then
33011    # The number of cores were not specified, try to probe them.
33012
33013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33014$as_echo_n "checking for number of cores... " >&6; }
33015    NUM_CORES=1
33016    FOUND_CORES=no
33017
33018    if test -f /proc/cpuinfo; then
33019        # Looks like a Linux (or cygwin) system
33020        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33021        FOUND_CORES=yes
33022    elif test -x /usr/sbin/psrinfo; then
33023        # Looks like a Solaris system
33024        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33025        FOUND_CORES=yes
33026    elif test -x /usr/sbin/system_profiler; then
33027        # Looks like a MacOSX system
33028        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33029        FOUND_CORES=yes
33030    elif test -n "$NUMBER_OF_PROCESSORS"; then
33031        # On windows, look in the env
33032        NUM_CORES=$NUMBER_OF_PROCESSORS
33033        FOUND_CORES=yes
33034    fi
33035
33036    if test "x$FOUND_CORES" = xyes; then
33037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33038$as_echo "$NUM_CORES" >&6; }
33039    else
33040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33041$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33043$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33044    fi
33045
33046
33047  else
33048    NUM_CORES=$with_num_cores
33049  fi
33050
33051
33052
33053  # How much memory do we have on this build system?
33054
33055# Check whether --with-memory-size was given.
33056if test "${with_memory_size+set}" = set; then :
33057  withval=$with_memory_size;
33058fi
33059
33060  if test "x$with_memory_size" = x; then
33061    # The memory size was not specified, try to probe it.
33062
33063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33064$as_echo_n "checking for memory size... " >&6; }
33065    # Default to 1024 MB
33066    MEMORY_SIZE=1024
33067    FOUND_MEM=no
33068
33069    if test -f /proc/meminfo; then
33070        # Looks like a Linux (or cygwin) system
33071        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33072        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33073        FOUND_MEM=yes
33074    elif test -x /usr/sbin/prtconf; then
33075        # Looks like a Solaris system
33076        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33077        FOUND_MEM=yes
33078    elif test -x /usr/sbin/system_profiler; then
33079        # Looks like a MacOSX system
33080        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33081        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33082        FOUND_MEM=yes
33083    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33084        # Windows, but without cygwin
33085        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33086        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33087        FOUND_MEM=yes
33088    fi
33089
33090    if test "x$FOUND_MEM" = xyes; then
33091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33092$as_echo "$MEMORY_SIZE MB" >&6; }
33093    else
33094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33095$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33097$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33098    fi
33099
33100  else
33101    MEMORY_SIZE=$with_memory_size
33102  fi
33103
33104
33105
33106  # Provide a decent default number of parallel jobs for make depending on
33107  # number of cores, amount of memory and machine architecture.
33108
33109# Check whether --with-jobs was given.
33110if test "${with_jobs+set}" = set; then :
33111  withval=$with_jobs;
33112fi
33113
33114  if test "x$with_jobs" = x; then
33115    # Number of jobs was not specified, calculate.
33116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33117$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33118    # Approximate memory in GB, rounding up a bit.
33119    memory_gb=`expr $MEMORY_SIZE / 1100`
33120    # Pick the lowest of memory in gb and number of cores.
33121    if test "$memory_gb" -lt "$NUM_CORES"; then
33122      JOBS="$memory_gb"
33123    else
33124      JOBS="$NUM_CORES"
33125      # On bigger machines, leave some room for other processes to run
33126      if test "$JOBS" -gt "4"; then
33127        JOBS=`expr $JOBS '*' 90 / 100`
33128      fi
33129    fi
33130    # Cap number of jobs to 16
33131    if test "$JOBS" -gt "16"; then
33132      JOBS=16
33133    fi
33134    if test "$JOBS" -eq "0"; then
33135      JOBS=1
33136    fi
33137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33138$as_echo "$JOBS" >&6; }
33139  else
33140    JOBS=$with_jobs
33141  fi
33142
33143
33144
33145# Setup smart javac (after cores and memory have been setup)
33146
33147
33148# Check whether --with-sjavac-server-java was given.
33149if test "${with_sjavac_server_java+set}" = set; then :
33150  withval=$with_sjavac_server_java;
33151fi
33152
33153
33154if test "x$with_sjavac_server_java" != x; then
33155    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33156    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33157    if test "x$FOUND_VERSION" = x; then
33158        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33159    fi
33160else
33161    SJAVAC_SERVER_JAVA=""
33162    # Hotspot specific options.
33163
33164    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33165    $ECHO "Command: $JAVA -verbosegc -version" >&5
33166    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33167    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33168    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33169    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33170        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33171	JVM_ARG_OK=true
33172    else
33173	$ECHO "Arg failed:" >&5
33174	$ECHO "$OUTPUT" >&5
33175	JVM_ARG_OK=false
33176    fi
33177
33178    # JRockit specific options.
33179
33180    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33181    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33182    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33183    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33184    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33185    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33186        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33187	JVM_ARG_OK=true
33188    else
33189	$ECHO "Arg failed:" >&5
33190	$ECHO "$OUTPUT" >&5
33191	JVM_ARG_OK=false
33192    fi
33193
33194    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33195fi
33196
33197
33198if test "$MEMORY_SIZE" -gt "2500"; then
33199
33200    $ECHO "Check if jvm arg is ok: -d64" >&5
33201    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33202    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33203    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33204    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33205    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33206        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33207	JVM_ARG_OK=true
33208    else
33209	$ECHO "Arg failed:" >&5
33210	$ECHO "$OUTPUT" >&5
33211	JVM_ARG_OK=false
33212    fi
33213
33214    if test "$JVM_ARG_OK" = true; then
33215        JVM_64BIT=true
33216	JVM_ARG_OK=false
33217    fi
33218    fi
33219
33220if test "$JVM_64BIT" = true; then
33221    if test "$MEMORY_SIZE" -gt "17000"; then
33222
33223    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33224    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33225    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33226    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33227    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33228    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33229        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33230	JVM_ARG_OK=true
33231    else
33232	$ECHO "Arg failed:" >&5
33233	$ECHO "$OUTPUT" >&5
33234	JVM_ARG_OK=false
33235    fi
33236
33237    fi
33238    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33239
33240    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33241    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33242    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33243    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33244    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33245    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33246        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33247	JVM_ARG_OK=true
33248    else
33249	$ECHO "Arg failed:" >&5
33250	$ECHO "$OUTPUT" >&5
33251	JVM_ARG_OK=false
33252    fi
33253
33254    fi
33255    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33256
33257    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33258    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33259    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33260    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33261    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33262    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33263        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33264	JVM_ARG_OK=true
33265    else
33266	$ECHO "Arg failed:" >&5
33267	$ECHO "$OUTPUT" >&5
33268	JVM_ARG_OK=false
33269    fi
33270
33271    fi
33272    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33273
33274    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33275    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33276    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33277    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33278    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33279    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33280        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33281	JVM_ARG_OK=true
33282    else
33283	$ECHO "Arg failed:" >&5
33284	$ECHO "$OUTPUT" >&5
33285	JVM_ARG_OK=false
33286    fi
33287
33288    fi
33289fi
33290if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33291
33292    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33293    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33294    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33295    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33296    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33297    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33298        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33299	JVM_ARG_OK=true
33300    else
33301	$ECHO "Arg failed:" >&5
33302	$ECHO "$OUTPUT" >&5
33303	JVM_ARG_OK=false
33304    fi
33305
33306fi
33307if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33308
33309    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33310    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33311    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33312    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33313    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33314    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33315        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33316	JVM_ARG_OK=true
33317    else
33318	$ECHO "Arg failed:" >&5
33319	$ECHO "$OUTPUT" >&5
33320	JVM_ARG_OK=false
33321    fi
33322
33323fi
33324if test "$JVM_ARG_OK" = false; then
33325
33326    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33327    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33328    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33329    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33330    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33331    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33332        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33333	JVM_ARG_OK=true
33334    else
33335	$ECHO "Arg failed:" >&5
33336	$ECHO "$OUTPUT" >&5
33337	JVM_ARG_OK=false
33338    fi
33339
33340fi
33341
33342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33343$as_echo_n "checking whether to use sjavac... " >&6; }
33344# Check whether --enable-sjavac was given.
33345if test "${enable_sjavac+set}" = set; then :
33346  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33347else
33348  ENABLE_SJAVAC='no'
33349fi
33350
33351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33352$as_echo "$ENABLE_SJAVAC" >&6; }
33353
33354
33355if test "x$ENABLE_SJAVAC" = xyes; then
33356    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33357else
33358    SJAVAC_SERVER_DIR=
33359fi
33360
33361
33362
33363
33364# Can the C/C++ compiler use precompiled headers?
33365
33366
33367###############################################################################
33368#
33369# Can the C/C++ compiler use precompiled headers?
33370#
33371# Check whether --enable-precompiled-headers was given.
33372if test "${enable_precompiled_headers+set}" = set; then :
33373  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33374else
33375  ENABLE_PRECOMPH=yes
33376fi
33377
33378
33379USE_PRECOMPILED_HEADER=1
33380if test "x$ENABLE_PRECOMPH" = xno; then
33381    USE_PRECOMPILED_HEADER=0
33382fi
33383
33384if test "x$ENABLE_PRECOMPH" = xyes; then
33385    # Check that the compiler actually supports precomp headers.
33386    if test "x$GCC" = xyes; then
33387         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33388$as_echo_n "checking that precompiled headers work... " >&6; }
33389         echo "int alfa();" > conftest.h
33390         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33391         if test ! -f conftest.hpp.gch; then
33392             USE_PRECOMPILED_HEADER=0
33393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33394$as_echo "no" >&6; }
33395         else
33396             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33397$as_echo "yes" >&6; }
33398         fi
33399         rm -f conftest.h conftest.hpp.gch
33400    fi
33401fi
33402
33403
33404
33405
33406# Setup use of ccache, if available
33407
33408    # Check whether --enable-ccache was given.
33409if test "${enable_ccache+set}" = set; then :
33410  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33411else
33412  ENABLE_CCACHE=yes
33413fi
33414
33415    if test "x$ENABLE_CCACHE" = xyes; then
33416        OLD_PATH="$PATH"
33417        if test "x$TOOLS_DIR" != x; then
33418          PATH=$TOOLS_DIR:$PATH
33419        fi
33420        # Extract the first word of "ccache", so it can be a program name with args.
33421set dummy ccache; ac_word=$2
33422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33423$as_echo_n "checking for $ac_word... " >&6; }
33424if ${ac_cv_path_CCACHE+:} false; then :
33425  $as_echo_n "(cached) " >&6
33426else
33427  case $CCACHE in
33428  [\\/]* | ?:[\\/]*)
33429  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33430  ;;
33431  *)
33432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33433for as_dir in $PATH
33434do
33435  IFS=$as_save_IFS
33436  test -z "$as_dir" && as_dir=.
33437    for ac_exec_ext in '' $ac_executable_extensions; do
33438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33439    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33441    break 2
33442  fi
33443done
33444  done
33445IFS=$as_save_IFS
33446
33447  ;;
33448esac
33449fi
33450CCACHE=$ac_cv_path_CCACHE
33451if test -n "$CCACHE"; then
33452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33453$as_echo "$CCACHE" >&6; }
33454else
33455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33456$as_echo "no" >&6; }
33457fi
33458
33459
33460        PATH="$OLD_PATH"
33461    else
33462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33463$as_echo_n "checking for ccache... " >&6; }
33464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33465$as_echo "explicitly disabled" >&6; }
33466        CCACHE=
33467    fi
33468
33469
33470
33471# Check whether --with-ccache-dir was given.
33472if test "${with_ccache_dir+set}" = set; then :
33473  withval=$with_ccache_dir;
33474fi
33475
33476
33477    if test "x$with_ccache_dir" != x; then
33478        # When using a non home ccache directory, assume the use is to share ccache files
33479        # with other users. Thus change the umask.
33480        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33481    fi
33482    CCACHE_FOUND=""
33483    if test "x$CCACHE" != x; then
33484
33485    if test "x$CCACHE" != x; then
33486        CCACHE_FOUND="true"
33487        # Only use ccache if it is 3.1.4 or later, which supports
33488        # precompiled headers.
33489        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33490$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33491        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33492        if test "x$HAS_GOOD_CCACHE" = x; then
33493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33494$as_echo "no, disabling ccache" >&6; }
33495            CCACHE=
33496        else
33497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33498$as_echo "yes" >&6; }
33499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33500$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33501            PUSHED_FLAGS="$CXXFLAGS"
33502            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33503            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33504/* end confdefs.h.  */
33505
33506int
33507main ()
33508{
33509
33510  ;
33511  return 0;
33512}
33513_ACEOF
33514if ac_fn_cxx_try_compile "$LINENO"; then :
33515  CC_KNOWS_CCACHE_TRICK=yes
33516else
33517  CC_KNOWS_CCACHE_TRICK=no
33518fi
33519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33520            CXXFLAGS="$PUSHED_FLAGS"
33521            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33522                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33523$as_echo "yes" >&6; }
33524            else
33525                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33526$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33527                CCACHE=
33528            fi
33529        fi
33530    fi
33531
33532    if test "x$CCACHE" != x; then
33533        CCACHE_SLOPPINESS=time_macros
33534        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33535        CCACHE_FLAGS=-fpch-preprocess
33536
33537        if test "x$SET_CCACHE_DIR" != x; then
33538            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33539	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33540        fi
33541    fi
33542
33543    fi
33544
33545
33546###############################################################################
33547#
33548# And now the finish...
33549#
33550###############################################################################
33551
33552# Check for some common pitfalls
33553
33554  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33555    file_to_test="$SRC_ROOT/LICENSE"
33556    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33557      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
33558    fi
33559  fi
33560
33561
33562
33563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33564$as_echo_n "checking if build directory is on local disk... " >&6; }
33565
33566	# df -l lists only local disks; if the given directory is not found then
33567	# a non-zero exit code is given
33568  if test "x$DF" = x; then
33569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33570      # msys does not have df; use Windows "net use" instead.
33571      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33572      if test "x$IS_NETWORK_DISK" = x; then
33573        OUTPUT_DIR_IS_LOCAL="yes"
33574      else
33575        OUTPUT_DIR_IS_LOCAL="no"
33576      fi
33577    else
33578      # No df here, say it's local
33579      OUTPUT_DIR_IS_LOCAL="yes"
33580    fi
33581  else
33582    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33583      OUTPUT_DIR_IS_LOCAL="yes"
33584    else
33585      OUTPUT_DIR_IS_LOCAL="no"
33586    fi
33587  fi
33588
33589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33590$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33591
33592
33593
33594# Check if the user has any old-style ALT_ variables set.
33595FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33596
33597# Before generating output files, test if they exist. If they do, this is a reconfigure.
33598# Since we can't properly handle the dependencies for this, warn the user about the situation
33599if test -e $OUTPUT_ROOT/spec.gmk; then
33600  IS_RECONFIGURE=yes
33601else
33602  IS_RECONFIGURE=no
33603fi
33604
33605if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33606  HIDE_PERFORMANCE_HINTS=yes
33607else
33608  HIDE_PERFORMANCE_HINTS=no
33609  # Hide it the next time around...
33610  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33611fi
33612
33613
33614
33615# At the end, call the custom hook. (Dummy macro if no custom sources available)
33616
33617
33618# We're messing a bit with internal autoconf variables to put the config.status
33619# in the output directory instead of the current directory.
33620CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33621# Create the actual output files. Now the main work of configure is done.
33622cat >confcache <<\_ACEOF
33623# This file is a shell script that caches the results of configure
33624# tests run on this system so they can be shared between configure
33625# scripts and configure runs, see configure's option --config-cache.
33626# It is not useful on other systems.  If it contains results you don't
33627# want to keep, you may remove or edit it.
33628#
33629# config.status only pays attention to the cache file if you give it
33630# the --recheck option to rerun configure.
33631#
33632# `ac_cv_env_foo' variables (set or unset) will be overridden when
33633# loading this file, other *unset* `ac_cv_foo' will be assigned the
33634# following values.
33635
33636_ACEOF
33637
33638# The following way of writing the cache mishandles newlines in values,
33639# but we know of no workaround that is simple, portable, and efficient.
33640# So, we kill variables containing newlines.
33641# Ultrix sh set writes to stderr and can't be redirected directly,
33642# and sets the high bit in the cache file unless we assign to the vars.
33643(
33644  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33645    eval ac_val=\$$ac_var
33646    case $ac_val in #(
33647    *${as_nl}*)
33648      case $ac_var in #(
33649      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33650$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33651      esac
33652      case $ac_var in #(
33653      _ | IFS | as_nl) ;; #(
33654      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33655      *) { eval $ac_var=; unset $ac_var;} ;;
33656      esac ;;
33657    esac
33658  done
33659
33660  (set) 2>&1 |
33661    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33662    *${as_nl}ac_space=\ *)
33663      # `set' does not quote correctly, so add quotes: double-quote
33664      # substitution turns \\\\ into \\, and sed turns \\ into \.
33665      sed -n \
33666	"s/'/'\\\\''/g;
33667	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33668      ;; #(
33669    *)
33670      # `set' quotes correctly as required by POSIX, so do not add quotes.
33671      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33672      ;;
33673    esac |
33674    sort
33675) |
33676  sed '
33677     /^ac_cv_env_/b end
33678     t clear
33679     :clear
33680     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33681     t end
33682     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33683     :end' >>confcache
33684if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33685  if test -w "$cache_file"; then
33686    if test "x$cache_file" != "x/dev/null"; then
33687      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33688$as_echo "$as_me: updating cache $cache_file" >&6;}
33689      if test ! -f "$cache_file" || test -h "$cache_file"; then
33690	cat confcache >"$cache_file"
33691      else
33692        case $cache_file in #(
33693        */* | ?:*)
33694	  mv -f confcache "$cache_file"$$ &&
33695	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33696        *)
33697	  mv -f confcache "$cache_file" ;;
33698	esac
33699      fi
33700    fi
33701  else
33702    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33703$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33704  fi
33705fi
33706rm -f confcache
33707
33708test "x$prefix" = xNONE && prefix=$ac_default_prefix
33709# Let make expand exec_prefix.
33710test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33711
33712DEFS=-DHAVE_CONFIG_H
33713
33714ac_libobjs=
33715ac_ltlibobjs=
33716U=
33717for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33718  # 1. Remove the extension, and $U if already installed.
33719  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33720  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33721  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33722  #    will be set to the directory where LIBOBJS objects are built.
33723  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33724  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33725done
33726LIBOBJS=$ac_libobjs
33727
33728LTLIBOBJS=$ac_ltlibobjs
33729
33730
33731
33732: "${CONFIG_STATUS=./config.status}"
33733ac_write_fail=0
33734ac_clean_files_save=$ac_clean_files
33735ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33736{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33737$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33738as_write_fail=0
33739cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33740#! $SHELL
33741# Generated by $as_me.
33742# Run this file to recreate the current configuration.
33743# Compiler output produced by configure, useful for debugging
33744# configure, is in config.log if it exists.
33745
33746debug=false
33747ac_cs_recheck=false
33748ac_cs_silent=false
33749
33750SHELL=\${CONFIG_SHELL-$SHELL}
33751export SHELL
33752_ASEOF
33753cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33754## -------------------- ##
33755## M4sh Initialization. ##
33756## -------------------- ##
33757
33758# Be more Bourne compatible
33759DUALCASE=1; export DUALCASE # for MKS sh
33760if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33761  emulate sh
33762  NULLCMD=:
33763  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33764  # is contrary to our usage.  Disable this feature.
33765  alias -g '${1+"$@"}'='"$@"'
33766  setopt NO_GLOB_SUBST
33767else
33768  case `(set -o) 2>/dev/null` in #(
33769  *posix*) :
33770    set -o posix ;; #(
33771  *) :
33772     ;;
33773esac
33774fi
33775
33776
33777as_nl='
33778'
33779export as_nl
33780# Printing a long string crashes Solaris 7 /usr/bin/printf.
33781as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33782as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33783as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33784# Prefer a ksh shell builtin over an external printf program on Solaris,
33785# but without wasting forks for bash or zsh.
33786if test -z "$BASH_VERSION$ZSH_VERSION" \
33787    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33788  as_echo='print -r --'
33789  as_echo_n='print -rn --'
33790elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33791  as_echo='printf %s\n'
33792  as_echo_n='printf %s'
33793else
33794  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33795    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33796    as_echo_n='/usr/ucb/echo -n'
33797  else
33798    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33799    as_echo_n_body='eval
33800      arg=$1;
33801      case $arg in #(
33802      *"$as_nl"*)
33803	expr "X$arg" : "X\\(.*\\)$as_nl";
33804	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33805      esac;
33806      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33807    '
33808    export as_echo_n_body
33809    as_echo_n='sh -c $as_echo_n_body as_echo'
33810  fi
33811  export as_echo_body
33812  as_echo='sh -c $as_echo_body as_echo'
33813fi
33814
33815# The user is always right.
33816if test "${PATH_SEPARATOR+set}" != set; then
33817  PATH_SEPARATOR=:
33818  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33819    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33820      PATH_SEPARATOR=';'
33821  }
33822fi
33823
33824
33825# IFS
33826# We need space, tab and new line, in precisely that order.  Quoting is
33827# there to prevent editors from complaining about space-tab.
33828# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33829# splitting by setting IFS to empty value.)
33830IFS=" ""	$as_nl"
33831
33832# Find who we are.  Look in the path if we contain no directory separator.
33833as_myself=
33834case $0 in #((
33835  *[\\/]* ) as_myself=$0 ;;
33836  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33837for as_dir in $PATH
33838do
33839  IFS=$as_save_IFS
33840  test -z "$as_dir" && as_dir=.
33841    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33842  done
33843IFS=$as_save_IFS
33844
33845     ;;
33846esac
33847# We did not find ourselves, most probably we were run as `sh COMMAND'
33848# in which case we are not to be found in the path.
33849if test "x$as_myself" = x; then
33850  as_myself=$0
33851fi
33852if test ! -f "$as_myself"; then
33853  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33854  exit 1
33855fi
33856
33857# Unset variables that we do not need and which cause bugs (e.g. in
33858# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33859# suppresses any "Segmentation fault" message there.  '((' could
33860# trigger a bug in pdksh 5.2.14.
33861for as_var in BASH_ENV ENV MAIL MAILPATH
33862do eval test x\${$as_var+set} = xset \
33863  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33864done
33865PS1='$ '
33866PS2='> '
33867PS4='+ '
33868
33869# NLS nuisances.
33870LC_ALL=C
33871export LC_ALL
33872LANGUAGE=C
33873export LANGUAGE
33874
33875# CDPATH.
33876(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33877
33878
33879# as_fn_error STATUS ERROR [LINENO LOG_FD]
33880# ----------------------------------------
33881# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33882# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33883# script with STATUS, using 1 if that was 0.
33884as_fn_error ()
33885{
33886  as_status=$1; test $as_status -eq 0 && as_status=1
33887  if test "$4"; then
33888    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33889    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33890  fi
33891  $as_echo "$as_me: error: $2" >&2
33892  as_fn_exit $as_status
33893} # as_fn_error
33894
33895
33896# as_fn_set_status STATUS
33897# -----------------------
33898# Set $? to STATUS, without forking.
33899as_fn_set_status ()
33900{
33901  return $1
33902} # as_fn_set_status
33903
33904# as_fn_exit STATUS
33905# -----------------
33906# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33907as_fn_exit ()
33908{
33909  set +e
33910  as_fn_set_status $1
33911  exit $1
33912} # as_fn_exit
33913
33914# as_fn_unset VAR
33915# ---------------
33916# Portably unset VAR.
33917as_fn_unset ()
33918{
33919  { eval $1=; unset $1;}
33920}
33921as_unset=as_fn_unset
33922# as_fn_append VAR VALUE
33923# ----------------------
33924# Append the text in VALUE to the end of the definition contained in VAR. Take
33925# advantage of any shell optimizations that allow amortized linear growth over
33926# repeated appends, instead of the typical quadratic growth present in naive
33927# implementations.
33928if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33929  eval 'as_fn_append ()
33930  {
33931    eval $1+=\$2
33932  }'
33933else
33934  as_fn_append ()
33935  {
33936    eval $1=\$$1\$2
33937  }
33938fi # as_fn_append
33939
33940# as_fn_arith ARG...
33941# ------------------
33942# Perform arithmetic evaluation on the ARGs, and store the result in the
33943# global $as_val. Take advantage of shells that can avoid forks. The arguments
33944# must be portable across $(()) and expr.
33945if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33946  eval 'as_fn_arith ()
33947  {
33948    as_val=$(( $* ))
33949  }'
33950else
33951  as_fn_arith ()
33952  {
33953    as_val=`expr "$@" || test $? -eq 1`
33954  }
33955fi # as_fn_arith
33956
33957
33958if expr a : '\(a\)' >/dev/null 2>&1 &&
33959   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33960  as_expr=expr
33961else
33962  as_expr=false
33963fi
33964
33965if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33966  as_basename=basename
33967else
33968  as_basename=false
33969fi
33970
33971if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33972  as_dirname=dirname
33973else
33974  as_dirname=false
33975fi
33976
33977as_me=`$as_basename -- "$0" ||
33978$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33979	 X"$0" : 'X\(//\)$' \| \
33980	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33981$as_echo X/"$0" |
33982    sed '/^.*\/\([^/][^/]*\)\/*$/{
33983	    s//\1/
33984	    q
33985	  }
33986	  /^X\/\(\/\/\)$/{
33987	    s//\1/
33988	    q
33989	  }
33990	  /^X\/\(\/\).*/{
33991	    s//\1/
33992	    q
33993	  }
33994	  s/.*/./; q'`
33995
33996# Avoid depending upon Character Ranges.
33997as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33998as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33999as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34000as_cr_digits='0123456789'
34001as_cr_alnum=$as_cr_Letters$as_cr_digits
34002
34003ECHO_C= ECHO_N= ECHO_T=
34004case `echo -n x` in #(((((
34005-n*)
34006  case `echo 'xy\c'` in
34007  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34008  xy)  ECHO_C='\c';;
34009  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34010       ECHO_T='	';;
34011  esac;;
34012*)
34013  ECHO_N='-n';;
34014esac
34015
34016rm -f conf$$ conf$$.exe conf$$.file
34017if test -d conf$$.dir; then
34018  rm -f conf$$.dir/conf$$.file
34019else
34020  rm -f conf$$.dir
34021  mkdir conf$$.dir 2>/dev/null
34022fi
34023if (echo >conf$$.file) 2>/dev/null; then
34024  if ln -s conf$$.file conf$$ 2>/dev/null; then
34025    as_ln_s='ln -s'
34026    # ... but there are two gotchas:
34027    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34028    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34029    # In both cases, we have to default to `cp -pR'.
34030    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34031      as_ln_s='cp -pR'
34032  elif ln conf$$.file conf$$ 2>/dev/null; then
34033    as_ln_s=ln
34034  else
34035    as_ln_s='cp -pR'
34036  fi
34037else
34038  as_ln_s='cp -pR'
34039fi
34040rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34041rmdir conf$$.dir 2>/dev/null
34042
34043
34044# as_fn_mkdir_p
34045# -------------
34046# Create "$as_dir" as a directory, including parents if necessary.
34047as_fn_mkdir_p ()
34048{
34049
34050  case $as_dir in #(
34051  -*) as_dir=./$as_dir;;
34052  esac
34053  test -d "$as_dir" || eval $as_mkdir_p || {
34054    as_dirs=
34055    while :; do
34056      case $as_dir in #(
34057      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34058      *) as_qdir=$as_dir;;
34059      esac
34060      as_dirs="'$as_qdir' $as_dirs"
34061      as_dir=`$as_dirname -- "$as_dir" ||
34062$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34063	 X"$as_dir" : 'X\(//\)[^/]' \| \
34064	 X"$as_dir" : 'X\(//\)$' \| \
34065	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34066$as_echo X"$as_dir" |
34067    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34068	    s//\1/
34069	    q
34070	  }
34071	  /^X\(\/\/\)[^/].*/{
34072	    s//\1/
34073	    q
34074	  }
34075	  /^X\(\/\/\)$/{
34076	    s//\1/
34077	    q
34078	  }
34079	  /^X\(\/\).*/{
34080	    s//\1/
34081	    q
34082	  }
34083	  s/.*/./; q'`
34084      test -d "$as_dir" && break
34085    done
34086    test -z "$as_dirs" || eval "mkdir $as_dirs"
34087  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34088
34089
34090} # as_fn_mkdir_p
34091if mkdir -p . 2>/dev/null; then
34092  as_mkdir_p='mkdir -p "$as_dir"'
34093else
34094  test -d ./-p && rmdir ./-p
34095  as_mkdir_p=false
34096fi
34097
34098
34099# as_fn_executable_p FILE
34100# -----------------------
34101# Test if FILE is an executable regular file.
34102as_fn_executable_p ()
34103{
34104  test -f "$1" && test -x "$1"
34105} # as_fn_executable_p
34106as_test_x='test -x'
34107as_executable_p=as_fn_executable_p
34108
34109# Sed expression to map a string onto a valid CPP name.
34110as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34111
34112# Sed expression to map a string onto a valid variable name.
34113as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34114
34115
34116exec 6>&1
34117## ----------------------------------- ##
34118## Main body of $CONFIG_STATUS script. ##
34119## ----------------------------------- ##
34120_ASEOF
34121test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34122
34123cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34124# Save the log message, to keep $0 and so on meaningful, and to
34125# report actual input values of CONFIG_FILES etc. instead of their
34126# values after options handling.
34127ac_log="
34128This file was extended by OpenJDK $as_me jdk8, which was
34129generated by GNU Autoconf 2.69.  Invocation command line was
34130
34131  CONFIG_FILES    = $CONFIG_FILES
34132  CONFIG_HEADERS  = $CONFIG_HEADERS
34133  CONFIG_LINKS    = $CONFIG_LINKS
34134  CONFIG_COMMANDS = $CONFIG_COMMANDS
34135  $ $0 $@
34136
34137on `(hostname || uname -n) 2>/dev/null | sed 1q`
34138"
34139
34140_ACEOF
34141
34142case $ac_config_files in *"
34143"*) set x $ac_config_files; shift; ac_config_files=$*;;
34144esac
34145
34146case $ac_config_headers in *"
34147"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34148esac
34149
34150
34151cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34152# Files that config.status was made for.
34153config_files="$ac_config_files"
34154config_headers="$ac_config_headers"
34155
34156_ACEOF
34157
34158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34159ac_cs_usage="\
34160\`$as_me' instantiates files and other configuration actions
34161from templates according to the current configuration.  Unless the files
34162and actions are specified as TAGs, all are instantiated by default.
34163
34164Usage: $0 [OPTION]... [TAG]...
34165
34166  -h, --help       print this help, then exit
34167  -V, --version    print version number and configuration settings, then exit
34168      --config     print configuration, then exit
34169  -q, --quiet, --silent
34170                   do not print progress messages
34171  -d, --debug      don't remove temporary files
34172      --recheck    update $as_me by reconfiguring in the same conditions
34173      --file=FILE[:TEMPLATE]
34174                   instantiate the configuration file FILE
34175      --header=FILE[:TEMPLATE]
34176                   instantiate the configuration header FILE
34177
34178Configuration files:
34179$config_files
34180
34181Configuration headers:
34182$config_headers
34183
34184Report bugs to <build-dev@openjdk.java.net>.
34185OpenJDK home page: <http://openjdk.java.net>."
34186
34187_ACEOF
34188cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34189ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34190ac_cs_version="\\
34191OpenJDK config.status jdk8
34192configured by $0, generated by GNU Autoconf 2.69,
34193  with options \\"\$ac_cs_config\\"
34194
34195Copyright (C) 2012 Free Software Foundation, Inc.
34196This config.status script is free software; the Free Software Foundation
34197gives unlimited permission to copy, distribute and modify it."
34198
34199ac_pwd='$ac_pwd'
34200srcdir='$srcdir'
34201AWK='$AWK'
34202test -n "\$AWK" || AWK=awk
34203_ACEOF
34204
34205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34206# The default lists apply if the user does not specify any file.
34207ac_need_defaults=:
34208while test $# != 0
34209do
34210  case $1 in
34211  --*=?*)
34212    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34213    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34214    ac_shift=:
34215    ;;
34216  --*=)
34217    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34218    ac_optarg=
34219    ac_shift=:
34220    ;;
34221  *)
34222    ac_option=$1
34223    ac_optarg=$2
34224    ac_shift=shift
34225    ;;
34226  esac
34227
34228  case $ac_option in
34229  # Handling of the options.
34230  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34231    ac_cs_recheck=: ;;
34232  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34233    $as_echo "$ac_cs_version"; exit ;;
34234  --config | --confi | --conf | --con | --co | --c )
34235    $as_echo "$ac_cs_config"; exit ;;
34236  --debug | --debu | --deb | --de | --d | -d )
34237    debug=: ;;
34238  --file | --fil | --fi | --f )
34239    $ac_shift
34240    case $ac_optarg in
34241    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34242    '') as_fn_error $? "missing file argument" ;;
34243    esac
34244    as_fn_append CONFIG_FILES " '$ac_optarg'"
34245    ac_need_defaults=false;;
34246  --header | --heade | --head | --hea )
34247    $ac_shift
34248    case $ac_optarg in
34249    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34250    esac
34251    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34252    ac_need_defaults=false;;
34253  --he | --h)
34254    # Conflict between --help and --header
34255    as_fn_error $? "ambiguous option: \`$1'
34256Try \`$0 --help' for more information.";;
34257  --help | --hel | -h )
34258    $as_echo "$ac_cs_usage"; exit ;;
34259  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34260  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34261    ac_cs_silent=: ;;
34262
34263  # This is an error.
34264  -*) as_fn_error $? "unrecognized option: \`$1'
34265Try \`$0 --help' for more information." ;;
34266
34267  *) as_fn_append ac_config_targets " $1"
34268     ac_need_defaults=false ;;
34269
34270  esac
34271  shift
34272done
34273
34274ac_configure_extra_args=
34275
34276if $ac_cs_silent; then
34277  exec 6>/dev/null
34278  ac_configure_extra_args="$ac_configure_extra_args --silent"
34279fi
34280
34281_ACEOF
34282cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34283if \$ac_cs_recheck; then
34284  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34285  shift
34286  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34287  CONFIG_SHELL='$SHELL'
34288  export CONFIG_SHELL
34289  exec "\$@"
34290fi
34291
34292_ACEOF
34293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34294exec 5>>config.log
34295{
34296  echo
34297  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34298## Running $as_me. ##
34299_ASBOX
34300  $as_echo "$ac_log"
34301} >&5
34302
34303_ACEOF
34304cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34305_ACEOF
34306
34307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34308
34309# Handling of arguments.
34310for ac_config_target in $ac_config_targets
34311do
34312  case $ac_config_target in
34313    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34314    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34315    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34316    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34317    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34318    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34319    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34320
34321  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34322  esac
34323done
34324
34325
34326# If the user did not use the arguments to specify the items to instantiate,
34327# then the envvar interface is used.  Set only those that are not.
34328# We use the long form for the default assignment because of an extremely
34329# bizarre bug on SunOS 4.1.3.
34330if $ac_need_defaults; then
34331  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34332  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34333fi
34334
34335# Have a temporary directory for convenience.  Make it in the build tree
34336# simply because there is no reason against having it here, and in addition,
34337# creating and moving files from /tmp can sometimes cause problems.
34338# Hook for its removal unless debugging.
34339# Note that there is a small window in which the directory will not be cleaned:
34340# after its creation but before its name has been assigned to `$tmp'.
34341$debug ||
34342{
34343  tmp= ac_tmp=
34344  trap 'exit_status=$?
34345  : "${ac_tmp:=$tmp}"
34346  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34347' 0
34348  trap 'as_fn_exit 1' 1 2 13 15
34349}
34350# Create a (secure) tmp directory for tmp files.
34351
34352{
34353  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34354  test -d "$tmp"
34355}  ||
34356{
34357  tmp=./conf$$-$RANDOM
34358  (umask 077 && mkdir "$tmp")
34359} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34360ac_tmp=$tmp
34361
34362# Set up the scripts for CONFIG_FILES section.
34363# No need to generate them if there are no CONFIG_FILES.
34364# This happens for instance with `./config.status config.h'.
34365if test -n "$CONFIG_FILES"; then
34366
34367
34368ac_cr=`echo X | tr X '\015'`
34369# On cygwin, bash can eat \r inside `` if the user requested igncr.
34370# But we know of no other shell where ac_cr would be empty at this
34371# point, so we can use a bashism as a fallback.
34372if test "x$ac_cr" = x; then
34373  eval ac_cr=\$\'\\r\'
34374fi
34375ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34376if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34377  ac_cs_awk_cr='\\r'
34378else
34379  ac_cs_awk_cr=$ac_cr
34380fi
34381
34382echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34383_ACEOF
34384
34385
34386{
34387  echo "cat >conf$$subs.awk <<_ACEOF" &&
34388  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34389  echo "_ACEOF"
34390} >conf$$subs.sh ||
34391  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34392ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34393ac_delim='%!_!# '
34394for ac_last_try in false false false false false :; do
34395  . ./conf$$subs.sh ||
34396    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34397
34398  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34399  if test $ac_delim_n = $ac_delim_num; then
34400    break
34401  elif $ac_last_try; then
34402    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34403  else
34404    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34405  fi
34406done
34407rm -f conf$$subs.sh
34408
34409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34410cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34411_ACEOF
34412sed -n '
34413h
34414s/^/S["/; s/!.*/"]=/
34415p
34416g
34417s/^[^!]*!//
34418:repl
34419t repl
34420s/'"$ac_delim"'$//
34421t delim
34422:nl
34423h
34424s/\(.\{148\}\)..*/\1/
34425t more1
34426s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34427p
34428n
34429b repl
34430:more1
34431s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34432p
34433g
34434s/.\{148\}//
34435t nl
34436:delim
34437h
34438s/\(.\{148\}\)..*/\1/
34439t more2
34440s/["\\]/\\&/g; s/^/"/; s/$/"/
34441p
34442b
34443:more2
34444s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34445p
34446g
34447s/.\{148\}//
34448t delim
34449' <conf$$subs.awk | sed '
34450/^[^""]/{
34451  N
34452  s/\n//
34453}
34454' >>$CONFIG_STATUS || ac_write_fail=1
34455rm -f conf$$subs.awk
34456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34457_ACAWK
34458cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34459  for (key in S) S_is_set[key] = 1
34460  FS = ""
34461
34462}
34463{
34464  line = $ 0
34465  nfields = split(line, field, "@")
34466  substed = 0
34467  len = length(field[1])
34468  for (i = 2; i < nfields; i++) {
34469    key = field[i]
34470    keylen = length(key)
34471    if (S_is_set[key]) {
34472      value = S[key]
34473      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34474      len += length(value) + length(field[++i])
34475      substed = 1
34476    } else
34477      len += 1 + keylen
34478  }
34479
34480  print line
34481}
34482
34483_ACAWK
34484_ACEOF
34485cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34486if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34487  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34488else
34489  cat
34490fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34491  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34492_ACEOF
34493
34494# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34495# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34496# trailing colons and then remove the whole line if VPATH becomes empty
34497# (actually we leave an empty line to preserve line numbers).
34498if test "x$srcdir" = x.; then
34499  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34500h
34501s///
34502s/^/:/
34503s/[	 ]*$/:/
34504s/:\$(srcdir):/:/g
34505s/:\${srcdir}:/:/g
34506s/:@srcdir@:/:/g
34507s/^:*//
34508s/:*$//
34509x
34510s/\(=[	 ]*\).*/\1/
34511G
34512s/\n//
34513s/^[^=]*=[	 ]*$//
34514}'
34515fi
34516
34517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34518fi # test -n "$CONFIG_FILES"
34519
34520# Set up the scripts for CONFIG_HEADERS section.
34521# No need to generate them if there are no CONFIG_HEADERS.
34522# This happens for instance with `./config.status Makefile'.
34523if test -n "$CONFIG_HEADERS"; then
34524cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34525BEGIN {
34526_ACEOF
34527
34528# Transform confdefs.h into an awk script `defines.awk', embedded as
34529# here-document in config.status, that substitutes the proper values into
34530# config.h.in to produce config.h.
34531
34532# Create a delimiter string that does not exist in confdefs.h, to ease
34533# handling of long lines.
34534ac_delim='%!_!# '
34535for ac_last_try in false false :; do
34536  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34537  if test -z "$ac_tt"; then
34538    break
34539  elif $ac_last_try; then
34540    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34541  else
34542    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34543  fi
34544done
34545
34546# For the awk script, D is an array of macro values keyed by name,
34547# likewise P contains macro parameters if any.  Preserve backslash
34548# newline sequences.
34549
34550ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34551sed -n '
34552s/.\{148\}/&'"$ac_delim"'/g
34553t rset
34554:rset
34555s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34556t def
34557d
34558:def
34559s/\\$//
34560t bsnl
34561s/["\\]/\\&/g
34562s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34563D["\1"]=" \3"/p
34564s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34565d
34566:bsnl
34567s/["\\]/\\&/g
34568s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34569D["\1"]=" \3\\\\\\n"\\/p
34570t cont
34571s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34572t cont
34573d
34574:cont
34575n
34576s/.\{148\}/&'"$ac_delim"'/g
34577t clear
34578:clear
34579s/\\$//
34580t bsnlc
34581s/["\\]/\\&/g; s/^/"/; s/$/"/p
34582d
34583:bsnlc
34584s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34585b cont
34586' <confdefs.h | sed '
34587s/'"$ac_delim"'/"\\\
34588"/g' >>$CONFIG_STATUS || ac_write_fail=1
34589
34590cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34591  for (key in D) D_is_set[key] = 1
34592  FS = ""
34593}
34594/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34595  line = \$ 0
34596  split(line, arg, " ")
34597  if (arg[1] == "#") {
34598    defundef = arg[2]
34599    mac1 = arg[3]
34600  } else {
34601    defundef = substr(arg[1], 2)
34602    mac1 = arg[2]
34603  }
34604  split(mac1, mac2, "(") #)
34605  macro = mac2[1]
34606  prefix = substr(line, 1, index(line, defundef) - 1)
34607  if (D_is_set[macro]) {
34608    # Preserve the white space surrounding the "#".
34609    print prefix "define", macro P[macro] D[macro]
34610    next
34611  } else {
34612    # Replace #undef with comments.  This is necessary, for example,
34613    # in the case of _POSIX_SOURCE, which is predefined and required
34614    # on some systems where configure will not decide to define it.
34615    if (defundef == "undef") {
34616      print "/*", prefix defundef, macro, "*/"
34617      next
34618    }
34619  }
34620}
34621{ print }
34622_ACAWK
34623_ACEOF
34624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34625  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34626fi # test -n "$CONFIG_HEADERS"
34627
34628
34629eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34630shift
34631for ac_tag
34632do
34633  case $ac_tag in
34634  :[FHLC]) ac_mode=$ac_tag; continue;;
34635  esac
34636  case $ac_mode$ac_tag in
34637  :[FHL]*:*);;
34638  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34639  :[FH]-) ac_tag=-:-;;
34640  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34641  esac
34642  ac_save_IFS=$IFS
34643  IFS=:
34644  set x $ac_tag
34645  IFS=$ac_save_IFS
34646  shift
34647  ac_file=$1
34648  shift
34649
34650  case $ac_mode in
34651  :L) ac_source=$1;;
34652  :[FH])
34653    ac_file_inputs=
34654    for ac_f
34655    do
34656      case $ac_f in
34657      -) ac_f="$ac_tmp/stdin";;
34658      *) # Look for the file first in the build tree, then in the source tree
34659	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34660	 # because $ac_f cannot contain `:'.
34661	 test -f "$ac_f" ||
34662	   case $ac_f in
34663	   [\\/$]*) false;;
34664	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34665	   esac ||
34666	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34667      esac
34668      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34669      as_fn_append ac_file_inputs " '$ac_f'"
34670    done
34671
34672    # Let's still pretend it is `configure' which instantiates (i.e., don't
34673    # use $as_me), people would be surprised to read:
34674    #    /* config.h.  Generated by config.status.  */
34675    configure_input='Generated from '`
34676	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34677	`' by configure.'
34678    if test x"$ac_file" != x-; then
34679      configure_input="$ac_file.  $configure_input"
34680      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34681$as_echo "$as_me: creating $ac_file" >&6;}
34682    fi
34683    # Neutralize special characters interpreted by sed in replacement strings.
34684    case $configure_input in #(
34685    *\&* | *\|* | *\\* )
34686       ac_sed_conf_input=`$as_echo "$configure_input" |
34687       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34688    *) ac_sed_conf_input=$configure_input;;
34689    esac
34690
34691    case $ac_tag in
34692    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34693      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34694    esac
34695    ;;
34696  esac
34697
34698  ac_dir=`$as_dirname -- "$ac_file" ||
34699$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34700	 X"$ac_file" : 'X\(//\)[^/]' \| \
34701	 X"$ac_file" : 'X\(//\)$' \| \
34702	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34703$as_echo X"$ac_file" |
34704    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34705	    s//\1/
34706	    q
34707	  }
34708	  /^X\(\/\/\)[^/].*/{
34709	    s//\1/
34710	    q
34711	  }
34712	  /^X\(\/\/\)$/{
34713	    s//\1/
34714	    q
34715	  }
34716	  /^X\(\/\).*/{
34717	    s//\1/
34718	    q
34719	  }
34720	  s/.*/./; q'`
34721  as_dir="$ac_dir"; as_fn_mkdir_p
34722  ac_builddir=.
34723
34724case "$ac_dir" in
34725.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34726*)
34727  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34728  # A ".." for each directory in $ac_dir_suffix.
34729  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34730  case $ac_top_builddir_sub in
34731  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34732  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34733  esac ;;
34734esac
34735ac_abs_top_builddir=$ac_pwd
34736ac_abs_builddir=$ac_pwd$ac_dir_suffix
34737# for backward compatibility:
34738ac_top_builddir=$ac_top_build_prefix
34739
34740case $srcdir in
34741  .)  # We are building in place.
34742    ac_srcdir=.
34743    ac_top_srcdir=$ac_top_builddir_sub
34744    ac_abs_top_srcdir=$ac_pwd ;;
34745  [\\/]* | ?:[\\/]* )  # Absolute name.
34746    ac_srcdir=$srcdir$ac_dir_suffix;
34747    ac_top_srcdir=$srcdir
34748    ac_abs_top_srcdir=$srcdir ;;
34749  *) # Relative name.
34750    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34751    ac_top_srcdir=$ac_top_build_prefix$srcdir
34752    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34753esac
34754ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34755
34756
34757  case $ac_mode in
34758  :F)
34759  #
34760  # CONFIG_FILE
34761  #
34762
34763_ACEOF
34764
34765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34766# If the template does not know about datarootdir, expand it.
34767# FIXME: This hack should be removed a few years after 2.60.
34768ac_datarootdir_hack=; ac_datarootdir_seen=
34769ac_sed_dataroot='
34770/datarootdir/ {
34771  p
34772  q
34773}
34774/@datadir@/p
34775/@docdir@/p
34776/@infodir@/p
34777/@localedir@/p
34778/@mandir@/p'
34779case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34780*datarootdir*) ac_datarootdir_seen=yes;;
34781*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34782  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34783$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34784_ACEOF
34785cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34786  ac_datarootdir_hack='
34787  s&@datadir@&$datadir&g
34788  s&@docdir@&$docdir&g
34789  s&@infodir@&$infodir&g
34790  s&@localedir@&$localedir&g
34791  s&@mandir@&$mandir&g
34792  s&\\\${datarootdir}&$datarootdir&g' ;;
34793esac
34794_ACEOF
34795
34796# Neutralize VPATH when `$srcdir' = `.'.
34797# Shell code in configure.ac might set extrasub.
34798# FIXME: do we really want to maintain this feature?
34799cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34800ac_sed_extra="$ac_vpsub
34801$extrasub
34802_ACEOF
34803cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34804:t
34805/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34806s|@configure_input@|$ac_sed_conf_input|;t t
34807s&@top_builddir@&$ac_top_builddir_sub&;t t
34808s&@top_build_prefix@&$ac_top_build_prefix&;t t
34809s&@srcdir@&$ac_srcdir&;t t
34810s&@abs_srcdir@&$ac_abs_srcdir&;t t
34811s&@top_srcdir@&$ac_top_srcdir&;t t
34812s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34813s&@builddir@&$ac_builddir&;t t
34814s&@abs_builddir@&$ac_abs_builddir&;t t
34815s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34816$ac_datarootdir_hack
34817"
34818eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34819  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34820
34821test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34822  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34823  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34824      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34825  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34826which seems to be undefined.  Please make sure it is defined" >&5
34827$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34828which seems to be undefined.  Please make sure it is defined" >&2;}
34829
34830  rm -f "$ac_tmp/stdin"
34831  case $ac_file in
34832  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34833  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34834  esac \
34835  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34836 ;;
34837  :H)
34838  #
34839  # CONFIG_HEADER
34840  #
34841  if test x"$ac_file" != x-; then
34842    {
34843      $as_echo "/* $configure_input  */" \
34844      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34845    } >"$ac_tmp/config.h" \
34846      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34847    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34848      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34849$as_echo "$as_me: $ac_file is unchanged" >&6;}
34850    else
34851      rm -f "$ac_file"
34852      mv "$ac_tmp/config.h" "$ac_file" \
34853	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34854    fi
34855  else
34856    $as_echo "/* $configure_input  */" \
34857      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34858      || as_fn_error $? "could not create -" "$LINENO" 5
34859  fi
34860 ;;
34861
34862
34863  esac
34864
34865done # for ac_tag
34866
34867
34868as_fn_exit 0
34869_ACEOF
34870ac_clean_files=$ac_clean_files_save
34871
34872test $ac_write_fail = 0 ||
34873  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34874
34875
34876# configure is writing to config.log, and then calls config.status.
34877# config.status does its own redirection, appending to config.log.
34878# Unfortunately, on DOS this fails, as config.log is still kept open
34879# by configure, so config.status won't be able to write to it; its
34880# output is simply discarded.  So we exec the FD to /dev/null,
34881# effectively closing config.log, so it can be properly (re)opened and
34882# appended to by config.status.  When coming back to configure, we
34883# need to make the FD available again.
34884if test "$no_create" != yes; then
34885  ac_cs_success=:
34886  ac_config_status_args=
34887  test "$silent" = yes &&
34888    ac_config_status_args="$ac_config_status_args --quiet"
34889  exec 5>/dev/null
34890  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34891  exec 5>>config.log
34892  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34893  # would make configure fail if this is the last instruction.
34894  $ac_cs_success || as_fn_exit 1
34895fi
34896if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34897  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34898$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34899fi
34900
34901
34902# Make the compare script executable
34903$CHMOD +x $OUTPUT_ROOT/compare.sh
34904
34905# Finally output some useful information to the user
34906
34907# Finally output some useful information to the user
34908
34909if test "x$CCACHE_FOUND" != x; then
34910	if  test "x$HAS_GOOD_CCACHE" = x; then
34911		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34912		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34913	else
34914		CCACHE_STATUS="installed and in use"
34915	fi
34916else
34917	if test "x$GCC" = xyes; then
34918		CCACHE_STATUS="not installed (consider installing)"
34919		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34920	else
34921		CCACHE_STATUS="not available for your system"
34922	fi
34923fi
34924
34925printf "\n"
34926printf "====================================================\n"
34927printf "A new configuration has been successfully created in\n"
34928printf "$OUTPUT_ROOT\n"
34929if test "x$CONFIGURE_COMMAND_LINE" != x; then
34930	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34931else
34932	printf "using default settings.\n"
34933fi
34934
34935printf "\n"
34936printf "Configuration summary:\n"
34937printf "* Debug level:    $DEBUG_LEVEL\n"
34938printf "* JDK variant:    $JDK_VARIANT\n"
34939printf "* JVM variants:   $with_jvm_variants\n"
34940printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34941
34942printf "\n"
34943printf "Tools summary:\n"
34944if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34945  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34946fi
34947printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34948printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34949printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34950
34951printf "\n"
34952printf "Build performance summary:\n"
34953printf "* Cores to use:   $JOBS\n"
34954printf "* Memory limit:   $MEMORY_SIZE MB\n"
34955printf "* ccache status:  $CCACHE_STATUS\n"
34956printf "\n"
34957
34958if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34959	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34960	printf "$CCACHE_HELP_MSG\n"
34961
34962    # Print a helpful message on how to acquire the necessary build dependency.
34963    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34964    MISSING_DEPENDENCY=ccache
34965    PKGHANDLER_COMMAND=
34966
34967    case $PKGHANDLER in
34968	apt-get)
34969                apt_help     $MISSING_DEPENDENCY ;;
34970    yum)
34971                yum_help     $MISSING_DEPENDENCY ;;
34972	port)
34973                port_help    $MISSING_DEPENDENCY ;;
34974	pkgutil)
34975                pkgutil_help $MISSING_DEPENDENCY ;;
34976	pkgadd)
34977                pkgadd_help  $MISSING_DEPENDENCY ;;
34978    * )
34979      break ;;
34980    esac
34981
34982    if test "x$PKGHANDLER_COMMAND" != x; then
34983        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34984    fi
34985
34986	printf "$HELP_MSG\n"
34987	printf "\n"
34988fi
34989
34990if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34991	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34992	printf "will result in longer build times.\n"
34993	printf "\n"
34994fi
34995
34996if test "x$FOUND_ALT_VARIABLES" != "x"; then
34997	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34998	printf "These are not respected, and will be ignored. It is recommended\n"
34999	printf "that you clean your environment. The following variables are set:\n"
35000	printf "$FOUND_ALT_VARIABLES\n"
35001	printf "\n"
35002fi
35003
35004if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35005	printf "WARNING: Your build output directory is not on a local disk.\n"
35006	printf "This will severely degrade build performance!\n"
35007	printf "It is recommended that you create an output directory on a local disk,\n"
35008	printf "and run the configure script again from that directory.\n"
35009	printf "\n"
35010fi
35011
35012if test "x$IS_RECONFIGURE" = "xyes"; then
35013	printf "WARNING: The result of this configuration has overridden an older\n"
35014	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35015	printf "proper build. Failure to do so might result in strange build problems.\n"
35016	printf "\n"
35017fi
35018
35019