generated-configure.sh revision 861:56db38956113
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
760ac_ct_PROPER_COMPILER_CC
761PROPER_COMPILER_CC
762POTENTIAL_CC
763TOOLS_DIR_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782NASHORN_TOPDIR
783HOTSPOT_TOPDIR
784JAXWS_TOPDIR
785JAXP_TOPDIR
786CORBA_TOPDIR
787LANGTOOLS_TOPDIR
788BOOT_JDK_JVMARGS
789JAVAC_FLAGS
790BOOT_JDK_SOURCETARGET
791BOOT_JDK
792BOOT_TOOLSJAR
793BOOT_RTJAR
794JAVA_CHECK
795JAVAC_CHECK
796COOKED_BUILD_NUMBER
797JDK_VERSION
798COPYRIGHT_YEAR
799MACOSX_BUNDLE_ID_BASE
800MACOSX_BUNDLE_NAME_BASE
801COMPANY_NAME
802JDK_RC_PLATFORM_NAME
803PRODUCT_SUFFIX
804PRODUCT_NAME
805LAUNCHER_NAME
806MILESTONE
807JDK_BUILD_NUMBER
808JDK_UPDATE_VERSION
809JDK_MICRO_VERSION
810JDK_MINOR_VERSION
811JDK_MAJOR_VERSION
812USER_RELEASE_SUFFIX
813COMPRESS_JARS
814UNLIMITED_CRYPTO
815CACERTS_FILE
816TEST_IN_BUILD
817BUILD_HEADLESS
818SUPPORT_HEADFUL
819SUPPORT_HEADLESS
820BDEPS_FTP
821BDEPS_UNZIP
822OS_VERSION_MICRO
823OS_VERSION_MINOR
824OS_VERSION_MAJOR
825PKG_CONFIG
826CODESIGN
827XATTR
828IS_GNU_TIME
829TIME
830STAT
831HG
832READELF
833OTOOL
834LDD
835ZIP
836UNZIP
837FIND_DELETE
838MAKE
839CHECK_TOOLSDIR_MAKE
840CHECK_TOOLSDIR_GMAKE
841CHECK_MAKE
842CHECK_GMAKE
843PKGHANDLER
844OUTPUT_ROOT
845CONF_NAME
846SPEC
847BUILD_VARIANT_RELEASE
848DEBUG_CLASSFILES
849FASTDEBUG
850VARIANT
851DEBUG_LEVEL
852MACOSX_UNIVERSAL
853INCLUDE_SA
854JVM_VARIANT_ZEROSHARK
855JVM_VARIANT_ZERO
856JVM_VARIANT_KERNEL
857JVM_VARIANT_MINIMAL1
858JVM_VARIANT_CLIENT
859JVM_VARIANT_SERVER
860JVM_VARIANTS
861JDK_VARIANT
862SET_OPENJDK
863BUILD_LOG_WRAPPER
864BUILD_LOG_PREVIOUS
865BUILD_LOG
866SYS_ROOT
867PATH_SEP
868SRC_ROOT
869ZERO_ARCHDEF
870DEFINE_CROSS_COMPILE_ARCH
871LP64
872OPENJDK_TARGET_OS_API_DIR
873OPENJDK_TARGET_CPU_JLI_CFLAGS
874OPENJDK_TARGET_CPU_OSARCH
875OPENJDK_TARGET_CPU_ISADIR
876OPENJDK_TARGET_CPU_LIBDIR
877OPENJDK_TARGET_CPU_LEGACY_LIB
878OPENJDK_TARGET_CPU_LEGACY
879REQUIRED_OS_VERSION
880REQUIRED_OS_NAME
881COMPILE_TYPE
882OPENJDK_TARGET_CPU_ENDIAN
883OPENJDK_TARGET_CPU_BITS
884OPENJDK_TARGET_CPU_ARCH
885OPENJDK_TARGET_CPU
886OPENJDK_TARGET_OS_API
887OPENJDK_TARGET_OS
888OPENJDK_BUILD_CPU_ENDIAN
889OPENJDK_BUILD_CPU_BITS
890OPENJDK_BUILD_CPU_ARCH
891OPENJDK_BUILD_CPU
892OPENJDK_BUILD_OS_API
893OPENJDK_BUILD_OS
894OPENJDK_BUILD_AUTOCONF_NAME
895OPENJDK_TARGET_AUTOCONF_NAME
896target_os
897target_vendor
898target_cpu
899target
900host_os
901host_vendor
902host_cpu
903host
904build_os
905build_vendor
906build_cpu
907build
908SETFILE
909DF
910READLINK
911CYGPATH
912NAWK
913SED
914FGREP
915EGREP
916GREP
917AWK
918XARGS
919WHICH
920WC
921UNIQ
922UNAME
923TR
924TOUCH
925TEE
926TAR
927TAIL
928SORT
929SH
930RM
931PRINTF
932MV
933MKTEMP
934MKDIR
935LS
936LN
937HEAD
938FIND
939FILE
940EXPR
941ECHO
942DIRNAME
943DIFF
944DATE
945CUT
946CPIO
947CP
948COMM
949CMP
950CHMOD
951CAT
952BASH
953BASENAME
954DATE_WHEN_CONFIGURED
955CONFIGURE_COMMAND_LINE
956CUSTOM_MAKE_DIR
957target_alias
958host_alias
959build_alias
960LIBS
961ECHO_T
962ECHO_N
963ECHO_C
964DEFS
965mandir
966localedir
967libdir
968psdir
969pdfdir
970dvidir
971htmldir
972infodir
973docdir
974oldincludedir
975includedir
976localstatedir
977sharedstatedir
978sysconfdir
979datadir
980datarootdir
981libexecdir
982sbindir
983bindir
984program_transform_name
985prefix
986exec_prefix
987PACKAGE_URL
988PACKAGE_BUGREPORT
989PACKAGE_STRING
990PACKAGE_VERSION
991PACKAGE_TARNAME
992PACKAGE_NAME
993PATH_SEPARATOR
994SHELL'
995ac_subst_files=''
996ac_user_opts='
997enable_option_checking
998with_custom_make_dir
999with_target_bits
1000with_sys_root
1001with_tools_dir
1002with_devkit
1003enable_openjdk_only
1004with_jdk_variant
1005with_jvm_variants
1006enable_debug
1007with_debug_level
1008with_conf_name
1009with_builddeps_conf
1010with_builddeps_server
1011with_builddeps_dir
1012with_builddeps_group
1013enable_headful
1014enable_hotspot_test_in_build
1015with_cacerts_file
1016enable_unlimited_crypto
1017with_milestone
1018with_update_version
1019with_user_release_suffix
1020with_build_number
1021with_boot_jdk
1022with_boot_jdk_jvmargs
1023with_add_source_root
1024with_override_source_root
1025with_adds_and_overrides
1026with_override_langtools
1027with_override_corba
1028with_override_jaxp
1029with_override_jaxws
1030with_override_hotspot
1031with_override_nashorn
1032with_override_jdk
1033with_import_hotspot
1034with_msvcr_dll
1035with_dxsdk
1036with_dxsdk_lib
1037with_dxsdk_include
1038with_jtreg
1039with_extra_cflags
1040with_extra_cxxflags
1041with_extra_ldflags
1042enable_debug_symbols
1043enable_zip_debug_info
1044enable_macosx_runtime_support
1045with_x
1046with_cups
1047with_cups_include
1048with_freetype
1049with_alsa
1050with_alsa_include
1051with_alsa_lib
1052with_giflib
1053with_zlib
1054with_stdc__lib
1055with_num_cores
1056with_memory_size
1057with_jobs
1058with_sjavac_server_java
1059enable_sjavac
1060enable_precompiled_headers
1061enable_ccache
1062with_ccache_dir
1063'
1064      ac_precious_vars='build_alias
1065host_alias
1066target_alias
1067PKG_CONFIG
1068CC
1069CFLAGS
1070LDFLAGS
1071LIBS
1072CPPFLAGS
1073CXX
1074CXXFLAGS
1075CCC
1076OBJC
1077OBJCFLAGS
1078CPP
1079CXXCPP
1080XMKMF
1081FREETYPE2_CFLAGS
1082FREETYPE2_LIBS
1083ALSA_CFLAGS
1084ALSA_LIBS
1085LIBFFI_CFLAGS
1086LIBFFI_LIBS'
1087
1088
1089# Initialize some variables set by options.
1090ac_init_help=
1091ac_init_version=false
1092ac_unrecognized_opts=
1093ac_unrecognized_sep=
1094# The variables have the same names as the options, with
1095# dashes changed to underlines.
1096cache_file=/dev/null
1097exec_prefix=NONE
1098no_create=
1099no_recursion=
1100prefix=NONE
1101program_prefix=NONE
1102program_suffix=NONE
1103program_transform_name=s,x,x,
1104silent=
1105site=
1106srcdir=
1107verbose=
1108x_includes=NONE
1109x_libraries=NONE
1110
1111# Installation directory options.
1112# These are left unexpanded so users can "make install exec_prefix=/foo"
1113# and all the variables that are supposed to be based on exec_prefix
1114# by default will actually change.
1115# Use braces instead of parens because sh, perl, etc. also accept them.
1116# (The list follows the same order as the GNU Coding Standards.)
1117bindir='${exec_prefix}/bin'
1118sbindir='${exec_prefix}/sbin'
1119libexecdir='${exec_prefix}/libexec'
1120datarootdir='${prefix}/share'
1121datadir='${datarootdir}'
1122sysconfdir='${prefix}/etc'
1123sharedstatedir='${prefix}/com'
1124localstatedir='${prefix}/var'
1125includedir='${prefix}/include'
1126oldincludedir='/usr/include'
1127docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1128infodir='${datarootdir}/info'
1129htmldir='${docdir}'
1130dvidir='${docdir}'
1131pdfdir='${docdir}'
1132psdir='${docdir}'
1133libdir='${exec_prefix}/lib'
1134localedir='${datarootdir}/locale'
1135mandir='${datarootdir}/man'
1136
1137ac_prev=
1138ac_dashdash=
1139for ac_option
1140do
1141  # If the previous option needs an argument, assign it.
1142  if test -n "$ac_prev"; then
1143    eval $ac_prev=\$ac_option
1144    ac_prev=
1145    continue
1146  fi
1147
1148  case $ac_option in
1149  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1150  *=)   ac_optarg= ;;
1151  *)    ac_optarg=yes ;;
1152  esac
1153
1154  # Accept the important Cygnus configure options, so we can diagnose typos.
1155
1156  case $ac_dashdash$ac_option in
1157  --)
1158    ac_dashdash=yes ;;
1159
1160  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1161    ac_prev=bindir ;;
1162  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1163    bindir=$ac_optarg ;;
1164
1165  -build | --build | --buil | --bui | --bu)
1166    ac_prev=build_alias ;;
1167  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1168    build_alias=$ac_optarg ;;
1169
1170  -cache-file | --cache-file | --cache-fil | --cache-fi \
1171  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1172    ac_prev=cache_file ;;
1173  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1174  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1175    cache_file=$ac_optarg ;;
1176
1177  --config-cache | -C)
1178    cache_file=config.cache ;;
1179
1180  -datadir | --datadir | --datadi | --datad)
1181    ac_prev=datadir ;;
1182  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1183    datadir=$ac_optarg ;;
1184
1185  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1186  | --dataroo | --dataro | --datar)
1187    ac_prev=datarootdir ;;
1188  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1189  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1190    datarootdir=$ac_optarg ;;
1191
1192  -disable-* | --disable-*)
1193    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1194    # Reject names that are not valid shell variable names.
1195    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196      as_fn_error $? "invalid feature name: $ac_useropt"
1197    ac_useropt_orig=$ac_useropt
1198    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199    case $ac_user_opts in
1200      *"
1201"enable_$ac_useropt"
1202"*) ;;
1203      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1204	 ac_unrecognized_sep=', ';;
1205    esac
1206    eval enable_$ac_useropt=no ;;
1207
1208  -docdir | --docdir | --docdi | --doc | --do)
1209    ac_prev=docdir ;;
1210  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1211    docdir=$ac_optarg ;;
1212
1213  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1214    ac_prev=dvidir ;;
1215  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1216    dvidir=$ac_optarg ;;
1217
1218  -enable-* | --enable-*)
1219    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1220    # Reject names that are not valid shell variable names.
1221    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222      as_fn_error $? "invalid feature name: $ac_useropt"
1223    ac_useropt_orig=$ac_useropt
1224    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225    case $ac_user_opts in
1226      *"
1227"enable_$ac_useropt"
1228"*) ;;
1229      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1230	 ac_unrecognized_sep=', ';;
1231    esac
1232    eval enable_$ac_useropt=\$ac_optarg ;;
1233
1234  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1235  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1236  | --exec | --exe | --ex)
1237    ac_prev=exec_prefix ;;
1238  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1239  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1240  | --exec=* | --exe=* | --ex=*)
1241    exec_prefix=$ac_optarg ;;
1242
1243  -gas | --gas | --ga | --g)
1244    # Obsolete; use --with-gas.
1245    with_gas=yes ;;
1246
1247  -help | --help | --hel | --he | -h)
1248    ac_init_help=long ;;
1249  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1250    ac_init_help=recursive ;;
1251  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1252    ac_init_help=short ;;
1253
1254  -host | --host | --hos | --ho)
1255    ac_prev=host_alias ;;
1256  -host=* | --host=* | --hos=* | --ho=*)
1257    host_alias=$ac_optarg ;;
1258
1259  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1260    ac_prev=htmldir ;;
1261  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1262  | --ht=*)
1263    htmldir=$ac_optarg ;;
1264
1265  -includedir | --includedir | --includedi | --included | --include \
1266  | --includ | --inclu | --incl | --inc)
1267    ac_prev=includedir ;;
1268  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1269  | --includ=* | --inclu=* | --incl=* | --inc=*)
1270    includedir=$ac_optarg ;;
1271
1272  -infodir | --infodir | --infodi | --infod | --info | --inf)
1273    ac_prev=infodir ;;
1274  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1275    infodir=$ac_optarg ;;
1276
1277  -libdir | --libdir | --libdi | --libd)
1278    ac_prev=libdir ;;
1279  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1280    libdir=$ac_optarg ;;
1281
1282  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1283  | --libexe | --libex | --libe)
1284    ac_prev=libexecdir ;;
1285  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1286  | --libexe=* | --libex=* | --libe=*)
1287    libexecdir=$ac_optarg ;;
1288
1289  -localedir | --localedir | --localedi | --localed | --locale)
1290    ac_prev=localedir ;;
1291  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1292    localedir=$ac_optarg ;;
1293
1294  -localstatedir | --localstatedir | --localstatedi | --localstated \
1295  | --localstate | --localstat | --localsta | --localst | --locals)
1296    ac_prev=localstatedir ;;
1297  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1298  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1299    localstatedir=$ac_optarg ;;
1300
1301  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1302    ac_prev=mandir ;;
1303  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1304    mandir=$ac_optarg ;;
1305
1306  -nfp | --nfp | --nf)
1307    # Obsolete; use --without-fp.
1308    with_fp=no ;;
1309
1310  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1311  | --no-cr | --no-c | -n)
1312    no_create=yes ;;
1313
1314  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1315  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1316    no_recursion=yes ;;
1317
1318  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1319  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1320  | --oldin | --oldi | --old | --ol | --o)
1321    ac_prev=oldincludedir ;;
1322  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1323  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1324  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1325    oldincludedir=$ac_optarg ;;
1326
1327  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1328    ac_prev=prefix ;;
1329  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1330    prefix=$ac_optarg ;;
1331
1332  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1333  | --program-pre | --program-pr | --program-p)
1334    ac_prev=program_prefix ;;
1335  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1336  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1337    program_prefix=$ac_optarg ;;
1338
1339  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1340  | --program-suf | --program-su | --program-s)
1341    ac_prev=program_suffix ;;
1342  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1343  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1344    program_suffix=$ac_optarg ;;
1345
1346  -program-transform-name | --program-transform-name \
1347  | --program-transform-nam | --program-transform-na \
1348  | --program-transform-n | --program-transform- \
1349  | --program-transform | --program-transfor \
1350  | --program-transfo | --program-transf \
1351  | --program-trans | --program-tran \
1352  | --progr-tra | --program-tr | --program-t)
1353    ac_prev=program_transform_name ;;
1354  -program-transform-name=* | --program-transform-name=* \
1355  | --program-transform-nam=* | --program-transform-na=* \
1356  | --program-transform-n=* | --program-transform-=* \
1357  | --program-transform=* | --program-transfor=* \
1358  | --program-transfo=* | --program-transf=* \
1359  | --program-trans=* | --program-tran=* \
1360  | --progr-tra=* | --program-tr=* | --program-t=*)
1361    program_transform_name=$ac_optarg ;;
1362
1363  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1364    ac_prev=pdfdir ;;
1365  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1366    pdfdir=$ac_optarg ;;
1367
1368  -psdir | --psdir | --psdi | --psd | --ps)
1369    ac_prev=psdir ;;
1370  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1371    psdir=$ac_optarg ;;
1372
1373  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1374  | -silent | --silent | --silen | --sile | --sil)
1375    silent=yes ;;
1376
1377  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1378    ac_prev=sbindir ;;
1379  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1380  | --sbi=* | --sb=*)
1381    sbindir=$ac_optarg ;;
1382
1383  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1384  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1385  | --sharedst | --shareds | --shared | --share | --shar \
1386  | --sha | --sh)
1387    ac_prev=sharedstatedir ;;
1388  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1389  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1390  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1391  | --sha=* | --sh=*)
1392    sharedstatedir=$ac_optarg ;;
1393
1394  -site | --site | --sit)
1395    ac_prev=site ;;
1396  -site=* | --site=* | --sit=*)
1397    site=$ac_optarg ;;
1398
1399  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1400    ac_prev=srcdir ;;
1401  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1402    srcdir=$ac_optarg ;;
1403
1404  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1405  | --syscon | --sysco | --sysc | --sys | --sy)
1406    ac_prev=sysconfdir ;;
1407  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1408  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1409    sysconfdir=$ac_optarg ;;
1410
1411  -target | --target | --targe | --targ | --tar | --ta | --t)
1412    ac_prev=target_alias ;;
1413  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1414    target_alias=$ac_optarg ;;
1415
1416  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1417    verbose=yes ;;
1418
1419  -version | --version | --versio | --versi | --vers | -V)
1420    ac_init_version=: ;;
1421
1422  -with-* | --with-*)
1423    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1424    # Reject names that are not valid shell variable names.
1425    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1426      as_fn_error $? "invalid package name: $ac_useropt"
1427    ac_useropt_orig=$ac_useropt
1428    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1429    case $ac_user_opts in
1430      *"
1431"with_$ac_useropt"
1432"*) ;;
1433      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1434	 ac_unrecognized_sep=', ';;
1435    esac
1436    eval with_$ac_useropt=\$ac_optarg ;;
1437
1438  -without-* | --without-*)
1439    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1440    # Reject names that are not valid shell variable names.
1441    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1442      as_fn_error $? "invalid package name: $ac_useropt"
1443    ac_useropt_orig=$ac_useropt
1444    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1445    case $ac_user_opts in
1446      *"
1447"with_$ac_useropt"
1448"*) ;;
1449      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1450	 ac_unrecognized_sep=', ';;
1451    esac
1452    eval with_$ac_useropt=no ;;
1453
1454  --x)
1455    # Obsolete; use --with-x.
1456    with_x=yes ;;
1457
1458  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1459  | --x-incl | --x-inc | --x-in | --x-i)
1460    ac_prev=x_includes ;;
1461  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1462  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1463    x_includes=$ac_optarg ;;
1464
1465  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1466  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1467    ac_prev=x_libraries ;;
1468  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1469  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1470    x_libraries=$ac_optarg ;;
1471
1472  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1473Try \`$0 --help' for more information"
1474    ;;
1475
1476  *=*)
1477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1478    # Reject names that are not valid shell variable names.
1479    case $ac_envvar in #(
1480      '' | [0-9]* | *[!_$as_cr_alnum]* )
1481      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1482    esac
1483    eval $ac_envvar=\$ac_optarg
1484    export $ac_envvar ;;
1485
1486  *)
1487    # FIXME: should be removed in autoconf 3.0.
1488    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1490      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1491    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1492    ;;
1493
1494  esac
1495done
1496
1497if test -n "$ac_prev"; then
1498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1499  as_fn_error $? "missing argument to $ac_option"
1500fi
1501
1502if test -n "$ac_unrecognized_opts"; then
1503  case $enable_option_checking in
1504    no) ;;
1505    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1506    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1507  esac
1508fi
1509
1510# Check all directory arguments for consistency.
1511for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1512		datadir sysconfdir sharedstatedir localstatedir includedir \
1513		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1514		libdir localedir mandir
1515do
1516  eval ac_val=\$$ac_var
1517  # Remove trailing slashes.
1518  case $ac_val in
1519    */ )
1520      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1521      eval $ac_var=\$ac_val;;
1522  esac
1523  # Be sure to have absolute directory names.
1524  case $ac_val in
1525    [\\/$]* | ?:[\\/]* )  continue;;
1526    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1527  esac
1528  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1529done
1530
1531# There might be people who depend on the old broken behavior: `$host'
1532# used to hold the argument of --host etc.
1533# FIXME: To remove some day.
1534build=$build_alias
1535host=$host_alias
1536target=$target_alias
1537
1538# FIXME: To remove some day.
1539if test "x$host_alias" != x; then
1540  if test "x$build_alias" = x; then
1541    cross_compiling=maybe
1542  elif test "x$build_alias" != "x$host_alias"; then
1543    cross_compiling=yes
1544  fi
1545fi
1546
1547ac_tool_prefix=
1548test -n "$host_alias" && ac_tool_prefix=$host_alias-
1549
1550test "$silent" = yes && exec 6>/dev/null
1551
1552
1553ac_pwd=`pwd` && test -n "$ac_pwd" &&
1554ac_ls_di=`ls -di .` &&
1555ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1556  as_fn_error $? "working directory cannot be determined"
1557test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1558  as_fn_error $? "pwd does not report name of working directory"
1559
1560
1561# Find the source files, if location was not specified.
1562if test -z "$srcdir"; then
1563  ac_srcdir_defaulted=yes
1564  # Try the directory containing this script, then the parent directory.
1565  ac_confdir=`$as_dirname -- "$as_myself" ||
1566$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1567	 X"$as_myself" : 'X\(//\)[^/]' \| \
1568	 X"$as_myself" : 'X\(//\)$' \| \
1569	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1570$as_echo X"$as_myself" |
1571    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1572	    s//\1/
1573	    q
1574	  }
1575	  /^X\(\/\/\)[^/].*/{
1576	    s//\1/
1577	    q
1578	  }
1579	  /^X\(\/\/\)$/{
1580	    s//\1/
1581	    q
1582	  }
1583	  /^X\(\/\).*/{
1584	    s//\1/
1585	    q
1586	  }
1587	  s/.*/./; q'`
1588  srcdir=$ac_confdir
1589  if test ! -r "$srcdir/$ac_unique_file"; then
1590    srcdir=..
1591  fi
1592else
1593  ac_srcdir_defaulted=no
1594fi
1595if test ! -r "$srcdir/$ac_unique_file"; then
1596  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1597  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1598fi
1599ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1600ac_abs_confdir=`(
1601	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1602	pwd)`
1603# When building in place, set srcdir=.
1604if test "$ac_abs_confdir" = "$ac_pwd"; then
1605  srcdir=.
1606fi
1607# Remove unnecessary trailing slashes from srcdir.
1608# Double slashes in file names in object file debugging info
1609# mess up M-x gdb in Emacs.
1610case $srcdir in
1611*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1612esac
1613for ac_var in $ac_precious_vars; do
1614  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1615  eval ac_env_${ac_var}_value=\$${ac_var}
1616  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1617  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1618done
1619
1620#
1621# Report the --help message.
1622#
1623if test "$ac_init_help" = "long"; then
1624  # Omit some internal or obsolete options to make the list less imposing.
1625  # This message is too long to be a string in the A/UX 3.1 sh.
1626  cat <<_ACEOF
1627\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1628
1629Usage: $0 [OPTION]... [VAR=VALUE]...
1630
1631To assign environment variables (e.g., CC, CFLAGS...), specify them as
1632VAR=VALUE.  See below for descriptions of some of the useful variables.
1633
1634Defaults for the options are specified in brackets.
1635
1636Configuration:
1637  -h, --help              display this help and exit
1638      --help=short        display options specific to this package
1639      --help=recursive    display the short help of all the included packages
1640  -V, --version           display version information and exit
1641  -q, --quiet, --silent   do not print \`checking ...' messages
1642      --cache-file=FILE   cache test results in FILE [disabled]
1643  -C, --config-cache      alias for \`--cache-file=config.cache'
1644  -n, --no-create         do not create output files
1645      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1646
1647Installation directories:
1648  --prefix=PREFIX         install architecture-independent files in PREFIX
1649                          [$ac_default_prefix]
1650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1651                          [PREFIX]
1652
1653By default, \`make install' will install all the files in
1654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1656for instance \`--prefix=\$HOME'.
1657
1658For better control, use the options below.
1659
1660Fine tuning of the installation directories:
1661  --bindir=DIR            user executables [EPREFIX/bin]
1662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1663  --libexecdir=DIR        program executables [EPREFIX/libexec]
1664  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1665  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1666  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1667  --libdir=DIR            object code libraries [EPREFIX/lib]
1668  --includedir=DIR        C header files [PREFIX/include]
1669  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1670  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1671  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1672  --infodir=DIR           info documentation [DATAROOTDIR/info]
1673  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1674  --mandir=DIR            man documentation [DATAROOTDIR/man]
1675  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1676  --htmldir=DIR           html documentation [DOCDIR]
1677  --dvidir=DIR            dvi documentation [DOCDIR]
1678  --pdfdir=DIR            pdf documentation [DOCDIR]
1679  --psdir=DIR             ps documentation [DOCDIR]
1680_ACEOF
1681
1682  cat <<\_ACEOF
1683
1684X features:
1685  --x-includes=DIR    X include files are in DIR
1686  --x-libraries=DIR   X library files are in DIR
1687
1688System types:
1689  --build=BUILD     configure for building on BUILD [guessed]
1690  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1691  --target=TARGET   configure for building compilers for TARGET [HOST]
1692_ACEOF
1693fi
1694
1695if test -n "$ac_init_help"; then
1696  case $ac_init_help in
1697     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1698   esac
1699  cat <<\_ACEOF
1700
1701Optional Features:
1702  --disable-option-checking  ignore unrecognized --enable/--with options
1703  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1704  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1705  --enable-openjdk-only   suppress building custom source even if present
1706                          [disabled]
1707  --enable-debug          set the debug level to fastdebug (shorthand for
1708                          --with-debug-level=fastdebug) [disabled]
1709  --disable-headful       disable building headful support (graphical UI
1710                          support) [enabled]
1711  --enable-hotspot-test-in-build
1712                          run the Queens test after Hotspot build [disabled]
1713  --enable-unlimited-crypto
1714                          Enable unlimited crypto policy [disabled]
1715  --disable-debug-symbols disable generation of debug symbols [enabled]
1716  --disable-zip-debug-info
1717                          disable zipping of debug-info files [enabled]
1718  --enable-macosx-runtime-support
1719                          Deprecated. Option is kept for backwards
1720                          compatibility and is ignored
1721  --enable-sjavac         use sjavac to do fast incremental compiles
1722                          [disabled]
1723  --disable-precompiled-headers
1724                          disable using precompiled headers when compiling C++
1725                          [enabled]
1726  --disable-ccache        disable using ccache to speed up recompilations
1727                          [enabled]
1728
1729Optional Packages:
1730  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1731  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1732  --with-custom-make-dir  use this directory for custom build/make files
1733  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1734                          support it), e.g. --with-target-bits=32 [guessed]
1735  --with-sys-root         pass this sys-root to the compilers and tools (for
1736                          cross-compiling)
1737  --with-tools-dir        search this directory for compilers and tools (for
1738                          cross-compiling)
1739  --with-devkit           use this directory as base for tools-dir and
1740                          sys-root (for cross-compiling)
1741  --with-jdk-variant      JDK variant to build (normal) [normal]
1742  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1743                          client, minimal1, kernel, zero, zeroshark) [server]
1744  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1745                          [release]
1746  --with-conf-name        use this as the name of the configuration [generated
1747                          from important configuration options]
1748  --with-builddeps-conf   use this configuration file for the builddeps
1749  --with-builddeps-server download and use build dependencies from this server
1750                          url
1751  --with-builddeps-dir    store downloaded build dependencies here
1752                          [/localhome/builddeps]
1753  --with-builddeps-group  chgrp the downloaded build dependencies to this
1754                          group
1755  --with-cacerts-file     specify alternative cacerts file
1756  --with-milestone        Set milestone value for build [internal]
1757  --with-update-version   Set update version value for build [b00]
1758  --with-user-release-suffix
1759                          Add a custom string to the version string if build
1760                          number isn't set.[username_builddateb00]
1761  --with-build-number     Set build number value for build [b00]
1762  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1763  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1764                          invocations of the Boot JDK, overriding the default
1765                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1766                          -enableassertions"
1767  --with-add-source-root  for each and every source directory, look in this
1768                          additional source root for the same directory; if it
1769                          exists and have files in it, include it in the build
1770  --with-override-source-root
1771                          for each and every source directory, look in this
1772                          override source root for the same directory; if it
1773                          exists, use that directory instead and ignore the
1774                          directory in the original source root
1775  --with-adds-and-overrides
1776                          use the subdirs 'adds' and 'overrides' in the
1777                          specified directory as add-source-root and
1778                          override-source-root
1779  --with-override-langtools
1780                          use this langtools dir for the build
1781  --with-override-corba   use this corba dir for the build
1782  --with-override-jaxp    use this jaxp dir for the build
1783  --with-override-jaxws   use this jaxws dir for the build
1784  --with-override-hotspot use this hotspot dir for the build
1785  --with-override-nashorn use this nashorn dir for the build
1786  --with-override-jdk     use this jdk dir for the build
1787  --with-import-hotspot   import hotspot binaries from this jdk image or
1788                          hotspot build dist dir instead of building from
1789                          source
1790  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1791                          only) [probed]
1792  --with-dxsdk            Deprecated. Option is kept for backwards
1793                          compatibility and is ignored
1794  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1795                          compatibility and is ignored
1796  --with-dxsdk-include    Deprecated. Option is kept for backwards
1797                          compatibility and is ignored
1798  --with-jtreg            Regression Test Harness [probed]
1799  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1800  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1801  --with-extra-ldflags    extra flags to be used when linking jdk
1802  --with-x                use the X Window System
1803  --with-cups             specify prefix directory for the cups package
1804                          (expecting the headers under PATH/include)
1805  --with-cups-include     specify directory for the cups include files
1806  --with-freetype         specify prefix directory for the freetype2 package
1807                          (expecting the libraries under PATH/lib and the
1808                          headers under PATH/include)
1809  --with-alsa             specify prefix directory for the alsa package
1810                          (expecting the libraries under PATH/lib and the
1811                          headers under PATH/include)
1812  --with-alsa-include     specify directory for the alsa include files
1813  --with-alsa-lib         specify directory for the alsa library
1814  --with-giflib           use giflib from build system or OpenJDK source
1815                          (system, bundled) [bundled]
1816  --with-zlib             use zlib from build system or OpenJDK source
1817                          (system, bundled) [bundled]
1818  --with-stdc++lib=<static>,<dynamic>,<default>
1819                          force linking of the C++ runtime on Linux to either
1820                          static or dynamic, default is static with dynamic as
1821                          fallback
1822  --with-num-cores        number of cores in the build system, e.g.
1823                          --with-num-cores=8 [probed]
1824  --with-memory-size      memory (in MB) available in the build system, e.g.
1825                          --with-memory-size=1024 [probed]
1826  --with-jobs             number of parallel jobs to let make run [calculated
1827                          based on cores and memory]
1828  --with-sjavac-server-java
1829                          use this java binary for running the sjavac
1830                          background server [Boot JDK java]
1831  --with-ccache-dir       where to store ccache files [~/.ccache]
1832
1833Some influential environment variables:
1834  PKG_CONFIG  path to pkg-config utility
1835  CC          C compiler command
1836  CFLAGS      C compiler flags
1837  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1838              nonstandard directory <lib dir>
1839  LIBS        libraries to pass to the linker, e.g. -l<library>
1840  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1841              you have headers in a nonstandard directory <include dir>
1842  CXX         C++ compiler command
1843  CXXFLAGS    C++ compiler flags
1844  OBJC        Objective C compiler command
1845  OBJCFLAGS   Objective C compiler flags
1846  CPP         C preprocessor
1847  CXXCPP      C++ preprocessor
1848  XMKMF       Path to xmkmf, Makefile generator for X Window System
1849  FREETYPE2_CFLAGS
1850              C compiler flags for FREETYPE2, overriding pkg-config
1851  FREETYPE2_LIBS
1852              linker flags for FREETYPE2, overriding pkg-config
1853  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1854  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1855  LIBFFI_CFLAGS
1856              C compiler flags for LIBFFI, overriding pkg-config
1857  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1858
1859Use these variables to override the choices made by `configure' or to help
1860it to find libraries and programs with nonstandard names/locations.
1861
1862Report bugs to <build-dev@openjdk.java.net>.
1863OpenJDK home page: <http://openjdk.java.net>.
1864_ACEOF
1865ac_status=$?
1866fi
1867
1868if test "$ac_init_help" = "recursive"; then
1869  # If there are subdirs, report their specific --help.
1870  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1871    test -d "$ac_dir" ||
1872      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1873      continue
1874    ac_builddir=.
1875
1876case "$ac_dir" in
1877.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1878*)
1879  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1880  # A ".." for each directory in $ac_dir_suffix.
1881  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1882  case $ac_top_builddir_sub in
1883  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1885  esac ;;
1886esac
1887ac_abs_top_builddir=$ac_pwd
1888ac_abs_builddir=$ac_pwd$ac_dir_suffix
1889# for backward compatibility:
1890ac_top_builddir=$ac_top_build_prefix
1891
1892case $srcdir in
1893  .)  # We are building in place.
1894    ac_srcdir=.
1895    ac_top_srcdir=$ac_top_builddir_sub
1896    ac_abs_top_srcdir=$ac_pwd ;;
1897  [\\/]* | ?:[\\/]* )  # Absolute name.
1898    ac_srcdir=$srcdir$ac_dir_suffix;
1899    ac_top_srcdir=$srcdir
1900    ac_abs_top_srcdir=$srcdir ;;
1901  *) # Relative name.
1902    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1903    ac_top_srcdir=$ac_top_build_prefix$srcdir
1904    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1905esac
1906ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1907
1908    cd "$ac_dir" || { ac_status=$?; continue; }
1909    # Check for guested configure.
1910    if test -f "$ac_srcdir/configure.gnu"; then
1911      echo &&
1912      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1913    elif test -f "$ac_srcdir/configure"; then
1914      echo &&
1915      $SHELL "$ac_srcdir/configure" --help=recursive
1916    else
1917      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1918    fi || ac_status=$?
1919    cd "$ac_pwd" || { ac_status=$?; break; }
1920  done
1921fi
1922
1923test -n "$ac_init_help" && exit $ac_status
1924if $ac_init_version; then
1925  cat <<\_ACEOF
1926OpenJDK configure jdk8
1927generated by GNU Autoconf 2.69
1928
1929Copyright (C) 2012 Free Software Foundation, Inc.
1930This configure script is free software; the Free Software Foundation
1931gives unlimited permission to copy, distribute and modify it.
1932_ACEOF
1933  exit
1934fi
1935
1936## ------------------------ ##
1937## Autoconf initialization. ##
1938## ------------------------ ##
1939
1940# ac_fn_c_try_compile LINENO
1941# --------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_c_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_c_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_c_try_compile
1977
1978# ac_fn_cxx_try_compile LINENO
1979# ----------------------------
1980# Try to compile conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_cxx_try_compile ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  rm -f conftest.$ac_objext
1985  if { { ac_try="$ac_compile"
1986case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_compile") 2>conftest.err
1993  ac_status=$?
1994  if test -s conftest.err; then
1995    grep -v '^ *+' conftest.err >conftest.er1
1996    cat conftest.er1 >&5
1997    mv -f conftest.er1 conftest.err
1998  fi
1999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000  test $ac_status = 0; } && {
2001	 test -z "$ac_cxx_werror_flag" ||
2002	 test ! -s conftest.err
2003       } && test -s conftest.$ac_objext; then :
2004  ac_retval=0
2005else
2006  $as_echo "$as_me: failed program was:" >&5
2007sed 's/^/| /' conftest.$ac_ext >&5
2008
2009	ac_retval=1
2010fi
2011  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012  as_fn_set_status $ac_retval
2013
2014} # ac_fn_cxx_try_compile
2015
2016# ac_fn_objc_try_compile LINENO
2017# -----------------------------
2018# Try to compile conftest.$ac_ext, and return whether this succeeded.
2019ac_fn_objc_try_compile ()
2020{
2021  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022  rm -f conftest.$ac_objext
2023  if { { ac_try="$ac_compile"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_compile") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } && {
2039	 test -z "$ac_objc_werror_flag" ||
2040	 test ! -s conftest.err
2041       } && test -s conftest.$ac_objext; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047	ac_retval=1
2048fi
2049  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_objc_try_compile
2053
2054# ac_fn_c_try_cpp LINENO
2055# ----------------------
2056# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2057ac_fn_c_try_cpp ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if { { ac_try="$ac_cpp conftest.$ac_ext"
2061case "(($ac_try" in
2062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063  *) ac_try_echo=$ac_try;;
2064esac
2065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066$as_echo "$ac_try_echo"; } >&5
2067  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2068  ac_status=$?
2069  if test -s conftest.err; then
2070    grep -v '^ *+' conftest.err >conftest.er1
2071    cat conftest.er1 >&5
2072    mv -f conftest.er1 conftest.err
2073  fi
2074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075  test $ac_status = 0; } > conftest.i && {
2076	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2077	 test ! -s conftest.err
2078       }; then :
2079  ac_retval=0
2080else
2081  $as_echo "$as_me: failed program was:" >&5
2082sed 's/^/| /' conftest.$ac_ext >&5
2083
2084    ac_retval=1
2085fi
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087  as_fn_set_status $ac_retval
2088
2089} # ac_fn_c_try_cpp
2090
2091# ac_fn_cxx_try_cpp LINENO
2092# ------------------------
2093# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2094ac_fn_cxx_try_cpp ()
2095{
2096  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097  if { { ac_try="$ac_cpp conftest.$ac_ext"
2098case "(($ac_try" in
2099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2100  *) ac_try_echo=$ac_try;;
2101esac
2102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2103$as_echo "$ac_try_echo"; } >&5
2104  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2105  ac_status=$?
2106  if test -s conftest.err; then
2107    grep -v '^ *+' conftest.err >conftest.er1
2108    cat conftest.er1 >&5
2109    mv -f conftest.er1 conftest.err
2110  fi
2111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2112  test $ac_status = 0; } > conftest.i && {
2113	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2114	 test ! -s conftest.err
2115       }; then :
2116  ac_retval=0
2117else
2118  $as_echo "$as_me: failed program was:" >&5
2119sed 's/^/| /' conftest.$ac_ext >&5
2120
2121    ac_retval=1
2122fi
2123  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2124  as_fn_set_status $ac_retval
2125
2126} # ac_fn_cxx_try_cpp
2127
2128# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2129# ---------------------------------------------------------
2130# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2131# the include files in INCLUDES and setting the cache variable VAR
2132# accordingly.
2133ac_fn_cxx_check_header_mongrel ()
2134{
2135  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136  if eval \${$3+:} false; then :
2137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2138$as_echo_n "checking for $2... " >&6; }
2139if eval \${$3+:} false; then :
2140  $as_echo_n "(cached) " >&6
2141fi
2142eval ac_res=\$$3
2143	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2144$as_echo "$ac_res" >&6; }
2145else
2146  # Is the header compilable?
2147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2148$as_echo_n "checking $2 usability... " >&6; }
2149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h.  */
2151$4
2152#include <$2>
2153_ACEOF
2154if ac_fn_cxx_try_compile "$LINENO"; then :
2155  ac_header_compiler=yes
2156else
2157  ac_header_compiler=no
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2161$as_echo "$ac_header_compiler" >&6; }
2162
2163# Is the header present?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2165$as_echo_n "checking $2 presence... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168#include <$2>
2169_ACEOF
2170if ac_fn_cxx_try_cpp "$LINENO"; then :
2171  ac_header_preproc=yes
2172else
2173  ac_header_preproc=no
2174fi
2175rm -f conftest.err conftest.i conftest.$ac_ext
2176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2177$as_echo "$ac_header_preproc" >&6; }
2178
2179# So?  What about this header?
2180case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2181  yes:no: )
2182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2183$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2185$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2186    ;;
2187  no:yes:* )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2189$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2191$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2193$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2195$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2197$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2198( $as_echo "## ----------------------------------------- ##
2199## Report this to build-dev@openjdk.java.net ##
2200## ----------------------------------------- ##"
2201     ) | sed "s/^/$as_me: WARNING:     /" >&2
2202    ;;
2203esac
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval \${$3+:} false; then :
2207  $as_echo_n "(cached) " >&6
2208else
2209  eval "$3=\$ac_header_compiler"
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216
2217} # ac_fn_cxx_check_header_mongrel
2218
2219# ac_fn_cxx_try_run LINENO
2220# ------------------------
2221# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2222# that executables *can* be run.
2223ac_fn_cxx_try_run ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if { { ac_try="$ac_link"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_link") 2>&5
2234  ac_status=$?
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2237  { { case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_try") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; }; }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: program exited with status $ac_status" >&5
2250       $as_echo "$as_me: failed program was:" >&5
2251sed 's/^/| /' conftest.$ac_ext >&5
2252
2253       ac_retval=$ac_status
2254fi
2255  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_cxx_try_run
2260
2261# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2262# ---------------------------------------------------------
2263# Tests whether HEADER exists and can be compiled using the include files in
2264# INCLUDES, setting the cache variable VAR accordingly.
2265ac_fn_cxx_check_header_compile ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2269$as_echo_n "checking for $2... " >&6; }
2270if eval \${$3+:} false; then :
2271  $as_echo_n "(cached) " >&6
2272else
2273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h.  */
2275$4
2276#include <$2>
2277_ACEOF
2278if ac_fn_cxx_try_compile "$LINENO"; then :
2279  eval "$3=yes"
2280else
2281  eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_cxx_check_header_compile
2291
2292# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2293# ----------------------------------------------
2294# Tries to find the compile-time value of EXPR in a program that includes
2295# INCLUDES, setting VAR accordingly. Returns whether the value could be
2296# computed
2297ac_fn_cxx_compute_int ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if test "$cross_compiling" = yes; then
2301    # Depending upon the size, compute the lo and hi bounds.
2302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) >= 0)];
2309test_array [0] = 0;
2310return test_array [0];
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_lo=0 ac_mid=0
2318  while :; do
2319    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid; break
2335else
2336  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2337			if test $ac_lo -le $ac_mid; then
2338			  ac_lo= ac_hi=
2339			  break
2340			fi
2341			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344  done
2345else
2346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h.  */
2348$4
2349int
2350main ()
2351{
2352static int test_array [1 - 2 * !(($2) < 0)];
2353test_array [0] = 0;
2354return test_array [0];
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_hi=-1 ac_mid=-1
2362  while :; do
2363    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_lo=$ac_mid; break
2379else
2380  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2381			if test $ac_mid -le $ac_hi; then
2382			  ac_lo= ac_hi=
2383			  break
2384			fi
2385			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388  done
2389else
2390  ac_lo= ac_hi=
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395# Binary search between lo and hi bounds.
2396while test "x$ac_lo" != "x$ac_hi"; do
2397  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401int
2402main ()
2403{
2404static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2405test_array [0] = 0;
2406return test_array [0];
2407
2408  ;
2409  return 0;
2410}
2411_ACEOF
2412if ac_fn_cxx_try_compile "$LINENO"; then :
2413  ac_hi=$ac_mid
2414else
2415  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419case $ac_lo in #((
2420?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2421'') ac_retval=1 ;;
2422esac
2423  else
2424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h.  */
2426$4
2427static long int longval () { return $2; }
2428static unsigned long int ulongval () { return $2; }
2429#include <stdio.h>
2430#include <stdlib.h>
2431int
2432main ()
2433{
2434
2435  FILE *f = fopen ("conftest.val", "w");
2436  if (! f)
2437    return 1;
2438  if (($2) < 0)
2439    {
2440      long int i = longval ();
2441      if (i != ($2))
2442	return 1;
2443      fprintf (f, "%ld", i);
2444    }
2445  else
2446    {
2447      unsigned long int i = ulongval ();
2448      if (i != ($2))
2449	return 1;
2450      fprintf (f, "%lu", i);
2451    }
2452  /* Do not output a trailing newline, as this causes \r\n confusion
2453     on some platforms.  */
2454  return ferror (f) || fclose (f) != 0;
2455
2456  ;
2457  return 0;
2458}
2459_ACEOF
2460if ac_fn_cxx_try_run "$LINENO"; then :
2461  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2462else
2463  ac_retval=1
2464fi
2465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2466  conftest.$ac_objext conftest.beam conftest.$ac_ext
2467rm -f conftest.val
2468
2469  fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_compute_int
2474
2475# ac_fn_cxx_try_link LINENO
2476# -------------------------
2477# Try to link conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_cxx_try_link ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  rm -f conftest.$ac_objext conftest$ac_exeext
2482  if { { ac_try="$ac_link"
2483case "(($ac_try" in
2484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2485  *) ac_try_echo=$ac_try;;
2486esac
2487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2488$as_echo "$ac_try_echo"; } >&5
2489  (eval "$ac_link") 2>conftest.err
2490  ac_status=$?
2491  if test -s conftest.err; then
2492    grep -v '^ *+' conftest.err >conftest.er1
2493    cat conftest.er1 >&5
2494    mv -f conftest.er1 conftest.err
2495  fi
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && {
2498	 test -z "$ac_cxx_werror_flag" ||
2499	 test ! -s conftest.err
2500       } && test -s conftest$ac_exeext && {
2501	 test "$cross_compiling" = yes ||
2502	 test -x conftest$ac_exeext
2503       }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: failed program was:" >&5
2507sed 's/^/| /' conftest.$ac_ext >&5
2508
2509	ac_retval=1
2510fi
2511  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2512  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2513  # interfere with the next link command; also delete a directory that is
2514  # left behind by Apple's compiler.  We do this before executing the actions.
2515  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_cxx_try_link
2520
2521# ac_fn_cxx_check_func LINENO FUNC VAR
2522# ------------------------------------
2523# Tests whether FUNC exists, setting the cache variable VAR accordingly
2524ac_fn_cxx_check_func ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2535   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2536#define $2 innocuous_$2
2537
2538/* System header to define __stub macros and hopefully few prototypes,
2539    which can conflict with char $2 (); below.
2540    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2541    <limits.h> exists even on freestanding compilers.  */
2542
2543#ifdef __STDC__
2544# include <limits.h>
2545#else
2546# include <assert.h>
2547#endif
2548
2549#undef $2
2550
2551/* Override any GCC internal prototype to avoid an error.
2552   Use char because int might match the return type of a GCC
2553   builtin and then its argument prototype would still apply.  */
2554#ifdef __cplusplus
2555extern "C"
2556#endif
2557char $2 ();
2558/* The GNU C library defines this for functions which it implements
2559    to always fail with ENOSYS.  Some functions are actually named
2560    something starting with __ and the normal name is an alias.  */
2561#if defined __stub_$2 || defined __stub___$2
2562choke me
2563#endif
2564
2565int
2566main ()
2567{
2568return $2 ();
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_link "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext \
2579    conftest$ac_exeext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_func
2587
2588# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2589# -------------------------------------------------------
2590# Tests whether HEADER exists and can be compiled using the include files in
2591# INCLUDES, setting the cache variable VAR accordingly.
2592ac_fn_c_check_header_compile ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2596$as_echo_n "checking for $2... " >&6; }
2597if eval \${$3+:} false; then :
2598  $as_echo_n "(cached) " >&6
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603#include <$2>
2604_ACEOF
2605if ac_fn_c_try_compile "$LINENO"; then :
2606  eval "$3=yes"
2607else
2608  eval "$3=no"
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2616
2617} # ac_fn_c_check_header_compile
2618cat >config.log <<_ACEOF
2619This file contains any messages produced by compilers while
2620running configure, to aid debugging if configure makes a mistake.
2621
2622It was created by OpenJDK $as_me jdk8, which was
2623generated by GNU Autoconf 2.69.  Invocation command line was
2624
2625  $ $0 $@
2626
2627_ACEOF
2628exec 5>>config.log
2629{
2630cat <<_ASUNAME
2631## --------- ##
2632## Platform. ##
2633## --------- ##
2634
2635hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2636uname -m = `(uname -m) 2>/dev/null || echo unknown`
2637uname -r = `(uname -r) 2>/dev/null || echo unknown`
2638uname -s = `(uname -s) 2>/dev/null || echo unknown`
2639uname -v = `(uname -v) 2>/dev/null || echo unknown`
2640
2641/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2642/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2643
2644/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2645/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2646/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2647/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2648/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2649/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2650/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2651
2652_ASUNAME
2653
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657  IFS=$as_save_IFS
2658  test -z "$as_dir" && as_dir=.
2659    $as_echo "PATH: $as_dir"
2660  done
2661IFS=$as_save_IFS
2662
2663} >&5
2664
2665cat >&5 <<_ACEOF
2666
2667
2668## ----------- ##
2669## Core tests. ##
2670## ----------- ##
2671
2672_ACEOF
2673
2674
2675# Keep a trace of the command line.
2676# Strip out --no-create and --no-recursion so they do not pile up.
2677# Strip out --silent because we don't want to record it for future runs.
2678# Also quote any args containing shell meta-characters.
2679# Make two passes to allow for proper duplicate-argument suppression.
2680ac_configure_args=
2681ac_configure_args0=
2682ac_configure_args1=
2683ac_must_keep_next=false
2684for ac_pass in 1 2
2685do
2686  for ac_arg
2687  do
2688    case $ac_arg in
2689    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2690    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2691    | -silent | --silent | --silen | --sile | --sil)
2692      continue ;;
2693    *\'*)
2694      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2695    esac
2696    case $ac_pass in
2697    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2698    2)
2699      as_fn_append ac_configure_args1 " '$ac_arg'"
2700      if test $ac_must_keep_next = true; then
2701	ac_must_keep_next=false # Got value, back to normal.
2702      else
2703	case $ac_arg in
2704	  *=* | --config-cache | -C | -disable-* | --disable-* \
2705	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2706	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2707	  | -with-* | --with-* | -without-* | --without-* | --x)
2708	    case "$ac_configure_args0 " in
2709	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2710	    esac
2711	    ;;
2712	  -* ) ac_must_keep_next=true ;;
2713	esac
2714      fi
2715      as_fn_append ac_configure_args " '$ac_arg'"
2716      ;;
2717    esac
2718  done
2719done
2720{ ac_configure_args0=; unset ac_configure_args0;}
2721{ ac_configure_args1=; unset ac_configure_args1;}
2722
2723# When interrupted or exit'd, cleanup temporary files, and complete
2724# config.log.  We remove comments because anyway the quotes in there
2725# would cause problems or look ugly.
2726# WARNING: Use '\'' to represent an apostrophe within the trap.
2727# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2728trap 'exit_status=$?
2729  # Save into config.log some information that might help in debugging.
2730  {
2731    echo
2732
2733    $as_echo "## ---------------- ##
2734## Cache variables. ##
2735## ---------------- ##"
2736    echo
2737    # The following way of writing the cache mishandles newlines in values,
2738(
2739  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2740    eval ac_val=\$$ac_var
2741    case $ac_val in #(
2742    *${as_nl}*)
2743      case $ac_var in #(
2744      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2745$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2746      esac
2747      case $ac_var in #(
2748      _ | IFS | as_nl) ;; #(
2749      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2750      *) { eval $ac_var=; unset $ac_var;} ;;
2751      esac ;;
2752    esac
2753  done
2754  (set) 2>&1 |
2755    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2756    *${as_nl}ac_space=\ *)
2757      sed -n \
2758	"s/'\''/'\''\\\\'\'''\''/g;
2759	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2760      ;; #(
2761    *)
2762      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2763      ;;
2764    esac |
2765    sort
2766)
2767    echo
2768
2769    $as_echo "## ----------------- ##
2770## Output variables. ##
2771## ----------------- ##"
2772    echo
2773    for ac_var in $ac_subst_vars
2774    do
2775      eval ac_val=\$$ac_var
2776      case $ac_val in
2777      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778      esac
2779      $as_echo "$ac_var='\''$ac_val'\''"
2780    done | sort
2781    echo
2782
2783    if test -n "$ac_subst_files"; then
2784      $as_echo "## ------------------- ##
2785## File substitutions. ##
2786## ------------------- ##"
2787      echo
2788      for ac_var in $ac_subst_files
2789      do
2790	eval ac_val=\$$ac_var
2791	case $ac_val in
2792	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2793	esac
2794	$as_echo "$ac_var='\''$ac_val'\''"
2795      done | sort
2796      echo
2797    fi
2798
2799    if test -s confdefs.h; then
2800      $as_echo "## ----------- ##
2801## confdefs.h. ##
2802## ----------- ##"
2803      echo
2804      cat confdefs.h
2805      echo
2806    fi
2807    test "$ac_signal" != 0 &&
2808      $as_echo "$as_me: caught signal $ac_signal"
2809    $as_echo "$as_me: exit $exit_status"
2810  } >&5
2811  rm -f core *.core core.conftest.* &&
2812    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2813    exit $exit_status
2814' 0
2815for ac_signal in 1 2 13 15; do
2816  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2817done
2818ac_signal=0
2819
2820# confdefs.h avoids OS command line length limits that DEFS can exceed.
2821rm -f -r conftest* confdefs.h
2822
2823$as_echo "/* confdefs.h */" > confdefs.h
2824
2825# Predefined preprocessor variables.
2826
2827cat >>confdefs.h <<_ACEOF
2828#define PACKAGE_NAME "$PACKAGE_NAME"
2829_ACEOF
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2833_ACEOF
2834
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_VERSION "$PACKAGE_VERSION"
2837_ACEOF
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_STRING "$PACKAGE_STRING"
2841_ACEOF
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_URL "$PACKAGE_URL"
2849_ACEOF
2850
2851
2852# Let the site file select an alternate cache file if it wants to.
2853# Prefer an explicitly selected file to automatically selected ones.
2854ac_site_file1=NONE
2855ac_site_file2=NONE
2856if test -n "$CONFIG_SITE"; then
2857  # We do not want a PATH search for config.site.
2858  case $CONFIG_SITE in #((
2859    -*)  ac_site_file1=./$CONFIG_SITE;;
2860    */*) ac_site_file1=$CONFIG_SITE;;
2861    *)   ac_site_file1=./$CONFIG_SITE;;
2862  esac
2863elif test "x$prefix" != xNONE; then
2864  ac_site_file1=$prefix/share/config.site
2865  ac_site_file2=$prefix/etc/config.site
2866else
2867  ac_site_file1=$ac_default_prefix/share/config.site
2868  ac_site_file2=$ac_default_prefix/etc/config.site
2869fi
2870for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2871do
2872  test "x$ac_site_file" = xNONE && continue
2873  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2874    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2875$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2876    sed 's/^/| /' "$ac_site_file" >&5
2877    . "$ac_site_file" \
2878      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880as_fn_error $? "failed to load site script $ac_site_file
2881See \`config.log' for more details" "$LINENO" 5; }
2882  fi
2883done
2884
2885if test -r "$cache_file"; then
2886  # Some versions of bash will fail to source /dev/null (special files
2887  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2888  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2889    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2890$as_echo "$as_me: loading cache $cache_file" >&6;}
2891    case $cache_file in
2892      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2893      *)                      . "./$cache_file";;
2894    esac
2895  fi
2896else
2897  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2898$as_echo "$as_me: creating cache $cache_file" >&6;}
2899  >$cache_file
2900fi
2901
2902# Check that the precious variables saved in the cache have kept the same
2903# value.
2904ac_cache_corrupted=false
2905for ac_var in $ac_precious_vars; do
2906  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2907  eval ac_new_set=\$ac_env_${ac_var}_set
2908  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2909  eval ac_new_val=\$ac_env_${ac_var}_value
2910  case $ac_old_set,$ac_new_set in
2911    set,)
2912      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2914      ac_cache_corrupted=: ;;
2915    ,set)
2916      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2917$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2918      ac_cache_corrupted=: ;;
2919    ,);;
2920    *)
2921      if test "x$ac_old_val" != "x$ac_new_val"; then
2922	# differences in whitespace do not lead to failure.
2923	ac_old_val_w=`echo x $ac_old_val`
2924	ac_new_val_w=`echo x $ac_new_val`
2925	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2926	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2927$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2928	  ac_cache_corrupted=:
2929	else
2930	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2931$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2932	  eval $ac_var=\$ac_old_val
2933	fi
2934	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2935$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2936	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2937$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2938      fi;;
2939  esac
2940  # Pass precious variables to config.status.
2941  if test "$ac_new_set" = set; then
2942    case $ac_new_val in
2943    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2944    *) ac_arg=$ac_var=$ac_new_val ;;
2945    esac
2946    case " $ac_configure_args " in
2947      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2948      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2949    esac
2950  fi
2951done
2952if $ac_cache_corrupted; then
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2956$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2957  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2958fi
2959## -------------------- ##
2960## Main body of script. ##
2961## -------------------- ##
2962
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
2968
2969
2970
2971ac_aux_dir=
2972for ac_dir in build-aux "$srcdir"/build-aux; do
2973  if test -f "$ac_dir/install-sh"; then
2974    ac_aux_dir=$ac_dir
2975    ac_install_sh="$ac_aux_dir/install-sh -c"
2976    break
2977  elif test -f "$ac_dir/install.sh"; then
2978    ac_aux_dir=$ac_dir
2979    ac_install_sh="$ac_aux_dir/install.sh -c"
2980    break
2981  elif test -f "$ac_dir/shtool"; then
2982    ac_aux_dir=$ac_dir
2983    ac_install_sh="$ac_aux_dir/shtool install -c"
2984    break
2985  fi
2986done
2987if test -z "$ac_aux_dir"; then
2988  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2989fi
2990
2991# These three variables are undocumented and unsupported,
2992# and are intended to be withdrawn in a future Autoconf release.
2993# They can cause serious problems if a builder's source tree is in a directory
2994# whose full name contains unusual characters.
2995ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2996ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2997ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2998
2999
3000# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3001
3002#
3003# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3004# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3005#
3006# This code is free software; you can redistribute it and/or modify it
3007# under the terms of the GNU General Public License version 2 only, as
3008# published by the Free Software Foundation.  Oracle designates this
3009# particular file as subject to the "Classpath" exception as provided
3010# by Oracle in the LICENSE file that accompanied this code.
3011#
3012# This code is distributed in the hope that it will be useful, but WITHOUT
3013# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3014# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3015# version 2 for more details (a copy is included in the LICENSE file that
3016# accompanied this code).
3017#
3018# You should have received a copy of the GNU General Public License version
3019# 2 along with this work; if not, write to the Free Software Foundation,
3020# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3021#
3022# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3023# or visit www.oracle.com if you need additional information or have any
3024# questions.
3025#
3026
3027#
3028# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3029#
3030# This program is free software; you can redistribute it and/or modify
3031# it under the terms of the GNU General Public License as published by
3032# the Free Software Foundation; either version 2 of the License, or
3033# (at your option) any later version.
3034#
3035# This program is distributed in the hope that it will be useful, but
3036# WITHOUT ANY WARRANTY; without even the implied warranty of
3037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3038# General Public License for more details.
3039#
3040# You should have received a copy of the GNU General Public License
3041# along with this program; if not, write to the Free Software
3042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3043#
3044# As a special exception to the GNU General Public License, if you
3045# distribute this file as part of a program that contains a
3046# configuration script generated by Autoconf, you may include it under
3047# the same distribution terms that you use for the rest of that program.
3048
3049# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3050# ----------------------------------
3051# PKG_PROG_PKG_CONFIG
3052
3053# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3054#
3055# Check to see whether a particular set of modules exists.  Similar
3056# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3057#
3058#
3059# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3060# this or PKG_CHECK_MODULES is called, or make sure to call
3061# PKG_CHECK_EXISTS manually
3062# --------------------------------------------------------------
3063
3064
3065
3066# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3067# ---------------------------------------------
3068# _PKG_CONFIG
3069
3070# _PKG_SHORT_ERRORS_SUPPORTED
3071# -----------------------------
3072# _PKG_SHORT_ERRORS_SUPPORTED
3073
3074
3075# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3076# [ACTION-IF-NOT-FOUND])
3077#
3078#
3079# Note that if there is a possibility the first call to
3080# PKG_CHECK_MODULES might not happen, you should be sure to include an
3081# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3082#
3083#
3084# --------------------------------------------------------------
3085# PKG_CHECK_MODULES
3086
3087
3088# Include these first...
3089#
3090# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3092#
3093# This code is free software; you can redistribute it and/or modify it
3094# under the terms of the GNU General Public License version 2 only, as
3095# published by the Free Software Foundation.  Oracle designates this
3096# particular file as subject to the "Classpath" exception as provided
3097# by Oracle in the LICENSE file that accompanied this code.
3098#
3099# This code is distributed in the hope that it will be useful, but WITHOUT
3100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3102# version 2 for more details (a copy is included in the LICENSE file that
3103# accompanied this code).
3104#
3105# You should have received a copy of the GNU General Public License version
3106# 2 along with this work; if not, write to the Free Software Foundation,
3107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3108#
3109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3110# or visit www.oracle.com if you need additional information or have any
3111# questions.
3112#
3113
3114# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3115# If so, then append $1 to $2 \
3116# Also set JVM_ARG_OK to true/false depending on outcome.
3117
3118
3119# Appends a string to a path variable, only adding the : when needed.
3120
3121
3122# This will make sure the given variable points to a full and proper
3123# path. This means:
3124# 1) There will be no spaces in the path. On posix platforms,
3125#    spaces in the path will result in an error. On Windows,
3126#    the path will be rewritten using short-style to be space-free.
3127# 2) The path will be absolute, and it will be in unix-style (on
3128#     cygwin).
3129# $1: The name of the variable to fix
3130
3131
3132# This will make sure the given variable points to a executable
3133# with a full and proper path. This means:
3134# 1) There will be no spaces in the path. On posix platforms,
3135#    spaces in the path will result in an error. On Windows,
3136#    the path will be rewritten using short-style to be space-free.
3137# 2) The path will be absolute, and it will be in unix-style (on
3138#     cygwin).
3139# Any arguments given to the executable is preserved.
3140# If the input variable does not have a directory specification, then
3141# it need to be in the PATH.
3142# $1: The name of the variable to fix
3143
3144
3145
3146
3147# Register a --with argument but mark it as deprecated
3148# $1: The name of the with argument to deprecate, not including --with-
3149
3150
3151# Register a --enable argument but mark it as deprecated
3152# $1: The name of the with argument to deprecate, not including --enable-
3153# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3154
3155
3156
3157
3158# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3159# $1: variable to check
3160# $2: executable name to print in warning (optional)
3161
3162
3163# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3164# Arguments as AC_PATH_PROG:
3165# $1: variable to set
3166# $2: executable name to look for
3167
3168
3169# Setup the most fundamental tools that relies on not much else to set up,
3170# but is used by much of the early bootstrap code.
3171
3172
3173# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3174
3175
3176
3177
3178
3179
3180
3181#%%% Simple tools %%%
3182
3183# Check if we have found a usable version of make
3184# $1: the path to a potential make binary (or empty)
3185# $2: the description on how we found this
3186
3187
3188# Goes looking for a usable version of GNU make.
3189
3190
3191
3192
3193
3194
3195# Check if build directory is on local disk. If not possible to determine,
3196# we prefer to claim it's local.
3197# Argument 1: directory to test
3198# Argument 2: what to do if it is on local disk
3199# Argument 3: what to do otherwise (remote disk or failure)
3200
3201
3202# Check that source files have basic read permissions set. This might
3203# not be the case in cygwin in certain conditions.
3204
3205
3206
3207
3208#
3209# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3210# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3211#
3212# This code is free software; you can redistribute it and/or modify it
3213# under the terms of the GNU General Public License version 2 only, as
3214# published by the Free Software Foundation.  Oracle designates this
3215# particular file as subject to the "Classpath" exception as provided
3216# by Oracle in the LICENSE file that accompanied this code.
3217#
3218# This code is distributed in the hope that it will be useful, but WITHOUT
3219# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3220# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3221# version 2 for more details (a copy is included in the LICENSE file that
3222# accompanied this code).
3223#
3224# You should have received a copy of the GNU General Public License version
3225# 2 along with this work; if not, write to the Free Software Foundation,
3226# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3227#
3228# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3229# or visit www.oracle.com if you need additional information or have any
3230# questions.
3231#
3232
3233
3234
3235
3236
3237# Helper function which possibly converts a path using DOS-style short mode.
3238# If so, the updated path is stored in $new_path.
3239# $1: The path to check
3240
3241
3242# Helper function which possibly converts a path using DOS-style short mode.
3243# If so, the updated path is stored in $new_path.
3244# $1: The path to check
3245
3246
3247# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3248# and could probably be heavily simplified. However, all changes in this
3249# area tend to need lot of testing in different scenarios, and in lack of
3250# proper unit testing, cleaning this up has not been deemed worth the effort
3251# at the moment.
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3262
3263
3264
3265
3266#
3267# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3268# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3269#
3270# This code is free software; you can redistribute it and/or modify it
3271# under the terms of the GNU General Public License version 2 only, as
3272# published by the Free Software Foundation.  Oracle designates this
3273# particular file as subject to the "Classpath" exception as provided
3274# by Oracle in the LICENSE file that accompanied this code.
3275#
3276# This code is distributed in the hope that it will be useful, but WITHOUT
3277# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3278# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3279# version 2 for more details (a copy is included in the LICENSE file that
3280# accompanied this code).
3281#
3282# You should have received a copy of the GNU General Public License version
3283# 2 along with this work; if not, write to the Free Software Foundation,
3284# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3285#
3286# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3287# or visit www.oracle.com if you need additional information or have any
3288# questions.
3289#
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301# ... then the rest
3302#
3303# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3304# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3305#
3306# This code is free software; you can redistribute it and/or modify it
3307# under the terms of the GNU General Public License version 2 only, as
3308# published by the Free Software Foundation.  Oracle designates this
3309# particular file as subject to the "Classpath" exception as provided
3310# by Oracle in the LICENSE file that accompanied this code.
3311#
3312# This code is distributed in the hope that it will be useful, but WITHOUT
3313# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3314# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3315# version 2 for more details (a copy is included in the LICENSE file that
3316# accompanied this code).
3317#
3318# You should have received a copy of the GNU General Public License version
3319# 2 along with this work; if not, write to the Free Software Foundation,
3320# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3321#
3322# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3323# or visit www.oracle.com if you need additional information or have any
3324# questions.
3325#
3326
3327# Execute the check given as argument, and verify the result
3328# If the Boot JDK was previously found, do nothing
3329# $1 A command line (typically autoconf macro) to execute
3330
3331
3332# Test: Is bootjdk explicitely set by command line arguments?
3333
3334
3335# Test: Is bootjdk available from builddeps?
3336
3337
3338# Test: Is $JAVA_HOME set?
3339
3340
3341# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3342
3343
3344# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3345
3346
3347# Look for a jdk in the given path. If there are multiple, try to select the newest.
3348# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3349# $1 = Path to directory containing jdk installations.
3350# $2 = String to append to the found JDK directory to get the proper JDK home
3351
3352
3353# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3354# environmental variable as base for where to look.
3355# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3356
3357
3358# Test: Is there a JDK installed in default, well-known locations?
3359
3360
3361# Check that a command-line tool in the Boot JDK is correct
3362# $1 = name of variable to assign
3363# $2 = name of binary
3364
3365
3366###############################################################################
3367#
3368# We need a Boot JDK to bootstrap the build.
3369#
3370
3371
3372
3373
3374
3375#
3376# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3377# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3378#
3379# This code is free software; you can redistribute it and/or modify it
3380# under the terms of the GNU General Public License version 2 only, as
3381# published by the Free Software Foundation.  Oracle designates this
3382# particular file as subject to the "Classpath" exception as provided
3383# by Oracle in the LICENSE file that accompanied this code.
3384#
3385# This code is distributed in the hope that it will be useful, but WITHOUT
3386# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3387# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3388# version 2 for more details (a copy is included in the LICENSE file that
3389# accompanied this code).
3390#
3391# You should have received a copy of the GNU General Public License version
3392# 2 along with this work; if not, write to the Free Software Foundation,
3393# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3394#
3395# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3396# or visit www.oracle.com if you need additional information or have any
3397# questions.
3398#
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419#
3420# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3421# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3422#
3423# This code is free software; you can redistribute it and/or modify it
3424# under the terms of the GNU General Public License version 2 only, as
3425# published by the Free Software Foundation.  Oracle designates this
3426# particular file as subject to the "Classpath" exception as provided
3427# by Oracle in the LICENSE file that accompanied this code.
3428#
3429# This code is distributed in the hope that it will be useful, but WITHOUT
3430# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3431# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3432# version 2 for more details (a copy is included in the LICENSE file that
3433# accompanied this code).
3434#
3435# You should have received a copy of the GNU General Public License version
3436# 2 along with this work; if not, write to the Free Software Foundation,
3437# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3438#
3439# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3440# or visit www.oracle.com if you need additional information or have any
3441# questions.
3442#
3443
3444
3445
3446
3447
3448cygwin_help() {
3449  case $1 in
3450    unzip)
3451      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3452      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3453      ;;
3454    zip)
3455      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3456      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3457      ;;
3458    make)
3459      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3460      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3461      ;;
3462    freetype2)
3463      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3464        HELP_MSG="To install freetype, run:
3465wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3466chmod +x /tmp/freetype-setup.exe
3467/tmp/freetype-setup.exe
3468Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3469After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3470      else
3471        HELP_MSG="You need to build a 64-bit version of freetype.
3472This is not readily available.
3473You can find source code and build instructions on
3474http://www.freetype.org/
3475If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3476      fi
3477      ;;
3478    * )
3479      break ;;
3480  esac
3481}
3482
3483msys_help() {
3484  PKGHANDLER_COMMAND=""
3485}
3486
3487apt_help() {
3488  case $1 in
3489    devkit)
3490      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3491    openjdk)
3492      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3493    alsa)
3494      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3495    cups)
3496      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3497    freetype2)
3498      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3499    pulse)
3500      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3501    x11)
3502      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3503    ccache)
3504      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3505    * )
3506      break ;;
3507  esac
3508}
3509
3510yum_help() {
3511  case $1 in
3512    devkit)
3513      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3514    openjdk)
3515      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3516    alsa)
3517      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3518    cups)
3519      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3520    freetype2)
3521      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3522    pulse)
3523      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3524    x11)
3525      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3526    ccache)
3527      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3528    * )
3529      break ;;
3530  esac
3531}
3532
3533port_help() {
3534  PKGHANDLER_COMMAND=""
3535}
3536
3537pkgutil_help() {
3538  PKGHANDLER_COMMAND=""
3539}
3540
3541pkgadd_help() {
3542  PKGHANDLER_COMMAND=""
3543}
3544
3545
3546
3547#
3548# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3549# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3550#
3551# This code is free software; you can redistribute it and/or modify it
3552# under the terms of the GNU General Public License version 2 only, as
3553# published by the Free Software Foundation.  Oracle designates this
3554# particular file as subject to the "Classpath" exception as provided
3555# by Oracle in the LICENSE file that accompanied this code.
3556#
3557# This code is distributed in the hope that it will be useful, but WITHOUT
3558# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3559# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3560# version 2 for more details (a copy is included in the LICENSE file that
3561# accompanied this code).
3562#
3563# You should have received a copy of the GNU General Public License version
3564# 2 along with this work; if not, write to the Free Software Foundation,
3565# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3566#
3567# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3568# or visit www.oracle.com if you need additional information or have any
3569# questions.
3570#
3571
3572
3573
3574
3575
3576
3577
3578
3579###############################################################################
3580#
3581# Should we build only OpenJDK even if closed sources are present?
3582#
3583
3584
3585
3586
3587###############################################################################
3588#
3589# Setup version numbers
3590#
3591
3592
3593
3594
3595
3596
3597# Support for customization of the build process. Some build files
3598# will include counterparts from this location, if they exist. This allows
3599# for a degree of customization of the build targets and the rules/recipes
3600# to create them
3601
3602# Check whether --with-custom-make-dir was given.
3603if test "${with_custom_make_dir+set}" = set; then :
3604  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3605fi
3606
3607
3608
3609#
3610# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3611# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3612#
3613# This code is free software; you can redistribute it and/or modify it
3614# under the terms of the GNU General Public License version 2 only, as
3615# published by the Free Software Foundation.  Oracle designates this
3616# particular file as subject to the "Classpath" exception as provided
3617# by Oracle in the LICENSE file that accompanied this code.
3618#
3619# This code is distributed in the hope that it will be useful, but WITHOUT
3620# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3621# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3622# version 2 for more details (a copy is included in the LICENSE file that
3623# accompanied this code).
3624#
3625# You should have received a copy of the GNU General Public License version
3626# 2 along with this work; if not, write to the Free Software Foundation,
3627# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3628#
3629# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3630# or visit www.oracle.com if you need additional information or have any
3631# questions.
3632#
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648#
3649# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3650# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3651#
3652# This code is free software; you can redistribute it and/or modify it
3653# under the terms of the GNU General Public License version 2 only, as
3654# published by the Free Software Foundation.  Oracle designates this
3655# particular file as subject to the "Classpath" exception as provided
3656# by Oracle in the LICENSE file that accompanied this code.
3657#
3658# This code is distributed in the hope that it will be useful, but WITHOUT
3659# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3660# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3661# version 2 for more details (a copy is included in the LICENSE file that
3662# accompanied this code).
3663#
3664# You should have received a copy of the GNU General Public License version
3665# 2 along with this work; if not, write to the Free Software Foundation,
3666# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3667#
3668# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3669# or visit www.oracle.com if you need additional information or have any
3670# questions.
3671#
3672
3673# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3674# Converts autoconf style CPU name to OpenJDK style, into
3675# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3676
3677
3678# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3679# Converts autoconf style OS name to OpenJDK style, into
3680# VAR_OS and VAR_OS_API.
3681
3682
3683# Expects $host_os $host_cpu $build_os and $build_cpu
3684# and $with_target_bits to have been setup!
3685#
3686# Translate the standard triplet(quadruplet) definition
3687# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3688# OPENJDK_BUILD_OS, etc.
3689
3690
3691# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3692# accordingly. Must be done after setting up build and target system, but before
3693# doing anything else with these values.
3694
3695
3696# Setup the legacy variables, for controlling the old makefiles.
3697#
3698
3699
3700
3701
3702#%%% Build and target systems %%%
3703
3704
3705
3706
3707# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3708# Add -mX to various FLAGS variables.
3709
3710
3711
3712
3713
3714
3715#
3716# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3717# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3718#
3719# This code is free software; you can redistribute it and/or modify it
3720# under the terms of the GNU General Public License version 2 only, as
3721# published by the Free Software Foundation.  Oracle designates this
3722# particular file as subject to the "Classpath" exception as provided
3723# by Oracle in the LICENSE file that accompanied this code.
3724#
3725# This code is distributed in the hope that it will be useful, but WITHOUT
3726# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3727# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3728# version 2 for more details (a copy is included in the LICENSE file that
3729# accompanied this code).
3730#
3731# You should have received a copy of the GNU General Public License version
3732# 2 along with this work; if not, write to the Free Software Foundation,
3733# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3734#
3735# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3736# or visit www.oracle.com if you need additional information or have any
3737# questions.
3738#
3739
3740
3741
3742
3743
3744
3745
3746
3747#
3748# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772# $1 = compiler to test (CC or CXX)
3773# $2 = human readable name of compiler (C or C++)
3774
3775
3776
3777
3778
3779# $1 = compiler to test (CC or CXX)
3780# $2 = human readable name of compiler (C or C++)
3781# $3 = list of compiler names to search for
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3796#                                   [RUN-IF-FALSE])
3797# ------------------------------------------------------------
3798# Check that the c and c++ compilers support an argument
3799
3800
3801
3802
3803# Setup the JTREG paths
3804
3805
3806#
3807# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3809#
3810# This code is free software; you can redistribute it and/or modify it
3811# under the terms of the GNU General Public License version 2 only, as
3812# published by the Free Software Foundation.  Oracle designates this
3813# particular file as subject to the "Classpath" exception as provided
3814# by Oracle in the LICENSE file that accompanied this code.
3815#
3816# This code is distributed in the hope that it will be useful, but WITHOUT
3817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3819# version 2 for more details (a copy is included in the LICENSE file that
3820# accompanied this code).
3821#
3822# You should have received a copy of the GNU General Public License version
3823# 2 along with this work; if not, write to the Free Software Foundation,
3824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3825#
3826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3827# or visit www.oracle.com if you need additional information or have any
3828# questions.
3829#
3830
3831
3832
3833
3834
3835
3836
3837# Check if the VS env variables were setup prior to running configure.
3838# If not, then find vcvarsall.bat and run it automatically, and integrate
3839# the set env variables into the spec file.
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850# This line needs to be here, verbatim, after all includes and the dummy hook
3851# definitions. It is replaced with custom functionality when building
3852# custom sources.
3853#CUSTOM_AUTOCONF_INCLUDE
3854
3855# Do not change or remove the following line, it is needed for consistency checks:
3856DATE_WHEN_GENERATED=1382437436
3857
3858###############################################################################
3859#
3860# Initialization / Boot-strapping
3861#
3862# The bootstrapping process needs to solve the "chicken or the egg" problem,
3863# thus it jumps back and forth, each time gaining something needed later on.
3864#
3865###############################################################################
3866
3867# Basic initialization that must happen first of all
3868
3869  # Save the original command line. This is passed to us by the wrapper configure script.
3870
3871  DATE_WHEN_CONFIGURED=`LANG=C date`
3872
3873  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3874$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3875  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3876$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3877
3878
3879
3880  # Start with tools that do not need have cross compilation support
3881  # and can be expected to be found in the default PATH. These tools are
3882  # used by configure. Nor are these tools expected to be found in the
3883  # devkit from the builddeps server either, since they are
3884  # needed to download the devkit.
3885
3886  # First are all the simple required tools.
3887
3888  for ac_prog in basename
3889do
3890  # Extract the first word of "$ac_prog", so it can be a program name with args.
3891set dummy $ac_prog; ac_word=$2
3892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3893$as_echo_n "checking for $ac_word... " >&6; }
3894if ${ac_cv_path_BASENAME+:} false; then :
3895  $as_echo_n "(cached) " >&6
3896else
3897  case $BASENAME in
3898  [\\/]* | ?:[\\/]*)
3899  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3900  ;;
3901  *)
3902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3903for as_dir in $PATH
3904do
3905  IFS=$as_save_IFS
3906  test -z "$as_dir" && as_dir=.
3907    for ac_exec_ext in '' $ac_executable_extensions; do
3908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3909    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3911    break 2
3912  fi
3913done
3914  done
3915IFS=$as_save_IFS
3916
3917  ;;
3918esac
3919fi
3920BASENAME=$ac_cv_path_BASENAME
3921if test -n "$BASENAME"; then
3922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3923$as_echo "$BASENAME" >&6; }
3924else
3925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3926$as_echo "no" >&6; }
3927fi
3928
3929
3930  test -n "$BASENAME" && break
3931done
3932
3933
3934  if test "x$BASENAME" = x; then
3935    if test "xbasename" = x; then
3936      PROG_NAME=basename
3937    else
3938      PROG_NAME=basename
3939    fi
3940    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3941$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3942    as_fn_error $? "Cannot continue" "$LINENO" 5
3943  fi
3944
3945
3946
3947  for ac_prog in bash
3948do
3949  # Extract the first word of "$ac_prog", so it can be a program name with args.
3950set dummy $ac_prog; ac_word=$2
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3952$as_echo_n "checking for $ac_word... " >&6; }
3953if ${ac_cv_path_BASH+:} false; then :
3954  $as_echo_n "(cached) " >&6
3955else
3956  case $BASH in
3957  [\\/]* | ?:[\\/]*)
3958  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3959  ;;
3960  *)
3961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3962for as_dir in $PATH
3963do
3964  IFS=$as_save_IFS
3965  test -z "$as_dir" && as_dir=.
3966    for ac_exec_ext in '' $ac_executable_extensions; do
3967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3968    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3970    break 2
3971  fi
3972done
3973  done
3974IFS=$as_save_IFS
3975
3976  ;;
3977esac
3978fi
3979BASH=$ac_cv_path_BASH
3980if test -n "$BASH"; then
3981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3982$as_echo "$BASH" >&6; }
3983else
3984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3985$as_echo "no" >&6; }
3986fi
3987
3988
3989  test -n "$BASH" && break
3990done
3991
3992
3993  if test "x$BASH" = x; then
3994    if test "xbash" = x; then
3995      PROG_NAME=bash
3996    else
3997      PROG_NAME=bash
3998    fi
3999    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4000$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4001    as_fn_error $? "Cannot continue" "$LINENO" 5
4002  fi
4003
4004
4005
4006  for ac_prog in cat
4007do
4008  # Extract the first word of "$ac_prog", so it can be a program name with args.
4009set dummy $ac_prog; ac_word=$2
4010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4011$as_echo_n "checking for $ac_word... " >&6; }
4012if ${ac_cv_path_CAT+:} false; then :
4013  $as_echo_n "(cached) " >&6
4014else
4015  case $CAT in
4016  [\\/]* | ?:[\\/]*)
4017  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4018  ;;
4019  *)
4020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021for as_dir in $PATH
4022do
4023  IFS=$as_save_IFS
4024  test -z "$as_dir" && as_dir=.
4025    for ac_exec_ext in '' $ac_executable_extensions; do
4026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4027    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4029    break 2
4030  fi
4031done
4032  done
4033IFS=$as_save_IFS
4034
4035  ;;
4036esac
4037fi
4038CAT=$ac_cv_path_CAT
4039if test -n "$CAT"; then
4040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4041$as_echo "$CAT" >&6; }
4042else
4043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4044$as_echo "no" >&6; }
4045fi
4046
4047
4048  test -n "$CAT" && break
4049done
4050
4051
4052  if test "x$CAT" = x; then
4053    if test "xcat" = x; then
4054      PROG_NAME=cat
4055    else
4056      PROG_NAME=cat
4057    fi
4058    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4059$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4060    as_fn_error $? "Cannot continue" "$LINENO" 5
4061  fi
4062
4063
4064
4065  for ac_prog in chmod
4066do
4067  # Extract the first word of "$ac_prog", so it can be a program name with args.
4068set dummy $ac_prog; ac_word=$2
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070$as_echo_n "checking for $ac_word... " >&6; }
4071if ${ac_cv_path_CHMOD+:} false; then :
4072  $as_echo_n "(cached) " >&6
4073else
4074  case $CHMOD in
4075  [\\/]* | ?:[\\/]*)
4076  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4077  ;;
4078  *)
4079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in $PATH
4081do
4082  IFS=$as_save_IFS
4083  test -z "$as_dir" && as_dir=.
4084    for ac_exec_ext in '' $ac_executable_extensions; do
4085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4086    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4088    break 2
4089  fi
4090done
4091  done
4092IFS=$as_save_IFS
4093
4094  ;;
4095esac
4096fi
4097CHMOD=$ac_cv_path_CHMOD
4098if test -n "$CHMOD"; then
4099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4100$as_echo "$CHMOD" >&6; }
4101else
4102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103$as_echo "no" >&6; }
4104fi
4105
4106
4107  test -n "$CHMOD" && break
4108done
4109
4110
4111  if test "x$CHMOD" = x; then
4112    if test "xchmod" = x; then
4113      PROG_NAME=chmod
4114    else
4115      PROG_NAME=chmod
4116    fi
4117    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4118$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4119    as_fn_error $? "Cannot continue" "$LINENO" 5
4120  fi
4121
4122
4123
4124  for ac_prog in cmp
4125do
4126  # Extract the first word of "$ac_prog", so it can be a program name with args.
4127set dummy $ac_prog; ac_word=$2
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4129$as_echo_n "checking for $ac_word... " >&6; }
4130if ${ac_cv_path_CMP+:} false; then :
4131  $as_echo_n "(cached) " >&6
4132else
4133  case $CMP in
4134  [\\/]* | ?:[\\/]*)
4135  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4136  ;;
4137  *)
4138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4139for as_dir in $PATH
4140do
4141  IFS=$as_save_IFS
4142  test -z "$as_dir" && as_dir=.
4143    for ac_exec_ext in '' $ac_executable_extensions; do
4144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4145    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4147    break 2
4148  fi
4149done
4150  done
4151IFS=$as_save_IFS
4152
4153  ;;
4154esac
4155fi
4156CMP=$ac_cv_path_CMP
4157if test -n "$CMP"; then
4158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4159$as_echo "$CMP" >&6; }
4160else
4161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4162$as_echo "no" >&6; }
4163fi
4164
4165
4166  test -n "$CMP" && break
4167done
4168
4169
4170  if test "x$CMP" = x; then
4171    if test "xcmp" = x; then
4172      PROG_NAME=cmp
4173    else
4174      PROG_NAME=cmp
4175    fi
4176    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4177$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4178    as_fn_error $? "Cannot continue" "$LINENO" 5
4179  fi
4180
4181
4182
4183  for ac_prog in comm
4184do
4185  # Extract the first word of "$ac_prog", so it can be a program name with args.
4186set dummy $ac_prog; ac_word=$2
4187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4188$as_echo_n "checking for $ac_word... " >&6; }
4189if ${ac_cv_path_COMM+:} false; then :
4190  $as_echo_n "(cached) " >&6
4191else
4192  case $COMM in
4193  [\\/]* | ?:[\\/]*)
4194  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4195  ;;
4196  *)
4197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4198for as_dir in $PATH
4199do
4200  IFS=$as_save_IFS
4201  test -z "$as_dir" && as_dir=.
4202    for ac_exec_ext in '' $ac_executable_extensions; do
4203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4204    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4206    break 2
4207  fi
4208done
4209  done
4210IFS=$as_save_IFS
4211
4212  ;;
4213esac
4214fi
4215COMM=$ac_cv_path_COMM
4216if test -n "$COMM"; then
4217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4218$as_echo "$COMM" >&6; }
4219else
4220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4221$as_echo "no" >&6; }
4222fi
4223
4224
4225  test -n "$COMM" && break
4226done
4227
4228
4229  if test "x$COMM" = x; then
4230    if test "xcomm" = x; then
4231      PROG_NAME=comm
4232    else
4233      PROG_NAME=comm
4234    fi
4235    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4236$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4237    as_fn_error $? "Cannot continue" "$LINENO" 5
4238  fi
4239
4240
4241
4242  for ac_prog in cp
4243do
4244  # Extract the first word of "$ac_prog", so it can be a program name with args.
4245set dummy $ac_prog; ac_word=$2
4246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4247$as_echo_n "checking for $ac_word... " >&6; }
4248if ${ac_cv_path_CP+:} false; then :
4249  $as_echo_n "(cached) " >&6
4250else
4251  case $CP in
4252  [\\/]* | ?:[\\/]*)
4253  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4254  ;;
4255  *)
4256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257for as_dir in $PATH
4258do
4259  IFS=$as_save_IFS
4260  test -z "$as_dir" && as_dir=.
4261    for ac_exec_ext in '' $ac_executable_extensions; do
4262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4263    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4265    break 2
4266  fi
4267done
4268  done
4269IFS=$as_save_IFS
4270
4271  ;;
4272esac
4273fi
4274CP=$ac_cv_path_CP
4275if test -n "$CP"; then
4276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4277$as_echo "$CP" >&6; }
4278else
4279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4280$as_echo "no" >&6; }
4281fi
4282
4283
4284  test -n "$CP" && break
4285done
4286
4287
4288  if test "x$CP" = x; then
4289    if test "xcp" = x; then
4290      PROG_NAME=cp
4291    else
4292      PROG_NAME=cp
4293    fi
4294    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4295$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4296    as_fn_error $? "Cannot continue" "$LINENO" 5
4297  fi
4298
4299
4300
4301  for ac_prog in cpio
4302do
4303  # Extract the first word of "$ac_prog", so it can be a program name with args.
4304set dummy $ac_prog; ac_word=$2
4305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4306$as_echo_n "checking for $ac_word... " >&6; }
4307if ${ac_cv_path_CPIO+:} false; then :
4308  $as_echo_n "(cached) " >&6
4309else
4310  case $CPIO in
4311  [\\/]* | ?:[\\/]*)
4312  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4313  ;;
4314  *)
4315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316for as_dir in $PATH
4317do
4318  IFS=$as_save_IFS
4319  test -z "$as_dir" && as_dir=.
4320    for ac_exec_ext in '' $ac_executable_extensions; do
4321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4322    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4324    break 2
4325  fi
4326done
4327  done
4328IFS=$as_save_IFS
4329
4330  ;;
4331esac
4332fi
4333CPIO=$ac_cv_path_CPIO
4334if test -n "$CPIO"; then
4335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4336$as_echo "$CPIO" >&6; }
4337else
4338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339$as_echo "no" >&6; }
4340fi
4341
4342
4343  test -n "$CPIO" && break
4344done
4345
4346
4347  if test "x$CPIO" = x; then
4348    if test "xcpio" = x; then
4349      PROG_NAME=cpio
4350    else
4351      PROG_NAME=cpio
4352    fi
4353    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4354$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4355    as_fn_error $? "Cannot continue" "$LINENO" 5
4356  fi
4357
4358
4359
4360  for ac_prog in cut
4361do
4362  # Extract the first word of "$ac_prog", so it can be a program name with args.
4363set dummy $ac_prog; ac_word=$2
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365$as_echo_n "checking for $ac_word... " >&6; }
4366if ${ac_cv_path_CUT+:} false; then :
4367  $as_echo_n "(cached) " >&6
4368else
4369  case $CUT in
4370  [\\/]* | ?:[\\/]*)
4371  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4372  ;;
4373  *)
4374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375for as_dir in $PATH
4376do
4377  IFS=$as_save_IFS
4378  test -z "$as_dir" && as_dir=.
4379    for ac_exec_ext in '' $ac_executable_extensions; do
4380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4381    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383    break 2
4384  fi
4385done
4386  done
4387IFS=$as_save_IFS
4388
4389  ;;
4390esac
4391fi
4392CUT=$ac_cv_path_CUT
4393if test -n "$CUT"; then
4394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4395$as_echo "$CUT" >&6; }
4396else
4397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398$as_echo "no" >&6; }
4399fi
4400
4401
4402  test -n "$CUT" && break
4403done
4404
4405
4406  if test "x$CUT" = x; then
4407    if test "xcut" = x; then
4408      PROG_NAME=cut
4409    else
4410      PROG_NAME=cut
4411    fi
4412    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4413$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4414    as_fn_error $? "Cannot continue" "$LINENO" 5
4415  fi
4416
4417
4418
4419  for ac_prog in date
4420do
4421  # Extract the first word of "$ac_prog", so it can be a program name with args.
4422set dummy $ac_prog; ac_word=$2
4423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4424$as_echo_n "checking for $ac_word... " >&6; }
4425if ${ac_cv_path_DATE+:} false; then :
4426  $as_echo_n "(cached) " >&6
4427else
4428  case $DATE in
4429  [\\/]* | ?:[\\/]*)
4430  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4431  ;;
4432  *)
4433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4434for as_dir in $PATH
4435do
4436  IFS=$as_save_IFS
4437  test -z "$as_dir" && as_dir=.
4438    for ac_exec_ext in '' $ac_executable_extensions; do
4439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4440    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4442    break 2
4443  fi
4444done
4445  done
4446IFS=$as_save_IFS
4447
4448  ;;
4449esac
4450fi
4451DATE=$ac_cv_path_DATE
4452if test -n "$DATE"; then
4453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4454$as_echo "$DATE" >&6; }
4455else
4456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4457$as_echo "no" >&6; }
4458fi
4459
4460
4461  test -n "$DATE" && break
4462done
4463
4464
4465  if test "x$DATE" = x; then
4466    if test "xdate" = x; then
4467      PROG_NAME=date
4468    else
4469      PROG_NAME=date
4470    fi
4471    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4472$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4473    as_fn_error $? "Cannot continue" "$LINENO" 5
4474  fi
4475
4476
4477
4478  for ac_prog in gdiff diff
4479do
4480  # Extract the first word of "$ac_prog", so it can be a program name with args.
4481set dummy $ac_prog; ac_word=$2
4482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4483$as_echo_n "checking for $ac_word... " >&6; }
4484if ${ac_cv_path_DIFF+:} false; then :
4485  $as_echo_n "(cached) " >&6
4486else
4487  case $DIFF in
4488  [\\/]* | ?:[\\/]*)
4489  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4490  ;;
4491  *)
4492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in $PATH
4494do
4495  IFS=$as_save_IFS
4496  test -z "$as_dir" && as_dir=.
4497    for ac_exec_ext in '' $ac_executable_extensions; do
4498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4499    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4501    break 2
4502  fi
4503done
4504  done
4505IFS=$as_save_IFS
4506
4507  ;;
4508esac
4509fi
4510DIFF=$ac_cv_path_DIFF
4511if test -n "$DIFF"; then
4512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4513$as_echo "$DIFF" >&6; }
4514else
4515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516$as_echo "no" >&6; }
4517fi
4518
4519
4520  test -n "$DIFF" && break
4521done
4522
4523
4524  if test "x$DIFF" = x; then
4525    if test "xgdiff diff" = x; then
4526      PROG_NAME=diff
4527    else
4528      PROG_NAME=gdiff diff
4529    fi
4530    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4531$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4532    as_fn_error $? "Cannot continue" "$LINENO" 5
4533  fi
4534
4535
4536
4537  for ac_prog in dirname
4538do
4539  # Extract the first word of "$ac_prog", so it can be a program name with args.
4540set dummy $ac_prog; ac_word=$2
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
4543if ${ac_cv_path_DIRNAME+:} false; then :
4544  $as_echo_n "(cached) " >&6
4545else
4546  case $DIRNAME in
4547  [\\/]* | ?:[\\/]*)
4548  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4549  ;;
4550  *)
4551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in $PATH
4553do
4554  IFS=$as_save_IFS
4555  test -z "$as_dir" && as_dir=.
4556    for ac_exec_ext in '' $ac_executable_extensions; do
4557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4558    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560    break 2
4561  fi
4562done
4563  done
4564IFS=$as_save_IFS
4565
4566  ;;
4567esac
4568fi
4569DIRNAME=$ac_cv_path_DIRNAME
4570if test -n "$DIRNAME"; then
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4572$as_echo "$DIRNAME" >&6; }
4573else
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
4576fi
4577
4578
4579  test -n "$DIRNAME" && break
4580done
4581
4582
4583  if test "x$DIRNAME" = x; then
4584    if test "xdirname" = x; then
4585      PROG_NAME=dirname
4586    else
4587      PROG_NAME=dirname
4588    fi
4589    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4590$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4591    as_fn_error $? "Cannot continue" "$LINENO" 5
4592  fi
4593
4594
4595
4596  for ac_prog in echo
4597do
4598  # Extract the first word of "$ac_prog", so it can be a program name with args.
4599set dummy $ac_prog; ac_word=$2
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4601$as_echo_n "checking for $ac_word... " >&6; }
4602if ${ac_cv_path_ECHO+:} false; then :
4603  $as_echo_n "(cached) " >&6
4604else
4605  case $ECHO in
4606  [\\/]* | ?:[\\/]*)
4607  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4608  ;;
4609  *)
4610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4611for as_dir in $PATH
4612do
4613  IFS=$as_save_IFS
4614  test -z "$as_dir" && as_dir=.
4615    for ac_exec_ext in '' $ac_executable_extensions; do
4616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4617    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4619    break 2
4620  fi
4621done
4622  done
4623IFS=$as_save_IFS
4624
4625  ;;
4626esac
4627fi
4628ECHO=$ac_cv_path_ECHO
4629if test -n "$ECHO"; then
4630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4631$as_echo "$ECHO" >&6; }
4632else
4633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4634$as_echo "no" >&6; }
4635fi
4636
4637
4638  test -n "$ECHO" && break
4639done
4640
4641
4642  if test "x$ECHO" = x; then
4643    if test "xecho" = x; then
4644      PROG_NAME=echo
4645    else
4646      PROG_NAME=echo
4647    fi
4648    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4649$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4650    as_fn_error $? "Cannot continue" "$LINENO" 5
4651  fi
4652
4653
4654
4655  for ac_prog in expr
4656do
4657  # Extract the first word of "$ac_prog", so it can be a program name with args.
4658set dummy $ac_prog; ac_word=$2
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660$as_echo_n "checking for $ac_word... " >&6; }
4661if ${ac_cv_path_EXPR+:} false; then :
4662  $as_echo_n "(cached) " >&6
4663else
4664  case $EXPR in
4665  [\\/]* | ?:[\\/]*)
4666  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4667  ;;
4668  *)
4669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670for as_dir in $PATH
4671do
4672  IFS=$as_save_IFS
4673  test -z "$as_dir" && as_dir=.
4674    for ac_exec_ext in '' $ac_executable_extensions; do
4675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4676    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678    break 2
4679  fi
4680done
4681  done
4682IFS=$as_save_IFS
4683
4684  ;;
4685esac
4686fi
4687EXPR=$ac_cv_path_EXPR
4688if test -n "$EXPR"; then
4689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4690$as_echo "$EXPR" >&6; }
4691else
4692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
4694fi
4695
4696
4697  test -n "$EXPR" && break
4698done
4699
4700
4701  if test "x$EXPR" = x; then
4702    if test "xexpr" = x; then
4703      PROG_NAME=expr
4704    else
4705      PROG_NAME=expr
4706    fi
4707    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4708$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4709    as_fn_error $? "Cannot continue" "$LINENO" 5
4710  fi
4711
4712
4713
4714  for ac_prog in file
4715do
4716  # Extract the first word of "$ac_prog", so it can be a program name with args.
4717set dummy $ac_prog; ac_word=$2
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
4720if ${ac_cv_path_FILE+:} false; then :
4721  $as_echo_n "(cached) " >&6
4722else
4723  case $FILE in
4724  [\\/]* | ?:[\\/]*)
4725  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4726  ;;
4727  *)
4728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in $PATH
4730do
4731  IFS=$as_save_IFS
4732  test -z "$as_dir" && as_dir=.
4733    for ac_exec_ext in '' $ac_executable_extensions; do
4734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4735    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737    break 2
4738  fi
4739done
4740  done
4741IFS=$as_save_IFS
4742
4743  ;;
4744esac
4745fi
4746FILE=$ac_cv_path_FILE
4747if test -n "$FILE"; then
4748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4749$as_echo "$FILE" >&6; }
4750else
4751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755
4756  test -n "$FILE" && break
4757done
4758
4759
4760  if test "x$FILE" = x; then
4761    if test "xfile" = x; then
4762      PROG_NAME=file
4763    else
4764      PROG_NAME=file
4765    fi
4766    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4767$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4768    as_fn_error $? "Cannot continue" "$LINENO" 5
4769  fi
4770
4771
4772
4773  for ac_prog in find
4774do
4775  # Extract the first word of "$ac_prog", so it can be a program name with args.
4776set dummy $ac_prog; ac_word=$2
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
4779if ${ac_cv_path_FIND+:} false; then :
4780  $as_echo_n "(cached) " >&6
4781else
4782  case $FIND in
4783  [\\/]* | ?:[\\/]*)
4784  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4785  ;;
4786  *)
4787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790  IFS=$as_save_IFS
4791  test -z "$as_dir" && as_dir=.
4792    for ac_exec_ext in '' $ac_executable_extensions; do
4793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4794    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796    break 2
4797  fi
4798done
4799  done
4800IFS=$as_save_IFS
4801
4802  ;;
4803esac
4804fi
4805FIND=$ac_cv_path_FIND
4806if test -n "$FIND"; then
4807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4808$as_echo "$FIND" >&6; }
4809else
4810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
4812fi
4813
4814
4815  test -n "$FIND" && break
4816done
4817
4818
4819  if test "x$FIND" = x; then
4820    if test "xfind" = x; then
4821      PROG_NAME=find
4822    else
4823      PROG_NAME=find
4824    fi
4825    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4826$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4827    as_fn_error $? "Cannot continue" "$LINENO" 5
4828  fi
4829
4830
4831
4832  for ac_prog in head
4833do
4834  # Extract the first word of "$ac_prog", so it can be a program name with args.
4835set dummy $ac_prog; ac_word=$2
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837$as_echo_n "checking for $ac_word... " >&6; }
4838if ${ac_cv_path_HEAD+:} false; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  case $HEAD in
4842  [\\/]* | ?:[\\/]*)
4843  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4844  ;;
4845  *)
4846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849  IFS=$as_save_IFS
4850  test -z "$as_dir" && as_dir=.
4851    for ac_exec_ext in '' $ac_executable_extensions; do
4852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4853    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855    break 2
4856  fi
4857done
4858  done
4859IFS=$as_save_IFS
4860
4861  ;;
4862esac
4863fi
4864HEAD=$ac_cv_path_HEAD
4865if test -n "$HEAD"; then
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4867$as_echo "$HEAD" >&6; }
4868else
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874  test -n "$HEAD" && break
4875done
4876
4877
4878  if test "x$HEAD" = x; then
4879    if test "xhead" = x; then
4880      PROG_NAME=head
4881    else
4882      PROG_NAME=head
4883    fi
4884    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4885$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4886    as_fn_error $? "Cannot continue" "$LINENO" 5
4887  fi
4888
4889
4890
4891  for ac_prog in ln
4892do
4893  # Extract the first word of "$ac_prog", so it can be a program name with args.
4894set dummy $ac_prog; ac_word=$2
4895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896$as_echo_n "checking for $ac_word... " >&6; }
4897if ${ac_cv_path_LN+:} false; then :
4898  $as_echo_n "(cached) " >&6
4899else
4900  case $LN in
4901  [\\/]* | ?:[\\/]*)
4902  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4903  ;;
4904  *)
4905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906for as_dir in $PATH
4907do
4908  IFS=$as_save_IFS
4909  test -z "$as_dir" && as_dir=.
4910    for ac_exec_ext in '' $ac_executable_extensions; do
4911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4912    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914    break 2
4915  fi
4916done
4917  done
4918IFS=$as_save_IFS
4919
4920  ;;
4921esac
4922fi
4923LN=$ac_cv_path_LN
4924if test -n "$LN"; then
4925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4926$as_echo "$LN" >&6; }
4927else
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929$as_echo "no" >&6; }
4930fi
4931
4932
4933  test -n "$LN" && break
4934done
4935
4936
4937  if test "x$LN" = x; then
4938    if test "xln" = x; then
4939      PROG_NAME=ln
4940    else
4941      PROG_NAME=ln
4942    fi
4943    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4944$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4945    as_fn_error $? "Cannot continue" "$LINENO" 5
4946  fi
4947
4948
4949
4950  for ac_prog in ls
4951do
4952  # Extract the first word of "$ac_prog", so it can be a program name with args.
4953set dummy $ac_prog; ac_word=$2
4954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955$as_echo_n "checking for $ac_word... " >&6; }
4956if ${ac_cv_path_LS+:} false; then :
4957  $as_echo_n "(cached) " >&6
4958else
4959  case $LS in
4960  [\\/]* | ?:[\\/]*)
4961  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4962  ;;
4963  *)
4964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965for as_dir in $PATH
4966do
4967  IFS=$as_save_IFS
4968  test -z "$as_dir" && as_dir=.
4969    for ac_exec_ext in '' $ac_executable_extensions; do
4970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4971    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973    break 2
4974  fi
4975done
4976  done
4977IFS=$as_save_IFS
4978
4979  ;;
4980esac
4981fi
4982LS=$ac_cv_path_LS
4983if test -n "$LS"; then
4984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4985$as_echo "$LS" >&6; }
4986else
4987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988$as_echo "no" >&6; }
4989fi
4990
4991
4992  test -n "$LS" && break
4993done
4994
4995
4996  if test "x$LS" = x; then
4997    if test "xls" = x; then
4998      PROG_NAME=ls
4999    else
5000      PROG_NAME=ls
5001    fi
5002    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5003$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5004    as_fn_error $? "Cannot continue" "$LINENO" 5
5005  fi
5006
5007
5008
5009  for ac_prog in mkdir
5010do
5011  # Extract the first word of "$ac_prog", so it can be a program name with args.
5012set dummy $ac_prog; ac_word=$2
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
5015if ${ac_cv_path_MKDIR+:} false; then :
5016  $as_echo_n "(cached) " >&6
5017else
5018  case $MKDIR in
5019  [\\/]* | ?:[\\/]*)
5020  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5021  ;;
5022  *)
5023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026  IFS=$as_save_IFS
5027  test -z "$as_dir" && as_dir=.
5028    for ac_exec_ext in '' $ac_executable_extensions; do
5029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5030    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032    break 2
5033  fi
5034done
5035  done
5036IFS=$as_save_IFS
5037
5038  ;;
5039esac
5040fi
5041MKDIR=$ac_cv_path_MKDIR
5042if test -n "$MKDIR"; then
5043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5044$as_echo "$MKDIR" >&6; }
5045else
5046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047$as_echo "no" >&6; }
5048fi
5049
5050
5051  test -n "$MKDIR" && break
5052done
5053
5054
5055  if test "x$MKDIR" = x; then
5056    if test "xmkdir" = x; then
5057      PROG_NAME=mkdir
5058    else
5059      PROG_NAME=mkdir
5060    fi
5061    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5062$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5063    as_fn_error $? "Cannot continue" "$LINENO" 5
5064  fi
5065
5066
5067
5068  for ac_prog in mktemp
5069do
5070  # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_path_MKTEMP+:} false; then :
5075  $as_echo_n "(cached) " >&6
5076else
5077  case $MKTEMP in
5078  [\\/]* | ?:[\\/]*)
5079  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5080  ;;
5081  *)
5082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in $PATH
5084do
5085  IFS=$as_save_IFS
5086  test -z "$as_dir" && as_dir=.
5087    for ac_exec_ext in '' $ac_executable_extensions; do
5088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5089    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091    break 2
5092  fi
5093done
5094  done
5095IFS=$as_save_IFS
5096
5097  ;;
5098esac
5099fi
5100MKTEMP=$ac_cv_path_MKTEMP
5101if test -n "$MKTEMP"; then
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5103$as_echo "$MKTEMP" >&6; }
5104else
5105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109
5110  test -n "$MKTEMP" && break
5111done
5112
5113
5114  if test "x$MKTEMP" = x; then
5115    if test "xmktemp" = x; then
5116      PROG_NAME=mktemp
5117    else
5118      PROG_NAME=mktemp
5119    fi
5120    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5121$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5122    as_fn_error $? "Cannot continue" "$LINENO" 5
5123  fi
5124
5125
5126
5127  for ac_prog in mv
5128do
5129  # Extract the first word of "$ac_prog", so it can be a program name with args.
5130set dummy $ac_prog; ac_word=$2
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5132$as_echo_n "checking for $ac_word... " >&6; }
5133if ${ac_cv_path_MV+:} false; then :
5134  $as_echo_n "(cached) " >&6
5135else
5136  case $MV in
5137  [\\/]* | ?:[\\/]*)
5138  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5139  ;;
5140  *)
5141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144  IFS=$as_save_IFS
5145  test -z "$as_dir" && as_dir=.
5146    for ac_exec_ext in '' $ac_executable_extensions; do
5147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5148    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5150    break 2
5151  fi
5152done
5153  done
5154IFS=$as_save_IFS
5155
5156  ;;
5157esac
5158fi
5159MV=$ac_cv_path_MV
5160if test -n "$MV"; then
5161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5162$as_echo "$MV" >&6; }
5163else
5164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5165$as_echo "no" >&6; }
5166fi
5167
5168
5169  test -n "$MV" && break
5170done
5171
5172
5173  if test "x$MV" = x; then
5174    if test "xmv" = x; then
5175      PROG_NAME=mv
5176    else
5177      PROG_NAME=mv
5178    fi
5179    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5180$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5181    as_fn_error $? "Cannot continue" "$LINENO" 5
5182  fi
5183
5184
5185
5186  for ac_prog in printf
5187do
5188  # Extract the first word of "$ac_prog", so it can be a program name with args.
5189set dummy $ac_prog; ac_word=$2
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191$as_echo_n "checking for $ac_word... " >&6; }
5192if ${ac_cv_path_PRINTF+:} false; then :
5193  $as_echo_n "(cached) " >&6
5194else
5195  case $PRINTF in
5196  [\\/]* | ?:[\\/]*)
5197  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5198  ;;
5199  *)
5200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201for as_dir in $PATH
5202do
5203  IFS=$as_save_IFS
5204  test -z "$as_dir" && as_dir=.
5205    for ac_exec_ext in '' $ac_executable_extensions; do
5206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5207    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209    break 2
5210  fi
5211done
5212  done
5213IFS=$as_save_IFS
5214
5215  ;;
5216esac
5217fi
5218PRINTF=$ac_cv_path_PRINTF
5219if test -n "$PRINTF"; then
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5221$as_echo "$PRINTF" >&6; }
5222else
5223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224$as_echo "no" >&6; }
5225fi
5226
5227
5228  test -n "$PRINTF" && break
5229done
5230
5231
5232  if test "x$PRINTF" = x; then
5233    if test "xprintf" = x; then
5234      PROG_NAME=printf
5235    else
5236      PROG_NAME=printf
5237    fi
5238    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5239$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5240    as_fn_error $? "Cannot continue" "$LINENO" 5
5241  fi
5242
5243
5244
5245  for ac_prog in rm
5246do
5247  # Extract the first word of "$ac_prog", so it can be a program name with args.
5248set dummy $ac_prog; ac_word=$2
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250$as_echo_n "checking for $ac_word... " >&6; }
5251if ${ac_cv_path_RM+:} false; then :
5252  $as_echo_n "(cached) " >&6
5253else
5254  case $RM in
5255  [\\/]* | ?:[\\/]*)
5256  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5257  ;;
5258  *)
5259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260for as_dir in $PATH
5261do
5262  IFS=$as_save_IFS
5263  test -z "$as_dir" && as_dir=.
5264    for ac_exec_ext in '' $ac_executable_extensions; do
5265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268    break 2
5269  fi
5270done
5271  done
5272IFS=$as_save_IFS
5273
5274  ;;
5275esac
5276fi
5277RM=$ac_cv_path_RM
5278if test -n "$RM"; then
5279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5280$as_echo "$RM" >&6; }
5281else
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }
5284fi
5285
5286
5287  test -n "$RM" && break
5288done
5289
5290
5291  if test "x$RM" = x; then
5292    if test "xrm" = x; then
5293      PROG_NAME=rm
5294    else
5295      PROG_NAME=rm
5296    fi
5297    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5298$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5299    as_fn_error $? "Cannot continue" "$LINENO" 5
5300  fi
5301
5302
5303
5304  for ac_prog in sh
5305do
5306  # Extract the first word of "$ac_prog", so it can be a program name with args.
5307set dummy $ac_prog; ac_word=$2
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309$as_echo_n "checking for $ac_word... " >&6; }
5310if ${ac_cv_path_SH+:} false; then :
5311  $as_echo_n "(cached) " >&6
5312else
5313  case $SH in
5314  [\\/]* | ?:[\\/]*)
5315  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5316  ;;
5317  *)
5318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in $PATH
5320do
5321  IFS=$as_save_IFS
5322  test -z "$as_dir" && as_dir=.
5323    for ac_exec_ext in '' $ac_executable_extensions; do
5324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5325    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327    break 2
5328  fi
5329done
5330  done
5331IFS=$as_save_IFS
5332
5333  ;;
5334esac
5335fi
5336SH=$ac_cv_path_SH
5337if test -n "$SH"; then
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5339$as_echo "$SH" >&6; }
5340else
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344
5345
5346  test -n "$SH" && break
5347done
5348
5349
5350  if test "x$SH" = x; then
5351    if test "xsh" = x; then
5352      PROG_NAME=sh
5353    else
5354      PROG_NAME=sh
5355    fi
5356    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5357$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5358    as_fn_error $? "Cannot continue" "$LINENO" 5
5359  fi
5360
5361
5362
5363  for ac_prog in sort
5364do
5365  # Extract the first word of "$ac_prog", so it can be a program name with args.
5366set dummy $ac_prog; ac_word=$2
5367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5368$as_echo_n "checking for $ac_word... " >&6; }
5369if ${ac_cv_path_SORT+:} false; then :
5370  $as_echo_n "(cached) " >&6
5371else
5372  case $SORT in
5373  [\\/]* | ?:[\\/]*)
5374  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5375  ;;
5376  *)
5377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5378for as_dir in $PATH
5379do
5380  IFS=$as_save_IFS
5381  test -z "$as_dir" && as_dir=.
5382    for ac_exec_ext in '' $ac_executable_extensions; do
5383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5384    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5386    break 2
5387  fi
5388done
5389  done
5390IFS=$as_save_IFS
5391
5392  ;;
5393esac
5394fi
5395SORT=$ac_cv_path_SORT
5396if test -n "$SORT"; then
5397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5398$as_echo "$SORT" >&6; }
5399else
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5401$as_echo "no" >&6; }
5402fi
5403
5404
5405  test -n "$SORT" && break
5406done
5407
5408
5409  if test "x$SORT" = x; then
5410    if test "xsort" = x; then
5411      PROG_NAME=sort
5412    else
5413      PROG_NAME=sort
5414    fi
5415    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5416$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5417    as_fn_error $? "Cannot continue" "$LINENO" 5
5418  fi
5419
5420
5421
5422  for ac_prog in tail
5423do
5424  # Extract the first word of "$ac_prog", so it can be a program name with args.
5425set dummy $ac_prog; ac_word=$2
5426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5427$as_echo_n "checking for $ac_word... " >&6; }
5428if ${ac_cv_path_TAIL+:} false; then :
5429  $as_echo_n "(cached) " >&6
5430else
5431  case $TAIL in
5432  [\\/]* | ?:[\\/]*)
5433  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5434  ;;
5435  *)
5436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5437for as_dir in $PATH
5438do
5439  IFS=$as_save_IFS
5440  test -z "$as_dir" && as_dir=.
5441    for ac_exec_ext in '' $ac_executable_extensions; do
5442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5443    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5445    break 2
5446  fi
5447done
5448  done
5449IFS=$as_save_IFS
5450
5451  ;;
5452esac
5453fi
5454TAIL=$ac_cv_path_TAIL
5455if test -n "$TAIL"; then
5456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5457$as_echo "$TAIL" >&6; }
5458else
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460$as_echo "no" >&6; }
5461fi
5462
5463
5464  test -n "$TAIL" && break
5465done
5466
5467
5468  if test "x$TAIL" = x; then
5469    if test "xtail" = x; then
5470      PROG_NAME=tail
5471    else
5472      PROG_NAME=tail
5473    fi
5474    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5475$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5476    as_fn_error $? "Cannot continue" "$LINENO" 5
5477  fi
5478
5479
5480
5481  for ac_prog in tar
5482do
5483  # Extract the first word of "$ac_prog", so it can be a program name with args.
5484set dummy $ac_prog; ac_word=$2
5485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5486$as_echo_n "checking for $ac_word... " >&6; }
5487if ${ac_cv_path_TAR+:} false; then :
5488  $as_echo_n "(cached) " >&6
5489else
5490  case $TAR in
5491  [\\/]* | ?:[\\/]*)
5492  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5493  ;;
5494  *)
5495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496for as_dir in $PATH
5497do
5498  IFS=$as_save_IFS
5499  test -z "$as_dir" && as_dir=.
5500    for ac_exec_ext in '' $ac_executable_extensions; do
5501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5502    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5504    break 2
5505  fi
5506done
5507  done
5508IFS=$as_save_IFS
5509
5510  ;;
5511esac
5512fi
5513TAR=$ac_cv_path_TAR
5514if test -n "$TAR"; then
5515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5516$as_echo "$TAR" >&6; }
5517else
5518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519$as_echo "no" >&6; }
5520fi
5521
5522
5523  test -n "$TAR" && break
5524done
5525
5526
5527  if test "x$TAR" = x; then
5528    if test "xtar" = x; then
5529      PROG_NAME=tar
5530    else
5531      PROG_NAME=tar
5532    fi
5533    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5534$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5535    as_fn_error $? "Cannot continue" "$LINENO" 5
5536  fi
5537
5538
5539
5540  for ac_prog in tee
5541do
5542  # Extract the first word of "$ac_prog", so it can be a program name with args.
5543set dummy $ac_prog; ac_word=$2
5544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5545$as_echo_n "checking for $ac_word... " >&6; }
5546if ${ac_cv_path_TEE+:} false; then :
5547  $as_echo_n "(cached) " >&6
5548else
5549  case $TEE in
5550  [\\/]* | ?:[\\/]*)
5551  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5552  ;;
5553  *)
5554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555for as_dir in $PATH
5556do
5557  IFS=$as_save_IFS
5558  test -z "$as_dir" && as_dir=.
5559    for ac_exec_ext in '' $ac_executable_extensions; do
5560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5561    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5563    break 2
5564  fi
5565done
5566  done
5567IFS=$as_save_IFS
5568
5569  ;;
5570esac
5571fi
5572TEE=$ac_cv_path_TEE
5573if test -n "$TEE"; then
5574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5575$as_echo "$TEE" >&6; }
5576else
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
5579fi
5580
5581
5582  test -n "$TEE" && break
5583done
5584
5585
5586  if test "x$TEE" = x; then
5587    if test "xtee" = x; then
5588      PROG_NAME=tee
5589    else
5590      PROG_NAME=tee
5591    fi
5592    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5593$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5594    as_fn_error $? "Cannot continue" "$LINENO" 5
5595  fi
5596
5597
5598
5599  for ac_prog in touch
5600do
5601  # Extract the first word of "$ac_prog", so it can be a program name with args.
5602set dummy $ac_prog; ac_word=$2
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5604$as_echo_n "checking for $ac_word... " >&6; }
5605if ${ac_cv_path_TOUCH+:} false; then :
5606  $as_echo_n "(cached) " >&6
5607else
5608  case $TOUCH in
5609  [\\/]* | ?:[\\/]*)
5610  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5611  ;;
5612  *)
5613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5614for as_dir in $PATH
5615do
5616  IFS=$as_save_IFS
5617  test -z "$as_dir" && as_dir=.
5618    for ac_exec_ext in '' $ac_executable_extensions; do
5619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5620    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5622    break 2
5623  fi
5624done
5625  done
5626IFS=$as_save_IFS
5627
5628  ;;
5629esac
5630fi
5631TOUCH=$ac_cv_path_TOUCH
5632if test -n "$TOUCH"; then
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5634$as_echo "$TOUCH" >&6; }
5635else
5636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5637$as_echo "no" >&6; }
5638fi
5639
5640
5641  test -n "$TOUCH" && break
5642done
5643
5644
5645  if test "x$TOUCH" = x; then
5646    if test "xtouch" = x; then
5647      PROG_NAME=touch
5648    else
5649      PROG_NAME=touch
5650    fi
5651    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5652$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5653    as_fn_error $? "Cannot continue" "$LINENO" 5
5654  fi
5655
5656
5657
5658  for ac_prog in tr
5659do
5660  # Extract the first word of "$ac_prog", so it can be a program name with args.
5661set dummy $ac_prog; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_TR+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $TR in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690TR=$ac_cv_path_TR
5691if test -n "$TR"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5693$as_echo "$TR" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700  test -n "$TR" && break
5701done
5702
5703
5704  if test "x$TR" = x; then
5705    if test "xtr" = x; then
5706      PROG_NAME=tr
5707    else
5708      PROG_NAME=tr
5709    fi
5710    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5711$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5712    as_fn_error $? "Cannot continue" "$LINENO" 5
5713  fi
5714
5715
5716
5717  for ac_prog in uname
5718do
5719  # Extract the first word of "$ac_prog", so it can be a program name with args.
5720set dummy $ac_prog; ac_word=$2
5721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5722$as_echo_n "checking for $ac_word... " >&6; }
5723if ${ac_cv_path_UNAME+:} false; then :
5724  $as_echo_n "(cached) " >&6
5725else
5726  case $UNAME in
5727  [\\/]* | ?:[\\/]*)
5728  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5729  ;;
5730  *)
5731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5732for as_dir in $PATH
5733do
5734  IFS=$as_save_IFS
5735  test -z "$as_dir" && as_dir=.
5736    for ac_exec_ext in '' $ac_executable_extensions; do
5737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5738    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5740    break 2
5741  fi
5742done
5743  done
5744IFS=$as_save_IFS
5745
5746  ;;
5747esac
5748fi
5749UNAME=$ac_cv_path_UNAME
5750if test -n "$UNAME"; then
5751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5752$as_echo "$UNAME" >&6; }
5753else
5754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755$as_echo "no" >&6; }
5756fi
5757
5758
5759  test -n "$UNAME" && break
5760done
5761
5762
5763  if test "x$UNAME" = x; then
5764    if test "xuname" = x; then
5765      PROG_NAME=uname
5766    else
5767      PROG_NAME=uname
5768    fi
5769    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5770$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5771    as_fn_error $? "Cannot continue" "$LINENO" 5
5772  fi
5773
5774
5775
5776  for ac_prog in uniq
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_UNIQ+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $UNIQ in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808UNIQ=$ac_cv_path_UNIQ
5809if test -n "$UNIQ"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5811$as_echo "$UNIQ" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$UNIQ" && break
5819done
5820
5821
5822  if test "x$UNIQ" = x; then
5823    if test "xuniq" = x; then
5824      PROG_NAME=uniq
5825    else
5826      PROG_NAME=uniq
5827    fi
5828    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5829$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5830    as_fn_error $? "Cannot continue" "$LINENO" 5
5831  fi
5832
5833
5834
5835  for ac_prog in wc
5836do
5837  # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if ${ac_cv_path_WC+:} false; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  case $WC in
5845  [\\/]* | ?:[\\/]*)
5846  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5847  ;;
5848  *)
5849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852  IFS=$as_save_IFS
5853  test -z "$as_dir" && as_dir=.
5854    for ac_exec_ext in '' $ac_executable_extensions; do
5855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858    break 2
5859  fi
5860done
5861  done
5862IFS=$as_save_IFS
5863
5864  ;;
5865esac
5866fi
5867WC=$ac_cv_path_WC
5868if test -n "$WC"; then
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5870$as_echo "$WC" >&6; }
5871else
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874fi
5875
5876
5877  test -n "$WC" && break
5878done
5879
5880
5881  if test "x$WC" = x; then
5882    if test "xwc" = x; then
5883      PROG_NAME=wc
5884    else
5885      PROG_NAME=wc
5886    fi
5887    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5888$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5889    as_fn_error $? "Cannot continue" "$LINENO" 5
5890  fi
5891
5892
5893
5894  for ac_prog in which
5895do
5896  # Extract the first word of "$ac_prog", so it can be a program name with args.
5897set dummy $ac_prog; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_path_WHICH+:} false; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $WHICH in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926WHICH=$ac_cv_path_WHICH
5927if test -n "$WHICH"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5929$as_echo "$WHICH" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936  test -n "$WHICH" && break
5937done
5938
5939
5940  if test "x$WHICH" = x; then
5941    if test "xwhich" = x; then
5942      PROG_NAME=which
5943    else
5944      PROG_NAME=which
5945    fi
5946    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5947$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5948    as_fn_error $? "Cannot continue" "$LINENO" 5
5949  fi
5950
5951
5952
5953  for ac_prog in xargs
5954do
5955  # Extract the first word of "$ac_prog", so it can be a program name with args.
5956set dummy $ac_prog; ac_word=$2
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
5959if ${ac_cv_path_XARGS+:} false; then :
5960  $as_echo_n "(cached) " >&6
5961else
5962  case $XARGS in
5963  [\\/]* | ?:[\\/]*)
5964  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5965  ;;
5966  *)
5967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968for as_dir in $PATH
5969do
5970  IFS=$as_save_IFS
5971  test -z "$as_dir" && as_dir=.
5972    for ac_exec_ext in '' $ac_executable_extensions; do
5973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5974    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5976    break 2
5977  fi
5978done
5979  done
5980IFS=$as_save_IFS
5981
5982  ;;
5983esac
5984fi
5985XARGS=$ac_cv_path_XARGS
5986if test -n "$XARGS"; then
5987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5988$as_echo "$XARGS" >&6; }
5989else
5990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991$as_echo "no" >&6; }
5992fi
5993
5994
5995  test -n "$XARGS" && break
5996done
5997
5998
5999  if test "x$XARGS" = x; then
6000    if test "xxargs" = x; then
6001      PROG_NAME=xargs
6002    else
6003      PROG_NAME=xargs
6004    fi
6005    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6006$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6007    as_fn_error $? "Cannot continue" "$LINENO" 5
6008  fi
6009
6010
6011
6012  # Then required tools that require some special treatment.
6013  for ac_prog in gawk mawk nawk awk
6014do
6015  # Extract the first word of "$ac_prog", so it can be a program name with args.
6016set dummy $ac_prog; ac_word=$2
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6018$as_echo_n "checking for $ac_word... " >&6; }
6019if ${ac_cv_prog_AWK+:} false; then :
6020  $as_echo_n "(cached) " >&6
6021else
6022  if test -n "$AWK"; then
6023  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6024else
6025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6026for as_dir in $PATH
6027do
6028  IFS=$as_save_IFS
6029  test -z "$as_dir" && as_dir=.
6030    for ac_exec_ext in '' $ac_executable_extensions; do
6031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6032    ac_cv_prog_AWK="$ac_prog"
6033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6034    break 2
6035  fi
6036done
6037  done
6038IFS=$as_save_IFS
6039
6040fi
6041fi
6042AWK=$ac_cv_prog_AWK
6043if test -n "$AWK"; then
6044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6045$as_echo "$AWK" >&6; }
6046else
6047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048$as_echo "no" >&6; }
6049fi
6050
6051
6052  test -n "$AWK" && break
6053done
6054
6055
6056  if test "x$AWK" = x; then
6057    if test "x" = x; then
6058      PROG_NAME=awk
6059    else
6060      PROG_NAME=
6061    fi
6062    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6063$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6064    as_fn_error $? "Cannot continue" "$LINENO" 5
6065  fi
6066
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6068$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6069if ${ac_cv_path_GREP+:} false; then :
6070  $as_echo_n "(cached) " >&6
6071else
6072  if test -z "$GREP"; then
6073  ac_path_GREP_found=false
6074  # Loop through the user's path and test for each of PROGNAME-LIST
6075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6077do
6078  IFS=$as_save_IFS
6079  test -z "$as_dir" && as_dir=.
6080    for ac_prog in grep ggrep; do
6081    for ac_exec_ext in '' $ac_executable_extensions; do
6082      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6083      as_fn_executable_p "$ac_path_GREP" || continue
6084# Check for GNU ac_path_GREP and select it if it is found.
6085  # Check for GNU $ac_path_GREP
6086case `"$ac_path_GREP" --version 2>&1` in
6087*GNU*)
6088  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6089*)
6090  ac_count=0
6091  $as_echo_n 0123456789 >"conftest.in"
6092  while :
6093  do
6094    cat "conftest.in" "conftest.in" >"conftest.tmp"
6095    mv "conftest.tmp" "conftest.in"
6096    cp "conftest.in" "conftest.nl"
6097    $as_echo 'GREP' >> "conftest.nl"
6098    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6099    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6100    as_fn_arith $ac_count + 1 && ac_count=$as_val
6101    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6102      # Best one so far, save it but keep looking for a better one
6103      ac_cv_path_GREP="$ac_path_GREP"
6104      ac_path_GREP_max=$ac_count
6105    fi
6106    # 10*(2^10) chars as input seems more than enough
6107    test $ac_count -gt 10 && break
6108  done
6109  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6110esac
6111
6112      $ac_path_GREP_found && break 3
6113    done
6114  done
6115  done
6116IFS=$as_save_IFS
6117  if test -z "$ac_cv_path_GREP"; then
6118    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6119  fi
6120else
6121  ac_cv_path_GREP=$GREP
6122fi
6123
6124fi
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6126$as_echo "$ac_cv_path_GREP" >&6; }
6127 GREP="$ac_cv_path_GREP"
6128
6129
6130
6131  if test "x$GREP" = x; then
6132    if test "x" = x; then
6133      PROG_NAME=grep
6134    else
6135      PROG_NAME=
6136    fi
6137    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6138$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6139    as_fn_error $? "Cannot continue" "$LINENO" 5
6140  fi
6141
6142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6143$as_echo_n "checking for egrep... " >&6; }
6144if ${ac_cv_path_EGREP+:} false; then :
6145  $as_echo_n "(cached) " >&6
6146else
6147  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6148   then ac_cv_path_EGREP="$GREP -E"
6149   else
6150     if test -z "$EGREP"; then
6151  ac_path_EGREP_found=false
6152  # Loop through the user's path and test for each of PROGNAME-LIST
6153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6154for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6155do
6156  IFS=$as_save_IFS
6157  test -z "$as_dir" && as_dir=.
6158    for ac_prog in egrep; do
6159    for ac_exec_ext in '' $ac_executable_extensions; do
6160      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6161      as_fn_executable_p "$ac_path_EGREP" || continue
6162# Check for GNU ac_path_EGREP and select it if it is found.
6163  # Check for GNU $ac_path_EGREP
6164case `"$ac_path_EGREP" --version 2>&1` in
6165*GNU*)
6166  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6167*)
6168  ac_count=0
6169  $as_echo_n 0123456789 >"conftest.in"
6170  while :
6171  do
6172    cat "conftest.in" "conftest.in" >"conftest.tmp"
6173    mv "conftest.tmp" "conftest.in"
6174    cp "conftest.in" "conftest.nl"
6175    $as_echo 'EGREP' >> "conftest.nl"
6176    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6177    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6178    as_fn_arith $ac_count + 1 && ac_count=$as_val
6179    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6180      # Best one so far, save it but keep looking for a better one
6181      ac_cv_path_EGREP="$ac_path_EGREP"
6182      ac_path_EGREP_max=$ac_count
6183    fi
6184    # 10*(2^10) chars as input seems more than enough
6185    test $ac_count -gt 10 && break
6186  done
6187  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6188esac
6189
6190      $ac_path_EGREP_found && break 3
6191    done
6192  done
6193  done
6194IFS=$as_save_IFS
6195  if test -z "$ac_cv_path_EGREP"; then
6196    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6197  fi
6198else
6199  ac_cv_path_EGREP=$EGREP
6200fi
6201
6202   fi
6203fi
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6205$as_echo "$ac_cv_path_EGREP" >&6; }
6206 EGREP="$ac_cv_path_EGREP"
6207
6208
6209
6210  if test "x$EGREP" = x; then
6211    if test "x" = x; then
6212      PROG_NAME=egrep
6213    else
6214      PROG_NAME=
6215    fi
6216    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6217$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6218    as_fn_error $? "Cannot continue" "$LINENO" 5
6219  fi
6220
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6222$as_echo_n "checking for fgrep... " >&6; }
6223if ${ac_cv_path_FGREP+:} false; then :
6224  $as_echo_n "(cached) " >&6
6225else
6226  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6227   then ac_cv_path_FGREP="$GREP -F"
6228   else
6229     if test -z "$FGREP"; then
6230  ac_path_FGREP_found=false
6231  # Loop through the user's path and test for each of PROGNAME-LIST
6232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6233for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6234do
6235  IFS=$as_save_IFS
6236  test -z "$as_dir" && as_dir=.
6237    for ac_prog in fgrep; do
6238    for ac_exec_ext in '' $ac_executable_extensions; do
6239      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6240      as_fn_executable_p "$ac_path_FGREP" || continue
6241# Check for GNU ac_path_FGREP and select it if it is found.
6242  # Check for GNU $ac_path_FGREP
6243case `"$ac_path_FGREP" --version 2>&1` in
6244*GNU*)
6245  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6246*)
6247  ac_count=0
6248  $as_echo_n 0123456789 >"conftest.in"
6249  while :
6250  do
6251    cat "conftest.in" "conftest.in" >"conftest.tmp"
6252    mv "conftest.tmp" "conftest.in"
6253    cp "conftest.in" "conftest.nl"
6254    $as_echo 'FGREP' >> "conftest.nl"
6255    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6256    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6257    as_fn_arith $ac_count + 1 && ac_count=$as_val
6258    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6259      # Best one so far, save it but keep looking for a better one
6260      ac_cv_path_FGREP="$ac_path_FGREP"
6261      ac_path_FGREP_max=$ac_count
6262    fi
6263    # 10*(2^10) chars as input seems more than enough
6264    test $ac_count -gt 10 && break
6265  done
6266  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6267esac
6268
6269      $ac_path_FGREP_found && break 3
6270    done
6271  done
6272  done
6273IFS=$as_save_IFS
6274  if test -z "$ac_cv_path_FGREP"; then
6275    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6276  fi
6277else
6278  ac_cv_path_FGREP=$FGREP
6279fi
6280
6281   fi
6282fi
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6284$as_echo "$ac_cv_path_FGREP" >&6; }
6285 FGREP="$ac_cv_path_FGREP"
6286
6287
6288
6289  if test "x$FGREP" = x; then
6290    if test "x" = x; then
6291      PROG_NAME=fgrep
6292    else
6293      PROG_NAME=
6294    fi
6295    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6296$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6297    as_fn_error $? "Cannot continue" "$LINENO" 5
6298  fi
6299
6300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6301$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6302if ${ac_cv_path_SED+:} false; then :
6303  $as_echo_n "(cached) " >&6
6304else
6305            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6306     for ac_i in 1 2 3 4 5 6 7; do
6307       ac_script="$ac_script$as_nl$ac_script"
6308     done
6309     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6310     { ac_script=; unset ac_script;}
6311     if test -z "$SED"; then
6312  ac_path_SED_found=false
6313  # Loop through the user's path and test for each of PROGNAME-LIST
6314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315for as_dir in $PATH
6316do
6317  IFS=$as_save_IFS
6318  test -z "$as_dir" && as_dir=.
6319    for ac_prog in sed gsed; do
6320    for ac_exec_ext in '' $ac_executable_extensions; do
6321      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6322      as_fn_executable_p "$ac_path_SED" || continue
6323# Check for GNU ac_path_SED and select it if it is found.
6324  # Check for GNU $ac_path_SED
6325case `"$ac_path_SED" --version 2>&1` in
6326*GNU*)
6327  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6328*)
6329  ac_count=0
6330  $as_echo_n 0123456789 >"conftest.in"
6331  while :
6332  do
6333    cat "conftest.in" "conftest.in" >"conftest.tmp"
6334    mv "conftest.tmp" "conftest.in"
6335    cp "conftest.in" "conftest.nl"
6336    $as_echo '' >> "conftest.nl"
6337    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6338    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6339    as_fn_arith $ac_count + 1 && ac_count=$as_val
6340    if test $ac_count -gt ${ac_path_SED_max-0}; then
6341      # Best one so far, save it but keep looking for a better one
6342      ac_cv_path_SED="$ac_path_SED"
6343      ac_path_SED_max=$ac_count
6344    fi
6345    # 10*(2^10) chars as input seems more than enough
6346    test $ac_count -gt 10 && break
6347  done
6348  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6349esac
6350
6351      $ac_path_SED_found && break 3
6352    done
6353  done
6354  done
6355IFS=$as_save_IFS
6356  if test -z "$ac_cv_path_SED"; then
6357    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6358  fi
6359else
6360  ac_cv_path_SED=$SED
6361fi
6362
6363fi
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6365$as_echo "$ac_cv_path_SED" >&6; }
6366 SED="$ac_cv_path_SED"
6367  rm -f conftest.sed
6368
6369
6370  if test "x$SED" = x; then
6371    if test "x" = x; then
6372      PROG_NAME=sed
6373    else
6374      PROG_NAME=
6375    fi
6376    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6377$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6378    as_fn_error $? "Cannot continue" "$LINENO" 5
6379  fi
6380
6381
6382  for ac_prog in nawk gawk awk
6383do
6384  # Extract the first word of "$ac_prog", so it can be a program name with args.
6385set dummy $ac_prog; ac_word=$2
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6387$as_echo_n "checking for $ac_word... " >&6; }
6388if ${ac_cv_path_NAWK+:} false; then :
6389  $as_echo_n "(cached) " >&6
6390else
6391  case $NAWK in
6392  [\\/]* | ?:[\\/]*)
6393  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6394  ;;
6395  *)
6396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6397for as_dir in $PATH
6398do
6399  IFS=$as_save_IFS
6400  test -z "$as_dir" && as_dir=.
6401    for ac_exec_ext in '' $ac_executable_extensions; do
6402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6403    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6405    break 2
6406  fi
6407done
6408  done
6409IFS=$as_save_IFS
6410
6411  ;;
6412esac
6413fi
6414NAWK=$ac_cv_path_NAWK
6415if test -n "$NAWK"; then
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6417$as_echo "$NAWK" >&6; }
6418else
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; }
6421fi
6422
6423
6424  test -n "$NAWK" && break
6425done
6426
6427
6428  if test "x$NAWK" = x; then
6429    if test "x" = x; then
6430      PROG_NAME=nawk
6431    else
6432      PROG_NAME=
6433    fi
6434    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6435$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6436    as_fn_error $? "Cannot continue" "$LINENO" 5
6437  fi
6438
6439
6440  # Always force rm.
6441  RM="$RM -f"
6442
6443  # pwd behaves differently on various platforms and some don't support the -L flag.
6444  # Always use the bash builtin pwd to get uniform behavior.
6445  THEPWDCMD=pwd
6446
6447  # These are not required on all platforms
6448  # Extract the first word of "cygpath", so it can be a program name with args.
6449set dummy cygpath; ac_word=$2
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6451$as_echo_n "checking for $ac_word... " >&6; }
6452if ${ac_cv_path_CYGPATH+:} false; then :
6453  $as_echo_n "(cached) " >&6
6454else
6455  case $CYGPATH in
6456  [\\/]* | ?:[\\/]*)
6457  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6458  ;;
6459  *)
6460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6461for as_dir in $PATH
6462do
6463  IFS=$as_save_IFS
6464  test -z "$as_dir" && as_dir=.
6465    for ac_exec_ext in '' $ac_executable_extensions; do
6466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6467    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6469    break 2
6470  fi
6471done
6472  done
6473IFS=$as_save_IFS
6474
6475  ;;
6476esac
6477fi
6478CYGPATH=$ac_cv_path_CYGPATH
6479if test -n "$CYGPATH"; then
6480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6481$as_echo "$CYGPATH" >&6; }
6482else
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; }
6485fi
6486
6487
6488  # Extract the first word of "readlink", so it can be a program name with args.
6489set dummy readlink; ac_word=$2
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491$as_echo_n "checking for $ac_word... " >&6; }
6492if ${ac_cv_path_READLINK+:} false; then :
6493  $as_echo_n "(cached) " >&6
6494else
6495  case $READLINK in
6496  [\\/]* | ?:[\\/]*)
6497  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6498  ;;
6499  *)
6500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in $PATH
6502do
6503  IFS=$as_save_IFS
6504  test -z "$as_dir" && as_dir=.
6505    for ac_exec_ext in '' $ac_executable_extensions; do
6506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509    break 2
6510  fi
6511done
6512  done
6513IFS=$as_save_IFS
6514
6515  ;;
6516esac
6517fi
6518READLINK=$ac_cv_path_READLINK
6519if test -n "$READLINK"; then
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6521$as_echo "$READLINK" >&6; }
6522else
6523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
6525fi
6526
6527
6528  # Extract the first word of "df", so it can be a program name with args.
6529set dummy df; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_path_DF+:} false; then :
6533  $as_echo_n "(cached) " >&6
6534else
6535  case $DF in
6536  [\\/]* | ?:[\\/]*)
6537  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6538  ;;
6539  *)
6540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in $PATH
6542do
6543  IFS=$as_save_IFS
6544  test -z "$as_dir" && as_dir=.
6545    for ac_exec_ext in '' $ac_executable_extensions; do
6546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549    break 2
6550  fi
6551done
6552  done
6553IFS=$as_save_IFS
6554
6555  ;;
6556esac
6557fi
6558DF=$ac_cv_path_DF
6559if test -n "$DF"; then
6560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6561$as_echo "$DF" >&6; }
6562else
6563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
6567
6568  # Extract the first word of "SetFile", so it can be a program name with args.
6569set dummy SetFile; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_SETFILE+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  case $SETFILE in
6576  [\\/]* | ?:[\\/]*)
6577  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6578  ;;
6579  *)
6580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in $PATH
6582do
6583  IFS=$as_save_IFS
6584  test -z "$as_dir" && as_dir=.
6585    for ac_exec_ext in '' $ac_executable_extensions; do
6586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589    break 2
6590  fi
6591done
6592  done
6593IFS=$as_save_IFS
6594
6595  ;;
6596esac
6597fi
6598SETFILE=$ac_cv_path_SETFILE
6599if test -n "$SETFILE"; then
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6601$as_echo "$SETFILE" >&6; }
6602else
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607
6608
6609
6610# Now we can determine OpenJDK build and target platforms. This is required to
6611# have early on.
6612# Make sure we can run config.sub.
6613$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6614  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6617$as_echo_n "checking build system type... " >&6; }
6618if ${ac_cv_build+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  ac_build_alias=$build_alias
6622test "x$ac_build_alias" = x &&
6623  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6624test "x$ac_build_alias" = x &&
6625  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6626ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6627  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6628
6629fi
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6631$as_echo "$ac_cv_build" >&6; }
6632case $ac_cv_build in
6633*-*-*) ;;
6634*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6635esac
6636build=$ac_cv_build
6637ac_save_IFS=$IFS; IFS='-'
6638set x $ac_cv_build
6639shift
6640build_cpu=$1
6641build_vendor=$2
6642shift; shift
6643# Remember, the first character of IFS is used to create $*,
6644# except with old shells:
6645build_os=$*
6646IFS=$ac_save_IFS
6647case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6648
6649
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6651$as_echo_n "checking host system type... " >&6; }
6652if ${ac_cv_host+:} false; then :
6653  $as_echo_n "(cached) " >&6
6654else
6655  if test "x$host_alias" = x; then
6656  ac_cv_host=$ac_cv_build
6657else
6658  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6659    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6660fi
6661
6662fi
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6664$as_echo "$ac_cv_host" >&6; }
6665case $ac_cv_host in
6666*-*-*) ;;
6667*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6668esac
6669host=$ac_cv_host
6670ac_save_IFS=$IFS; IFS='-'
6671set x $ac_cv_host
6672shift
6673host_cpu=$1
6674host_vendor=$2
6675shift; shift
6676# Remember, the first character of IFS is used to create $*,
6677# except with old shells:
6678host_os=$*
6679IFS=$ac_save_IFS
6680case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6681
6682
6683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6684$as_echo_n "checking target system type... " >&6; }
6685if ${ac_cv_target+:} false; then :
6686  $as_echo_n "(cached) " >&6
6687else
6688  if test "x$target_alias" = x; then
6689  ac_cv_target=$ac_cv_host
6690else
6691  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6692    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6693fi
6694
6695fi
6696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6697$as_echo "$ac_cv_target" >&6; }
6698case $ac_cv_target in
6699*-*-*) ;;
6700*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6701esac
6702target=$ac_cv_target
6703ac_save_IFS=$IFS; IFS='-'
6704set x $ac_cv_target
6705shift
6706target_cpu=$1
6707target_vendor=$2
6708shift; shift
6709# Remember, the first character of IFS is used to create $*,
6710# except with old shells:
6711target_os=$*
6712IFS=$ac_save_IFS
6713case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6714
6715
6716# The aliases save the names the user supplied, while $host etc.
6717# will get canonicalized.
6718test -n "$target_alias" &&
6719  test "$program_prefix$program_suffix$program_transform_name" = \
6720    NONENONEs,x,x, &&
6721  program_prefix=${target_alias}-
6722
6723  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6724  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6725  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6726  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6727  # to use the configure naming style.
6728
6729
6730
6731
6732
6733  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6734  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6735  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6736  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6737  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6738  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6739
6740
6741
6742  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6743
6744  case "$build_os" in
6745    *linux*)
6746      VAR_OS=linux
6747      VAR_OS_API=posix
6748      VAR_OS_ENV=linux
6749      ;;
6750    *solaris*)
6751      VAR_OS=solaris
6752      VAR_OS_API=posix
6753      VAR_OS_ENV=solaris
6754      ;;
6755    *darwin*)
6756      VAR_OS=macosx
6757      VAR_OS_API=posix
6758      VAR_OS_ENV=macosx
6759      ;;
6760    *bsd*)
6761      VAR_OS=bsd
6762      VAR_OS_API=posix
6763      VAR_OS_ENV=bsd
6764      ;;
6765    *cygwin*)
6766      VAR_OS=windows
6767      VAR_OS_API=winapi
6768      VAR_OS_ENV=windows.cygwin
6769      ;;
6770    *mingw*)
6771      VAR_OS=windows
6772      VAR_OS_API=winapi
6773      VAR_OS_ENV=windows.msys
6774      ;;
6775    *)
6776      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6777      ;;
6778  esac
6779
6780
6781  # First argument is the cpu name from the trip/quad
6782  case "$build_cpu" in
6783    x86_64)
6784      VAR_CPU=x86_64
6785      VAR_CPU_ARCH=x86
6786      VAR_CPU_BITS=64
6787      VAR_CPU_ENDIAN=little
6788      ;;
6789    i?86)
6790      VAR_CPU=x86
6791      VAR_CPU_ARCH=x86
6792      VAR_CPU_BITS=32
6793      VAR_CPU_ENDIAN=little
6794      ;;
6795    arm*)
6796      VAR_CPU=arm
6797      VAR_CPU_ARCH=arm
6798      VAR_CPU_BITS=32
6799      VAR_CPU_ENDIAN=little
6800      ;;
6801    powerpc)
6802      VAR_CPU=ppc
6803      VAR_CPU_ARCH=ppc
6804      VAR_CPU_BITS=32
6805      VAR_CPU_ENDIAN=big
6806      ;;
6807    powerpc64)
6808      VAR_CPU=ppc64
6809      VAR_CPU_ARCH=ppc
6810      VAR_CPU_BITS=64
6811      VAR_CPU_ENDIAN=big
6812      ;;
6813    s390)
6814      VAR_CPU=s390
6815      VAR_CPU_ARCH=s390
6816      VAR_CPU_BITS=32
6817      VAR_CPU_ENDIAN=big
6818      ;;
6819    s390x)
6820      VAR_CPU=s390x
6821      VAR_CPU_ARCH=s390
6822      VAR_CPU_BITS=64
6823      VAR_CPU_ENDIAN=big
6824      ;;
6825    sparc)
6826      VAR_CPU=sparc
6827      VAR_CPU_ARCH=sparc
6828      VAR_CPU_BITS=32
6829      VAR_CPU_ENDIAN=big
6830      ;;
6831    sparcv9)
6832      VAR_CPU=sparcv9
6833      VAR_CPU_ARCH=sparc
6834      VAR_CPU_BITS=64
6835      VAR_CPU_ENDIAN=big
6836      ;;
6837    *)
6838      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6839      ;;
6840  esac
6841
6842  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6843  OPENJDK_BUILD_OS="$VAR_OS"
6844  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6845  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6846  OPENJDK_BUILD_CPU="$VAR_CPU"
6847  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6848  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6849  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6850
6851
6852
6853
6854
6855
6856
6857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6858$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6860$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6861
6862  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6863
6864  case "$host_os" in
6865    *linux*)
6866      VAR_OS=linux
6867      VAR_OS_API=posix
6868      VAR_OS_ENV=linux
6869      ;;
6870    *solaris*)
6871      VAR_OS=solaris
6872      VAR_OS_API=posix
6873      VAR_OS_ENV=solaris
6874      ;;
6875    *darwin*)
6876      VAR_OS=macosx
6877      VAR_OS_API=posix
6878      VAR_OS_ENV=macosx
6879      ;;
6880    *bsd*)
6881      VAR_OS=bsd
6882      VAR_OS_API=posix
6883      VAR_OS_ENV=bsd
6884      ;;
6885    *cygwin*)
6886      VAR_OS=windows
6887      VAR_OS_API=winapi
6888      VAR_OS_ENV=windows.cygwin
6889      ;;
6890    *mingw*)
6891      VAR_OS=windows
6892      VAR_OS_API=winapi
6893      VAR_OS_ENV=windows.msys
6894      ;;
6895    *)
6896      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6897      ;;
6898  esac
6899
6900
6901  # First argument is the cpu name from the trip/quad
6902  case "$host_cpu" in
6903    x86_64)
6904      VAR_CPU=x86_64
6905      VAR_CPU_ARCH=x86
6906      VAR_CPU_BITS=64
6907      VAR_CPU_ENDIAN=little
6908      ;;
6909    i?86)
6910      VAR_CPU=x86
6911      VAR_CPU_ARCH=x86
6912      VAR_CPU_BITS=32
6913      VAR_CPU_ENDIAN=little
6914      ;;
6915    arm*)
6916      VAR_CPU=arm
6917      VAR_CPU_ARCH=arm
6918      VAR_CPU_BITS=32
6919      VAR_CPU_ENDIAN=little
6920      ;;
6921    powerpc)
6922      VAR_CPU=ppc
6923      VAR_CPU_ARCH=ppc
6924      VAR_CPU_BITS=32
6925      VAR_CPU_ENDIAN=big
6926      ;;
6927    powerpc64)
6928      VAR_CPU=ppc64
6929      VAR_CPU_ARCH=ppc
6930      VAR_CPU_BITS=64
6931      VAR_CPU_ENDIAN=big
6932      ;;
6933    s390)
6934      VAR_CPU=s390
6935      VAR_CPU_ARCH=s390
6936      VAR_CPU_BITS=32
6937      VAR_CPU_ENDIAN=big
6938      ;;
6939    s390x)
6940      VAR_CPU=s390x
6941      VAR_CPU_ARCH=s390
6942      VAR_CPU_BITS=64
6943      VAR_CPU_ENDIAN=big
6944      ;;
6945    sparc)
6946      VAR_CPU=sparc
6947      VAR_CPU_ARCH=sparc
6948      VAR_CPU_BITS=32
6949      VAR_CPU_ENDIAN=big
6950      ;;
6951    sparcv9)
6952      VAR_CPU=sparcv9
6953      VAR_CPU_ARCH=sparc
6954      VAR_CPU_BITS=64
6955      VAR_CPU_ENDIAN=big
6956      ;;
6957    *)
6958      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6959      ;;
6960  esac
6961
6962  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6963  OPENJDK_TARGET_OS="$VAR_OS"
6964  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6965  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6966  OPENJDK_TARGET_CPU="$VAR_CPU"
6967  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6968  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6969  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6970
6971
6972
6973
6974
6975
6976
6977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6978$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6980$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6981
6982
6983
6984# Check whether --with-target-bits was given.
6985if test "${with_target_bits+set}" = set; then :
6986  withval=$with_target_bits;
6987fi
6988
6989
6990  # We have three types of compiles:
6991  # native  == normal compilation, target system == build system
6992  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6993  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6994  #
6995  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6996    # We're doing a proper cross-compilation
6997    COMPILE_TYPE="cross"
6998  else
6999    COMPILE_TYPE="native"
7000  fi
7001
7002  if test "x$with_target_bits" != x; then
7003    if test "x$COMPILE_TYPE" = "xcross"; then
7004      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7005    fi
7006
7007    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7008      # A reduced build is requested
7009      COMPILE_TYPE="reduced"
7010      OPENJDK_TARGET_CPU_BITS=32
7011      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7012        OPENJDK_TARGET_CPU=x86
7013      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7014        OPENJDK_TARGET_CPU=sparc
7015      else
7016        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7017      fi
7018    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7019      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
7020    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7021      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7022$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7023    else
7024      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7025    fi
7026  fi
7027
7028
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7030$as_echo_n "checking compilation type... " >&6; }
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7032$as_echo "$COMPILE_TYPE" >&6; }
7033
7034
7035  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7036    REQUIRED_OS_NAME=SunOS
7037    REQUIRED_OS_VERSION=5.10
7038  fi
7039  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7040    REQUIRED_OS_NAME=Linux
7041    REQUIRED_OS_VERSION=2.6
7042  fi
7043  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7044    REQUIRED_OS_NAME=Windows
7045    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7046      REQUIRED_OS_VERSION=5.2
7047    else
7048      REQUIRED_OS_VERSION=5.1
7049    fi
7050  fi
7051  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7052    REQUIRED_OS_NAME=Darwin
7053    REQUIRED_OS_VERSION=11.2
7054  fi
7055
7056
7057
7058
7059
7060  # Also store the legacy naming of the cpu.
7061  # Ie i586 and amd64 instead of x86 and x86_64
7062  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7063  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7064    OPENJDK_TARGET_CPU_LEGACY="i586"
7065  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7066    # On all platforms except MacOSX replace x86_64 with amd64.
7067    OPENJDK_TARGET_CPU_LEGACY="amd64"
7068  fi
7069
7070
7071  # And the second legacy naming of the cpu.
7072  # Ie i386 and amd64 instead of x86 and x86_64.
7073  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7074  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7075    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7076  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7077    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7078  fi
7079
7080
7081  # This is the name of the cpu (but using i386 and amd64 instead of
7082  # x86 and x86_64, respectively), preceeded by a /, to be used when
7083  # locating libraries. On macosx, it's empty, though.
7084  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7085  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7086    OPENJDK_TARGET_CPU_LIBDIR=""
7087  fi
7088
7089
7090  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7091  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7092  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7093  OPENJDK_TARGET_CPU_ISADIR=""
7094  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7095    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7096      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7097    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7098      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7099    fi
7100  fi
7101
7102
7103  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7104  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7105  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7106    # On linux only, we replace x86 with i386.
7107    OPENJDK_TARGET_CPU_OSARCH="i386"
7108  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7109    # On all platforms except macosx, we replace x86_64 with amd64.
7110    OPENJDK_TARGET_CPU_OSARCH="amd64"
7111  fi
7112
7113
7114  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7115  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7116    OPENJDK_TARGET_CPU_JLI="i386"
7117  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7118    # On all platforms except macosx, we replace x86_64 with amd64.
7119    OPENJDK_TARGET_CPU_JLI="amd64"
7120  fi
7121  # Now setup the -D flags for building libjli.
7122  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7123  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7124    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7125      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7126    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7127      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7128    fi
7129  fi
7130
7131
7132  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7133  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7134    OPENJDK_TARGET_OS_API_DIR="solaris"
7135  fi
7136  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7137    OPENJDK_TARGET_OS_API_DIR="windows"
7138  fi
7139
7140
7141  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7142    A_LP64="LP64:="
7143    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7144    # unpack200.exe
7145    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7146      ADD_LP64="-D_LP64=1"
7147    fi
7148  fi
7149  LP64=$A_LP64
7150
7151
7152  if test "x$COMPILE_TYPE" = "xcross"; then
7153    # FIXME: ... or should this include reduced builds..?
7154    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7155  else
7156    DEFINE_CROSS_COMPILE_ARCH=""
7157  fi
7158
7159
7160  # ZERO_ARCHDEF is used to enable architecture-specific code
7161  case "${OPENJDK_TARGET_CPU}" in
7162    ppc*)    ZERO_ARCHDEF=PPC   ;;
7163    s390*)   ZERO_ARCHDEF=S390  ;;
7164    sparc*)  ZERO_ARCHDEF=SPARC ;;
7165    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7166    x86)     ZERO_ARCHDEF=IA32  ;;
7167    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7168  esac
7169
7170
7171
7172
7173# Continue setting up basic stuff. Most remaining code require fundamental tools.
7174
7175  # Locate the directory of this script.
7176  SCRIPT="$0"
7177  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7178
7179  # Where is the source? It is located two levels above the configure script.
7180  CURDIR="$PWD"
7181  cd "$AUTOCONF_DIR/../.."
7182  SRC_ROOT="`$THEPWDCMD -L`"
7183
7184  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7185    PATH_SEP=";"
7186
7187  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7188  if test $SRC_ROOT_LENGTH -gt 100; then
7189    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7190  fi
7191
7192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7194$as_echo_n "checking cygwin release... " >&6; }
7195    CYGWIN_VERSION=`$UNAME -r`
7196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7197$as_echo "$CYGWIN_VERSION" >&6; }
7198    WINDOWS_ENV_VENDOR='cygwin'
7199    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7200
7201    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7202    if test "x$CYGWIN_VERSION_OK" = x; then
7203      { $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
7204$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;}
7205      as_fn_error $? "Cannot continue" "$LINENO" 5
7206    fi
7207    if test "x$CYGPATH" = x; then
7208      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7209    fi
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7211$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7212    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7213    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7214    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7215    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7217$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7218    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7219    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7220    if test "x$test_cygdrive_prefix" = x; then
7221      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7222    fi
7223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7225$as_echo_n "checking msys release... " >&6; }
7226    MSYS_VERSION=`$UNAME -r`
7227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7228$as_echo "$MSYS_VERSION" >&6; }
7229
7230    WINDOWS_ENV_VENDOR='msys'
7231    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7232
7233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7234$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7235    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7236    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7237
7238  windows_path="$MSYS_ROOT_PATH"
7239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7240    unix_path=`$CYGPATH -u "$windows_path"`
7241    MSYS_ROOT_PATH="$unix_path"
7242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7244    MSYS_ROOT_PATH="$unix_path"
7245  fi
7246
7247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7248$as_echo "$MSYS_ROOT_PATH" >&6; }
7249    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7250  else
7251    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7252  fi
7253
7254  # Test if windows or unix (cygwin/msys) find is first in path.
7255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7256$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7257  FIND_BINARY_OUTPUT=`find --version 2>&1`
7258  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7260$as_echo "unix style" >&6; }
7261  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7263$as_echo "Windows" >&6; }
7264    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7265$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7266    { $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
7267$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7268    as_fn_error $? "Cannot continue" "$LINENO" 5
7269  else
7270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7271$as_echo "unknown" >&6; }
7272    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7273$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7274  fi
7275
7276  else
7277    PATH_SEP=":"
7278  fi
7279
7280
7281
7282  cd "$CURDIR"
7283
7284
7285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7286
7287  # Input might be given as Windows format, start by converting to
7288  # unix format.
7289  path="$SRC_ROOT"
7290  new_path=`$CYGPATH -u "$path"`
7291
7292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7295  # "foo.exe" is OK but "foo" is an error.
7296  #
7297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7298  # It is also a way to make sure we got the proper file name for the real test later on.
7299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7300  if test "x$test_shortpath" = x; then
7301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7302$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7303    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7304  fi
7305
7306  # Call helper function which possibly converts this using DOS-style short mode.
7307  # If so, the updated path is stored in $new_path.
7308
7309  input_path="$new_path"
7310  # Check if we need to convert this using DOS-style short mode. If the path
7311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7312  # take no chances and rewrite it.
7313  # Note: m4 eats our [], so we need to use [ and ] instead.
7314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7315  if test "x$has_forbidden_chars" != x; then
7316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7320      # Going to short mode and back again did indeed matter. Since short mode is
7321      # case insensitive, let's make it lowercase to improve readability.
7322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7323      # Now convert it back to Unix-stile (cygpath)
7324      input_path=`$CYGPATH -u "$shortmode_path"`
7325      new_path="$input_path"
7326    fi
7327  fi
7328
7329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7330  if test "x$test_cygdrive_prefix" = x; then
7331    # As a simple fix, exclude /usr/bin since it's not a real path.
7332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7334      # a path prefixed by /cygdrive for fixpath to work.
7335      new_path="$CYGWIN_ROOT_PATH$input_path"
7336    fi
7337  fi
7338
7339
7340  if test "x$path" != "x$new_path"; then
7341    SRC_ROOT="$new_path"
7342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7343$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7344  fi
7345
7346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7347
7348  path="$SRC_ROOT"
7349  has_colon=`$ECHO $path | $GREP ^.:`
7350  new_path="$path"
7351  if test "x$has_colon" = x; then
7352    # Not in mixed or Windows style, start by that.
7353    new_path=`cmd //c echo $path`
7354  fi
7355
7356
7357  input_path="$new_path"
7358  # Check if we need to convert this using DOS-style short mode. If the path
7359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7360  # take no chances and rewrite it.
7361  # Note: m4 eats our [], so we need to use [ and ] instead.
7362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7363  if test "x$has_forbidden_chars" != x; then
7364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7366  fi
7367
7368
7369  windows_path="$new_path"
7370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7371    unix_path=`$CYGPATH -u "$windows_path"`
7372    new_path="$unix_path"
7373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7375    new_path="$unix_path"
7376  fi
7377
7378  if test "x$path" != "x$new_path"; then
7379    SRC_ROOT="$new_path"
7380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7381$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7382  fi
7383
7384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7386
7387  else
7388    # We're on a posix platform. Hooray! :)
7389    path="$SRC_ROOT"
7390    has_space=`$ECHO "$path" | $GREP " "`
7391    if test "x$has_space" != x; then
7392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7393$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7394      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7395    fi
7396
7397    # Use eval to expand a potential ~
7398    eval path="$path"
7399    if test ! -f "$path" && test ! -d "$path"; then
7400      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7401    fi
7402
7403    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7404  fi
7405
7406
7407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7408
7409  # Input might be given as Windows format, start by converting to
7410  # unix format.
7411  path="$CURDIR"
7412  new_path=`$CYGPATH -u "$path"`
7413
7414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7417  # "foo.exe" is OK but "foo" is an error.
7418  #
7419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7420  # It is also a way to make sure we got the proper file name for the real test later on.
7421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7422  if test "x$test_shortpath" = x; then
7423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7424$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7425    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7426  fi
7427
7428  # Call helper function which possibly converts this using DOS-style short mode.
7429  # If so, the updated path is stored in $new_path.
7430
7431  input_path="$new_path"
7432  # Check if we need to convert this using DOS-style short mode. If the path
7433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7434  # take no chances and rewrite it.
7435  # Note: m4 eats our [], so we need to use [ and ] instead.
7436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7437  if test "x$has_forbidden_chars" != x; then
7438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7442      # Going to short mode and back again did indeed matter. Since short mode is
7443      # case insensitive, let's make it lowercase to improve readability.
7444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7445      # Now convert it back to Unix-stile (cygpath)
7446      input_path=`$CYGPATH -u "$shortmode_path"`
7447      new_path="$input_path"
7448    fi
7449  fi
7450
7451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7452  if test "x$test_cygdrive_prefix" = x; then
7453    # As a simple fix, exclude /usr/bin since it's not a real path.
7454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7456      # a path prefixed by /cygdrive for fixpath to work.
7457      new_path="$CYGWIN_ROOT_PATH$input_path"
7458    fi
7459  fi
7460
7461
7462  if test "x$path" != "x$new_path"; then
7463    CURDIR="$new_path"
7464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7465$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7466  fi
7467
7468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7469
7470  path="$CURDIR"
7471  has_colon=`$ECHO $path | $GREP ^.:`
7472  new_path="$path"
7473  if test "x$has_colon" = x; then
7474    # Not in mixed or Windows style, start by that.
7475    new_path=`cmd //c echo $path`
7476  fi
7477
7478
7479  input_path="$new_path"
7480  # Check if we need to convert this using DOS-style short mode. If the path
7481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7482  # take no chances and rewrite it.
7483  # Note: m4 eats our [], so we need to use [ and ] instead.
7484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7485  if test "x$has_forbidden_chars" != x; then
7486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7488  fi
7489
7490
7491  windows_path="$new_path"
7492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7493    unix_path=`$CYGPATH -u "$windows_path"`
7494    new_path="$unix_path"
7495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7497    new_path="$unix_path"
7498  fi
7499
7500  if test "x$path" != "x$new_path"; then
7501    CURDIR="$new_path"
7502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7503$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7504  fi
7505
7506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7508
7509  else
7510    # We're on a posix platform. Hooray! :)
7511    path="$CURDIR"
7512    has_space=`$ECHO "$path" | $GREP " "`
7513    if test "x$has_space" != x; then
7514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7515$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7516      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7517    fi
7518
7519    # Use eval to expand a potential ~
7520    eval path="$path"
7521    if test ! -f "$path" && test ! -d "$path"; then
7522      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7523    fi
7524
7525    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7526  fi
7527
7528
7529  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7530    # Add extra search paths on solaris for utilities like ar and as etc...
7531    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7532  fi
7533
7534  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7535  # is not correct.
7536
7537# Check whether --with-sys-root was given.
7538if test "${with_sys_root+set}" = set; then :
7539  withval=$with_sys_root;
7540fi
7541
7542
7543  if test "x$with_sys_root" != x; then
7544    SYS_ROOT=$with_sys_root
7545  else
7546    SYS_ROOT=/
7547  fi
7548
7549
7550
7551# Check whether --with-tools-dir was given.
7552if test "${with_tools_dir+set}" = set; then :
7553  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7554
7555fi
7556
7557
7558
7559# Check whether --with-devkit was given.
7560if test "${with_devkit+set}" = set; then :
7561  withval=$with_devkit;
7562        if test "x$with_sys_root" != x; then
7563          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7564        fi
7565
7566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7567
7568  # Input might be given as Windows format, start by converting to
7569  # unix format.
7570  path="$with_devkit"
7571  new_path=`$CYGPATH -u "$path"`
7572
7573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7576  # "foo.exe" is OK but "foo" is an error.
7577  #
7578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7579  # It is also a way to make sure we got the proper file name for the real test later on.
7580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7581  if test "x$test_shortpath" = x; then
7582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7583$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7584    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7585  fi
7586
7587  # Call helper function which possibly converts this using DOS-style short mode.
7588  # If so, the updated path is stored in $new_path.
7589
7590  input_path="$new_path"
7591  # Check if we need to convert this using DOS-style short mode. If the path
7592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7593  # take no chances and rewrite it.
7594  # Note: m4 eats our [], so we need to use [ and ] instead.
7595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7596  if test "x$has_forbidden_chars" != x; then
7597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7601      # Going to short mode and back again did indeed matter. Since short mode is
7602      # case insensitive, let's make it lowercase to improve readability.
7603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7604      # Now convert it back to Unix-stile (cygpath)
7605      input_path=`$CYGPATH -u "$shortmode_path"`
7606      new_path="$input_path"
7607    fi
7608  fi
7609
7610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7611  if test "x$test_cygdrive_prefix" = x; then
7612    # As a simple fix, exclude /usr/bin since it's not a real path.
7613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7615      # a path prefixed by /cygdrive for fixpath to work.
7616      new_path="$CYGWIN_ROOT_PATH$input_path"
7617    fi
7618  fi
7619
7620
7621  if test "x$path" != "x$new_path"; then
7622    with_devkit="$new_path"
7623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7624$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7625  fi
7626
7627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7628
7629  path="$with_devkit"
7630  has_colon=`$ECHO $path | $GREP ^.:`
7631  new_path="$path"
7632  if test "x$has_colon" = x; then
7633    # Not in mixed or Windows style, start by that.
7634    new_path=`cmd //c echo $path`
7635  fi
7636
7637
7638  input_path="$new_path"
7639  # Check if we need to convert this using DOS-style short mode. If the path
7640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7641  # take no chances and rewrite it.
7642  # Note: m4 eats our [], so we need to use [ and ] instead.
7643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7644  if test "x$has_forbidden_chars" != x; then
7645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7647  fi
7648
7649
7650  windows_path="$new_path"
7651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7652    unix_path=`$CYGPATH -u "$windows_path"`
7653    new_path="$unix_path"
7654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7656    new_path="$unix_path"
7657  fi
7658
7659  if test "x$path" != "x$new_path"; then
7660    with_devkit="$new_path"
7661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7662$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7663  fi
7664
7665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7667
7668  else
7669    # We're on a posix platform. Hooray! :)
7670    path="$with_devkit"
7671    has_space=`$ECHO "$path" | $GREP " "`
7672    if test "x$has_space" != x; then
7673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7674$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7675      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7676    fi
7677
7678    # Use eval to expand a potential ~
7679    eval path="$path"
7680    if test ! -f "$path" && test ! -d "$path"; then
7681      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7682    fi
7683
7684    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7685  fi
7686
7687
7688  if test "x$TOOLS_DIR" = x; then
7689    TOOLS_DIR="$with_devkit/bin"
7690  else
7691    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7692  fi
7693
7694        if test -d "$with_devkit/$host_alias/libc"; then
7695          SYS_ROOT=$with_devkit/$host_alias/libc
7696        elif test -d "$with_devkit/$host/sys-root"; then
7697          SYS_ROOT=$with_devkit/$host/sys-root
7698        fi
7699
7700fi
7701
7702
7703
7704  # Setup default logging of stdout and stderr to build.log in the output root.
7705  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7706  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7707  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7708
7709
7710
7711
7712
7713# Check if it's a pure open build or if custom sources are to be used.
7714
7715  # Check whether --enable-openjdk-only was given.
7716if test "${enable_openjdk_only+set}" = set; then :
7717  enableval=$enable_openjdk_only;
7718else
7719  enable_openjdk_only="no"
7720fi
7721
7722
7723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7724$as_echo_n "checking for presence of closed sources... " >&6; }
7725  if test -d "$SRC_ROOT/jdk/src/closed"; then
7726    CLOSED_SOURCE_PRESENT=yes
7727  else
7728    CLOSED_SOURCE_PRESENT=no
7729  fi
7730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7731$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7732
7733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7734$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7735  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7737$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7738
7739  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7740    OPENJDK=true
7741    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7742      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7743$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7744    fi
7745  else
7746    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7747      OPENJDK=true
7748    else
7749      OPENJDK=false
7750    fi
7751  fi
7752
7753  if test "x$OPENJDK" = "xtrue"; then
7754    SET_OPENJDK="OPENJDK=true"
7755  fi
7756
7757
7758
7759
7760# These are needed to be able to create a configuration name (and thus the output directory)
7761
7762  ###############################################################################
7763  #
7764  # Check which variant of the JDK that we want to build.
7765  # Currently we have:
7766  #    normal:   standard edition
7767  # but the custom make system may add other variants
7768  #
7769  # Effectively the JDK variant gives a name to a specific set of
7770  # modules to compile into the JDK. In the future, these modules
7771  # might even be Jigsaw modules.
7772  #
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7774$as_echo_n "checking which variant of the JDK to build... " >&6; }
7775
7776# Check whether --with-jdk-variant was given.
7777if test "${with_jdk_variant+set}" = set; then :
7778  withval=$with_jdk_variant;
7779fi
7780
7781
7782  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7783    JDK_VARIANT="normal"
7784  else
7785    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7786  fi
7787
7788
7789
7790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7791$as_echo "$JDK_VARIANT" >&6; }
7792
7793
7794
7795  ###############################################################################
7796  #
7797  # Check which variants of the JVM that we want to build.
7798  # Currently we have:
7799  #    server: normal interpreter and a tiered C1/C2 compiler
7800  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7801  #    minimal1: reduced form of client with optional VM services and features stripped out
7802  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7803  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7804  #    zero: no machine code interpreter, no compiler
7805  #    zeroshark: zero interpreter and shark/llvm compiler backend
7806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7807$as_echo_n "checking which variants of the JVM to build... " >&6; }
7808
7809# Check whether --with-jvm-variants was given.
7810if test "${with_jvm_variants+set}" = set; then :
7811  withval=$with_jvm_variants;
7812fi
7813
7814
7815  if test "x$with_jvm_variants" = x; then
7816    with_jvm_variants="server"
7817  fi
7818
7819  JVM_VARIANTS=",$with_jvm_variants,"
7820  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7821
7822  if test "x$TEST_VARIANTS" != "x,"; then
7823    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7824  fi
7825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7826$as_echo "$with_jvm_variants" >&6; }
7827
7828  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7829  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7830  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7831  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7832  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7833  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7834
7835  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7836    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7837      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7838    fi
7839  fi
7840  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7841    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7842      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7843    fi
7844  fi
7845  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7846    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7847      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7848    fi
7849  fi
7850
7851  # Replace the commas with AND for use in the build directory name.
7852  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7853  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7854  if test "x$COUNT_VARIANTS" != "x,1"; then
7855    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7856  else
7857    BUILDING_MULTIPLE_JVM_VARIANTS=no
7858  fi
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868  INCLUDE_SA=true
7869  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7870    INCLUDE_SA=false
7871  fi
7872  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7873    INCLUDE_SA=false
7874  fi
7875
7876
7877  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7878    MACOSX_UNIVERSAL="true"
7879  fi
7880
7881
7882
7883
7884  ###############################################################################
7885  #
7886  # Set the debug level
7887  #    release: no debug information, all optimizations, no asserts.
7888  #    fastdebug: debug information (-g), all optimizations, all asserts
7889  #    slowdebug: debug information (-g), no optimizations, all asserts
7890  #
7891  DEBUG_LEVEL="release"
7892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7893$as_echo_n "checking which debug level to use... " >&6; }
7894  # Check whether --enable-debug was given.
7895if test "${enable_debug+set}" = set; then :
7896  enableval=$enable_debug;
7897        ENABLE_DEBUG="${enableval}"
7898        DEBUG_LEVEL="fastdebug"
7899
7900else
7901  ENABLE_DEBUG="no"
7902fi
7903
7904
7905
7906# Check whether --with-debug-level was given.
7907if test "${with_debug_level+set}" = set; then :
7908  withval=$with_debug_level;
7909        DEBUG_LEVEL="${withval}"
7910        if test "x$ENABLE_DEBUG" = xyes; then
7911          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7912        fi
7913
7914fi
7915
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7917$as_echo "$DEBUG_LEVEL" >&6; }
7918
7919  if test "x$DEBUG_LEVEL" != xrelease && \
7920      test "x$DEBUG_LEVEL" != xfastdebug && \
7921      test "x$DEBUG_LEVEL" != xslowdebug; then
7922    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7923  fi
7924
7925
7926  ###############################################################################
7927  #
7928  # Setup legacy vars/targets and new vars to deal with different debug levels.
7929  #
7930
7931  case $DEBUG_LEVEL in
7932    release )
7933      VARIANT="OPT"
7934      FASTDEBUG="false"
7935      DEBUG_CLASSFILES="false"
7936      BUILD_VARIANT_RELEASE=""
7937      HOTSPOT_DEBUG_LEVEL="product"
7938      HOTSPOT_EXPORT="product"
7939      ;;
7940    fastdebug )
7941      VARIANT="DBG"
7942      FASTDEBUG="true"
7943      DEBUG_CLASSFILES="true"
7944      BUILD_VARIANT_RELEASE="-fastdebug"
7945      HOTSPOT_DEBUG_LEVEL="fastdebug"
7946      HOTSPOT_EXPORT="fastdebug"
7947      ;;
7948    slowdebug )
7949      VARIANT="DBG"
7950      FASTDEBUG="false"
7951      DEBUG_CLASSFILES="true"
7952      BUILD_VARIANT_RELEASE="-debug"
7953      HOTSPOT_DEBUG_LEVEL="jvmg"
7954      HOTSPOT_EXPORT="debug"
7955      ;;
7956  esac
7957
7958  #####
7959  # Generate the legacy makefile targets for hotspot.
7960  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7961  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7962  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7963  # But until then ...
7964  HOTSPOT_TARGET=""
7965
7966  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7967    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7968  fi
7969
7970  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7971    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7972  fi
7973
7974  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7975    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7976  fi
7977
7978  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7979    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7980  fi
7981
7982  if test "x$JVM_VARIANT_ZERO" = xtrue; then
7983    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7984  fi
7985
7986  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7987    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7988  fi
7989
7990  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7991
7992  # On Macosx universal binaries are produced, but they only contain
7993  # 64 bit intel. This invalidates control of which jvms are built
7994  # from configure, but only server is valid anyway. Fix this
7995  # when hotspot makefiles are rewritten.
7996  if test "x$MACOSX_UNIVERSAL" = xtrue; then
7997    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7998  fi
7999
8000  #####
8001
8002
8003
8004
8005
8006
8007
8008
8009# With basic setup done, call the custom early hook.
8010
8011
8012# To properly create a configuration name, we need to have the OpenJDK target
8013# and options (variants and debug level) parsed.
8014
8015
8016
8017# Check whether --with-conf-name was given.
8018if test "${with_conf_name+set}" = set; then :
8019  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8020fi
8021
8022
8023  # Test from where we are running configure, in or outside of src root.
8024  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8025      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8026      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8027    # We are running configure from the src root.
8028    # Create a default ./build/target-variant-debuglevel output root.
8029    if test "x${CONF_NAME}" = x; then
8030      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8031    fi
8032    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8033    $MKDIR -p "$OUTPUT_ROOT"
8034    if test ! -d "$OUTPUT_ROOT"; then
8035      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8036    fi
8037  else
8038    # We are running configure from outside of the src dir.
8039    # Then use the current directory as output dir!
8040    # If configuration is situated in normal build directory, just use the build
8041    # directory name as configuration name, otherwise use the complete path.
8042    if test "x${CONF_NAME}" = x; then
8043      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8044    fi
8045    OUTPUT_ROOT="$CURDIR"
8046
8047    # WARNING: This might be a bad thing to do. You need to be sure you want to
8048    # have a configuration in this directory. Do some sanity checks!
8049
8050    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8051      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8052      # other files
8053      files_present=`$LS $OUTPUT_ROOT`
8054      # Configure has already touched config.log and confdefs.h in the current dir when this check
8055      # is performed.
8056      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8057      | $TR -d '\n'`
8058      if test "x$filtered_files" != x; then
8059        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8060$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8062$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8064$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8066$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8067        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8068$as_echo "$as_me: seriously mess up just about everything." >&6;}
8069        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8070$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8071        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8072$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8073        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8074      fi
8075    fi
8076  fi
8077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8078$as_echo_n "checking what configuration name to use... " >&6; }
8079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8080$as_echo "$CONF_NAME" >&6; }
8081
8082
8083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8084
8085  # Input might be given as Windows format, start by converting to
8086  # unix format.
8087  path="$OUTPUT_ROOT"
8088  new_path=`$CYGPATH -u "$path"`
8089
8090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8093  # "foo.exe" is OK but "foo" is an error.
8094  #
8095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8096  # It is also a way to make sure we got the proper file name for the real test later on.
8097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8098  if test "x$test_shortpath" = x; then
8099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8100$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8101    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8102  fi
8103
8104  # Call helper function which possibly converts this using DOS-style short mode.
8105  # If so, the updated path is stored in $new_path.
8106
8107  input_path="$new_path"
8108  # Check if we need to convert this using DOS-style short mode. If the path
8109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8110  # take no chances and rewrite it.
8111  # Note: m4 eats our [], so we need to use [ and ] instead.
8112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8113  if test "x$has_forbidden_chars" != x; then
8114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8118      # Going to short mode and back again did indeed matter. Since short mode is
8119      # case insensitive, let's make it lowercase to improve readability.
8120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8121      # Now convert it back to Unix-stile (cygpath)
8122      input_path=`$CYGPATH -u "$shortmode_path"`
8123      new_path="$input_path"
8124    fi
8125  fi
8126
8127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8128  if test "x$test_cygdrive_prefix" = x; then
8129    # As a simple fix, exclude /usr/bin since it's not a real path.
8130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8132      # a path prefixed by /cygdrive for fixpath to work.
8133      new_path="$CYGWIN_ROOT_PATH$input_path"
8134    fi
8135  fi
8136
8137
8138  if test "x$path" != "x$new_path"; then
8139    OUTPUT_ROOT="$new_path"
8140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8141$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8142  fi
8143
8144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8145
8146  path="$OUTPUT_ROOT"
8147  has_colon=`$ECHO $path | $GREP ^.:`
8148  new_path="$path"
8149  if test "x$has_colon" = x; then
8150    # Not in mixed or Windows style, start by that.
8151    new_path=`cmd //c echo $path`
8152  fi
8153
8154
8155  input_path="$new_path"
8156  # Check if we need to convert this using DOS-style short mode. If the path
8157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8158  # take no chances and rewrite it.
8159  # Note: m4 eats our [], so we need to use [ and ] instead.
8160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8161  if test "x$has_forbidden_chars" != x; then
8162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8164  fi
8165
8166
8167  windows_path="$new_path"
8168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8169    unix_path=`$CYGPATH -u "$windows_path"`
8170    new_path="$unix_path"
8171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8173    new_path="$unix_path"
8174  fi
8175
8176  if test "x$path" != "x$new_path"; then
8177    OUTPUT_ROOT="$new_path"
8178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8179$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8180  fi
8181
8182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8184
8185  else
8186    # We're on a posix platform. Hooray! :)
8187    path="$OUTPUT_ROOT"
8188    has_space=`$ECHO "$path" | $GREP " "`
8189    if test "x$has_space" != x; then
8190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8191$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8193    fi
8194
8195    # Use eval to expand a potential ~
8196    eval path="$path"
8197    if test ! -f "$path" && test ! -d "$path"; then
8198      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8199    fi
8200
8201    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8202  fi
8203
8204
8205  SPEC=$OUTPUT_ROOT/spec.gmk
8206
8207  CONF_NAME=$CONF_NAME
8208
8209  OUTPUT_ROOT=$OUTPUT_ROOT
8210
8211
8212  # Most of the probed defines are put into config.h
8213  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8214
8215  # The spec.gmk file contains all variables for the make system.
8216  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8217
8218  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8219  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8220
8221  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8222  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8223
8224  # The compare.sh is used to compare the build output to other builds.
8225  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8226
8227  # Spec.sh is currently used by compare-objects.sh
8228  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8229
8230  # The generated Makefile knows where the spec.gmk is and where the source is.
8231  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8232  # which will look for generated configurations
8233  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8234
8235
8236  # Save the arguments given to us
8237  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8238
8239
8240# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8241
8242  for ac_prog in apt-get yum port pkgutil pkgadd
8243do
8244  # Extract the first word of "$ac_prog", so it can be a program name with args.
8245set dummy $ac_prog; ac_word=$2
8246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8247$as_echo_n "checking for $ac_word... " >&6; }
8248if ${ac_cv_prog_PKGHANDLER+:} false; then :
8249  $as_echo_n "(cached) " >&6
8250else
8251  if test -n "$PKGHANDLER"; then
8252  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8253else
8254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8255for as_dir in $PATH
8256do
8257  IFS=$as_save_IFS
8258  test -z "$as_dir" && as_dir=.
8259    for ac_exec_ext in '' $ac_executable_extensions; do
8260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8261    ac_cv_prog_PKGHANDLER="$ac_prog"
8262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8263    break 2
8264  fi
8265done
8266  done
8267IFS=$as_save_IFS
8268
8269fi
8270fi
8271PKGHANDLER=$ac_cv_prog_PKGHANDLER
8272if test -n "$PKGHANDLER"; then
8273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8274$as_echo "$PKGHANDLER" >&6; }
8275else
8276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8277$as_echo "no" >&6; }
8278fi
8279
8280
8281  test -n "$PKGHANDLER" && break
8282done
8283
8284
8285
8286# Setup tools that requires more complex handling, or that is not needed by the configure script.
8287
8288
8289  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8290  if test "x$MAKE" != x; then
8291    # User has supplied a make, test it.
8292    if test ! -f "$MAKE"; then
8293      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8294    fi
8295
8296  MAKE_CANDIDATE=""$MAKE""
8297  DESCRIPTION="user supplied MAKE=$MAKE"
8298  if test "x$MAKE_CANDIDATE" != x; then
8299    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8300$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8301    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8302    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8303    if test "x$IS_GNU_MAKE" = x; then
8304      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8305$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8306    else
8307      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8308      if test "x$IS_MODERN_MAKE" = x; then
8309        { $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
8310$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;}
8311      else
8312        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8313          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8314            MAKE_EXPECTED_ENV='cygwin'
8315          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8316            MAKE_EXPECTED_ENV='msys'
8317          else
8318            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8319          fi
8320          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8321          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8322        else
8323          # Not relevant for non-Windows
8324          IS_MAKE_CORRECT_ENV=true
8325        fi
8326        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8327          { $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
8328$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;}
8329        else
8330          FOUND_MAKE=$MAKE_CANDIDATE
8331
8332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8333
8334  # First separate the path from the arguments. This will split at the first
8335  # space.
8336  complete="$FOUND_MAKE"
8337  path="${complete%% *}"
8338  tmp="$complete EOL"
8339  arguments="${tmp#* }"
8340
8341  # Input might be given as Windows format, start by converting to
8342  # unix format.
8343  new_path=`$CYGPATH -u "$path"`
8344
8345  # Now try to locate executable using which
8346  new_path=`$WHICH "$new_path" 2> /dev/null`
8347  # bat and cmd files are not always considered executable in cygwin causing which
8348  # to not find them
8349  if test "x$new_path" = x \
8350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8352    new_path=`$CYGPATH -u "$path"`
8353  fi
8354  if test "x$new_path" = x; then
8355    # Oops. Which didn't find the executable.
8356    # The splitting of arguments from the executable at a space might have been incorrect,
8357    # since paths with space are more likely in Windows. Give it another try with the whole
8358    # argument.
8359    path="$complete"
8360    arguments="EOL"
8361    new_path=`$CYGPATH -u "$path"`
8362    new_path=`$WHICH "$new_path" 2> /dev/null`
8363    # bat and cmd files are not always considered executable in cygwin causing which
8364    # to not find them
8365    if test "x$new_path" = x \
8366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8368      new_path=`$CYGPATH -u "$path"`
8369    fi
8370    if test "x$new_path" = x; then
8371      # It's still not found. Now this is an unrecoverable error.
8372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8373$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8374      has_space=`$ECHO "$complete" | $GREP " "`
8375      if test "x$has_space" != x; then
8376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8378      fi
8379      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8380    fi
8381  fi
8382
8383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8386  # "foo.exe" is OK but "foo" is an error.
8387  #
8388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8389  # It is also a way to make sure we got the proper file name for the real test later on.
8390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8391  if test "x$test_shortpath" = x; then
8392    # Short path failed, file does not exist as specified.
8393    # Try adding .exe or .cmd
8394    if test -f "${new_path}.exe"; then
8395      input_to_shortpath="${new_path}.exe"
8396    elif test -f "${new_path}.cmd"; then
8397      input_to_shortpath="${new_path}.cmd"
8398    else
8399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8400$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8403      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8404    fi
8405  else
8406    input_to_shortpath="$new_path"
8407  fi
8408
8409  # Call helper function which possibly converts this using DOS-style short mode.
8410  # If so, the updated path is stored in $new_path.
8411  new_path="$input_to_shortpath"
8412
8413  input_path="$input_to_shortpath"
8414  # Check if we need to convert this using DOS-style short mode. If the path
8415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8416  # take no chances and rewrite it.
8417  # Note: m4 eats our [], so we need to use [ and ] instead.
8418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8419  if test "x$has_forbidden_chars" != x; then
8420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8424      # Going to short mode and back again did indeed matter. Since short mode is
8425      # case insensitive, let's make it lowercase to improve readability.
8426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8427      # Now convert it back to Unix-stile (cygpath)
8428      input_path=`$CYGPATH -u "$shortmode_path"`
8429      new_path="$input_path"
8430    fi
8431  fi
8432
8433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8434  if test "x$test_cygdrive_prefix" = x; then
8435    # As a simple fix, exclude /usr/bin since it's not a real path.
8436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8438      # a path prefixed by /cygdrive for fixpath to work.
8439      new_path="$CYGWIN_ROOT_PATH$input_path"
8440    fi
8441  fi
8442
8443  # remove trailing .exe if any
8444  new_path="${new_path/%.exe/}"
8445
8446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8447
8448  # First separate the path from the arguments. This will split at the first
8449  # space.
8450  complete="$FOUND_MAKE"
8451  path="${complete%% *}"
8452  tmp="$complete EOL"
8453  arguments="${tmp#* }"
8454
8455  # Input might be given as Windows format, start by converting to
8456  # unix format.
8457  new_path="$path"
8458
8459  windows_path="$new_path"
8460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8461    unix_path=`$CYGPATH -u "$windows_path"`
8462    new_path="$unix_path"
8463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8465    new_path="$unix_path"
8466  fi
8467
8468
8469  # Now try to locate executable using which
8470  new_path=`$WHICH "$new_path" 2> /dev/null`
8471
8472  if test "x$new_path" = x; then
8473    # Oops. Which didn't find the executable.
8474    # The splitting of arguments from the executable at a space might have been incorrect,
8475    # since paths with space are more likely in Windows. Give it another try with the whole
8476    # argument.
8477    path="$complete"
8478    arguments="EOL"
8479    new_path="$path"
8480
8481  windows_path="$new_path"
8482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8483    unix_path=`$CYGPATH -u "$windows_path"`
8484    new_path="$unix_path"
8485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8487    new_path="$unix_path"
8488  fi
8489
8490
8491    new_path=`$WHICH "$new_path" 2> /dev/null`
8492
8493    if test "x$new_path" = x; then
8494      # It's still not found. Now this is an unrecoverable error.
8495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8497      has_space=`$ECHO "$complete" | $GREP " "`
8498      if test "x$has_space" != x; then
8499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8501      fi
8502      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8503    fi
8504  fi
8505
8506  # Now new_path has a complete unix path to the binary
8507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8508    # Keep paths in /bin as-is, but remove trailing .exe if any
8509    new_path="${new_path/%.exe/}"
8510    # Do not save /bin paths to all_fixpath_prefixes!
8511  else
8512    # Not in mixed or Windows style, start by that.
8513    new_path=`cmd //c echo $new_path`
8514
8515  input_path="$new_path"
8516  # Check if we need to convert this using DOS-style short mode. If the path
8517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8518  # take no chances and rewrite it.
8519  # Note: m4 eats our [], so we need to use [ and ] instead.
8520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8521  if test "x$has_forbidden_chars" != x; then
8522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8524  fi
8525
8526    # Output is in $new_path
8527
8528  windows_path="$new_path"
8529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8530    unix_path=`$CYGPATH -u "$windows_path"`
8531    new_path="$unix_path"
8532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8534    new_path="$unix_path"
8535  fi
8536
8537    # remove trailing .exe if any
8538    new_path="${new_path/%.exe/}"
8539
8540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8542  fi
8543
8544  else
8545    # We're on a posix platform. Hooray! :)
8546    # First separate the path from the arguments. This will split at the first
8547    # space.
8548    complete="$FOUND_MAKE"
8549    path="${complete%% *}"
8550    tmp="$complete EOL"
8551    arguments="${tmp#* }"
8552
8553    # Cannot rely on the command "which" here since it doesn't always work.
8554    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8555    if test -z "$is_absolute_path"; then
8556      # Path to executable is not absolute. Find it.
8557      IFS_save="$IFS"
8558      IFS=:
8559      for p in $PATH; do
8560        if test -f "$p/$path" && test -x "$p/$path"; then
8561          new_path="$p/$path"
8562          break
8563        fi
8564      done
8565      IFS="$IFS_save"
8566    else
8567      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8568$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8569      new_path="$path"
8570    fi
8571
8572    if test "x$new_path" = x; then
8573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8575      has_space=`$ECHO "$complete" | $GREP " "`
8576      if test "x$has_space" != x; then
8577        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8579      fi
8580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8581    fi
8582  fi
8583
8584  # Now join together the path and the arguments once again
8585  if test "x$arguments" != xEOL; then
8586    new_complete="$new_path ${arguments% *}"
8587  else
8588    new_complete="$new_path"
8589  fi
8590
8591  if test "x$complete" != "x$new_complete"; then
8592    FOUND_MAKE="$new_complete"
8593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8594$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8595  fi
8596
8597        fi
8598      fi
8599    fi
8600  fi
8601
8602    if test "x$FOUND_MAKE" = x; then
8603      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8604    fi
8605  else
8606    # Try our hardest to locate a correct version of GNU make
8607    for ac_prog in gmake
8608do
8609  # Extract the first word of "$ac_prog", so it can be a program name with args.
8610set dummy $ac_prog; ac_word=$2
8611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8612$as_echo_n "checking for $ac_word... " >&6; }
8613if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8614  $as_echo_n "(cached) " >&6
8615else
8616  case $CHECK_GMAKE in
8617  [\\/]* | ?:[\\/]*)
8618  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8619  ;;
8620  *)
8621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8622for as_dir in $PATH
8623do
8624  IFS=$as_save_IFS
8625  test -z "$as_dir" && as_dir=.
8626    for ac_exec_ext in '' $ac_executable_extensions; do
8627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8628    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8630    break 2
8631  fi
8632done
8633  done
8634IFS=$as_save_IFS
8635
8636  ;;
8637esac
8638fi
8639CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8640if test -n "$CHECK_GMAKE"; then
8641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8642$as_echo "$CHECK_GMAKE" >&6; }
8643else
8644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8645$as_echo "no" >&6; }
8646fi
8647
8648
8649  test -n "$CHECK_GMAKE" && break
8650done
8651
8652
8653  MAKE_CANDIDATE=""$CHECK_GMAKE""
8654  DESCRIPTION="gmake in PATH"
8655  if test "x$MAKE_CANDIDATE" != x; then
8656    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8657$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8658    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8659    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8660    if test "x$IS_GNU_MAKE" = x; then
8661      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8662$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8663    else
8664      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8665      if test "x$IS_MODERN_MAKE" = x; then
8666        { $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
8667$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;}
8668      else
8669        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8670          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8671            MAKE_EXPECTED_ENV='cygwin'
8672          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8673            MAKE_EXPECTED_ENV='msys'
8674          else
8675            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8676          fi
8677          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8678          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8679        else
8680          # Not relevant for non-Windows
8681          IS_MAKE_CORRECT_ENV=true
8682        fi
8683        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8684          { $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
8685$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;}
8686        else
8687          FOUND_MAKE=$MAKE_CANDIDATE
8688
8689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8690
8691  # First separate the path from the arguments. This will split at the first
8692  # space.
8693  complete="$FOUND_MAKE"
8694  path="${complete%% *}"
8695  tmp="$complete EOL"
8696  arguments="${tmp#* }"
8697
8698  # Input might be given as Windows format, start by converting to
8699  # unix format.
8700  new_path=`$CYGPATH -u "$path"`
8701
8702  # Now try to locate executable using which
8703  new_path=`$WHICH "$new_path" 2> /dev/null`
8704  # bat and cmd files are not always considered executable in cygwin causing which
8705  # to not find them
8706  if test "x$new_path" = x \
8707      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8708      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8709    new_path=`$CYGPATH -u "$path"`
8710  fi
8711  if test "x$new_path" = x; then
8712    # Oops. Which didn't find the executable.
8713    # The splitting of arguments from the executable at a space might have been incorrect,
8714    # since paths with space are more likely in Windows. Give it another try with the whole
8715    # argument.
8716    path="$complete"
8717    arguments="EOL"
8718    new_path=`$CYGPATH -u "$path"`
8719    new_path=`$WHICH "$new_path" 2> /dev/null`
8720    # bat and cmd files are not always considered executable in cygwin causing which
8721    # to not find them
8722    if test "x$new_path" = x \
8723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8725      new_path=`$CYGPATH -u "$path"`
8726    fi
8727    if test "x$new_path" = x; then
8728      # It's still not found. Now this is an unrecoverable error.
8729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8730$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8731      has_space=`$ECHO "$complete" | $GREP " "`
8732      if test "x$has_space" != x; then
8733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8735      fi
8736      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8737    fi
8738  fi
8739
8740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8743  # "foo.exe" is OK but "foo" is an error.
8744  #
8745  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8746  # It is also a way to make sure we got the proper file name for the real test later on.
8747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8748  if test "x$test_shortpath" = x; then
8749    # Short path failed, file does not exist as specified.
8750    # Try adding .exe or .cmd
8751    if test -f "${new_path}.exe"; then
8752      input_to_shortpath="${new_path}.exe"
8753    elif test -f "${new_path}.cmd"; then
8754      input_to_shortpath="${new_path}.cmd"
8755    else
8756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8757$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8758      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8760      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8761    fi
8762  else
8763    input_to_shortpath="$new_path"
8764  fi
8765
8766  # Call helper function which possibly converts this using DOS-style short mode.
8767  # If so, the updated path is stored in $new_path.
8768  new_path="$input_to_shortpath"
8769
8770  input_path="$input_to_shortpath"
8771  # Check if we need to convert this using DOS-style short mode. If the path
8772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8773  # take no chances and rewrite it.
8774  # Note: m4 eats our [], so we need to use [ and ] instead.
8775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8776  if test "x$has_forbidden_chars" != x; then
8777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8781      # Going to short mode and back again did indeed matter. Since short mode is
8782      # case insensitive, let's make it lowercase to improve readability.
8783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8784      # Now convert it back to Unix-stile (cygpath)
8785      input_path=`$CYGPATH -u "$shortmode_path"`
8786      new_path="$input_path"
8787    fi
8788  fi
8789
8790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8791  if test "x$test_cygdrive_prefix" = x; then
8792    # As a simple fix, exclude /usr/bin since it's not a real path.
8793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8795      # a path prefixed by /cygdrive for fixpath to work.
8796      new_path="$CYGWIN_ROOT_PATH$input_path"
8797    fi
8798  fi
8799
8800  # remove trailing .exe if any
8801  new_path="${new_path/%.exe/}"
8802
8803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8804
8805  # First separate the path from the arguments. This will split at the first
8806  # space.
8807  complete="$FOUND_MAKE"
8808  path="${complete%% *}"
8809  tmp="$complete EOL"
8810  arguments="${tmp#* }"
8811
8812  # Input might be given as Windows format, start by converting to
8813  # unix format.
8814  new_path="$path"
8815
8816  windows_path="$new_path"
8817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8818    unix_path=`$CYGPATH -u "$windows_path"`
8819    new_path="$unix_path"
8820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8822    new_path="$unix_path"
8823  fi
8824
8825
8826  # Now try to locate executable using which
8827  new_path=`$WHICH "$new_path" 2> /dev/null`
8828
8829  if test "x$new_path" = x; then
8830    # Oops. Which didn't find the executable.
8831    # The splitting of arguments from the executable at a space might have been incorrect,
8832    # since paths with space are more likely in Windows. Give it another try with the whole
8833    # argument.
8834    path="$complete"
8835    arguments="EOL"
8836    new_path="$path"
8837
8838  windows_path="$new_path"
8839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8840    unix_path=`$CYGPATH -u "$windows_path"`
8841    new_path="$unix_path"
8842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8844    new_path="$unix_path"
8845  fi
8846
8847
8848    new_path=`$WHICH "$new_path" 2> /dev/null`
8849
8850    if test "x$new_path" = x; then
8851      # It's still not found. Now this is an unrecoverable error.
8852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8853$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8854      has_space=`$ECHO "$complete" | $GREP " "`
8855      if test "x$has_space" != x; then
8856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8858      fi
8859      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8860    fi
8861  fi
8862
8863  # Now new_path has a complete unix path to the binary
8864  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8865    # Keep paths in /bin as-is, but remove trailing .exe if any
8866    new_path="${new_path/%.exe/}"
8867    # Do not save /bin paths to all_fixpath_prefixes!
8868  else
8869    # Not in mixed or Windows style, start by that.
8870    new_path=`cmd //c echo $new_path`
8871
8872  input_path="$new_path"
8873  # Check if we need to convert this using DOS-style short mode. If the path
8874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8875  # take no chances and rewrite it.
8876  # Note: m4 eats our [], so we need to use [ and ] instead.
8877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8878  if test "x$has_forbidden_chars" != x; then
8879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8881  fi
8882
8883    # Output is in $new_path
8884
8885  windows_path="$new_path"
8886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8887    unix_path=`$CYGPATH -u "$windows_path"`
8888    new_path="$unix_path"
8889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8891    new_path="$unix_path"
8892  fi
8893
8894    # remove trailing .exe if any
8895    new_path="${new_path/%.exe/}"
8896
8897    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8898    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8899  fi
8900
8901  else
8902    # We're on a posix platform. Hooray! :)
8903    # First separate the path from the arguments. This will split at the first
8904    # space.
8905    complete="$FOUND_MAKE"
8906    path="${complete%% *}"
8907    tmp="$complete EOL"
8908    arguments="${tmp#* }"
8909
8910    # Cannot rely on the command "which" here since it doesn't always work.
8911    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8912    if test -z "$is_absolute_path"; then
8913      # Path to executable is not absolute. Find it.
8914      IFS_save="$IFS"
8915      IFS=:
8916      for p in $PATH; do
8917        if test -f "$p/$path" && test -x "$p/$path"; then
8918          new_path="$p/$path"
8919          break
8920        fi
8921      done
8922      IFS="$IFS_save"
8923    else
8924      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8925$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8926      new_path="$path"
8927    fi
8928
8929    if test "x$new_path" = x; then
8930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8931$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8932      has_space=`$ECHO "$complete" | $GREP " "`
8933      if test "x$has_space" != x; then
8934        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8935$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8936      fi
8937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8938    fi
8939  fi
8940
8941  # Now join together the path and the arguments once again
8942  if test "x$arguments" != xEOL; then
8943    new_complete="$new_path ${arguments% *}"
8944  else
8945    new_complete="$new_path"
8946  fi
8947
8948  if test "x$complete" != "x$new_complete"; then
8949    FOUND_MAKE="$new_complete"
8950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8951$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8952  fi
8953
8954        fi
8955      fi
8956    fi
8957  fi
8958
8959
8960    if test "x$FOUND_MAKE" = x; then
8961      for ac_prog in make
8962do
8963  # Extract the first word of "$ac_prog", so it can be a program name with args.
8964set dummy $ac_prog; ac_word=$2
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8966$as_echo_n "checking for $ac_word... " >&6; }
8967if ${ac_cv_path_CHECK_MAKE+:} false; then :
8968  $as_echo_n "(cached) " >&6
8969else
8970  case $CHECK_MAKE in
8971  [\\/]* | ?:[\\/]*)
8972  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8973  ;;
8974  *)
8975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976for as_dir in $PATH
8977do
8978  IFS=$as_save_IFS
8979  test -z "$as_dir" && as_dir=.
8980    for ac_exec_ext in '' $ac_executable_extensions; do
8981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984    break 2
8985  fi
8986done
8987  done
8988IFS=$as_save_IFS
8989
8990  ;;
8991esac
8992fi
8993CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8994if test -n "$CHECK_MAKE"; then
8995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8996$as_echo "$CHECK_MAKE" >&6; }
8997else
8998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999$as_echo "no" >&6; }
9000fi
9001
9002
9003  test -n "$CHECK_MAKE" && break
9004done
9005
9006
9007  MAKE_CANDIDATE=""$CHECK_MAKE""
9008  DESCRIPTION="make in PATH"
9009  if test "x$MAKE_CANDIDATE" != x; then
9010    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9011$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9012    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9013    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9014    if test "x$IS_GNU_MAKE" = x; then
9015      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9016$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9017    else
9018      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9019      if test "x$IS_MODERN_MAKE" = x; then
9020        { $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
9021$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;}
9022      else
9023        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9024          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9025            MAKE_EXPECTED_ENV='cygwin'
9026          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9027            MAKE_EXPECTED_ENV='msys'
9028          else
9029            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9030          fi
9031          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9032          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9033        else
9034          # Not relevant for non-Windows
9035          IS_MAKE_CORRECT_ENV=true
9036        fi
9037        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9038          { $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
9039$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;}
9040        else
9041          FOUND_MAKE=$MAKE_CANDIDATE
9042
9043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9044
9045  # First separate the path from the arguments. This will split at the first
9046  # space.
9047  complete="$FOUND_MAKE"
9048  path="${complete%% *}"
9049  tmp="$complete EOL"
9050  arguments="${tmp#* }"
9051
9052  # Input might be given as Windows format, start by converting to
9053  # unix format.
9054  new_path=`$CYGPATH -u "$path"`
9055
9056  # Now try to locate executable using which
9057  new_path=`$WHICH "$new_path" 2> /dev/null`
9058  # bat and cmd files are not always considered executable in cygwin causing which
9059  # to not find them
9060  if test "x$new_path" = x \
9061      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9062      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9063    new_path=`$CYGPATH -u "$path"`
9064  fi
9065  if test "x$new_path" = x; then
9066    # Oops. Which didn't find the executable.
9067    # The splitting of arguments from the executable at a space might have been incorrect,
9068    # since paths with space are more likely in Windows. Give it another try with the whole
9069    # argument.
9070    path="$complete"
9071    arguments="EOL"
9072    new_path=`$CYGPATH -u "$path"`
9073    new_path=`$WHICH "$new_path" 2> /dev/null`
9074    # bat and cmd files are not always considered executable in cygwin causing which
9075    # to not find them
9076    if test "x$new_path" = x \
9077        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9078        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9079      new_path=`$CYGPATH -u "$path"`
9080    fi
9081    if test "x$new_path" = x; then
9082      # It's still not found. Now this is an unrecoverable error.
9083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9085      has_space=`$ECHO "$complete" | $GREP " "`
9086      if test "x$has_space" != x; then
9087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9089      fi
9090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9091    fi
9092  fi
9093
9094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9097  # "foo.exe" is OK but "foo" is an error.
9098  #
9099  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9100  # It is also a way to make sure we got the proper file name for the real test later on.
9101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9102  if test "x$test_shortpath" = x; then
9103    # Short path failed, file does not exist as specified.
9104    # Try adding .exe or .cmd
9105    if test -f "${new_path}.exe"; then
9106      input_to_shortpath="${new_path}.exe"
9107    elif test -f "${new_path}.cmd"; then
9108      input_to_shortpath="${new_path}.cmd"
9109    else
9110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9111$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9112      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9113$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9114      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9115    fi
9116  else
9117    input_to_shortpath="$new_path"
9118  fi
9119
9120  # Call helper function which possibly converts this using DOS-style short mode.
9121  # If so, the updated path is stored in $new_path.
9122  new_path="$input_to_shortpath"
9123
9124  input_path="$input_to_shortpath"
9125  # Check if we need to convert this using DOS-style short mode. If the path
9126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9127  # take no chances and rewrite it.
9128  # Note: m4 eats our [], so we need to use [ and ] instead.
9129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9130  if test "x$has_forbidden_chars" != x; then
9131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9135      # Going to short mode and back again did indeed matter. Since short mode is
9136      # case insensitive, let's make it lowercase to improve readability.
9137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9138      # Now convert it back to Unix-stile (cygpath)
9139      input_path=`$CYGPATH -u "$shortmode_path"`
9140      new_path="$input_path"
9141    fi
9142  fi
9143
9144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9145  if test "x$test_cygdrive_prefix" = x; then
9146    # As a simple fix, exclude /usr/bin since it's not a real path.
9147    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9149      # a path prefixed by /cygdrive for fixpath to work.
9150      new_path="$CYGWIN_ROOT_PATH$input_path"
9151    fi
9152  fi
9153
9154  # remove trailing .exe if any
9155  new_path="${new_path/%.exe/}"
9156
9157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9158
9159  # First separate the path from the arguments. This will split at the first
9160  # space.
9161  complete="$FOUND_MAKE"
9162  path="${complete%% *}"
9163  tmp="$complete EOL"
9164  arguments="${tmp#* }"
9165
9166  # Input might be given as Windows format, start by converting to
9167  # unix format.
9168  new_path="$path"
9169
9170  windows_path="$new_path"
9171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9172    unix_path=`$CYGPATH -u "$windows_path"`
9173    new_path="$unix_path"
9174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9176    new_path="$unix_path"
9177  fi
9178
9179
9180  # Now try to locate executable using which
9181  new_path=`$WHICH "$new_path" 2> /dev/null`
9182
9183  if test "x$new_path" = x; then
9184    # Oops. Which didn't find the executable.
9185    # The splitting of arguments from the executable at a space might have been incorrect,
9186    # since paths with space are more likely in Windows. Give it another try with the whole
9187    # argument.
9188    path="$complete"
9189    arguments="EOL"
9190    new_path="$path"
9191
9192  windows_path="$new_path"
9193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9194    unix_path=`$CYGPATH -u "$windows_path"`
9195    new_path="$unix_path"
9196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9198    new_path="$unix_path"
9199  fi
9200
9201
9202    new_path=`$WHICH "$new_path" 2> /dev/null`
9203
9204    if test "x$new_path" = x; then
9205      # It's still not found. Now this is an unrecoverable error.
9206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9208      has_space=`$ECHO "$complete" | $GREP " "`
9209      if test "x$has_space" != x; then
9210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9212      fi
9213      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9214    fi
9215  fi
9216
9217  # Now new_path has a complete unix path to the binary
9218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9219    # Keep paths in /bin as-is, but remove trailing .exe if any
9220    new_path="${new_path/%.exe/}"
9221    # Do not save /bin paths to all_fixpath_prefixes!
9222  else
9223    # Not in mixed or Windows style, start by that.
9224    new_path=`cmd //c echo $new_path`
9225
9226  input_path="$new_path"
9227  # Check if we need to convert this using DOS-style short mode. If the path
9228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9229  # take no chances and rewrite it.
9230  # Note: m4 eats our [], so we need to use [ and ] instead.
9231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9232  if test "x$has_forbidden_chars" != x; then
9233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9235  fi
9236
9237    # Output is in $new_path
9238
9239  windows_path="$new_path"
9240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9241    unix_path=`$CYGPATH -u "$windows_path"`
9242    new_path="$unix_path"
9243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9245    new_path="$unix_path"
9246  fi
9247
9248    # remove trailing .exe if any
9249    new_path="${new_path/%.exe/}"
9250
9251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9253  fi
9254
9255  else
9256    # We're on a posix platform. Hooray! :)
9257    # First separate the path from the arguments. This will split at the first
9258    # space.
9259    complete="$FOUND_MAKE"
9260    path="${complete%% *}"
9261    tmp="$complete EOL"
9262    arguments="${tmp#* }"
9263
9264    # Cannot rely on the command "which" here since it doesn't always work.
9265    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9266    if test -z "$is_absolute_path"; then
9267      # Path to executable is not absolute. Find it.
9268      IFS_save="$IFS"
9269      IFS=:
9270      for p in $PATH; do
9271        if test -f "$p/$path" && test -x "$p/$path"; then
9272          new_path="$p/$path"
9273          break
9274        fi
9275      done
9276      IFS="$IFS_save"
9277    else
9278      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9279$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9280      new_path="$path"
9281    fi
9282
9283    if test "x$new_path" = x; then
9284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9285$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9286      has_space=`$ECHO "$complete" | $GREP " "`
9287      if test "x$has_space" != x; then
9288        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9290      fi
9291      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9292    fi
9293  fi
9294
9295  # Now join together the path and the arguments once again
9296  if test "x$arguments" != xEOL; then
9297    new_complete="$new_path ${arguments% *}"
9298  else
9299    new_complete="$new_path"
9300  fi
9301
9302  if test "x$complete" != "x$new_complete"; then
9303    FOUND_MAKE="$new_complete"
9304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9305$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9306  fi
9307
9308        fi
9309      fi
9310    fi
9311  fi
9312
9313    fi
9314
9315    if test "x$FOUND_MAKE" = x; then
9316      if test "x$TOOLS_DIR" != x; then
9317        # We have a tools-dir, check that as well before giving up.
9318        OLD_PATH=$PATH
9319        PATH=$TOOLS_DIR:$PATH
9320        for ac_prog in gmake
9321do
9322  # Extract the first word of "$ac_prog", so it can be a program name with args.
9323set dummy $ac_prog; ac_word=$2
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9325$as_echo_n "checking for $ac_word... " >&6; }
9326if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9327  $as_echo_n "(cached) " >&6
9328else
9329  case $CHECK_TOOLSDIR_GMAKE in
9330  [\\/]* | ?:[\\/]*)
9331  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9332  ;;
9333  *)
9334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335for as_dir in $PATH
9336do
9337  IFS=$as_save_IFS
9338  test -z "$as_dir" && as_dir=.
9339    for ac_exec_ext in '' $ac_executable_extensions; do
9340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9341    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9343    break 2
9344  fi
9345done
9346  done
9347IFS=$as_save_IFS
9348
9349  ;;
9350esac
9351fi
9352CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9353if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9355$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9356else
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358$as_echo "no" >&6; }
9359fi
9360
9361
9362  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9363done
9364
9365
9366  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9367  DESCRIPTION="gmake in tools-dir"
9368  if test "x$MAKE_CANDIDATE" != x; then
9369    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9370$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9371    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9372    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9373    if test "x$IS_GNU_MAKE" = x; then
9374      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9375$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9376    else
9377      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9378      if test "x$IS_MODERN_MAKE" = x; then
9379        { $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
9380$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;}
9381      else
9382        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9383          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9384            MAKE_EXPECTED_ENV='cygwin'
9385          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9386            MAKE_EXPECTED_ENV='msys'
9387          else
9388            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9389          fi
9390          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9391          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9392        else
9393          # Not relevant for non-Windows
9394          IS_MAKE_CORRECT_ENV=true
9395        fi
9396        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9397          { $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
9398$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;}
9399        else
9400          FOUND_MAKE=$MAKE_CANDIDATE
9401
9402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9403
9404  # First separate the path from the arguments. This will split at the first
9405  # space.
9406  complete="$FOUND_MAKE"
9407  path="${complete%% *}"
9408  tmp="$complete EOL"
9409  arguments="${tmp#* }"
9410
9411  # Input might be given as Windows format, start by converting to
9412  # unix format.
9413  new_path=`$CYGPATH -u "$path"`
9414
9415  # Now try to locate executable using which
9416  new_path=`$WHICH "$new_path" 2> /dev/null`
9417  # bat and cmd files are not always considered executable in cygwin causing which
9418  # to not find them
9419  if test "x$new_path" = x \
9420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9422    new_path=`$CYGPATH -u "$path"`
9423  fi
9424  if test "x$new_path" = x; then
9425    # Oops. Which didn't find the executable.
9426    # The splitting of arguments from the executable at a space might have been incorrect,
9427    # since paths with space are more likely in Windows. Give it another try with the whole
9428    # argument.
9429    path="$complete"
9430    arguments="EOL"
9431    new_path=`$CYGPATH -u "$path"`
9432    new_path=`$WHICH "$new_path" 2> /dev/null`
9433    # bat and cmd files are not always considered executable in cygwin causing which
9434    # to not find them
9435    if test "x$new_path" = x \
9436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9438      new_path=`$CYGPATH -u "$path"`
9439    fi
9440    if test "x$new_path" = x; then
9441      # It's still not found. Now this is an unrecoverable error.
9442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9444      has_space=`$ECHO "$complete" | $GREP " "`
9445      if test "x$has_space" != x; then
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9448      fi
9449      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9450    fi
9451  fi
9452
9453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9456  # "foo.exe" is OK but "foo" is an error.
9457  #
9458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9459  # It is also a way to make sure we got the proper file name for the real test later on.
9460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9461  if test "x$test_shortpath" = x; then
9462    # Short path failed, file does not exist as specified.
9463    # Try adding .exe or .cmd
9464    if test -f "${new_path}.exe"; then
9465      input_to_shortpath="${new_path}.exe"
9466    elif test -f "${new_path}.cmd"; then
9467      input_to_shortpath="${new_path}.cmd"
9468    else
9469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9474    fi
9475  else
9476    input_to_shortpath="$new_path"
9477  fi
9478
9479  # Call helper function which possibly converts this using DOS-style short mode.
9480  # If so, the updated path is stored in $new_path.
9481  new_path="$input_to_shortpath"
9482
9483  input_path="$input_to_shortpath"
9484  # Check if we need to convert this using DOS-style short mode. If the path
9485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9486  # take no chances and rewrite it.
9487  # Note: m4 eats our [], so we need to use [ and ] instead.
9488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9489  if test "x$has_forbidden_chars" != x; then
9490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9494      # Going to short mode and back again did indeed matter. Since short mode is
9495      # case insensitive, let's make it lowercase to improve readability.
9496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9497      # Now convert it back to Unix-stile (cygpath)
9498      input_path=`$CYGPATH -u "$shortmode_path"`
9499      new_path="$input_path"
9500    fi
9501  fi
9502
9503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9504  if test "x$test_cygdrive_prefix" = x; then
9505    # As a simple fix, exclude /usr/bin since it's not a real path.
9506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9508      # a path prefixed by /cygdrive for fixpath to work.
9509      new_path="$CYGWIN_ROOT_PATH$input_path"
9510    fi
9511  fi
9512
9513  # remove trailing .exe if any
9514  new_path="${new_path/%.exe/}"
9515
9516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517
9518  # First separate the path from the arguments. This will split at the first
9519  # space.
9520  complete="$FOUND_MAKE"
9521  path="${complete%% *}"
9522  tmp="$complete EOL"
9523  arguments="${tmp#* }"
9524
9525  # Input might be given as Windows format, start by converting to
9526  # unix format.
9527  new_path="$path"
9528
9529  windows_path="$new_path"
9530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9531    unix_path=`$CYGPATH -u "$windows_path"`
9532    new_path="$unix_path"
9533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9535    new_path="$unix_path"
9536  fi
9537
9538
9539  # Now try to locate executable using which
9540  new_path=`$WHICH "$new_path" 2> /dev/null`
9541
9542  if test "x$new_path" = x; then
9543    # Oops. Which didn't find the executable.
9544    # The splitting of arguments from the executable at a space might have been incorrect,
9545    # since paths with space are more likely in Windows. Give it another try with the whole
9546    # argument.
9547    path="$complete"
9548    arguments="EOL"
9549    new_path="$path"
9550
9551  windows_path="$new_path"
9552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9553    unix_path=`$CYGPATH -u "$windows_path"`
9554    new_path="$unix_path"
9555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9557    new_path="$unix_path"
9558  fi
9559
9560
9561    new_path=`$WHICH "$new_path" 2> /dev/null`
9562
9563    if test "x$new_path" = x; then
9564      # It's still not found. Now this is an unrecoverable error.
9565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9566$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9567      has_space=`$ECHO "$complete" | $GREP " "`
9568      if test "x$has_space" != x; then
9569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9571      fi
9572      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9573    fi
9574  fi
9575
9576  # Now new_path has a complete unix path to the binary
9577  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9578    # Keep paths in /bin as-is, but remove trailing .exe if any
9579    new_path="${new_path/%.exe/}"
9580    # Do not save /bin paths to all_fixpath_prefixes!
9581  else
9582    # Not in mixed or Windows style, start by that.
9583    new_path=`cmd //c echo $new_path`
9584
9585  input_path="$new_path"
9586  # Check if we need to convert this using DOS-style short mode. If the path
9587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9588  # take no chances and rewrite it.
9589  # Note: m4 eats our [], so we need to use [ and ] instead.
9590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9591  if test "x$has_forbidden_chars" != x; then
9592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9594  fi
9595
9596    # Output is in $new_path
9597
9598  windows_path="$new_path"
9599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9600    unix_path=`$CYGPATH -u "$windows_path"`
9601    new_path="$unix_path"
9602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9604    new_path="$unix_path"
9605  fi
9606
9607    # remove trailing .exe if any
9608    new_path="${new_path/%.exe/}"
9609
9610    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9611    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9612  fi
9613
9614  else
9615    # We're on a posix platform. Hooray! :)
9616    # First separate the path from the arguments. This will split at the first
9617    # space.
9618    complete="$FOUND_MAKE"
9619    path="${complete%% *}"
9620    tmp="$complete EOL"
9621    arguments="${tmp#* }"
9622
9623    # Cannot rely on the command "which" here since it doesn't always work.
9624    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9625    if test -z "$is_absolute_path"; then
9626      # Path to executable is not absolute. Find it.
9627      IFS_save="$IFS"
9628      IFS=:
9629      for p in $PATH; do
9630        if test -f "$p/$path" && test -x "$p/$path"; then
9631          new_path="$p/$path"
9632          break
9633        fi
9634      done
9635      IFS="$IFS_save"
9636    else
9637      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9638$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9639      new_path="$path"
9640    fi
9641
9642    if test "x$new_path" = x; then
9643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9644$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9645      has_space=`$ECHO "$complete" | $GREP " "`
9646      if test "x$has_space" != x; then
9647        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9648$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9649      fi
9650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9651    fi
9652  fi
9653
9654  # Now join together the path and the arguments once again
9655  if test "x$arguments" != xEOL; then
9656    new_complete="$new_path ${arguments% *}"
9657  else
9658    new_complete="$new_path"
9659  fi
9660
9661  if test "x$complete" != "x$new_complete"; then
9662    FOUND_MAKE="$new_complete"
9663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9664$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9665  fi
9666
9667        fi
9668      fi
9669    fi
9670  fi
9671
9672        if test "x$FOUND_MAKE" = x; then
9673          for ac_prog in make
9674do
9675  # Extract the first word of "$ac_prog", so it can be a program name with args.
9676set dummy $ac_prog; ac_word=$2
9677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9678$as_echo_n "checking for $ac_word... " >&6; }
9679if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9680  $as_echo_n "(cached) " >&6
9681else
9682  case $CHECK_TOOLSDIR_MAKE in
9683  [\\/]* | ?:[\\/]*)
9684  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9685  ;;
9686  *)
9687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9688for as_dir in $PATH
9689do
9690  IFS=$as_save_IFS
9691  test -z "$as_dir" && as_dir=.
9692    for ac_exec_ext in '' $ac_executable_extensions; do
9693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9694    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9696    break 2
9697  fi
9698done
9699  done
9700IFS=$as_save_IFS
9701
9702  ;;
9703esac
9704fi
9705CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9706if test -n "$CHECK_TOOLSDIR_MAKE"; then
9707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9708$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9709else
9710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711$as_echo "no" >&6; }
9712fi
9713
9714
9715  test -n "$CHECK_TOOLSDIR_MAKE" && break
9716done
9717
9718
9719  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9720  DESCRIPTION="make in tools-dir"
9721  if test "x$MAKE_CANDIDATE" != x; then
9722    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9723$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9724    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9725    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9726    if test "x$IS_GNU_MAKE" = x; then
9727      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9728$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9729    else
9730      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9731      if test "x$IS_MODERN_MAKE" = x; then
9732        { $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
9733$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;}
9734      else
9735        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9736          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9737            MAKE_EXPECTED_ENV='cygwin'
9738          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9739            MAKE_EXPECTED_ENV='msys'
9740          else
9741            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9742          fi
9743          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9744          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9745        else
9746          # Not relevant for non-Windows
9747          IS_MAKE_CORRECT_ENV=true
9748        fi
9749        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9750          { $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
9751$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;}
9752        else
9753          FOUND_MAKE=$MAKE_CANDIDATE
9754
9755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9756
9757  # First separate the path from the arguments. This will split at the first
9758  # space.
9759  complete="$FOUND_MAKE"
9760  path="${complete%% *}"
9761  tmp="$complete EOL"
9762  arguments="${tmp#* }"
9763
9764  # Input might be given as Windows format, start by converting to
9765  # unix format.
9766  new_path=`$CYGPATH -u "$path"`
9767
9768  # Now try to locate executable using which
9769  new_path=`$WHICH "$new_path" 2> /dev/null`
9770  # bat and cmd files are not always considered executable in cygwin causing which
9771  # to not find them
9772  if test "x$new_path" = x \
9773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9775    new_path=`$CYGPATH -u "$path"`
9776  fi
9777  if test "x$new_path" = x; then
9778    # Oops. Which didn't find the executable.
9779    # The splitting of arguments from the executable at a space might have been incorrect,
9780    # since paths with space are more likely in Windows. Give it another try with the whole
9781    # argument.
9782    path="$complete"
9783    arguments="EOL"
9784    new_path=`$CYGPATH -u "$path"`
9785    new_path=`$WHICH "$new_path" 2> /dev/null`
9786    # bat and cmd files are not always considered executable in cygwin causing which
9787    # to not find them
9788    if test "x$new_path" = x \
9789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9791      new_path=`$CYGPATH -u "$path"`
9792    fi
9793    if test "x$new_path" = x; then
9794      # It's still not found. Now this is an unrecoverable error.
9795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9797      has_space=`$ECHO "$complete" | $GREP " "`
9798      if test "x$has_space" != x; then
9799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9801      fi
9802      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9803    fi
9804  fi
9805
9806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9809  # "foo.exe" is OK but "foo" is an error.
9810  #
9811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9812  # It is also a way to make sure we got the proper file name for the real test later on.
9813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9814  if test "x$test_shortpath" = x; then
9815    # Short path failed, file does not exist as specified.
9816    # Try adding .exe or .cmd
9817    if test -f "${new_path}.exe"; then
9818      input_to_shortpath="${new_path}.exe"
9819    elif test -f "${new_path}.cmd"; then
9820      input_to_shortpath="${new_path}.cmd"
9821    else
9822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9827    fi
9828  else
9829    input_to_shortpath="$new_path"
9830  fi
9831
9832  # Call helper function which possibly converts this using DOS-style short mode.
9833  # If so, the updated path is stored in $new_path.
9834  new_path="$input_to_shortpath"
9835
9836  input_path="$input_to_shortpath"
9837  # Check if we need to convert this using DOS-style short mode. If the path
9838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9839  # take no chances and rewrite it.
9840  # Note: m4 eats our [], so we need to use [ and ] instead.
9841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9842  if test "x$has_forbidden_chars" != x; then
9843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9847      # Going to short mode and back again did indeed matter. Since short mode is
9848      # case insensitive, let's make it lowercase to improve readability.
9849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9850      # Now convert it back to Unix-stile (cygpath)
9851      input_path=`$CYGPATH -u "$shortmode_path"`
9852      new_path="$input_path"
9853    fi
9854  fi
9855
9856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9857  if test "x$test_cygdrive_prefix" = x; then
9858    # As a simple fix, exclude /usr/bin since it's not a real path.
9859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9861      # a path prefixed by /cygdrive for fixpath to work.
9862      new_path="$CYGWIN_ROOT_PATH$input_path"
9863    fi
9864  fi
9865
9866  # remove trailing .exe if any
9867  new_path="${new_path/%.exe/}"
9868
9869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9870
9871  # First separate the path from the arguments. This will split at the first
9872  # space.
9873  complete="$FOUND_MAKE"
9874  path="${complete%% *}"
9875  tmp="$complete EOL"
9876  arguments="${tmp#* }"
9877
9878  # Input might be given as Windows format, start by converting to
9879  # unix format.
9880  new_path="$path"
9881
9882  windows_path="$new_path"
9883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9884    unix_path=`$CYGPATH -u "$windows_path"`
9885    new_path="$unix_path"
9886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9888    new_path="$unix_path"
9889  fi
9890
9891
9892  # Now try to locate executable using which
9893  new_path=`$WHICH "$new_path" 2> /dev/null`
9894
9895  if test "x$new_path" = x; then
9896    # Oops. Which didn't find the executable.
9897    # The splitting of arguments from the executable at a space might have been incorrect,
9898    # since paths with space are more likely in Windows. Give it another try with the whole
9899    # argument.
9900    path="$complete"
9901    arguments="EOL"
9902    new_path="$path"
9903
9904  windows_path="$new_path"
9905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9906    unix_path=`$CYGPATH -u "$windows_path"`
9907    new_path="$unix_path"
9908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9910    new_path="$unix_path"
9911  fi
9912
9913
9914    new_path=`$WHICH "$new_path" 2> /dev/null`
9915
9916    if test "x$new_path" = x; then
9917      # It's still not found. Now this is an unrecoverable error.
9918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9920      has_space=`$ECHO "$complete" | $GREP " "`
9921      if test "x$has_space" != x; then
9922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9924      fi
9925      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9926    fi
9927  fi
9928
9929  # Now new_path has a complete unix path to the binary
9930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9931    # Keep paths in /bin as-is, but remove trailing .exe if any
9932    new_path="${new_path/%.exe/}"
9933    # Do not save /bin paths to all_fixpath_prefixes!
9934  else
9935    # Not in mixed or Windows style, start by that.
9936    new_path=`cmd //c echo $new_path`
9937
9938  input_path="$new_path"
9939  # Check if we need to convert this using DOS-style short mode. If the path
9940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9941  # take no chances and rewrite it.
9942  # Note: m4 eats our [], so we need to use [ and ] instead.
9943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9944  if test "x$has_forbidden_chars" != x; then
9945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9947  fi
9948
9949    # Output is in $new_path
9950
9951  windows_path="$new_path"
9952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9953    unix_path=`$CYGPATH -u "$windows_path"`
9954    new_path="$unix_path"
9955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9957    new_path="$unix_path"
9958  fi
9959
9960    # remove trailing .exe if any
9961    new_path="${new_path/%.exe/}"
9962
9963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9965  fi
9966
9967  else
9968    # We're on a posix platform. Hooray! :)
9969    # First separate the path from the arguments. This will split at the first
9970    # space.
9971    complete="$FOUND_MAKE"
9972    path="${complete%% *}"
9973    tmp="$complete EOL"
9974    arguments="${tmp#* }"
9975
9976    # Cannot rely on the command "which" here since it doesn't always work.
9977    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9978    if test -z "$is_absolute_path"; then
9979      # Path to executable is not absolute. Find it.
9980      IFS_save="$IFS"
9981      IFS=:
9982      for p in $PATH; do
9983        if test -f "$p/$path" && test -x "$p/$path"; then
9984          new_path="$p/$path"
9985          break
9986        fi
9987      done
9988      IFS="$IFS_save"
9989    else
9990      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9991$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9992      new_path="$path"
9993    fi
9994
9995    if test "x$new_path" = x; then
9996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9997$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9998      has_space=`$ECHO "$complete" | $GREP " "`
9999      if test "x$has_space" != x; then
10000        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10002      fi
10003      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10004    fi
10005  fi
10006
10007  # Now join together the path and the arguments once again
10008  if test "x$arguments" != xEOL; then
10009    new_complete="$new_path ${arguments% *}"
10010  else
10011    new_complete="$new_path"
10012  fi
10013
10014  if test "x$complete" != "x$new_complete"; then
10015    FOUND_MAKE="$new_complete"
10016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10017$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10018  fi
10019
10020        fi
10021      fi
10022    fi
10023  fi
10024
10025        fi
10026        PATH=$OLD_PATH
10027      fi
10028    fi
10029
10030    if test "x$FOUND_MAKE" = x; then
10031      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
10032    fi
10033  fi
10034
10035  MAKE=$FOUND_MAKE
10036
10037  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10038$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10039
10040
10041
10042  # Test if find supports -delete
10043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10044$as_echo_n "checking if find supports -delete... " >&6; }
10045  FIND_DELETE="-delete"
10046
10047  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10048
10049  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10050
10051  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10052  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10053    # No, it does not.
10054    rm $DELETEDIR/TestIfFindSupportsDelete
10055    FIND_DELETE="-exec rm \{\} \+"
10056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
10058  else
10059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10060$as_echo "yes" >&6; }
10061  fi
10062  rmdir $DELETEDIR
10063
10064
10065
10066  # These tools might not be installed by default,
10067  # need hint on how to install them.
10068
10069  for ac_prog in unzip
10070do
10071  # Extract the first word of "$ac_prog", so it can be a program name with args.
10072set dummy $ac_prog; ac_word=$2
10073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10074$as_echo_n "checking for $ac_word... " >&6; }
10075if ${ac_cv_path_UNZIP+:} false; then :
10076  $as_echo_n "(cached) " >&6
10077else
10078  case $UNZIP in
10079  [\\/]* | ?:[\\/]*)
10080  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10081  ;;
10082  *)
10083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10084for as_dir in $PATH
10085do
10086  IFS=$as_save_IFS
10087  test -z "$as_dir" && as_dir=.
10088    for ac_exec_ext in '' $ac_executable_extensions; do
10089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10090    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10092    break 2
10093  fi
10094done
10095  done
10096IFS=$as_save_IFS
10097
10098  ;;
10099esac
10100fi
10101UNZIP=$ac_cv_path_UNZIP
10102if test -n "$UNZIP"; then
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10104$as_echo "$UNZIP" >&6; }
10105else
10106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
10108fi
10109
10110
10111  test -n "$UNZIP" && break
10112done
10113
10114
10115  if test "x$UNZIP" = x; then
10116    if test "xunzip" = x; then
10117      PROG_NAME=unzip
10118    else
10119      PROG_NAME=unzip
10120    fi
10121    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10122$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10123    as_fn_error $? "Cannot continue" "$LINENO" 5
10124  fi
10125
10126
10127
10128  for ac_prog in zip
10129do
10130  # Extract the first word of "$ac_prog", so it can be a program name with args.
10131set dummy $ac_prog; ac_word=$2
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10133$as_echo_n "checking for $ac_word... " >&6; }
10134if ${ac_cv_path_ZIP+:} false; then :
10135  $as_echo_n "(cached) " >&6
10136else
10137  case $ZIP in
10138  [\\/]* | ?:[\\/]*)
10139  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10140  ;;
10141  *)
10142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10143for as_dir in $PATH
10144do
10145  IFS=$as_save_IFS
10146  test -z "$as_dir" && as_dir=.
10147    for ac_exec_ext in '' $ac_executable_extensions; do
10148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10149    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10151    break 2
10152  fi
10153done
10154  done
10155IFS=$as_save_IFS
10156
10157  ;;
10158esac
10159fi
10160ZIP=$ac_cv_path_ZIP
10161if test -n "$ZIP"; then
10162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10163$as_echo "$ZIP" >&6; }
10164else
10165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166$as_echo "no" >&6; }
10167fi
10168
10169
10170  test -n "$ZIP" && break
10171done
10172
10173
10174  if test "x$ZIP" = x; then
10175    if test "xzip" = x; then
10176      PROG_NAME=zip
10177    else
10178      PROG_NAME=zip
10179    fi
10180    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10181$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10182    as_fn_error $? "Cannot continue" "$LINENO" 5
10183  fi
10184
10185
10186
10187  # Non-required basic tools
10188
10189  # Extract the first word of "ldd", so it can be a program name with args.
10190set dummy ldd; ac_word=$2
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10192$as_echo_n "checking for $ac_word... " >&6; }
10193if ${ac_cv_path_LDD+:} false; then :
10194  $as_echo_n "(cached) " >&6
10195else
10196  case $LDD in
10197  [\\/]* | ?:[\\/]*)
10198  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10199  ;;
10200  *)
10201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10202for as_dir in $PATH
10203do
10204  IFS=$as_save_IFS
10205  test -z "$as_dir" && as_dir=.
10206    for ac_exec_ext in '' $ac_executable_extensions; do
10207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10208    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10210    break 2
10211  fi
10212done
10213  done
10214IFS=$as_save_IFS
10215
10216  ;;
10217esac
10218fi
10219LDD=$ac_cv_path_LDD
10220if test -n "$LDD"; then
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10222$as_echo "$LDD" >&6; }
10223else
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10225$as_echo "no" >&6; }
10226fi
10227
10228
10229  if test "x$LDD" = "x"; then
10230    # List shared lib dependencies is used for
10231    # debug output and checking for forbidden dependencies.
10232    # We can build without it.
10233    LDD="true"
10234  fi
10235  # Extract the first word of "otool", so it can be a program name with args.
10236set dummy otool; ac_word=$2
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10238$as_echo_n "checking for $ac_word... " >&6; }
10239if ${ac_cv_path_OTOOL+:} false; then :
10240  $as_echo_n "(cached) " >&6
10241else
10242  case $OTOOL in
10243  [\\/]* | ?:[\\/]*)
10244  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10245  ;;
10246  *)
10247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248for as_dir in $PATH
10249do
10250  IFS=$as_save_IFS
10251  test -z "$as_dir" && as_dir=.
10252    for ac_exec_ext in '' $ac_executable_extensions; do
10253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10254    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10256    break 2
10257  fi
10258done
10259  done
10260IFS=$as_save_IFS
10261
10262  ;;
10263esac
10264fi
10265OTOOL=$ac_cv_path_OTOOL
10266if test -n "$OTOOL"; then
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10268$as_echo "$OTOOL" >&6; }
10269else
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271$as_echo "no" >&6; }
10272fi
10273
10274
10275  if test "x$OTOOL" = "x"; then
10276    OTOOL="true"
10277  fi
10278  for ac_prog in readelf greadelf
10279do
10280  # Extract the first word of "$ac_prog", so it can be a program name with args.
10281set dummy $ac_prog; ac_word=$2
10282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10283$as_echo_n "checking for $ac_word... " >&6; }
10284if ${ac_cv_path_READELF+:} false; then :
10285  $as_echo_n "(cached) " >&6
10286else
10287  case $READELF in
10288  [\\/]* | ?:[\\/]*)
10289  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10290  ;;
10291  *)
10292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10293for as_dir in $PATH
10294do
10295  IFS=$as_save_IFS
10296  test -z "$as_dir" && as_dir=.
10297    for ac_exec_ext in '' $ac_executable_extensions; do
10298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10299    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10301    break 2
10302  fi
10303done
10304  done
10305IFS=$as_save_IFS
10306
10307  ;;
10308esac
10309fi
10310READELF=$ac_cv_path_READELF
10311if test -n "$READELF"; then
10312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10313$as_echo "$READELF" >&6; }
10314else
10315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10316$as_echo "no" >&6; }
10317fi
10318
10319
10320  test -n "$READELF" && break
10321done
10322
10323  # Extract the first word of "hg", so it can be a program name with args.
10324set dummy hg; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if ${ac_cv_path_HG+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $HG in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10342    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353HG=$ac_cv_path_HG
10354if test -n "$HG"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10356$as_echo "$HG" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363  # Extract the first word of "stat", so it can be a program name with args.
10364set dummy stat; ac_word=$2
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366$as_echo_n "checking for $ac_word... " >&6; }
10367if ${ac_cv_path_STAT+:} false; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  case $STAT in
10371  [\\/]* | ?:[\\/]*)
10372  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10373  ;;
10374  *)
10375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10382    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390  ;;
10391esac
10392fi
10393STAT=$ac_cv_path_STAT
10394if test -n "$STAT"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10396$as_echo "$STAT" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403  # Extract the first word of "time", so it can be a program name with args.
10404set dummy time; ac_word=$2
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10406$as_echo_n "checking for $ac_word... " >&6; }
10407if ${ac_cv_path_TIME+:} false; then :
10408  $as_echo_n "(cached) " >&6
10409else
10410  case $TIME in
10411  [\\/]* | ?:[\\/]*)
10412  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10413  ;;
10414  *)
10415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10416for as_dir in $PATH
10417do
10418  IFS=$as_save_IFS
10419  test -z "$as_dir" && as_dir=.
10420    for ac_exec_ext in '' $ac_executable_extensions; do
10421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10422    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10424    break 2
10425  fi
10426done
10427  done
10428IFS=$as_save_IFS
10429
10430  ;;
10431esac
10432fi
10433TIME=$ac_cv_path_TIME
10434if test -n "$TIME"; then
10435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10436$as_echo "$TIME" >&6; }
10437else
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439$as_echo "no" >&6; }
10440fi
10441
10442
10443  # Check if it's GNU time
10444  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10445  if test "x$IS_GNU_TIME" != x; then
10446    IS_GNU_TIME=yes
10447  else
10448    IS_GNU_TIME=no
10449  fi
10450
10451
10452  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10453
10454  for ac_prog in comm
10455do
10456  # Extract the first word of "$ac_prog", so it can be a program name with args.
10457set dummy $ac_prog; ac_word=$2
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10459$as_echo_n "checking for $ac_word... " >&6; }
10460if ${ac_cv_path_COMM+:} false; then :
10461  $as_echo_n "(cached) " >&6
10462else
10463  case $COMM in
10464  [\\/]* | ?:[\\/]*)
10465  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10466  ;;
10467  *)
10468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10469for as_dir in $PATH
10470do
10471  IFS=$as_save_IFS
10472  test -z "$as_dir" && as_dir=.
10473    for ac_exec_ext in '' $ac_executable_extensions; do
10474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10475    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10477    break 2
10478  fi
10479done
10480  done
10481IFS=$as_save_IFS
10482
10483  ;;
10484esac
10485fi
10486COMM=$ac_cv_path_COMM
10487if test -n "$COMM"; then
10488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10489$as_echo "$COMM" >&6; }
10490else
10491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
10493fi
10494
10495
10496  test -n "$COMM" && break
10497done
10498
10499
10500  if test "x$COMM" = x; then
10501    if test "xcomm" = x; then
10502      PROG_NAME=comm
10503    else
10504      PROG_NAME=comm
10505    fi
10506    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10507$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10508    as_fn_error $? "Cannot continue" "$LINENO" 5
10509  fi
10510
10511
10512  fi
10513
10514  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10515
10516  for ac_prog in xattr
10517do
10518  # Extract the first word of "$ac_prog", so it can be a program name with args.
10519set dummy $ac_prog; ac_word=$2
10520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10521$as_echo_n "checking for $ac_word... " >&6; }
10522if ${ac_cv_path_XATTR+:} false; then :
10523  $as_echo_n "(cached) " >&6
10524else
10525  case $XATTR in
10526  [\\/]* | ?:[\\/]*)
10527  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10528  ;;
10529  *)
10530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10531for as_dir in $PATH
10532do
10533  IFS=$as_save_IFS
10534  test -z "$as_dir" && as_dir=.
10535    for ac_exec_ext in '' $ac_executable_extensions; do
10536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10537    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10539    break 2
10540  fi
10541done
10542  done
10543IFS=$as_save_IFS
10544
10545  ;;
10546esac
10547fi
10548XATTR=$ac_cv_path_XATTR
10549if test -n "$XATTR"; then
10550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10551$as_echo "$XATTR" >&6; }
10552else
10553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10554$as_echo "no" >&6; }
10555fi
10556
10557
10558  test -n "$XATTR" && break
10559done
10560
10561
10562  if test "x$XATTR" = x; then
10563    if test "xxattr" = x; then
10564      PROG_NAME=xattr
10565    else
10566      PROG_NAME=xattr
10567    fi
10568    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10569$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10570    as_fn_error $? "Cannot continue" "$LINENO" 5
10571  fi
10572
10573
10574    # Extract the first word of "codesign", so it can be a program name with args.
10575set dummy codesign; ac_word=$2
10576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10577$as_echo_n "checking for $ac_word... " >&6; }
10578if ${ac_cv_path_CODESIGN+:} false; then :
10579  $as_echo_n "(cached) " >&6
10580else
10581  case $CODESIGN in
10582  [\\/]* | ?:[\\/]*)
10583  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10584  ;;
10585  *)
10586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587for as_dir in $PATH
10588do
10589  IFS=$as_save_IFS
10590  test -z "$as_dir" && as_dir=.
10591    for ac_exec_ext in '' $ac_executable_extensions; do
10592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10593    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10595    break 2
10596  fi
10597done
10598  done
10599IFS=$as_save_IFS
10600
10601  ;;
10602esac
10603fi
10604CODESIGN=$ac_cv_path_CODESIGN
10605if test -n "$CODESIGN"; then
10606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10607$as_echo "$CODESIGN" >&6; }
10608else
10609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10610$as_echo "no" >&6; }
10611fi
10612
10613
10614    if test "x$CODESIGN" != "x"; then
10615      # Verify that the openjdk_codesign certificate is present
10616      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10617$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10618      rm -f codesign-testfile
10619      touch codesign-testfile
10620      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10621      rm -f codesign-testfile
10622      if test "x$CODESIGN" = x; then
10623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625      else
10626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10627$as_echo "yes" >&6; }
10628      fi
10629    fi
10630  fi
10631
10632
10633# Check if pkg-config is available.
10634
10635
10636if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10637	if test -n "$ac_tool_prefix"; then
10638  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10639set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10641$as_echo_n "checking for $ac_word... " >&6; }
10642if ${ac_cv_path_PKG_CONFIG+:} false; then :
10643  $as_echo_n "(cached) " >&6
10644else
10645  case $PKG_CONFIG in
10646  [\\/]* | ?:[\\/]*)
10647  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10648  ;;
10649  *)
10650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10651for as_dir in $PATH
10652do
10653  IFS=$as_save_IFS
10654  test -z "$as_dir" && as_dir=.
10655    for ac_exec_ext in '' $ac_executable_extensions; do
10656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10657    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10659    break 2
10660  fi
10661done
10662  done
10663IFS=$as_save_IFS
10664
10665  ;;
10666esac
10667fi
10668PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10669if test -n "$PKG_CONFIG"; then
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10671$as_echo "$PKG_CONFIG" >&6; }
10672else
10673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10674$as_echo "no" >&6; }
10675fi
10676
10677
10678fi
10679if test -z "$ac_cv_path_PKG_CONFIG"; then
10680  ac_pt_PKG_CONFIG=$PKG_CONFIG
10681  # Extract the first word of "pkg-config", so it can be a program name with args.
10682set dummy pkg-config; ac_word=$2
10683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10684$as_echo_n "checking for $ac_word... " >&6; }
10685if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10686  $as_echo_n "(cached) " >&6
10687else
10688  case $ac_pt_PKG_CONFIG in
10689  [\\/]* | ?:[\\/]*)
10690  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10691  ;;
10692  *)
10693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10694for as_dir in $PATH
10695do
10696  IFS=$as_save_IFS
10697  test -z "$as_dir" && as_dir=.
10698    for ac_exec_ext in '' $ac_executable_extensions; do
10699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10700    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10702    break 2
10703  fi
10704done
10705  done
10706IFS=$as_save_IFS
10707
10708  ;;
10709esac
10710fi
10711ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10712if test -n "$ac_pt_PKG_CONFIG"; then
10713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10714$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10715else
10716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10717$as_echo "no" >&6; }
10718fi
10719
10720  if test "x$ac_pt_PKG_CONFIG" = x; then
10721    PKG_CONFIG=""
10722  else
10723    case $cross_compiling:$ac_tool_warned in
10724yes:)
10725{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10726$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10727ac_tool_warned=yes ;;
10728esac
10729    PKG_CONFIG=$ac_pt_PKG_CONFIG
10730  fi
10731else
10732  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10733fi
10734
10735fi
10736if test -n "$PKG_CONFIG"; then
10737	_pkg_min_version=0.9.0
10738	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10739$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10740	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10741		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10742$as_echo "yes" >&6; }
10743	else
10744		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
10746		PKG_CONFIG=""
10747	fi
10748
10749fi
10750
10751# After basic tools have been setup, we can check build os specific details.
10752
10753  ###############################################################################
10754
10755  # Note that this is the build platform OS version!
10756
10757  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10758  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10759  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10760  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10761
10762
10763
10764
10765
10766# Setup builddeps, for automatic downloading of tools we need.
10767# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10768# boot-jdk setup, but we need to have basic tools setup first.
10769
10770
10771# Check whether --with-builddeps-conf was given.
10772if test "${with_builddeps_conf+set}" = set; then :
10773  withval=$with_builddeps_conf;
10774fi
10775
10776
10777
10778# Check whether --with-builddeps-server was given.
10779if test "${with_builddeps_server+set}" = set; then :
10780  withval=$with_builddeps_server;
10781fi
10782
10783
10784
10785# Check whether --with-builddeps-dir was given.
10786if test "${with_builddeps_dir+set}" = set; then :
10787  withval=$with_builddeps_dir;
10788else
10789  with_builddeps_dir=/localhome/builddeps
10790fi
10791
10792
10793
10794# Check whether --with-builddeps-group was given.
10795if test "${with_builddeps_group+set}" = set; then :
10796  withval=$with_builddeps_group;
10797fi
10798
10799
10800
10801
10802  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10803    if test "x$with_builddeps_conf" != x; then
10804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10805$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10806      builddepsfile=$with_builddeps_conf
10807      if test -s $builddepsfile; then
10808        . $builddepsfile
10809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10810$as_echo "loaded!" >&6; }
10811      else
10812        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10813      fi
10814    else
10815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10816$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10817      builddepsfile=`mktemp`
10818      touch $builddepsfile
10819      # Put all found confs into a single file.
10820      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10821      # Source the file to acquire the variables
10822      if test -s $builddepsfile; then
10823        . $builddepsfile
10824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10825$as_echo "found at least one!" >&6; }
10826      else
10827        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10828      fi
10829    fi
10830    # Create build and target names that use _ instead of "-" and ".".
10831    # This is necessary to use them in variable names.
10832    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10833    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10834    # Extract rewrite information for build and target
10835    eval rewritten_build=\${REWRITE_${build_var}}
10836    if test "x$rewritten_build" = x; then
10837      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10838      echo Build stays the same $rewritten_build
10839    else
10840      echo Rewriting build for builddeps into $rewritten_build
10841    fi
10842    eval rewritten_target=\${REWRITE_${target_var}}
10843    if test "x$rewritten_target" = x; then
10844      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10845      echo Target stays the same $rewritten_target
10846    else
10847      echo Rewriting target for builddeps into $rewritten_target
10848    fi
10849    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10850    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10851  fi
10852  for ac_prog in 7z unzip
10853do
10854  # Extract the first word of "$ac_prog", so it can be a program name with args.
10855set dummy $ac_prog; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  if test -n "$BDEPS_UNZIP"; then
10862  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10863else
10864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10865for as_dir in $PATH
10866do
10867  IFS=$as_save_IFS
10868  test -z "$as_dir" && as_dir=.
10869    for ac_exec_ext in '' $ac_executable_extensions; do
10870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10871    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10873    break 2
10874  fi
10875done
10876  done
10877IFS=$as_save_IFS
10878
10879fi
10880fi
10881BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10882if test -n "$BDEPS_UNZIP"; then
10883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10884$as_echo "$BDEPS_UNZIP" >&6; }
10885else
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10887$as_echo "no" >&6; }
10888fi
10889
10890
10891  test -n "$BDEPS_UNZIP" && break
10892done
10893
10894  if test "x$BDEPS_UNZIP" = x7z; then
10895    BDEPS_UNZIP="7z x"
10896  fi
10897
10898  for ac_prog in wget lftp ftp
10899do
10900  # Extract the first word of "$ac_prog", so it can be a program name with args.
10901set dummy $ac_prog; ac_word=$2
10902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10903$as_echo_n "checking for $ac_word... " >&6; }
10904if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10905  $as_echo_n "(cached) " >&6
10906else
10907  if test -n "$BDEPS_FTP"; then
10908  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10909else
10910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10911for as_dir in $PATH
10912do
10913  IFS=$as_save_IFS
10914  test -z "$as_dir" && as_dir=.
10915    for ac_exec_ext in '' $ac_executable_extensions; do
10916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10917    ac_cv_prog_BDEPS_FTP="$ac_prog"
10918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10919    break 2
10920  fi
10921done
10922  done
10923IFS=$as_save_IFS
10924
10925fi
10926fi
10927BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10928if test -n "$BDEPS_FTP"; then
10929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10930$as_echo "$BDEPS_FTP" >&6; }
10931else
10932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10933$as_echo "no" >&6; }
10934fi
10935
10936
10937  test -n "$BDEPS_FTP" && break
10938done
10939
10940
10941
10942###############################################################################
10943#
10944# Determine OpenJDK variants, options and version numbers.
10945#
10946###############################################################################
10947
10948# We need build & target for this.
10949
10950
10951  ###############################################################################
10952  #
10953  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10954  # We always build headless support.
10955  #
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10957$as_echo_n "checking headful support... " >&6; }
10958  # Check whether --enable-headful was given.
10959if test "${enable_headful+set}" = set; then :
10960  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10961else
10962  SUPPORT_HEADFUL=yes
10963fi
10964
10965
10966  SUPPORT_HEADLESS=yes
10967  BUILD_HEADLESS="BUILD_HEADLESS:=true"
10968
10969  if test "x$SUPPORT_HEADFUL" = xyes; then
10970    # We are building both headful and headless.
10971    headful_msg="include support for both headful and headless"
10972  fi
10973
10974  if test "x$SUPPORT_HEADFUL" = xno; then
10975    # Thus we are building headless only.
10976    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10977    headful_msg="headless only"
10978  fi
10979
10980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10981$as_echo "$headful_msg" >&6; }
10982
10983
10984
10985
10986
10987  # Control wether Hotspot runs Queens test after build.
10988  # Check whether --enable-hotspot-test-in-build was given.
10989if test "${enable_hotspot_test_in_build+set}" = set; then :
10990  enableval=$enable_hotspot_test_in_build;
10991else
10992  enable_hotspot_test_in_build=no
10993fi
10994
10995  if test "x$enable_hotspot_test_in_build" = "xyes"; then
10996    TEST_IN_BUILD=true
10997  else
10998    TEST_IN_BUILD=false
10999  fi
11000
11001
11002  ###############################################################################
11003  #
11004  # Choose cacerts source file
11005  #
11006
11007# Check whether --with-cacerts-file was given.
11008if test "${with_cacerts_file+set}" = set; then :
11009  withval=$with_cacerts_file;
11010fi
11011
11012  if test "x$with_cacerts_file" != x; then
11013    CACERTS_FILE=$with_cacerts_file
11014  else
11015    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11016  fi
11017
11018
11019  ###############################################################################
11020  #
11021  # Enable or disable unlimited crypto
11022  #
11023  # Check whether --enable-unlimited-crypto was given.
11024if test "${enable_unlimited_crypto+set}" = set; then :
11025  enableval=$enable_unlimited_crypto;
11026else
11027  enable_unlimited_crypto=no
11028fi
11029
11030  if test "x$enable_unlimited_crypto" = "xyes"; then
11031    UNLIMITED_CRYPTO=true
11032  else
11033    UNLIMITED_CRYPTO=false
11034  fi
11035
11036
11037  ###############################################################################
11038  #
11039  # Enable or disable the elliptic curve crypto implementation
11040  #
11041
11042
11043  ###############################################################################
11044  #
11045  # Compress jars
11046  #
11047  COMPRESS_JARS=false
11048
11049
11050
11051
11052  # Source the version numbers
11053  . $AUTOCONF_DIR/version-numbers
11054
11055  # Get the settings from parameters
11056
11057# Check whether --with-milestone was given.
11058if test "${with_milestone+set}" = set; then :
11059  withval=$with_milestone;
11060fi
11061
11062  if test "x$with_milestone" = xyes; then
11063    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11064  elif test "x$with_milestone" != x; then
11065    MILESTONE="$with_milestone"
11066  fi
11067  if test "x$MILESTONE" = x; then
11068    MILESTONE=internal
11069  fi
11070
11071
11072# Check whether --with-update-version was given.
11073if test "${with_update_version+set}" = set; then :
11074  withval=$with_update_version;
11075fi
11076
11077  if test "x$with_update_version" = xyes; then
11078    as_fn_error $? "Update version must have a value" "$LINENO" 5
11079  elif test "x$with_update_version" != x; then
11080    JDK_UPDATE_VERSION="$with_update_version"
11081  fi
11082
11083
11084# Check whether --with-user-release-suffix was given.
11085if test "${with_user_release_suffix+set}" = set; then :
11086  withval=$with_user_release_suffix;
11087fi
11088
11089  if test "x$with_user_release_suffix" = xyes; then
11090    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11091  elif test "x$with_user_release_suffix" != x; then
11092    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11093  fi
11094
11095
11096# Check whether --with-build-number was given.
11097if test "${with_build_number+set}" = set; then :
11098  withval=$with_build_number;
11099fi
11100
11101  if test "x$with_build_number" = xyes; then
11102    as_fn_error $? "Build number must have a value" "$LINENO" 5
11103  elif test "x$with_build_number" != x; then
11104    JDK_BUILD_NUMBER="$with_build_number"
11105  fi
11106  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11107  if test "x$JDK_BUILD_NUMBER" = x; then
11108    JDK_BUILD_NUMBER=b00
11109    if test "x$USER_RELEASE_SUFFIX" = x; then
11110      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11111      # Avoid [:alnum:] since it depends on the locale.
11112      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11113      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11114    fi
11115  fi
11116
11117  # Now set the JDK version, milestone, build number etc.
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133  COPYRIGHT_YEAR=`date +'%Y'`
11134
11135
11136  if test "x$JDK_UPDATE_VERSION" != x; then
11137    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11138  else
11139    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11140  fi
11141
11142
11143  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11144
11145
11146
11147###############################################################################
11148#
11149# Setup BootJDK, used to bootstrap the build.
11150#
11151###############################################################################
11152
11153
11154  BOOT_JDK_FOUND=no
11155
11156# Check whether --with-boot-jdk was given.
11157if test "${with_boot_jdk+set}" = set; then :
11158  withval=$with_boot_jdk;
11159fi
11160
11161
11162  # We look for the Boot JDK through various means, going from more certain to
11163  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11164  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11165  # must check if this is indeed valid; otherwise we'll continue looking.
11166
11167  # Test: Is bootjdk explicitely set by command line arguments?
11168
11169  if test "x$BOOT_JDK_FOUND" = xno; then
11170    # Now execute the test
11171
11172  if test "x$with_boot_jdk" != x; then
11173    BOOT_JDK=$with_boot_jdk
11174    BOOT_JDK_FOUND=maybe
11175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11176$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11177  fi
11178
11179
11180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11182      # Do we have a bin/java?
11183      if test ! -x "$BOOT_JDK/bin/java"; then
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11186        BOOT_JDK_FOUND=no
11187      else
11188        # Do we have a bin/javac?
11189        if test ! -x "$BOOT_JDK/bin/javac"; then
11190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11194          BOOT_JDK_FOUND=no
11195        else
11196          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11197          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11198            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11200            BOOT_JDK_FOUND=no
11201          else
11202            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11204
11205            # Extra M4 quote needed to protect [] in grep expression.
11206            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11207            if test "x$FOUND_VERSION_78" = x; then
11208              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11210              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11211$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11212              BOOT_JDK_FOUND=no
11213            else
11214              # We're done! :-)
11215              BOOT_JDK_FOUND=yes
11216
11217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11218
11219  # Input might be given as Windows format, start by converting to
11220  # unix format.
11221  path="$BOOT_JDK"
11222  new_path=`$CYGPATH -u "$path"`
11223
11224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11227  # "foo.exe" is OK but "foo" is an error.
11228  #
11229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11230  # It is also a way to make sure we got the proper file name for the real test later on.
11231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11232  if test "x$test_shortpath" = x; then
11233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11235    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11236  fi
11237
11238  # Call helper function which possibly converts this using DOS-style short mode.
11239  # If so, the updated path is stored in $new_path.
11240
11241  input_path="$new_path"
11242  # Check if we need to convert this using DOS-style short mode. If the path
11243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11244  # take no chances and rewrite it.
11245  # Note: m4 eats our [], so we need to use [ and ] instead.
11246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11247  if test "x$has_forbidden_chars" != x; then
11248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11252      # Going to short mode and back again did indeed matter. Since short mode is
11253      # case insensitive, let's make it lowercase to improve readability.
11254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11255      # Now convert it back to Unix-stile (cygpath)
11256      input_path=`$CYGPATH -u "$shortmode_path"`
11257      new_path="$input_path"
11258    fi
11259  fi
11260
11261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11262  if test "x$test_cygdrive_prefix" = x; then
11263    # As a simple fix, exclude /usr/bin since it's not a real path.
11264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11266      # a path prefixed by /cygdrive for fixpath to work.
11267      new_path="$CYGWIN_ROOT_PATH$input_path"
11268    fi
11269  fi
11270
11271
11272  if test "x$path" != "x$new_path"; then
11273    BOOT_JDK="$new_path"
11274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11276  fi
11277
11278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11279
11280  path="$BOOT_JDK"
11281  has_colon=`$ECHO $path | $GREP ^.:`
11282  new_path="$path"
11283  if test "x$has_colon" = x; then
11284    # Not in mixed or Windows style, start by that.
11285    new_path=`cmd //c echo $path`
11286  fi
11287
11288
11289  input_path="$new_path"
11290  # Check if we need to convert this using DOS-style short mode. If the path
11291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11292  # take no chances and rewrite it.
11293  # Note: m4 eats our [], so we need to use [ and ] instead.
11294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11295  if test "x$has_forbidden_chars" != x; then
11296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11298  fi
11299
11300
11301  windows_path="$new_path"
11302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11303    unix_path=`$CYGPATH -u "$windows_path"`
11304    new_path="$unix_path"
11305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11307    new_path="$unix_path"
11308  fi
11309
11310  if test "x$path" != "x$new_path"; then
11311    BOOT_JDK="$new_path"
11312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11314  fi
11315
11316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11318
11319  else
11320    # We're on a posix platform. Hooray! :)
11321    path="$BOOT_JDK"
11322    has_space=`$ECHO "$path" | $GREP " "`
11323    if test "x$has_space" != x; then
11324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11326      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11327    fi
11328
11329    # Use eval to expand a potential ~
11330    eval path="$path"
11331    if test ! -f "$path" && test ! -d "$path"; then
11332      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11333    fi
11334
11335    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11336  fi
11337
11338              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11339$as_echo_n "checking for Boot JDK... " >&6; }
11340              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11341$as_echo "$BOOT_JDK" >&6; }
11342              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11343$as_echo_n "checking Boot JDK version... " >&6; }
11344              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11345              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11346$as_echo "$BOOT_JDK_VERSION" >&6; }
11347            fi # end check jdk version
11348          fi # end check rt.jar
11349        fi # end check javac
11350      fi # end check java
11351    fi # end check boot jdk found
11352  fi
11353
11354  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11355    # Having specified an argument which is incorrect will produce an instant failure;
11356    # we should not go on looking
11357    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11358  fi
11359
11360  # Test: Is bootjdk available from builddeps?
11361
11362  if test "x$BOOT_JDK_FOUND" = xno; then
11363    # Now execute the test
11364
11365
11366
11367  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11368    # Source the builddeps file again, to make sure it uses the latest variables!
11369    . $builddepsfile
11370    # Look for a target and build machine specific resource!
11371    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11372    if test "x$resource" = x; then
11373      # Ok, lets instead look for a target specific resource
11374      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11375    fi
11376    if test "x$resource" = x; then
11377      # Ok, lets instead look for a build specific resource
11378      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11379    fi
11380    if test "x$resource" = x; then
11381      # Ok, lets instead look for a generic resource
11382      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11383      resource=${builddep_bootjdk}
11384    fi
11385    if test "x$resource" != x; then
11386      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11387$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11388      # If the resource in the builddeps.conf file is an existing directory,
11389      # for example /java/linux/cups
11390      if test -d ${resource}; then
11391        depdir=${resource}
11392      else
11393
11394  # bootjdk is for example mymodule
11395  # $resource is for example libs/general/libmymod_1_2_3.zip
11396  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11397  # $with_builddeps_dir is for example /localhome/builddeps
11398  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11399  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11400  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11401  filename=`basename $resource`
11402  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11403  filebase=${filename%%.*}
11404  extension=${filename#*.}
11405  installdir=$with_builddeps_dir/$filebase
11406  if test ! -f $installdir/$filename.unpacked; then
11407    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11408$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11409    if test ! -d $installdir; then
11410      mkdir -p $installdir
11411    fi
11412    if test ! -d $installdir; then
11413      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11414    fi
11415    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11416    touch $tmpfile
11417    if test ! -f $tmpfile; then
11418      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11419    fi
11420
11421  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11422  # $tmpfile is the local file name for the downloaded file.
11423  VALID_TOOL=no
11424  if test "x$BDEPS_FTP" = xwget; then
11425    VALID_TOOL=yes
11426    wget -O $tmpfile $with_builddeps_server/$resource
11427  fi
11428  if test "x$BDEPS_FTP" = xlftp; then
11429    VALID_TOOL=yes
11430    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11431  fi
11432  if test "x$BDEPS_FTP" = xftp; then
11433    VALID_TOOL=yes
11434    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11435    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11436    FTPUSERPWD=${FTPSERVER%%@*}
11437    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11438      FTPUSER=${userpwd%%:*}
11439      FTPPWD=${userpwd#*@}
11440      FTPSERVER=${FTPSERVER#*@}
11441    else
11442      FTPUSER=ftp
11443      FTPPWD=ftp
11444    fi
11445    # the "pass" command does not work on some
11446    # ftp clients (read ftp.exe) but if it works,
11447    # passive mode is better!
11448    ( \
11449        echo "user $FTPUSER $FTPPWD"        ; \
11450        echo "pass"                         ; \
11451        echo "bin"                          ; \
11452        echo "get $FTPPATH $tmpfile"              ; \
11453    ) | ftp -in $FTPSERVER
11454  fi
11455  if test "x$VALID_TOOL" != xyes; then
11456    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11457  fi
11458
11459    mv $tmpfile $installdir/$filename
11460    if test ! -s $installdir/$filename; then
11461      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11462    fi
11463    case "$extension" in
11464      zip)  echo "Unzipping $installdir/$filename..."
11465        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11466        ;;
11467      tar.gz) echo "Untaring $installdir/$filename..."
11468        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11469        ;;
11470      tgz) echo "Untaring $installdir/$filename..."
11471        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11472        ;;
11473      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11474        ;;
11475    esac
11476  fi
11477  if test -f $installdir/$filename.unpacked; then
11478    depdir=$installdir
11479  fi
11480
11481      fi
11482      # Source the builddeps file again, because in the previous command, the depdir
11483      # was updated to point at the current build dependency install directory.
11484      . $builddepsfile
11485      # Now extract variables from the builddeps.conf files.
11486      theroot=${builddep_bootjdk_ROOT}
11487      thecflags=${builddep_bootjdk_CFLAGS}
11488      thelibs=${builddep_bootjdk_LIBS}
11489      if test "x$depdir" = x; then
11490        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11491      fi
11492      BOOT_JDK=$depdir
11493      if test "x$theroot" != x; then
11494        BOOT_JDK="$theroot"
11495      fi
11496      if test "x$thecflags" != x; then
11497        BOOT_JDK_CFLAGS="$thecflags"
11498      fi
11499      if test "x$thelibs" != x; then
11500        BOOT_JDK_LIBS="$thelibs"
11501      fi
11502      BOOT_JDK_FOUND=maybe
11503      else BOOT_JDK_FOUND=no
11504
11505    fi
11506    else BOOT_JDK_FOUND=no
11507
11508  fi
11509
11510
11511
11512    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11513    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11514      # Do we have a bin/java?
11515      if test ! -x "$BOOT_JDK/bin/java"; then
11516        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11518        BOOT_JDK_FOUND=no
11519      else
11520        # Do we have a bin/javac?
11521        if test ! -x "$BOOT_JDK/bin/javac"; then
11522          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11524          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11525$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11526          BOOT_JDK_FOUND=no
11527        else
11528          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11529          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11530            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11532            BOOT_JDK_FOUND=no
11533          else
11534            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11535            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11536
11537            # Extra M4 quote needed to protect [] in grep expression.
11538            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11539            if test "x$FOUND_VERSION_78" = x; then
11540              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11542              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11543$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11544              BOOT_JDK_FOUND=no
11545            else
11546              # We're done! :-)
11547              BOOT_JDK_FOUND=yes
11548
11549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11550
11551  # Input might be given as Windows format, start by converting to
11552  # unix format.
11553  path="$BOOT_JDK"
11554  new_path=`$CYGPATH -u "$path"`
11555
11556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11559  # "foo.exe" is OK but "foo" is an error.
11560  #
11561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11562  # It is also a way to make sure we got the proper file name for the real test later on.
11563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11564  if test "x$test_shortpath" = x; then
11565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11567    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11568  fi
11569
11570  # Call helper function which possibly converts this using DOS-style short mode.
11571  # If so, the updated path is stored in $new_path.
11572
11573  input_path="$new_path"
11574  # Check if we need to convert this using DOS-style short mode. If the path
11575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11576  # take no chances and rewrite it.
11577  # Note: m4 eats our [], so we need to use [ and ] instead.
11578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11579  if test "x$has_forbidden_chars" != x; then
11580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11584      # Going to short mode and back again did indeed matter. Since short mode is
11585      # case insensitive, let's make it lowercase to improve readability.
11586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11587      # Now convert it back to Unix-stile (cygpath)
11588      input_path=`$CYGPATH -u "$shortmode_path"`
11589      new_path="$input_path"
11590    fi
11591  fi
11592
11593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11594  if test "x$test_cygdrive_prefix" = x; then
11595    # As a simple fix, exclude /usr/bin since it's not a real path.
11596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11598      # a path prefixed by /cygdrive for fixpath to work.
11599      new_path="$CYGWIN_ROOT_PATH$input_path"
11600    fi
11601  fi
11602
11603
11604  if test "x$path" != "x$new_path"; then
11605    BOOT_JDK="$new_path"
11606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11607$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11608  fi
11609
11610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11611
11612  path="$BOOT_JDK"
11613  has_colon=`$ECHO $path | $GREP ^.:`
11614  new_path="$path"
11615  if test "x$has_colon" = x; then
11616    # Not in mixed or Windows style, start by that.
11617    new_path=`cmd //c echo $path`
11618  fi
11619
11620
11621  input_path="$new_path"
11622  # Check if we need to convert this using DOS-style short mode. If the path
11623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11624  # take no chances and rewrite it.
11625  # Note: m4 eats our [], so we need to use [ and ] instead.
11626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11627  if test "x$has_forbidden_chars" != x; then
11628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11630  fi
11631
11632
11633  windows_path="$new_path"
11634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11635    unix_path=`$CYGPATH -u "$windows_path"`
11636    new_path="$unix_path"
11637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11639    new_path="$unix_path"
11640  fi
11641
11642  if test "x$path" != "x$new_path"; then
11643    BOOT_JDK="$new_path"
11644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11646  fi
11647
11648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11650
11651  else
11652    # We're on a posix platform. Hooray! :)
11653    path="$BOOT_JDK"
11654    has_space=`$ECHO "$path" | $GREP " "`
11655    if test "x$has_space" != x; then
11656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11658      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11659    fi
11660
11661    # Use eval to expand a potential ~
11662    eval path="$path"
11663    if test ! -f "$path" && test ! -d "$path"; then
11664      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11665    fi
11666
11667    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11668  fi
11669
11670              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11671$as_echo_n "checking for Boot JDK... " >&6; }
11672              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11673$as_echo "$BOOT_JDK" >&6; }
11674              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11675$as_echo_n "checking Boot JDK version... " >&6; }
11676              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11677              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11678$as_echo "$BOOT_JDK_VERSION" >&6; }
11679            fi # end check jdk version
11680          fi # end check rt.jar
11681        fi # end check javac
11682      fi # end check java
11683    fi # end check boot jdk found
11684  fi
11685
11686
11687  # Test: Is $JAVA_HOME set?
11688
11689  if test "x$BOOT_JDK_FOUND" = xno; then
11690    # Now execute the test
11691
11692  if test "x$JAVA_HOME" != x; then
11693    JAVA_HOME_PROCESSED="$JAVA_HOME"
11694
11695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11696
11697  # Input might be given as Windows format, start by converting to
11698  # unix format.
11699  path="$JAVA_HOME_PROCESSED"
11700  new_path=`$CYGPATH -u "$path"`
11701
11702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11705  # "foo.exe" is OK but "foo" is an error.
11706  #
11707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11708  # It is also a way to make sure we got the proper file name for the real test later on.
11709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11710  if test "x$test_shortpath" = x; then
11711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11712$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11713    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11714  fi
11715
11716  # Call helper function which possibly converts this using DOS-style short mode.
11717  # If so, the updated path is stored in $new_path.
11718
11719  input_path="$new_path"
11720  # Check if we need to convert this using DOS-style short mode. If the path
11721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11722  # take no chances and rewrite it.
11723  # Note: m4 eats our [], so we need to use [ and ] instead.
11724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11725  if test "x$has_forbidden_chars" != x; then
11726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11730      # Going to short mode and back again did indeed matter. Since short mode is
11731      # case insensitive, let's make it lowercase to improve readability.
11732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11733      # Now convert it back to Unix-stile (cygpath)
11734      input_path=`$CYGPATH -u "$shortmode_path"`
11735      new_path="$input_path"
11736    fi
11737  fi
11738
11739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11740  if test "x$test_cygdrive_prefix" = x; then
11741    # As a simple fix, exclude /usr/bin since it's not a real path.
11742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11744      # a path prefixed by /cygdrive for fixpath to work.
11745      new_path="$CYGWIN_ROOT_PATH$input_path"
11746    fi
11747  fi
11748
11749
11750  if test "x$path" != "x$new_path"; then
11751    JAVA_HOME_PROCESSED="$new_path"
11752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11753$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11754  fi
11755
11756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11757
11758  path="$JAVA_HOME_PROCESSED"
11759  has_colon=`$ECHO $path | $GREP ^.:`
11760  new_path="$path"
11761  if test "x$has_colon" = x; then
11762    # Not in mixed or Windows style, start by that.
11763    new_path=`cmd //c echo $path`
11764  fi
11765
11766
11767  input_path="$new_path"
11768  # Check if we need to convert this using DOS-style short mode. If the path
11769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11770  # take no chances and rewrite it.
11771  # Note: m4 eats our [], so we need to use [ and ] instead.
11772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11773  if test "x$has_forbidden_chars" != x; then
11774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11776  fi
11777
11778
11779  windows_path="$new_path"
11780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11781    unix_path=`$CYGPATH -u "$windows_path"`
11782    new_path="$unix_path"
11783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11785    new_path="$unix_path"
11786  fi
11787
11788  if test "x$path" != "x$new_path"; then
11789    JAVA_HOME_PROCESSED="$new_path"
11790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11791$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11792  fi
11793
11794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11796
11797  else
11798    # We're on a posix platform. Hooray! :)
11799    path="$JAVA_HOME_PROCESSED"
11800    has_space=`$ECHO "$path" | $GREP " "`
11801    if test "x$has_space" != x; then
11802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11803$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11804      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11805    fi
11806
11807    # Use eval to expand a potential ~
11808    eval path="$path"
11809    if test ! -f "$path" && test ! -d "$path"; then
11810      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11811    fi
11812
11813    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11814  fi
11815
11816    if test ! -d "$JAVA_HOME_PROCESSED"; then
11817      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11818$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11819    else
11820      # Aha, the user has set a JAVA_HOME
11821      # let us use that as the Boot JDK.
11822      BOOT_JDK="$JAVA_HOME_PROCESSED"
11823      BOOT_JDK_FOUND=maybe
11824      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11825$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11826    fi
11827  fi
11828
11829
11830    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11831    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11832      # Do we have a bin/java?
11833      if test ! -x "$BOOT_JDK/bin/java"; then
11834        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11836        BOOT_JDK_FOUND=no
11837      else
11838        # Do we have a bin/javac?
11839        if test ! -x "$BOOT_JDK/bin/javac"; then
11840          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11842          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11843$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11844          BOOT_JDK_FOUND=no
11845        else
11846          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11847          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11848            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11850            BOOT_JDK_FOUND=no
11851          else
11852            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11853            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11854
11855            # Extra M4 quote needed to protect [] in grep expression.
11856            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11857            if test "x$FOUND_VERSION_78" = x; then
11858              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11860              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11861$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11862              BOOT_JDK_FOUND=no
11863            else
11864              # We're done! :-)
11865              BOOT_JDK_FOUND=yes
11866
11867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11868
11869  # Input might be given as Windows format, start by converting to
11870  # unix format.
11871  path="$BOOT_JDK"
11872  new_path=`$CYGPATH -u "$path"`
11873
11874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11877  # "foo.exe" is OK but "foo" is an error.
11878  #
11879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11880  # It is also a way to make sure we got the proper file name for the real test later on.
11881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11882  if test "x$test_shortpath" = x; then
11883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11885    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11886  fi
11887
11888  # Call helper function which possibly converts this using DOS-style short mode.
11889  # If so, the updated path is stored in $new_path.
11890
11891  input_path="$new_path"
11892  # Check if we need to convert this using DOS-style short mode. If the path
11893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11894  # take no chances and rewrite it.
11895  # Note: m4 eats our [], so we need to use [ and ] instead.
11896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11897  if test "x$has_forbidden_chars" != x; then
11898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11902      # Going to short mode and back again did indeed matter. Since short mode is
11903      # case insensitive, let's make it lowercase to improve readability.
11904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11905      # Now convert it back to Unix-stile (cygpath)
11906      input_path=`$CYGPATH -u "$shortmode_path"`
11907      new_path="$input_path"
11908    fi
11909  fi
11910
11911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11912  if test "x$test_cygdrive_prefix" = x; then
11913    # As a simple fix, exclude /usr/bin since it's not a real path.
11914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11916      # a path prefixed by /cygdrive for fixpath to work.
11917      new_path="$CYGWIN_ROOT_PATH$input_path"
11918    fi
11919  fi
11920
11921
11922  if test "x$path" != "x$new_path"; then
11923    BOOT_JDK="$new_path"
11924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11925$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11926  fi
11927
11928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11929
11930  path="$BOOT_JDK"
11931  has_colon=`$ECHO $path | $GREP ^.:`
11932  new_path="$path"
11933  if test "x$has_colon" = x; then
11934    # Not in mixed or Windows style, start by that.
11935    new_path=`cmd //c echo $path`
11936  fi
11937
11938
11939  input_path="$new_path"
11940  # Check if we need to convert this using DOS-style short mode. If the path
11941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11942  # take no chances and rewrite it.
11943  # Note: m4 eats our [], so we need to use [ and ] instead.
11944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11945  if test "x$has_forbidden_chars" != x; then
11946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11948  fi
11949
11950
11951  windows_path="$new_path"
11952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11953    unix_path=`$CYGPATH -u "$windows_path"`
11954    new_path="$unix_path"
11955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11957    new_path="$unix_path"
11958  fi
11959
11960  if test "x$path" != "x$new_path"; then
11961    BOOT_JDK="$new_path"
11962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11964  fi
11965
11966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11968
11969  else
11970    # We're on a posix platform. Hooray! :)
11971    path="$BOOT_JDK"
11972    has_space=`$ECHO "$path" | $GREP " "`
11973    if test "x$has_space" != x; then
11974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11975$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11976      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11977    fi
11978
11979    # Use eval to expand a potential ~
11980    eval path="$path"
11981    if test ! -f "$path" && test ! -d "$path"; then
11982      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11983    fi
11984
11985    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11986  fi
11987
11988              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11989$as_echo_n "checking for Boot JDK... " >&6; }
11990              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11991$as_echo "$BOOT_JDK" >&6; }
11992              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11993$as_echo_n "checking Boot JDK version... " >&6; }
11994              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11995              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11996$as_echo "$BOOT_JDK_VERSION" >&6; }
11997            fi # end check jdk version
11998          fi # end check rt.jar
11999        fi # end check javac
12000      fi # end check java
12001    fi # end check boot jdk found
12002  fi
12003
12004
12005  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12006
12007  if test "x$BOOT_JDK_FOUND" = xno; then
12008    # Now execute the test
12009
12010  if test -x /usr/libexec/java_home; then
12011    BOOT_JDK=`/usr/libexec/java_home`
12012    BOOT_JDK_FOUND=maybe
12013    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12014$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12015  fi
12016
12017
12018    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12019    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12020      # Do we have a bin/java?
12021      if test ! -x "$BOOT_JDK/bin/java"; then
12022        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12024        BOOT_JDK_FOUND=no
12025      else
12026        # Do we have a bin/javac?
12027        if test ! -x "$BOOT_JDK/bin/javac"; then
12028          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12030          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12031$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12032          BOOT_JDK_FOUND=no
12033        else
12034          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12035          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12036            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12038            BOOT_JDK_FOUND=no
12039          else
12040            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12042
12043            # Extra M4 quote needed to protect [] in grep expression.
12044            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12045            if test "x$FOUND_VERSION_78" = x; then
12046              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12048              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12049$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12050              BOOT_JDK_FOUND=no
12051            else
12052              # We're done! :-)
12053              BOOT_JDK_FOUND=yes
12054
12055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12056
12057  # Input might be given as Windows format, start by converting to
12058  # unix format.
12059  path="$BOOT_JDK"
12060  new_path=`$CYGPATH -u "$path"`
12061
12062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12065  # "foo.exe" is OK but "foo" is an error.
12066  #
12067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12068  # It is also a way to make sure we got the proper file name for the real test later on.
12069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12070  if test "x$test_shortpath" = x; then
12071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12073    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12074  fi
12075
12076  # Call helper function which possibly converts this using DOS-style short mode.
12077  # If so, the updated path is stored in $new_path.
12078
12079  input_path="$new_path"
12080  # Check if we need to convert this using DOS-style short mode. If the path
12081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12082  # take no chances and rewrite it.
12083  # Note: m4 eats our [], so we need to use [ and ] instead.
12084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12085  if test "x$has_forbidden_chars" != x; then
12086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12090      # Going to short mode and back again did indeed matter. Since short mode is
12091      # case insensitive, let's make it lowercase to improve readability.
12092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12093      # Now convert it back to Unix-stile (cygpath)
12094      input_path=`$CYGPATH -u "$shortmode_path"`
12095      new_path="$input_path"
12096    fi
12097  fi
12098
12099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12100  if test "x$test_cygdrive_prefix" = x; then
12101    # As a simple fix, exclude /usr/bin since it's not a real path.
12102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12104      # a path prefixed by /cygdrive for fixpath to work.
12105      new_path="$CYGWIN_ROOT_PATH$input_path"
12106    fi
12107  fi
12108
12109
12110  if test "x$path" != "x$new_path"; then
12111    BOOT_JDK="$new_path"
12112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12114  fi
12115
12116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12117
12118  path="$BOOT_JDK"
12119  has_colon=`$ECHO $path | $GREP ^.:`
12120  new_path="$path"
12121  if test "x$has_colon" = x; then
12122    # Not in mixed or Windows style, start by that.
12123    new_path=`cmd //c echo $path`
12124  fi
12125
12126
12127  input_path="$new_path"
12128  # Check if we need to convert this using DOS-style short mode. If the path
12129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12130  # take no chances and rewrite it.
12131  # Note: m4 eats our [], so we need to use [ and ] instead.
12132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12133  if test "x$has_forbidden_chars" != x; then
12134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12136  fi
12137
12138
12139  windows_path="$new_path"
12140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12141    unix_path=`$CYGPATH -u "$windows_path"`
12142    new_path="$unix_path"
12143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12145    new_path="$unix_path"
12146  fi
12147
12148  if test "x$path" != "x$new_path"; then
12149    BOOT_JDK="$new_path"
12150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12152  fi
12153
12154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12156
12157  else
12158    # We're on a posix platform. Hooray! :)
12159    path="$BOOT_JDK"
12160    has_space=`$ECHO "$path" | $GREP " "`
12161    if test "x$has_space" != x; then
12162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12163$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12164      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12165    fi
12166
12167    # Use eval to expand a potential ~
12168    eval path="$path"
12169    if test ! -f "$path" && test ! -d "$path"; then
12170      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12171    fi
12172
12173    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12174  fi
12175
12176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12177$as_echo_n "checking for Boot JDK... " >&6; }
12178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12179$as_echo "$BOOT_JDK" >&6; }
12180              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12181$as_echo_n "checking Boot JDK version... " >&6; }
12182              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12184$as_echo "$BOOT_JDK_VERSION" >&6; }
12185            fi # end check jdk version
12186          fi # end check rt.jar
12187        fi # end check javac
12188      fi # end check java
12189    fi # end check boot jdk found
12190  fi
12191
12192
12193  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12194
12195  if test "x$BOOT_JDK_FOUND" = xno; then
12196    # Now execute the test
12197
12198  # Extract the first word of "javac", so it can be a program name with args.
12199set dummy javac; ac_word=$2
12200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12201$as_echo_n "checking for $ac_word... " >&6; }
12202if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12203  $as_echo_n "(cached) " >&6
12204else
12205  case $JAVAC_CHECK in
12206  [\\/]* | ?:[\\/]*)
12207  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12208  ;;
12209  *)
12210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12211for as_dir in $PATH
12212do
12213  IFS=$as_save_IFS
12214  test -z "$as_dir" && as_dir=.
12215    for ac_exec_ext in '' $ac_executable_extensions; do
12216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12217    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12219    break 2
12220  fi
12221done
12222  done
12223IFS=$as_save_IFS
12224
12225  ;;
12226esac
12227fi
12228JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12229if test -n "$JAVAC_CHECK"; then
12230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12231$as_echo "$JAVAC_CHECK" >&6; }
12232else
12233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12234$as_echo "no" >&6; }
12235fi
12236
12237
12238  # Extract the first word of "java", so it can be a program name with args.
12239set dummy java; ac_word=$2
12240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12241$as_echo_n "checking for $ac_word... " >&6; }
12242if ${ac_cv_path_JAVA_CHECK+:} false; then :
12243  $as_echo_n "(cached) " >&6
12244else
12245  case $JAVA_CHECK in
12246  [\\/]* | ?:[\\/]*)
12247  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12248  ;;
12249  *)
12250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12251for as_dir in $PATH
12252do
12253  IFS=$as_save_IFS
12254  test -z "$as_dir" && as_dir=.
12255    for ac_exec_ext in '' $ac_executable_extensions; do
12256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12257    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12259    break 2
12260  fi
12261done
12262  done
12263IFS=$as_save_IFS
12264
12265  ;;
12266esac
12267fi
12268JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12269if test -n "$JAVA_CHECK"; then
12270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12271$as_echo "$JAVA_CHECK" >&6; }
12272else
12273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12274$as_echo "no" >&6; }
12275fi
12276
12277
12278  BINARY="$JAVAC_CHECK"
12279  if test "x$JAVAC_CHECK" = x; then
12280    BINARY="$JAVA_CHECK"
12281  fi
12282  if test "x$BINARY" != x; then
12283    # So there is a java(c) binary, it might be part of a JDK.
12284    # Lets find the JDK/JRE directory by following symbolic links.
12285    # Linux/GNU systems often have links from /usr/bin/java to
12286    # /etc/alternatives/java to the real JDK binary.
12287
12288  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12289    # Follow a chain of symbolic links. Use readlink
12290    # where it exists, else fall back to horribly
12291    # complicated shell code.
12292    if test "x$READLINK_TESTED" != yes; then
12293      # On MacOSX there is a readlink tool with a different
12294      # purpose than the GNU readlink tool. Check the found readlink.
12295      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12296      if test "x$ISGNU" = x; then
12297        # A readlink that we do not know how to use.
12298        # Are there other non-GNU readlinks out there?
12299        READLINK_TESTED=yes
12300        READLINK=
12301      fi
12302    fi
12303
12304    if test "x$READLINK" != x; then
12305      BINARY=`$READLINK -f $BINARY`
12306    else
12307      # Save the current directory for restoring afterwards
12308      STARTDIR=$PWD
12309      COUNTER=0
12310      sym_link_dir=`$DIRNAME $BINARY`
12311      sym_link_file=`$BASENAME $BINARY`
12312      cd $sym_link_dir
12313      # Use -P flag to resolve symlinks in directories.
12314      cd `$THEPWDCMD -P`
12315      sym_link_dir=`$THEPWDCMD -P`
12316      # Resolve file symlinks
12317      while test $COUNTER -lt 20; do
12318        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12319        if test "x$ISLINK" == x; then
12320          # This is not a symbolic link! We are done!
12321          break
12322        fi
12323        # Again resolve directory symlinks since the target of the just found
12324        # link could be in a different directory
12325        cd `$DIRNAME $ISLINK`
12326        sym_link_dir=`$THEPWDCMD -P`
12327        sym_link_file=`$BASENAME $ISLINK`
12328        let COUNTER=COUNTER+1
12329      done
12330      cd $STARTDIR
12331      BINARY=$sym_link_dir/$sym_link_file
12332    fi
12333  fi
12334
12335    BOOT_JDK=`dirname "$BINARY"`
12336    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12337    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12338      # Looks like we found ourselves an JDK
12339      BOOT_JDK_FOUND=maybe
12340      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12341$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12342    fi
12343  fi
12344
12345
12346    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12347    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12348      # Do we have a bin/java?
12349      if test ! -x "$BOOT_JDK/bin/java"; then
12350        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12352        BOOT_JDK_FOUND=no
12353      else
12354        # Do we have a bin/javac?
12355        if test ! -x "$BOOT_JDK/bin/javac"; then
12356          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12358          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12359$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12360          BOOT_JDK_FOUND=no
12361        else
12362          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12363          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12364            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12366            BOOT_JDK_FOUND=no
12367          else
12368            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12369            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12370
12371            # Extra M4 quote needed to protect [] in grep expression.
12372            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12373            if test "x$FOUND_VERSION_78" = x; then
12374              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12376              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12377$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12378              BOOT_JDK_FOUND=no
12379            else
12380              # We're done! :-)
12381              BOOT_JDK_FOUND=yes
12382
12383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12384
12385  # Input might be given as Windows format, start by converting to
12386  # unix format.
12387  path="$BOOT_JDK"
12388  new_path=`$CYGPATH -u "$path"`
12389
12390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12393  # "foo.exe" is OK but "foo" is an error.
12394  #
12395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12396  # It is also a way to make sure we got the proper file name for the real test later on.
12397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12398  if test "x$test_shortpath" = x; then
12399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12401    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12402  fi
12403
12404  # Call helper function which possibly converts this using DOS-style short mode.
12405  # If so, the updated path is stored in $new_path.
12406
12407  input_path="$new_path"
12408  # Check if we need to convert this using DOS-style short mode. If the path
12409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12410  # take no chances and rewrite it.
12411  # Note: m4 eats our [], so we need to use [ and ] instead.
12412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12413  if test "x$has_forbidden_chars" != x; then
12414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12418      # Going to short mode and back again did indeed matter. Since short mode is
12419      # case insensitive, let's make it lowercase to improve readability.
12420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12421      # Now convert it back to Unix-stile (cygpath)
12422      input_path=`$CYGPATH -u "$shortmode_path"`
12423      new_path="$input_path"
12424    fi
12425  fi
12426
12427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12428  if test "x$test_cygdrive_prefix" = x; then
12429    # As a simple fix, exclude /usr/bin since it's not a real path.
12430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12432      # a path prefixed by /cygdrive for fixpath to work.
12433      new_path="$CYGWIN_ROOT_PATH$input_path"
12434    fi
12435  fi
12436
12437
12438  if test "x$path" != "x$new_path"; then
12439    BOOT_JDK="$new_path"
12440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12441$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12442  fi
12443
12444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12445
12446  path="$BOOT_JDK"
12447  has_colon=`$ECHO $path | $GREP ^.:`
12448  new_path="$path"
12449  if test "x$has_colon" = x; then
12450    # Not in mixed or Windows style, start by that.
12451    new_path=`cmd //c echo $path`
12452  fi
12453
12454
12455  input_path="$new_path"
12456  # Check if we need to convert this using DOS-style short mode. If the path
12457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12458  # take no chances and rewrite it.
12459  # Note: m4 eats our [], so we need to use [ and ] instead.
12460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12461  if test "x$has_forbidden_chars" != x; then
12462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12464  fi
12465
12466
12467  windows_path="$new_path"
12468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12469    unix_path=`$CYGPATH -u "$windows_path"`
12470    new_path="$unix_path"
12471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12473    new_path="$unix_path"
12474  fi
12475
12476  if test "x$path" != "x$new_path"; then
12477    BOOT_JDK="$new_path"
12478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12480  fi
12481
12482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12484
12485  else
12486    # We're on a posix platform. Hooray! :)
12487    path="$BOOT_JDK"
12488    has_space=`$ECHO "$path" | $GREP " "`
12489    if test "x$has_space" != x; then
12490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12491$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12492      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12493    fi
12494
12495    # Use eval to expand a potential ~
12496    eval path="$path"
12497    if test ! -f "$path" && test ! -d "$path"; then
12498      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12499    fi
12500
12501    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12502  fi
12503
12504              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12505$as_echo_n "checking for Boot JDK... " >&6; }
12506              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12507$as_echo "$BOOT_JDK" >&6; }
12508              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12509$as_echo_n "checking Boot JDK version... " >&6; }
12510              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12511              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12512$as_echo "$BOOT_JDK_VERSION" >&6; }
12513            fi # end check jdk version
12514          fi # end check rt.jar
12515        fi # end check javac
12516      fi # end check java
12517    fi # end check boot jdk found
12518  fi
12519
12520
12521  # Test: Is there a JDK installed in default, well-known locations?
12522
12523  if test "x$BOOT_JDK_FOUND" = xno; then
12524    # Now execute the test
12525
12526  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12527
12528  if test "x$BOOT_JDK_FOUND" = xno; then
12529    # Now execute the test
12530
12531  if test "x$ProgramW6432" != x; then
12532    VIRTUAL_DIR="$ProgramW6432/Java"
12533
12534  windows_path="$VIRTUAL_DIR"
12535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12536    unix_path=`$CYGPATH -u "$windows_path"`
12537    VIRTUAL_DIR="$unix_path"
12538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12540    VIRTUAL_DIR="$unix_path"
12541  fi
12542
12543
12544  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12545  BOOT_JDK_SUFFIX=""
12546  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12547  if test "x$ALL_JDKS_FOUND" != x; then
12548    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12549
12550  if test "x$BOOT_JDK_FOUND" = xno; then
12551    # Now execute the test
12552
12553        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12554        if test -d "$BOOT_JDK"; then
12555          BOOT_JDK_FOUND=maybe
12556          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12557$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12558        fi
12559
12560
12561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12563      # Do we have a bin/java?
12564      if test ! -x "$BOOT_JDK/bin/java"; then
12565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12567        BOOT_JDK_FOUND=no
12568      else
12569        # Do we have a bin/javac?
12570        if test ! -x "$BOOT_JDK/bin/javac"; then
12571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12575          BOOT_JDK_FOUND=no
12576        else
12577          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12578          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12581            BOOT_JDK_FOUND=no
12582          else
12583            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12585
12586            # Extra M4 quote needed to protect [] in grep expression.
12587            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12588            if test "x$FOUND_VERSION_78" = x; then
12589              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12591              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12592$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12593              BOOT_JDK_FOUND=no
12594            else
12595              # We're done! :-)
12596              BOOT_JDK_FOUND=yes
12597
12598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12599
12600  # Input might be given as Windows format, start by converting to
12601  # unix format.
12602  path="$BOOT_JDK"
12603  new_path=`$CYGPATH -u "$path"`
12604
12605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12608  # "foo.exe" is OK but "foo" is an error.
12609  #
12610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12611  # It is also a way to make sure we got the proper file name for the real test later on.
12612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12613  if test "x$test_shortpath" = x; then
12614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12616    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12617  fi
12618
12619  # Call helper function which possibly converts this using DOS-style short mode.
12620  # If so, the updated path is stored in $new_path.
12621
12622  input_path="$new_path"
12623  # Check if we need to convert this using DOS-style short mode. If the path
12624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625  # take no chances and rewrite it.
12626  # Note: m4 eats our [], so we need to use [ and ] instead.
12627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12628  if test "x$has_forbidden_chars" != x; then
12629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12633      # Going to short mode and back again did indeed matter. Since short mode is
12634      # case insensitive, let's make it lowercase to improve readability.
12635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12636      # Now convert it back to Unix-stile (cygpath)
12637      input_path=`$CYGPATH -u "$shortmode_path"`
12638      new_path="$input_path"
12639    fi
12640  fi
12641
12642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12643  if test "x$test_cygdrive_prefix" = x; then
12644    # As a simple fix, exclude /usr/bin since it's not a real path.
12645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12647      # a path prefixed by /cygdrive for fixpath to work.
12648      new_path="$CYGWIN_ROOT_PATH$input_path"
12649    fi
12650  fi
12651
12652
12653  if test "x$path" != "x$new_path"; then
12654    BOOT_JDK="$new_path"
12655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12657  fi
12658
12659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12660
12661  path="$BOOT_JDK"
12662  has_colon=`$ECHO $path | $GREP ^.:`
12663  new_path="$path"
12664  if test "x$has_colon" = x; then
12665    # Not in mixed or Windows style, start by that.
12666    new_path=`cmd //c echo $path`
12667  fi
12668
12669
12670  input_path="$new_path"
12671  # Check if we need to convert this using DOS-style short mode. If the path
12672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12673  # take no chances and rewrite it.
12674  # Note: m4 eats our [], so we need to use [ and ] instead.
12675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12676  if test "x$has_forbidden_chars" != x; then
12677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12679  fi
12680
12681
12682  windows_path="$new_path"
12683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12684    unix_path=`$CYGPATH -u "$windows_path"`
12685    new_path="$unix_path"
12686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12688    new_path="$unix_path"
12689  fi
12690
12691  if test "x$path" != "x$new_path"; then
12692    BOOT_JDK="$new_path"
12693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12695  fi
12696
12697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12699
12700  else
12701    # We're on a posix platform. Hooray! :)
12702    path="$BOOT_JDK"
12703    has_space=`$ECHO "$path" | $GREP " "`
12704    if test "x$has_space" != x; then
12705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12706$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12707      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12708    fi
12709
12710    # Use eval to expand a potential ~
12711    eval path="$path"
12712    if test ! -f "$path" && test ! -d "$path"; then
12713      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12714    fi
12715
12716    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12717  fi
12718
12719              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12720$as_echo_n "checking for Boot JDK... " >&6; }
12721              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12722$as_echo "$BOOT_JDK" >&6; }
12723              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12724$as_echo_n "checking Boot JDK version... " >&6; }
12725              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12726              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12727$as_echo "$BOOT_JDK_VERSION" >&6; }
12728            fi # end check jdk version
12729          fi # end check rt.jar
12730        fi # end check javac
12731      fi # end check java
12732    fi # end check boot jdk found
12733  fi
12734
12735    done
12736  fi
12737
12738  fi
12739
12740
12741    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12742    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12743      # Do we have a bin/java?
12744      if test ! -x "$BOOT_JDK/bin/java"; then
12745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12747        BOOT_JDK_FOUND=no
12748      else
12749        # Do we have a bin/javac?
12750        if test ! -x "$BOOT_JDK/bin/javac"; then
12751          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12753          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12754$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12755          BOOT_JDK_FOUND=no
12756        else
12757          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12758          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12761            BOOT_JDK_FOUND=no
12762          else
12763            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12764            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12765
12766            # Extra M4 quote needed to protect [] in grep expression.
12767            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12768            if test "x$FOUND_VERSION_78" = x; then
12769              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12771              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12772$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12773              BOOT_JDK_FOUND=no
12774            else
12775              # We're done! :-)
12776              BOOT_JDK_FOUND=yes
12777
12778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12779
12780  # Input might be given as Windows format, start by converting to
12781  # unix format.
12782  path="$BOOT_JDK"
12783  new_path=`$CYGPATH -u "$path"`
12784
12785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12788  # "foo.exe" is OK but "foo" is an error.
12789  #
12790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12791  # It is also a way to make sure we got the proper file name for the real test later on.
12792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12793  if test "x$test_shortpath" = x; then
12794    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12795$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12796    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12797  fi
12798
12799  # Call helper function which possibly converts this using DOS-style short mode.
12800  # If so, the updated path is stored in $new_path.
12801
12802  input_path="$new_path"
12803  # Check if we need to convert this using DOS-style short mode. If the path
12804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12805  # take no chances and rewrite it.
12806  # Note: m4 eats our [], so we need to use [ and ] instead.
12807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12808  if test "x$has_forbidden_chars" != x; then
12809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12813      # Going to short mode and back again did indeed matter. Since short mode is
12814      # case insensitive, let's make it lowercase to improve readability.
12815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12816      # Now convert it back to Unix-stile (cygpath)
12817      input_path=`$CYGPATH -u "$shortmode_path"`
12818      new_path="$input_path"
12819    fi
12820  fi
12821
12822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12823  if test "x$test_cygdrive_prefix" = x; then
12824    # As a simple fix, exclude /usr/bin since it's not a real path.
12825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12827      # a path prefixed by /cygdrive for fixpath to work.
12828      new_path="$CYGWIN_ROOT_PATH$input_path"
12829    fi
12830  fi
12831
12832
12833  if test "x$path" != "x$new_path"; then
12834    BOOT_JDK="$new_path"
12835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12837  fi
12838
12839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12840
12841  path="$BOOT_JDK"
12842  has_colon=`$ECHO $path | $GREP ^.:`
12843  new_path="$path"
12844  if test "x$has_colon" = x; then
12845    # Not in mixed or Windows style, start by that.
12846    new_path=`cmd //c echo $path`
12847  fi
12848
12849
12850  input_path="$new_path"
12851  # Check if we need to convert this using DOS-style short mode. If the path
12852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12853  # take no chances and rewrite it.
12854  # Note: m4 eats our [], so we need to use [ and ] instead.
12855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12856  if test "x$has_forbidden_chars" != x; then
12857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12859  fi
12860
12861
12862  windows_path="$new_path"
12863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12864    unix_path=`$CYGPATH -u "$windows_path"`
12865    new_path="$unix_path"
12866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12868    new_path="$unix_path"
12869  fi
12870
12871  if test "x$path" != "x$new_path"; then
12872    BOOT_JDK="$new_path"
12873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12874$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12875  fi
12876
12877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12879
12880  else
12881    # We're on a posix platform. Hooray! :)
12882    path="$BOOT_JDK"
12883    has_space=`$ECHO "$path" | $GREP " "`
12884    if test "x$has_space" != x; then
12885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12887      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12888    fi
12889
12890    # Use eval to expand a potential ~
12891    eval path="$path"
12892    if test ! -f "$path" && test ! -d "$path"; then
12893      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12894    fi
12895
12896    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12897  fi
12898
12899              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12900$as_echo_n "checking for Boot JDK... " >&6; }
12901              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12902$as_echo "$BOOT_JDK" >&6; }
12903              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12904$as_echo_n "checking Boot JDK version... " >&6; }
12905              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12906              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12907$as_echo "$BOOT_JDK_VERSION" >&6; }
12908            fi # end check jdk version
12909          fi # end check rt.jar
12910        fi # end check javac
12911      fi # end check java
12912    fi # end check boot jdk found
12913  fi
12914
12915
12916  if test "x$BOOT_JDK_FOUND" = xno; then
12917    # Now execute the test
12918
12919  if test "x$PROGRAMW6432" != x; then
12920    VIRTUAL_DIR="$PROGRAMW6432/Java"
12921
12922  windows_path="$VIRTUAL_DIR"
12923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12924    unix_path=`$CYGPATH -u "$windows_path"`
12925    VIRTUAL_DIR="$unix_path"
12926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12928    VIRTUAL_DIR="$unix_path"
12929  fi
12930
12931
12932  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12933  BOOT_JDK_SUFFIX=""
12934  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12935  if test "x$ALL_JDKS_FOUND" != x; then
12936    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12937
12938  if test "x$BOOT_JDK_FOUND" = xno; then
12939    # Now execute the test
12940
12941        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12942        if test -d "$BOOT_JDK"; then
12943          BOOT_JDK_FOUND=maybe
12944          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12945$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12946        fi
12947
12948
12949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12951      # Do we have a bin/java?
12952      if test ! -x "$BOOT_JDK/bin/java"; then
12953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12955        BOOT_JDK_FOUND=no
12956      else
12957        # Do we have a bin/javac?
12958        if test ! -x "$BOOT_JDK/bin/javac"; then
12959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12963          BOOT_JDK_FOUND=no
12964        else
12965          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12966          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12969            BOOT_JDK_FOUND=no
12970          else
12971            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12972            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12973
12974            # Extra M4 quote needed to protect [] in grep expression.
12975            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12976            if test "x$FOUND_VERSION_78" = x; then
12977              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12979              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12980$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12981              BOOT_JDK_FOUND=no
12982            else
12983              # We're done! :-)
12984              BOOT_JDK_FOUND=yes
12985
12986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12987
12988  # Input might be given as Windows format, start by converting to
12989  # unix format.
12990  path="$BOOT_JDK"
12991  new_path=`$CYGPATH -u "$path"`
12992
12993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12996  # "foo.exe" is OK but "foo" is an error.
12997  #
12998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12999  # It is also a way to make sure we got the proper file name for the real test later on.
13000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13001  if test "x$test_shortpath" = x; then
13002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13004    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13005  fi
13006
13007  # Call helper function which possibly converts this using DOS-style short mode.
13008  # If so, the updated path is stored in $new_path.
13009
13010  input_path="$new_path"
13011  # Check if we need to convert this using DOS-style short mode. If the path
13012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13013  # take no chances and rewrite it.
13014  # Note: m4 eats our [], so we need to use [ and ] instead.
13015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13016  if test "x$has_forbidden_chars" != x; then
13017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13021      # Going to short mode and back again did indeed matter. Since short mode is
13022      # case insensitive, let's make it lowercase to improve readability.
13023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13024      # Now convert it back to Unix-stile (cygpath)
13025      input_path=`$CYGPATH -u "$shortmode_path"`
13026      new_path="$input_path"
13027    fi
13028  fi
13029
13030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13031  if test "x$test_cygdrive_prefix" = x; then
13032    # As a simple fix, exclude /usr/bin since it's not a real path.
13033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13035      # a path prefixed by /cygdrive for fixpath to work.
13036      new_path="$CYGWIN_ROOT_PATH$input_path"
13037    fi
13038  fi
13039
13040
13041  if test "x$path" != "x$new_path"; then
13042    BOOT_JDK="$new_path"
13043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13045  fi
13046
13047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13048
13049  path="$BOOT_JDK"
13050  has_colon=`$ECHO $path | $GREP ^.:`
13051  new_path="$path"
13052  if test "x$has_colon" = x; then
13053    # Not in mixed or Windows style, start by that.
13054    new_path=`cmd //c echo $path`
13055  fi
13056
13057
13058  input_path="$new_path"
13059  # Check if we need to convert this using DOS-style short mode. If the path
13060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13061  # take no chances and rewrite it.
13062  # Note: m4 eats our [], so we need to use [ and ] instead.
13063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13064  if test "x$has_forbidden_chars" != x; then
13065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13067  fi
13068
13069
13070  windows_path="$new_path"
13071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13072    unix_path=`$CYGPATH -u "$windows_path"`
13073    new_path="$unix_path"
13074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13076    new_path="$unix_path"
13077  fi
13078
13079  if test "x$path" != "x$new_path"; then
13080    BOOT_JDK="$new_path"
13081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13083  fi
13084
13085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13087
13088  else
13089    # We're on a posix platform. Hooray! :)
13090    path="$BOOT_JDK"
13091    has_space=`$ECHO "$path" | $GREP " "`
13092    if test "x$has_space" != x; then
13093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13095      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13096    fi
13097
13098    # Use eval to expand a potential ~
13099    eval path="$path"
13100    if test ! -f "$path" && test ! -d "$path"; then
13101      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13102    fi
13103
13104    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13105  fi
13106
13107              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13108$as_echo_n "checking for Boot JDK... " >&6; }
13109              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13110$as_echo "$BOOT_JDK" >&6; }
13111              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13112$as_echo_n "checking Boot JDK version... " >&6; }
13113              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13114              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13115$as_echo "$BOOT_JDK_VERSION" >&6; }
13116            fi # end check jdk version
13117          fi # end check rt.jar
13118        fi # end check javac
13119      fi # end check java
13120    fi # end check boot jdk found
13121  fi
13122
13123    done
13124  fi
13125
13126  fi
13127
13128
13129    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13130    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13131      # Do we have a bin/java?
13132      if test ! -x "$BOOT_JDK/bin/java"; then
13133        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13135        BOOT_JDK_FOUND=no
13136      else
13137        # Do we have a bin/javac?
13138        if test ! -x "$BOOT_JDK/bin/javac"; then
13139          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13141          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13142$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13143          BOOT_JDK_FOUND=no
13144        else
13145          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13146          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13147            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13149            BOOT_JDK_FOUND=no
13150          else
13151            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13153
13154            # Extra M4 quote needed to protect [] in grep expression.
13155            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13156            if test "x$FOUND_VERSION_78" = x; then
13157              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13159              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13160$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13161              BOOT_JDK_FOUND=no
13162            else
13163              # We're done! :-)
13164              BOOT_JDK_FOUND=yes
13165
13166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13167
13168  # Input might be given as Windows format, start by converting to
13169  # unix format.
13170  path="$BOOT_JDK"
13171  new_path=`$CYGPATH -u "$path"`
13172
13173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13176  # "foo.exe" is OK but "foo" is an error.
13177  #
13178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13179  # It is also a way to make sure we got the proper file name for the real test later on.
13180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13181  if test "x$test_shortpath" = x; then
13182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13183$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13184    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13185  fi
13186
13187  # Call helper function which possibly converts this using DOS-style short mode.
13188  # If so, the updated path is stored in $new_path.
13189
13190  input_path="$new_path"
13191  # Check if we need to convert this using DOS-style short mode. If the path
13192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13193  # take no chances and rewrite it.
13194  # Note: m4 eats our [], so we need to use [ and ] instead.
13195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13196  if test "x$has_forbidden_chars" != x; then
13197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13201      # Going to short mode and back again did indeed matter. Since short mode is
13202      # case insensitive, let's make it lowercase to improve readability.
13203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13204      # Now convert it back to Unix-stile (cygpath)
13205      input_path=`$CYGPATH -u "$shortmode_path"`
13206      new_path="$input_path"
13207    fi
13208  fi
13209
13210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13211  if test "x$test_cygdrive_prefix" = x; then
13212    # As a simple fix, exclude /usr/bin since it's not a real path.
13213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13215      # a path prefixed by /cygdrive for fixpath to work.
13216      new_path="$CYGWIN_ROOT_PATH$input_path"
13217    fi
13218  fi
13219
13220
13221  if test "x$path" != "x$new_path"; then
13222    BOOT_JDK="$new_path"
13223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13224$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13225  fi
13226
13227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13228
13229  path="$BOOT_JDK"
13230  has_colon=`$ECHO $path | $GREP ^.:`
13231  new_path="$path"
13232  if test "x$has_colon" = x; then
13233    # Not in mixed or Windows style, start by that.
13234    new_path=`cmd //c echo $path`
13235  fi
13236
13237
13238  input_path="$new_path"
13239  # Check if we need to convert this using DOS-style short mode. If the path
13240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13241  # take no chances and rewrite it.
13242  # Note: m4 eats our [], so we need to use [ and ] instead.
13243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13244  if test "x$has_forbidden_chars" != x; then
13245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13247  fi
13248
13249
13250  windows_path="$new_path"
13251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13252    unix_path=`$CYGPATH -u "$windows_path"`
13253    new_path="$unix_path"
13254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13256    new_path="$unix_path"
13257  fi
13258
13259  if test "x$path" != "x$new_path"; then
13260    BOOT_JDK="$new_path"
13261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13263  fi
13264
13265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13267
13268  else
13269    # We're on a posix platform. Hooray! :)
13270    path="$BOOT_JDK"
13271    has_space=`$ECHO "$path" | $GREP " "`
13272    if test "x$has_space" != x; then
13273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13274$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13275      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13276    fi
13277
13278    # Use eval to expand a potential ~
13279    eval path="$path"
13280    if test ! -f "$path" && test ! -d "$path"; then
13281      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13282    fi
13283
13284    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13285  fi
13286
13287              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13288$as_echo_n "checking for Boot JDK... " >&6; }
13289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13290$as_echo "$BOOT_JDK" >&6; }
13291              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13292$as_echo_n "checking Boot JDK version... " >&6; }
13293              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13294              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13295$as_echo "$BOOT_JDK_VERSION" >&6; }
13296            fi # end check jdk version
13297          fi # end check rt.jar
13298        fi # end check javac
13299      fi # end check java
13300    fi # end check boot jdk found
13301  fi
13302
13303
13304  if test "x$BOOT_JDK_FOUND" = xno; then
13305    # Now execute the test
13306
13307  if test "x$PROGRAMFILES" != x; then
13308    VIRTUAL_DIR="$PROGRAMFILES/Java"
13309
13310  windows_path="$VIRTUAL_DIR"
13311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13312    unix_path=`$CYGPATH -u "$windows_path"`
13313    VIRTUAL_DIR="$unix_path"
13314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13316    VIRTUAL_DIR="$unix_path"
13317  fi
13318
13319
13320  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13321  BOOT_JDK_SUFFIX=""
13322  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13323  if test "x$ALL_JDKS_FOUND" != x; then
13324    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13325
13326  if test "x$BOOT_JDK_FOUND" = xno; then
13327    # Now execute the test
13328
13329        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13330        if test -d "$BOOT_JDK"; then
13331          BOOT_JDK_FOUND=maybe
13332          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13333$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13334        fi
13335
13336
13337    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13338    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13339      # Do we have a bin/java?
13340      if test ! -x "$BOOT_JDK/bin/java"; then
13341        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13343        BOOT_JDK_FOUND=no
13344      else
13345        # Do we have a bin/javac?
13346        if test ! -x "$BOOT_JDK/bin/javac"; then
13347          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13350$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13351          BOOT_JDK_FOUND=no
13352        else
13353          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13354          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13357            BOOT_JDK_FOUND=no
13358          else
13359            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13361
13362            # Extra M4 quote needed to protect [] in grep expression.
13363            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13364            if test "x$FOUND_VERSION_78" = x; then
13365              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13367              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13368$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13369              BOOT_JDK_FOUND=no
13370            else
13371              # We're done! :-)
13372              BOOT_JDK_FOUND=yes
13373
13374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13375
13376  # Input might be given as Windows format, start by converting to
13377  # unix format.
13378  path="$BOOT_JDK"
13379  new_path=`$CYGPATH -u "$path"`
13380
13381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13384  # "foo.exe" is OK but "foo" is an error.
13385  #
13386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13387  # It is also a way to make sure we got the proper file name for the real test later on.
13388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13389  if test "x$test_shortpath" = x; then
13390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13392    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13393  fi
13394
13395  # Call helper function which possibly converts this using DOS-style short mode.
13396  # If so, the updated path is stored in $new_path.
13397
13398  input_path="$new_path"
13399  # Check if we need to convert this using DOS-style short mode. If the path
13400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13401  # take no chances and rewrite it.
13402  # Note: m4 eats our [], so we need to use [ and ] instead.
13403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13404  if test "x$has_forbidden_chars" != x; then
13405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13409      # Going to short mode and back again did indeed matter. Since short mode is
13410      # case insensitive, let's make it lowercase to improve readability.
13411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13412      # Now convert it back to Unix-stile (cygpath)
13413      input_path=`$CYGPATH -u "$shortmode_path"`
13414      new_path="$input_path"
13415    fi
13416  fi
13417
13418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13419  if test "x$test_cygdrive_prefix" = x; then
13420    # As a simple fix, exclude /usr/bin since it's not a real path.
13421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13423      # a path prefixed by /cygdrive for fixpath to work.
13424      new_path="$CYGWIN_ROOT_PATH$input_path"
13425    fi
13426  fi
13427
13428
13429  if test "x$path" != "x$new_path"; then
13430    BOOT_JDK="$new_path"
13431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13432$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13433  fi
13434
13435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13436
13437  path="$BOOT_JDK"
13438  has_colon=`$ECHO $path | $GREP ^.:`
13439  new_path="$path"
13440  if test "x$has_colon" = x; then
13441    # Not in mixed or Windows style, start by that.
13442    new_path=`cmd //c echo $path`
13443  fi
13444
13445
13446  input_path="$new_path"
13447  # Check if we need to convert this using DOS-style short mode. If the path
13448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13449  # take no chances and rewrite it.
13450  # Note: m4 eats our [], so we need to use [ and ] instead.
13451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13452  if test "x$has_forbidden_chars" != x; then
13453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13455  fi
13456
13457
13458  windows_path="$new_path"
13459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13460    unix_path=`$CYGPATH -u "$windows_path"`
13461    new_path="$unix_path"
13462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13464    new_path="$unix_path"
13465  fi
13466
13467  if test "x$path" != "x$new_path"; then
13468    BOOT_JDK="$new_path"
13469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13471  fi
13472
13473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13475
13476  else
13477    # We're on a posix platform. Hooray! :)
13478    path="$BOOT_JDK"
13479    has_space=`$ECHO "$path" | $GREP " "`
13480    if test "x$has_space" != x; then
13481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13483      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13484    fi
13485
13486    # Use eval to expand a potential ~
13487    eval path="$path"
13488    if test ! -f "$path" && test ! -d "$path"; then
13489      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13490    fi
13491
13492    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13493  fi
13494
13495              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13496$as_echo_n "checking for Boot JDK... " >&6; }
13497              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13498$as_echo "$BOOT_JDK" >&6; }
13499              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13500$as_echo_n "checking Boot JDK version... " >&6; }
13501              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13502              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13503$as_echo "$BOOT_JDK_VERSION" >&6; }
13504            fi # end check jdk version
13505          fi # end check rt.jar
13506        fi # end check javac
13507      fi # end check java
13508    fi # end check boot jdk found
13509  fi
13510
13511    done
13512  fi
13513
13514  fi
13515
13516
13517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13519      # Do we have a bin/java?
13520      if test ! -x "$BOOT_JDK/bin/java"; then
13521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13523        BOOT_JDK_FOUND=no
13524      else
13525        # Do we have a bin/javac?
13526        if test ! -x "$BOOT_JDK/bin/javac"; then
13527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13531          BOOT_JDK_FOUND=no
13532        else
13533          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13534          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13535            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13537            BOOT_JDK_FOUND=no
13538          else
13539            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13540            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13541
13542            # Extra M4 quote needed to protect [] in grep expression.
13543            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13544            if test "x$FOUND_VERSION_78" = x; then
13545              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13547              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13548$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13549              BOOT_JDK_FOUND=no
13550            else
13551              # We're done! :-)
13552              BOOT_JDK_FOUND=yes
13553
13554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13555
13556  # Input might be given as Windows format, start by converting to
13557  # unix format.
13558  path="$BOOT_JDK"
13559  new_path=`$CYGPATH -u "$path"`
13560
13561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13564  # "foo.exe" is OK but "foo" is an error.
13565  #
13566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13567  # It is also a way to make sure we got the proper file name for the real test later on.
13568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13569  if test "x$test_shortpath" = x; then
13570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13572    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13573  fi
13574
13575  # Call helper function which possibly converts this using DOS-style short mode.
13576  # If so, the updated path is stored in $new_path.
13577
13578  input_path="$new_path"
13579  # Check if we need to convert this using DOS-style short mode. If the path
13580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13581  # take no chances and rewrite it.
13582  # Note: m4 eats our [], so we need to use [ and ] instead.
13583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13584  if test "x$has_forbidden_chars" != x; then
13585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13589      # Going to short mode and back again did indeed matter. Since short mode is
13590      # case insensitive, let's make it lowercase to improve readability.
13591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13592      # Now convert it back to Unix-stile (cygpath)
13593      input_path=`$CYGPATH -u "$shortmode_path"`
13594      new_path="$input_path"
13595    fi
13596  fi
13597
13598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13599  if test "x$test_cygdrive_prefix" = x; then
13600    # As a simple fix, exclude /usr/bin since it's not a real path.
13601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13603      # a path prefixed by /cygdrive for fixpath to work.
13604      new_path="$CYGWIN_ROOT_PATH$input_path"
13605    fi
13606  fi
13607
13608
13609  if test "x$path" != "x$new_path"; then
13610    BOOT_JDK="$new_path"
13611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13613  fi
13614
13615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13616
13617  path="$BOOT_JDK"
13618  has_colon=`$ECHO $path | $GREP ^.:`
13619  new_path="$path"
13620  if test "x$has_colon" = x; then
13621    # Not in mixed or Windows style, start by that.
13622    new_path=`cmd //c echo $path`
13623  fi
13624
13625
13626  input_path="$new_path"
13627  # Check if we need to convert this using DOS-style short mode. If the path
13628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13629  # take no chances and rewrite it.
13630  # Note: m4 eats our [], so we need to use [ and ] instead.
13631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13632  if test "x$has_forbidden_chars" != x; then
13633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13635  fi
13636
13637
13638  windows_path="$new_path"
13639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13640    unix_path=`$CYGPATH -u "$windows_path"`
13641    new_path="$unix_path"
13642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13644    new_path="$unix_path"
13645  fi
13646
13647  if test "x$path" != "x$new_path"; then
13648    BOOT_JDK="$new_path"
13649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13651  fi
13652
13653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13655
13656  else
13657    # We're on a posix platform. Hooray! :)
13658    path="$BOOT_JDK"
13659    has_space=`$ECHO "$path" | $GREP " "`
13660    if test "x$has_space" != x; then
13661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13663      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13664    fi
13665
13666    # Use eval to expand a potential ~
13667    eval path="$path"
13668    if test ! -f "$path" && test ! -d "$path"; then
13669      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13670    fi
13671
13672    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13673  fi
13674
13675              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13676$as_echo_n "checking for Boot JDK... " >&6; }
13677              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13678$as_echo "$BOOT_JDK" >&6; }
13679              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13680$as_echo_n "checking Boot JDK version... " >&6; }
13681              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13682              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13683$as_echo "$BOOT_JDK_VERSION" >&6; }
13684            fi # end check jdk version
13685          fi # end check rt.jar
13686        fi # end check javac
13687      fi # end check java
13688    fi # end check boot jdk found
13689  fi
13690
13691
13692  if test "x$BOOT_JDK_FOUND" = xno; then
13693    # Now execute the test
13694
13695  if test "x$ProgramFiles" != x; then
13696    VIRTUAL_DIR="$ProgramFiles/Java"
13697
13698  windows_path="$VIRTUAL_DIR"
13699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13700    unix_path=`$CYGPATH -u "$windows_path"`
13701    VIRTUAL_DIR="$unix_path"
13702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13704    VIRTUAL_DIR="$unix_path"
13705  fi
13706
13707
13708  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13709  BOOT_JDK_SUFFIX=""
13710  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13711  if test "x$ALL_JDKS_FOUND" != x; then
13712    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13713
13714  if test "x$BOOT_JDK_FOUND" = xno; then
13715    # Now execute the test
13716
13717        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13718        if test -d "$BOOT_JDK"; then
13719          BOOT_JDK_FOUND=maybe
13720          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13721$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13722        fi
13723
13724
13725    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13726    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13727      # Do we have a bin/java?
13728      if test ! -x "$BOOT_JDK/bin/java"; then
13729        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13731        BOOT_JDK_FOUND=no
13732      else
13733        # Do we have a bin/javac?
13734        if test ! -x "$BOOT_JDK/bin/javac"; then
13735          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13737          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13738$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13739          BOOT_JDK_FOUND=no
13740        else
13741          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13742          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13743            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13745            BOOT_JDK_FOUND=no
13746          else
13747            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13749
13750            # Extra M4 quote needed to protect [] in grep expression.
13751            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13752            if test "x$FOUND_VERSION_78" = x; then
13753              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13755              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13756$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13757              BOOT_JDK_FOUND=no
13758            else
13759              # We're done! :-)
13760              BOOT_JDK_FOUND=yes
13761
13762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13763
13764  # Input might be given as Windows format, start by converting to
13765  # unix format.
13766  path="$BOOT_JDK"
13767  new_path=`$CYGPATH -u "$path"`
13768
13769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13772  # "foo.exe" is OK but "foo" is an error.
13773  #
13774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13775  # It is also a way to make sure we got the proper file name for the real test later on.
13776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13777  if test "x$test_shortpath" = x; then
13778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13780    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13781  fi
13782
13783  # Call helper function which possibly converts this using DOS-style short mode.
13784  # If so, the updated path is stored in $new_path.
13785
13786  input_path="$new_path"
13787  # Check if we need to convert this using DOS-style short mode. If the path
13788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13789  # take no chances and rewrite it.
13790  # Note: m4 eats our [], so we need to use [ and ] instead.
13791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13792  if test "x$has_forbidden_chars" != x; then
13793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13797      # Going to short mode and back again did indeed matter. Since short mode is
13798      # case insensitive, let's make it lowercase to improve readability.
13799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13800      # Now convert it back to Unix-stile (cygpath)
13801      input_path=`$CYGPATH -u "$shortmode_path"`
13802      new_path="$input_path"
13803    fi
13804  fi
13805
13806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13807  if test "x$test_cygdrive_prefix" = x; then
13808    # As a simple fix, exclude /usr/bin since it's not a real path.
13809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13811      # a path prefixed by /cygdrive for fixpath to work.
13812      new_path="$CYGWIN_ROOT_PATH$input_path"
13813    fi
13814  fi
13815
13816
13817  if test "x$path" != "x$new_path"; then
13818    BOOT_JDK="$new_path"
13819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13820$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13821  fi
13822
13823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13824
13825  path="$BOOT_JDK"
13826  has_colon=`$ECHO $path | $GREP ^.:`
13827  new_path="$path"
13828  if test "x$has_colon" = x; then
13829    # Not in mixed or Windows style, start by that.
13830    new_path=`cmd //c echo $path`
13831  fi
13832
13833
13834  input_path="$new_path"
13835  # Check if we need to convert this using DOS-style short mode. If the path
13836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13837  # take no chances and rewrite it.
13838  # Note: m4 eats our [], so we need to use [ and ] instead.
13839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13840  if test "x$has_forbidden_chars" != x; then
13841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13843  fi
13844
13845
13846  windows_path="$new_path"
13847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13848    unix_path=`$CYGPATH -u "$windows_path"`
13849    new_path="$unix_path"
13850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13852    new_path="$unix_path"
13853  fi
13854
13855  if test "x$path" != "x$new_path"; then
13856    BOOT_JDK="$new_path"
13857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13859  fi
13860
13861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13863
13864  else
13865    # We're on a posix platform. Hooray! :)
13866    path="$BOOT_JDK"
13867    has_space=`$ECHO "$path" | $GREP " "`
13868    if test "x$has_space" != x; then
13869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13871      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13872    fi
13873
13874    # Use eval to expand a potential ~
13875    eval path="$path"
13876    if test ! -f "$path" && test ! -d "$path"; then
13877      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13878    fi
13879
13880    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13881  fi
13882
13883              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13884$as_echo_n "checking for Boot JDK... " >&6; }
13885              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13886$as_echo "$BOOT_JDK" >&6; }
13887              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13888$as_echo_n "checking Boot JDK version... " >&6; }
13889              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13890              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13891$as_echo "$BOOT_JDK_VERSION" >&6; }
13892            fi # end check jdk version
13893          fi # end check rt.jar
13894        fi # end check javac
13895      fi # end check java
13896    fi # end check boot jdk found
13897  fi
13898
13899    done
13900  fi
13901
13902  fi
13903
13904
13905    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13906    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13907      # Do we have a bin/java?
13908      if test ! -x "$BOOT_JDK/bin/java"; then
13909        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13911        BOOT_JDK_FOUND=no
13912      else
13913        # Do we have a bin/javac?
13914        if test ! -x "$BOOT_JDK/bin/javac"; then
13915          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13917          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13918$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13919          BOOT_JDK_FOUND=no
13920        else
13921          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13922          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13923            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13925            BOOT_JDK_FOUND=no
13926          else
13927            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13928            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13929
13930            # Extra M4 quote needed to protect [] in grep expression.
13931            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13932            if test "x$FOUND_VERSION_78" = x; then
13933              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13935              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13936$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13937              BOOT_JDK_FOUND=no
13938            else
13939              # We're done! :-)
13940              BOOT_JDK_FOUND=yes
13941
13942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13943
13944  # Input might be given as Windows format, start by converting to
13945  # unix format.
13946  path="$BOOT_JDK"
13947  new_path=`$CYGPATH -u "$path"`
13948
13949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13952  # "foo.exe" is OK but "foo" is an error.
13953  #
13954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13955  # It is also a way to make sure we got the proper file name for the real test later on.
13956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13957  if test "x$test_shortpath" = x; then
13958    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13960    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13961  fi
13962
13963  # Call helper function which possibly converts this using DOS-style short mode.
13964  # If so, the updated path is stored in $new_path.
13965
13966  input_path="$new_path"
13967  # Check if we need to convert this using DOS-style short mode. If the path
13968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13969  # take no chances and rewrite it.
13970  # Note: m4 eats our [], so we need to use [ and ] instead.
13971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13972  if test "x$has_forbidden_chars" != x; then
13973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13974    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13975    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13976    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13977      # Going to short mode and back again did indeed matter. Since short mode is
13978      # case insensitive, let's make it lowercase to improve readability.
13979      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13980      # Now convert it back to Unix-stile (cygpath)
13981      input_path=`$CYGPATH -u "$shortmode_path"`
13982      new_path="$input_path"
13983    fi
13984  fi
13985
13986  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13987  if test "x$test_cygdrive_prefix" = x; then
13988    # As a simple fix, exclude /usr/bin since it's not a real path.
13989    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13990      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13991      # a path prefixed by /cygdrive for fixpath to work.
13992      new_path="$CYGWIN_ROOT_PATH$input_path"
13993    fi
13994  fi
13995
13996
13997  if test "x$path" != "x$new_path"; then
13998    BOOT_JDK="$new_path"
13999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14001  fi
14002
14003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14004
14005  path="$BOOT_JDK"
14006  has_colon=`$ECHO $path | $GREP ^.:`
14007  new_path="$path"
14008  if test "x$has_colon" = x; then
14009    # Not in mixed or Windows style, start by that.
14010    new_path=`cmd //c echo $path`
14011  fi
14012
14013
14014  input_path="$new_path"
14015  # Check if we need to convert this using DOS-style short mode. If the path
14016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14017  # take no chances and rewrite it.
14018  # Note: m4 eats our [], so we need to use [ and ] instead.
14019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14020  if test "x$has_forbidden_chars" != x; then
14021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14023  fi
14024
14025
14026  windows_path="$new_path"
14027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14028    unix_path=`$CYGPATH -u "$windows_path"`
14029    new_path="$unix_path"
14030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14032    new_path="$unix_path"
14033  fi
14034
14035  if test "x$path" != "x$new_path"; then
14036    BOOT_JDK="$new_path"
14037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14039  fi
14040
14041  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14042  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14043
14044  else
14045    # We're on a posix platform. Hooray! :)
14046    path="$BOOT_JDK"
14047    has_space=`$ECHO "$path" | $GREP " "`
14048    if test "x$has_space" != x; then
14049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14050$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14051      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14052    fi
14053
14054    # Use eval to expand a potential ~
14055    eval path="$path"
14056    if test ! -f "$path" && test ! -d "$path"; then
14057      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14058    fi
14059
14060    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14061  fi
14062
14063              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14064$as_echo_n "checking for Boot JDK... " >&6; }
14065              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14066$as_echo "$BOOT_JDK" >&6; }
14067              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14068$as_echo_n "checking Boot JDK version... " >&6; }
14069              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14070              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14071$as_echo "$BOOT_JDK_VERSION" >&6; }
14072            fi # end check jdk version
14073          fi # end check rt.jar
14074        fi # end check javac
14075      fi # end check java
14076    fi # end check boot jdk found
14077  fi
14078
14079
14080  if test "x$BOOT_JDK_FOUND" = xno; then
14081    # Now execute the test
14082
14083  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14084  BOOT_JDK_SUFFIX=""
14085  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14086  if test "x$ALL_JDKS_FOUND" != x; then
14087    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14088
14089  if test "x$BOOT_JDK_FOUND" = xno; then
14090    # Now execute the test
14091
14092        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14093        if test -d "$BOOT_JDK"; then
14094          BOOT_JDK_FOUND=maybe
14095          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14096$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14097        fi
14098
14099
14100    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14101    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14102      # Do we have a bin/java?
14103      if test ! -x "$BOOT_JDK/bin/java"; then
14104        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14106        BOOT_JDK_FOUND=no
14107      else
14108        # Do we have a bin/javac?
14109        if test ! -x "$BOOT_JDK/bin/javac"; then
14110          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14112          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14113$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14114          BOOT_JDK_FOUND=no
14115        else
14116          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14117          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14118            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14120            BOOT_JDK_FOUND=no
14121          else
14122            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14123            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14124
14125            # Extra M4 quote needed to protect [] in grep expression.
14126            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14127            if test "x$FOUND_VERSION_78" = x; then
14128              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14130              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14131$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14132              BOOT_JDK_FOUND=no
14133            else
14134              # We're done! :-)
14135              BOOT_JDK_FOUND=yes
14136
14137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14138
14139  # Input might be given as Windows format, start by converting to
14140  # unix format.
14141  path="$BOOT_JDK"
14142  new_path=`$CYGPATH -u "$path"`
14143
14144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14147  # "foo.exe" is OK but "foo" is an error.
14148  #
14149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14150  # It is also a way to make sure we got the proper file name for the real test later on.
14151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14152  if test "x$test_shortpath" = x; then
14153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14155    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14156  fi
14157
14158  # Call helper function which possibly converts this using DOS-style short mode.
14159  # If so, the updated path is stored in $new_path.
14160
14161  input_path="$new_path"
14162  # Check if we need to convert this using DOS-style short mode. If the path
14163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14164  # take no chances and rewrite it.
14165  # Note: m4 eats our [], so we need to use [ and ] instead.
14166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14167  if test "x$has_forbidden_chars" != x; then
14168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14172      # Going to short mode and back again did indeed matter. Since short mode is
14173      # case insensitive, let's make it lowercase to improve readability.
14174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14175      # Now convert it back to Unix-stile (cygpath)
14176      input_path=`$CYGPATH -u "$shortmode_path"`
14177      new_path="$input_path"
14178    fi
14179  fi
14180
14181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14182  if test "x$test_cygdrive_prefix" = x; then
14183    # As a simple fix, exclude /usr/bin since it's not a real path.
14184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14186      # a path prefixed by /cygdrive for fixpath to work.
14187      new_path="$CYGWIN_ROOT_PATH$input_path"
14188    fi
14189  fi
14190
14191
14192  if test "x$path" != "x$new_path"; then
14193    BOOT_JDK="$new_path"
14194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14195$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14196  fi
14197
14198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14199
14200  path="$BOOT_JDK"
14201  has_colon=`$ECHO $path | $GREP ^.:`
14202  new_path="$path"
14203  if test "x$has_colon" = x; then
14204    # Not in mixed or Windows style, start by that.
14205    new_path=`cmd //c echo $path`
14206  fi
14207
14208
14209  input_path="$new_path"
14210  # Check if we need to convert this using DOS-style short mode. If the path
14211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14212  # take no chances and rewrite it.
14213  # Note: m4 eats our [], so we need to use [ and ] instead.
14214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14215  if test "x$has_forbidden_chars" != x; then
14216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14218  fi
14219
14220
14221  windows_path="$new_path"
14222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14223    unix_path=`$CYGPATH -u "$windows_path"`
14224    new_path="$unix_path"
14225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14227    new_path="$unix_path"
14228  fi
14229
14230  if test "x$path" != "x$new_path"; then
14231    BOOT_JDK="$new_path"
14232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14234  fi
14235
14236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14238
14239  else
14240    # We're on a posix platform. Hooray! :)
14241    path="$BOOT_JDK"
14242    has_space=`$ECHO "$path" | $GREP " "`
14243    if test "x$has_space" != x; then
14244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14246      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14247    fi
14248
14249    # Use eval to expand a potential ~
14250    eval path="$path"
14251    if test ! -f "$path" && test ! -d "$path"; then
14252      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14253    fi
14254
14255    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14256  fi
14257
14258              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14259$as_echo_n "checking for Boot JDK... " >&6; }
14260              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14261$as_echo "$BOOT_JDK" >&6; }
14262              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14263$as_echo_n "checking Boot JDK version... " >&6; }
14264              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14265              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14266$as_echo "$BOOT_JDK_VERSION" >&6; }
14267            fi # end check jdk version
14268          fi # end check rt.jar
14269        fi # end check javac
14270      fi # end check java
14271    fi # end check boot jdk found
14272  fi
14273
14274    done
14275  fi
14276
14277
14278    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14279    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14280      # Do we have a bin/java?
14281      if test ! -x "$BOOT_JDK/bin/java"; then
14282        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14284        BOOT_JDK_FOUND=no
14285      else
14286        # Do we have a bin/javac?
14287        if test ! -x "$BOOT_JDK/bin/javac"; then
14288          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14290          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14291$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14292          BOOT_JDK_FOUND=no
14293        else
14294          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14295          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14298            BOOT_JDK_FOUND=no
14299          else
14300            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14301            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14302
14303            # Extra M4 quote needed to protect [] in grep expression.
14304            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14305            if test "x$FOUND_VERSION_78" = x; then
14306              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14308              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14309$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14310              BOOT_JDK_FOUND=no
14311            else
14312              # We're done! :-)
14313              BOOT_JDK_FOUND=yes
14314
14315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14316
14317  # Input might be given as Windows format, start by converting to
14318  # unix format.
14319  path="$BOOT_JDK"
14320  new_path=`$CYGPATH -u "$path"`
14321
14322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14325  # "foo.exe" is OK but "foo" is an error.
14326  #
14327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14328  # It is also a way to make sure we got the proper file name for the real test later on.
14329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14330  if test "x$test_shortpath" = x; then
14331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14332$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14333    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14334  fi
14335
14336  # Call helper function which possibly converts this using DOS-style short mode.
14337  # If so, the updated path is stored in $new_path.
14338
14339  input_path="$new_path"
14340  # Check if we need to convert this using DOS-style short mode. If the path
14341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14342  # take no chances and rewrite it.
14343  # Note: m4 eats our [], so we need to use [ and ] instead.
14344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14345  if test "x$has_forbidden_chars" != x; then
14346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14350      # Going to short mode and back again did indeed matter. Since short mode is
14351      # case insensitive, let's make it lowercase to improve readability.
14352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14353      # Now convert it back to Unix-stile (cygpath)
14354      input_path=`$CYGPATH -u "$shortmode_path"`
14355      new_path="$input_path"
14356    fi
14357  fi
14358
14359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14360  if test "x$test_cygdrive_prefix" = x; then
14361    # As a simple fix, exclude /usr/bin since it's not a real path.
14362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14364      # a path prefixed by /cygdrive for fixpath to work.
14365      new_path="$CYGWIN_ROOT_PATH$input_path"
14366    fi
14367  fi
14368
14369
14370  if test "x$path" != "x$new_path"; then
14371    BOOT_JDK="$new_path"
14372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14373$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14374  fi
14375
14376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14377
14378  path="$BOOT_JDK"
14379  has_colon=`$ECHO $path | $GREP ^.:`
14380  new_path="$path"
14381  if test "x$has_colon" = x; then
14382    # Not in mixed or Windows style, start by that.
14383    new_path=`cmd //c echo $path`
14384  fi
14385
14386
14387  input_path="$new_path"
14388  # Check if we need to convert this using DOS-style short mode. If the path
14389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14390  # take no chances and rewrite it.
14391  # Note: m4 eats our [], so we need to use [ and ] instead.
14392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14393  if test "x$has_forbidden_chars" != x; then
14394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14396  fi
14397
14398
14399  windows_path="$new_path"
14400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14401    unix_path=`$CYGPATH -u "$windows_path"`
14402    new_path="$unix_path"
14403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14405    new_path="$unix_path"
14406  fi
14407
14408  if test "x$path" != "x$new_path"; then
14409    BOOT_JDK="$new_path"
14410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14412  fi
14413
14414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14416
14417  else
14418    # We're on a posix platform. Hooray! :)
14419    path="$BOOT_JDK"
14420    has_space=`$ECHO "$path" | $GREP " "`
14421    if test "x$has_space" != x; then
14422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14424      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14425    fi
14426
14427    # Use eval to expand a potential ~
14428    eval path="$path"
14429    if test ! -f "$path" && test ! -d "$path"; then
14430      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14431    fi
14432
14433    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14434  fi
14435
14436              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14437$as_echo_n "checking for Boot JDK... " >&6; }
14438              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14439$as_echo "$BOOT_JDK" >&6; }
14440              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14441$as_echo_n "checking Boot JDK version... " >&6; }
14442              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14443              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14444$as_echo "$BOOT_JDK_VERSION" >&6; }
14445            fi # end check jdk version
14446          fi # end check rt.jar
14447        fi # end check javac
14448      fi # end check java
14449    fi # end check boot jdk found
14450  fi
14451
14452  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14453
14454  if test "x$BOOT_JDK_FOUND" = xno; then
14455    # Now execute the test
14456
14457  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14458  BOOT_JDK_SUFFIX="/Contents/Home"
14459  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14460  if test "x$ALL_JDKS_FOUND" != x; then
14461    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14462
14463  if test "x$BOOT_JDK_FOUND" = xno; then
14464    # Now execute the test
14465
14466        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14467        if test -d "$BOOT_JDK"; then
14468          BOOT_JDK_FOUND=maybe
14469          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14470$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14471        fi
14472
14473
14474    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14475    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14476      # Do we have a bin/java?
14477      if test ! -x "$BOOT_JDK/bin/java"; then
14478        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14480        BOOT_JDK_FOUND=no
14481      else
14482        # Do we have a bin/javac?
14483        if test ! -x "$BOOT_JDK/bin/javac"; then
14484          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14486          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14487$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14488          BOOT_JDK_FOUND=no
14489        else
14490          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14491          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14492            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14494            BOOT_JDK_FOUND=no
14495          else
14496            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14497            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14498
14499            # Extra M4 quote needed to protect [] in grep expression.
14500            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14501            if test "x$FOUND_VERSION_78" = x; then
14502              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14504              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14505$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14506              BOOT_JDK_FOUND=no
14507            else
14508              # We're done! :-)
14509              BOOT_JDK_FOUND=yes
14510
14511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14512
14513  # Input might be given as Windows format, start by converting to
14514  # unix format.
14515  path="$BOOT_JDK"
14516  new_path=`$CYGPATH -u "$path"`
14517
14518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14521  # "foo.exe" is OK but "foo" is an error.
14522  #
14523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14524  # It is also a way to make sure we got the proper file name for the real test later on.
14525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14526  if test "x$test_shortpath" = x; then
14527    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14529    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14530  fi
14531
14532  # Call helper function which possibly converts this using DOS-style short mode.
14533  # If so, the updated path is stored in $new_path.
14534
14535  input_path="$new_path"
14536  # Check if we need to convert this using DOS-style short mode. If the path
14537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14538  # take no chances and rewrite it.
14539  # Note: m4 eats our [], so we need to use [ and ] instead.
14540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14541  if test "x$has_forbidden_chars" != x; then
14542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14546      # Going to short mode and back again did indeed matter. Since short mode is
14547      # case insensitive, let's make it lowercase to improve readability.
14548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14549      # Now convert it back to Unix-stile (cygpath)
14550      input_path=`$CYGPATH -u "$shortmode_path"`
14551      new_path="$input_path"
14552    fi
14553  fi
14554
14555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14556  if test "x$test_cygdrive_prefix" = x; then
14557    # As a simple fix, exclude /usr/bin since it's not a real path.
14558    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14560      # a path prefixed by /cygdrive for fixpath to work.
14561      new_path="$CYGWIN_ROOT_PATH$input_path"
14562    fi
14563  fi
14564
14565
14566  if test "x$path" != "x$new_path"; then
14567    BOOT_JDK="$new_path"
14568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14570  fi
14571
14572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14573
14574  path="$BOOT_JDK"
14575  has_colon=`$ECHO $path | $GREP ^.:`
14576  new_path="$path"
14577  if test "x$has_colon" = x; then
14578    # Not in mixed or Windows style, start by that.
14579    new_path=`cmd //c echo $path`
14580  fi
14581
14582
14583  input_path="$new_path"
14584  # Check if we need to convert this using DOS-style short mode. If the path
14585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14586  # take no chances and rewrite it.
14587  # Note: m4 eats our [], so we need to use [ and ] instead.
14588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14589  if test "x$has_forbidden_chars" != x; then
14590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14592  fi
14593
14594
14595  windows_path="$new_path"
14596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14597    unix_path=`$CYGPATH -u "$windows_path"`
14598    new_path="$unix_path"
14599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14601    new_path="$unix_path"
14602  fi
14603
14604  if test "x$path" != "x$new_path"; then
14605    BOOT_JDK="$new_path"
14606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14607$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14608  fi
14609
14610  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14611  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14612
14613  else
14614    # We're on a posix platform. Hooray! :)
14615    path="$BOOT_JDK"
14616    has_space=`$ECHO "$path" | $GREP " "`
14617    if test "x$has_space" != x; then
14618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14619$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14620      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14621    fi
14622
14623    # Use eval to expand a potential ~
14624    eval path="$path"
14625    if test ! -f "$path" && test ! -d "$path"; then
14626      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14627    fi
14628
14629    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14630  fi
14631
14632              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14633$as_echo_n "checking for Boot JDK... " >&6; }
14634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14635$as_echo "$BOOT_JDK" >&6; }
14636              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14637$as_echo_n "checking Boot JDK version... " >&6; }
14638              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14639              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14640$as_echo "$BOOT_JDK_VERSION" >&6; }
14641            fi # end check jdk version
14642          fi # end check rt.jar
14643        fi # end check javac
14644      fi # end check java
14645    fi # end check boot jdk found
14646  fi
14647
14648    done
14649  fi
14650
14651
14652    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14653    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14654      # Do we have a bin/java?
14655      if test ! -x "$BOOT_JDK/bin/java"; then
14656        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14658        BOOT_JDK_FOUND=no
14659      else
14660        # Do we have a bin/javac?
14661        if test ! -x "$BOOT_JDK/bin/javac"; then
14662          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14664          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14665$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14666          BOOT_JDK_FOUND=no
14667        else
14668          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14669          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14670            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14672            BOOT_JDK_FOUND=no
14673          else
14674            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14676
14677            # Extra M4 quote needed to protect [] in grep expression.
14678            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14679            if test "x$FOUND_VERSION_78" = x; then
14680              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14682              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14683$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14684              BOOT_JDK_FOUND=no
14685            else
14686              # We're done! :-)
14687              BOOT_JDK_FOUND=yes
14688
14689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14690
14691  # Input might be given as Windows format, start by converting to
14692  # unix format.
14693  path="$BOOT_JDK"
14694  new_path=`$CYGPATH -u "$path"`
14695
14696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14699  # "foo.exe" is OK but "foo" is an error.
14700  #
14701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14702  # It is also a way to make sure we got the proper file name for the real test later on.
14703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14704  if test "x$test_shortpath" = x; then
14705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14706$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14707    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14708  fi
14709
14710  # Call helper function which possibly converts this using DOS-style short mode.
14711  # If so, the updated path is stored in $new_path.
14712
14713  input_path="$new_path"
14714  # Check if we need to convert this using DOS-style short mode. If the path
14715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14716  # take no chances and rewrite it.
14717  # Note: m4 eats our [], so we need to use [ and ] instead.
14718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14719  if test "x$has_forbidden_chars" != x; then
14720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14724      # Going to short mode and back again did indeed matter. Since short mode is
14725      # case insensitive, let's make it lowercase to improve readability.
14726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14727      # Now convert it back to Unix-stile (cygpath)
14728      input_path=`$CYGPATH -u "$shortmode_path"`
14729      new_path="$input_path"
14730    fi
14731  fi
14732
14733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14734  if test "x$test_cygdrive_prefix" = x; then
14735    # As a simple fix, exclude /usr/bin since it's not a real path.
14736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14738      # a path prefixed by /cygdrive for fixpath to work.
14739      new_path="$CYGWIN_ROOT_PATH$input_path"
14740    fi
14741  fi
14742
14743
14744  if test "x$path" != "x$new_path"; then
14745    BOOT_JDK="$new_path"
14746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14748  fi
14749
14750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14751
14752  path="$BOOT_JDK"
14753  has_colon=`$ECHO $path | $GREP ^.:`
14754  new_path="$path"
14755  if test "x$has_colon" = x; then
14756    # Not in mixed or Windows style, start by that.
14757    new_path=`cmd //c echo $path`
14758  fi
14759
14760
14761  input_path="$new_path"
14762  # Check if we need to convert this using DOS-style short mode. If the path
14763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14764  # take no chances and rewrite it.
14765  # Note: m4 eats our [], so we need to use [ and ] instead.
14766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14767  if test "x$has_forbidden_chars" != x; then
14768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14770  fi
14771
14772
14773  windows_path="$new_path"
14774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14775    unix_path=`$CYGPATH -u "$windows_path"`
14776    new_path="$unix_path"
14777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14779    new_path="$unix_path"
14780  fi
14781
14782  if test "x$path" != "x$new_path"; then
14783    BOOT_JDK="$new_path"
14784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14785$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14786  fi
14787
14788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14790
14791  else
14792    # We're on a posix platform. Hooray! :)
14793    path="$BOOT_JDK"
14794    has_space=`$ECHO "$path" | $GREP " "`
14795    if test "x$has_space" != x; then
14796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14798      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14799    fi
14800
14801    # Use eval to expand a potential ~
14802    eval path="$path"
14803    if test ! -f "$path" && test ! -d "$path"; then
14804      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14805    fi
14806
14807    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14808  fi
14809
14810              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14811$as_echo_n "checking for Boot JDK... " >&6; }
14812              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14813$as_echo "$BOOT_JDK" >&6; }
14814              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14815$as_echo_n "checking Boot JDK version... " >&6; }
14816              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14817              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14818$as_echo "$BOOT_JDK_VERSION" >&6; }
14819            fi # end check jdk version
14820          fi # end check rt.jar
14821        fi # end check javac
14822      fi # end check java
14823    fi # end check boot jdk found
14824  fi
14825
14826
14827  if test "x$BOOT_JDK_FOUND" = xno; then
14828    # Now execute the test
14829
14830  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14831  BOOT_JDK_SUFFIX="/Contents/Home"
14832  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14833  if test "x$ALL_JDKS_FOUND" != x; then
14834    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14835
14836  if test "x$BOOT_JDK_FOUND" = xno; then
14837    # Now execute the test
14838
14839        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14840        if test -d "$BOOT_JDK"; then
14841          BOOT_JDK_FOUND=maybe
14842          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14843$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14844        fi
14845
14846
14847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14849      # Do we have a bin/java?
14850      if test ! -x "$BOOT_JDK/bin/java"; then
14851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14853        BOOT_JDK_FOUND=no
14854      else
14855        # Do we have a bin/javac?
14856        if test ! -x "$BOOT_JDK/bin/javac"; then
14857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14861          BOOT_JDK_FOUND=no
14862        else
14863          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14864          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14867            BOOT_JDK_FOUND=no
14868          else
14869            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14870            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14871
14872            # Extra M4 quote needed to protect [] in grep expression.
14873            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14874            if test "x$FOUND_VERSION_78" = x; then
14875              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14877              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14878$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14879              BOOT_JDK_FOUND=no
14880            else
14881              # We're done! :-)
14882              BOOT_JDK_FOUND=yes
14883
14884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14885
14886  # Input might be given as Windows format, start by converting to
14887  # unix format.
14888  path="$BOOT_JDK"
14889  new_path=`$CYGPATH -u "$path"`
14890
14891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14894  # "foo.exe" is OK but "foo" is an error.
14895  #
14896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14897  # It is also a way to make sure we got the proper file name for the real test later on.
14898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14899  if test "x$test_shortpath" = x; then
14900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14902    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14903  fi
14904
14905  # Call helper function which possibly converts this using DOS-style short mode.
14906  # If so, the updated path is stored in $new_path.
14907
14908  input_path="$new_path"
14909  # Check if we need to convert this using DOS-style short mode. If the path
14910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14911  # take no chances and rewrite it.
14912  # Note: m4 eats our [], so we need to use [ and ] instead.
14913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14914  if test "x$has_forbidden_chars" != x; then
14915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14919      # Going to short mode and back again did indeed matter. Since short mode is
14920      # case insensitive, let's make it lowercase to improve readability.
14921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14922      # Now convert it back to Unix-stile (cygpath)
14923      input_path=`$CYGPATH -u "$shortmode_path"`
14924      new_path="$input_path"
14925    fi
14926  fi
14927
14928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14929  if test "x$test_cygdrive_prefix" = x; then
14930    # As a simple fix, exclude /usr/bin since it's not a real path.
14931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14933      # a path prefixed by /cygdrive for fixpath to work.
14934      new_path="$CYGWIN_ROOT_PATH$input_path"
14935    fi
14936  fi
14937
14938
14939  if test "x$path" != "x$new_path"; then
14940    BOOT_JDK="$new_path"
14941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14943  fi
14944
14945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14946
14947  path="$BOOT_JDK"
14948  has_colon=`$ECHO $path | $GREP ^.:`
14949  new_path="$path"
14950  if test "x$has_colon" = x; then
14951    # Not in mixed or Windows style, start by that.
14952    new_path=`cmd //c echo $path`
14953  fi
14954
14955
14956  input_path="$new_path"
14957  # Check if we need to convert this using DOS-style short mode. If the path
14958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14959  # take no chances and rewrite it.
14960  # Note: m4 eats our [], so we need to use [ and ] instead.
14961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14962  if test "x$has_forbidden_chars" != x; then
14963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14965  fi
14966
14967
14968  windows_path="$new_path"
14969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14970    unix_path=`$CYGPATH -u "$windows_path"`
14971    new_path="$unix_path"
14972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14974    new_path="$unix_path"
14975  fi
14976
14977  if test "x$path" != "x$new_path"; then
14978    BOOT_JDK="$new_path"
14979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14981  fi
14982
14983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14985
14986  else
14987    # We're on a posix platform. Hooray! :)
14988    path="$BOOT_JDK"
14989    has_space=`$ECHO "$path" | $GREP " "`
14990    if test "x$has_space" != x; then
14991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14993      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14994    fi
14995
14996    # Use eval to expand a potential ~
14997    eval path="$path"
14998    if test ! -f "$path" && test ! -d "$path"; then
14999      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15000    fi
15001
15002    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15003  fi
15004
15005              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15006$as_echo_n "checking for Boot JDK... " >&6; }
15007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15008$as_echo "$BOOT_JDK" >&6; }
15009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15010$as_echo_n "checking Boot JDK version... " >&6; }
15011              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15013$as_echo "$BOOT_JDK_VERSION" >&6; }
15014            fi # end check jdk version
15015          fi # end check rt.jar
15016        fi # end check javac
15017      fi # end check java
15018    fi # end check boot jdk found
15019  fi
15020
15021    done
15022  fi
15023
15024
15025    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15026    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15027      # Do we have a bin/java?
15028      if test ! -x "$BOOT_JDK/bin/java"; then
15029        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15031        BOOT_JDK_FOUND=no
15032      else
15033        # Do we have a bin/javac?
15034        if test ! -x "$BOOT_JDK/bin/javac"; then
15035          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15037          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15038$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15039          BOOT_JDK_FOUND=no
15040        else
15041          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15042          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15043            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15045            BOOT_JDK_FOUND=no
15046          else
15047            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15048            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15049
15050            # Extra M4 quote needed to protect [] in grep expression.
15051            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15052            if test "x$FOUND_VERSION_78" = x; then
15053              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15055              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15056$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15057              BOOT_JDK_FOUND=no
15058            else
15059              # We're done! :-)
15060              BOOT_JDK_FOUND=yes
15061
15062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15063
15064  # Input might be given as Windows format, start by converting to
15065  # unix format.
15066  path="$BOOT_JDK"
15067  new_path=`$CYGPATH -u "$path"`
15068
15069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15072  # "foo.exe" is OK but "foo" is an error.
15073  #
15074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15075  # It is also a way to make sure we got the proper file name for the real test later on.
15076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15077  if test "x$test_shortpath" = x; then
15078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15080    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15081  fi
15082
15083  # Call helper function which possibly converts this using DOS-style short mode.
15084  # If so, the updated path is stored in $new_path.
15085
15086  input_path="$new_path"
15087  # Check if we need to convert this using DOS-style short mode. If the path
15088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15089  # take no chances and rewrite it.
15090  # Note: m4 eats our [], so we need to use [ and ] instead.
15091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15092  if test "x$has_forbidden_chars" != x; then
15093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15097      # Going to short mode and back again did indeed matter. Since short mode is
15098      # case insensitive, let's make it lowercase to improve readability.
15099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15100      # Now convert it back to Unix-stile (cygpath)
15101      input_path=`$CYGPATH -u "$shortmode_path"`
15102      new_path="$input_path"
15103    fi
15104  fi
15105
15106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15107  if test "x$test_cygdrive_prefix" = x; then
15108    # As a simple fix, exclude /usr/bin since it's not a real path.
15109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15111      # a path prefixed by /cygdrive for fixpath to work.
15112      new_path="$CYGWIN_ROOT_PATH$input_path"
15113    fi
15114  fi
15115
15116
15117  if test "x$path" != "x$new_path"; then
15118    BOOT_JDK="$new_path"
15119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15121  fi
15122
15123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15124
15125  path="$BOOT_JDK"
15126  has_colon=`$ECHO $path | $GREP ^.:`
15127  new_path="$path"
15128  if test "x$has_colon" = x; then
15129    # Not in mixed or Windows style, start by that.
15130    new_path=`cmd //c echo $path`
15131  fi
15132
15133
15134  input_path="$new_path"
15135  # Check if we need to convert this using DOS-style short mode. If the path
15136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15137  # take no chances and rewrite it.
15138  # Note: m4 eats our [], so we need to use [ and ] instead.
15139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15140  if test "x$has_forbidden_chars" != x; then
15141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15143  fi
15144
15145
15146  windows_path="$new_path"
15147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15148    unix_path=`$CYGPATH -u "$windows_path"`
15149    new_path="$unix_path"
15150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15152    new_path="$unix_path"
15153  fi
15154
15155  if test "x$path" != "x$new_path"; then
15156    BOOT_JDK="$new_path"
15157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15159  fi
15160
15161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15163
15164  else
15165    # We're on a posix platform. Hooray! :)
15166    path="$BOOT_JDK"
15167    has_space=`$ECHO "$path" | $GREP " "`
15168    if test "x$has_space" != x; then
15169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15171      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15172    fi
15173
15174    # Use eval to expand a potential ~
15175    eval path="$path"
15176    if test ! -f "$path" && test ! -d "$path"; then
15177      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15178    fi
15179
15180    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15181  fi
15182
15183              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15184$as_echo_n "checking for Boot JDK... " >&6; }
15185              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15186$as_echo "$BOOT_JDK" >&6; }
15187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15188$as_echo_n "checking Boot JDK version... " >&6; }
15189              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15190              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15191$as_echo "$BOOT_JDK_VERSION" >&6; }
15192            fi # end check jdk version
15193          fi # end check rt.jar
15194        fi # end check javac
15195      fi # end check java
15196    fi # end check boot jdk found
15197  fi
15198
15199  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15200
15201  if test "x$BOOT_JDK_FOUND" = xno; then
15202    # Now execute the test
15203
15204  BOOT_JDK_PREFIX="/usr/lib/jvm"
15205  BOOT_JDK_SUFFIX=""
15206  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15207  if test "x$ALL_JDKS_FOUND" != x; then
15208    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15209
15210  if test "x$BOOT_JDK_FOUND" = xno; then
15211    # Now execute the test
15212
15213        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15214        if test -d "$BOOT_JDK"; then
15215          BOOT_JDK_FOUND=maybe
15216          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15217$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15218        fi
15219
15220
15221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15223      # Do we have a bin/java?
15224      if test ! -x "$BOOT_JDK/bin/java"; then
15225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15227        BOOT_JDK_FOUND=no
15228      else
15229        # Do we have a bin/javac?
15230        if test ! -x "$BOOT_JDK/bin/javac"; then
15231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15235          BOOT_JDK_FOUND=no
15236        else
15237          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15238          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15239            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15241            BOOT_JDK_FOUND=no
15242          else
15243            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15245
15246            # Extra M4 quote needed to protect [] in grep expression.
15247            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15248            if test "x$FOUND_VERSION_78" = x; then
15249              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15251              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15252$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15253              BOOT_JDK_FOUND=no
15254            else
15255              # We're done! :-)
15256              BOOT_JDK_FOUND=yes
15257
15258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15259
15260  # Input might be given as Windows format, start by converting to
15261  # unix format.
15262  path="$BOOT_JDK"
15263  new_path=`$CYGPATH -u "$path"`
15264
15265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15268  # "foo.exe" is OK but "foo" is an error.
15269  #
15270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15271  # It is also a way to make sure we got the proper file name for the real test later on.
15272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15273  if test "x$test_shortpath" = x; then
15274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15277  fi
15278
15279  # Call helper function which possibly converts this using DOS-style short mode.
15280  # If so, the updated path is stored in $new_path.
15281
15282  input_path="$new_path"
15283  # Check if we need to convert this using DOS-style short mode. If the path
15284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15285  # take no chances and rewrite it.
15286  # Note: m4 eats our [], so we need to use [ and ] instead.
15287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15288  if test "x$has_forbidden_chars" != x; then
15289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15293      # Going to short mode and back again did indeed matter. Since short mode is
15294      # case insensitive, let's make it lowercase to improve readability.
15295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15296      # Now convert it back to Unix-stile (cygpath)
15297      input_path=`$CYGPATH -u "$shortmode_path"`
15298      new_path="$input_path"
15299    fi
15300  fi
15301
15302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15303  if test "x$test_cygdrive_prefix" = x; then
15304    # As a simple fix, exclude /usr/bin since it's not a real path.
15305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15307      # a path prefixed by /cygdrive for fixpath to work.
15308      new_path="$CYGWIN_ROOT_PATH$input_path"
15309    fi
15310  fi
15311
15312
15313  if test "x$path" != "x$new_path"; then
15314    BOOT_JDK="$new_path"
15315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15317  fi
15318
15319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15320
15321  path="$BOOT_JDK"
15322  has_colon=`$ECHO $path | $GREP ^.:`
15323  new_path="$path"
15324  if test "x$has_colon" = x; then
15325    # Not in mixed or Windows style, start by that.
15326    new_path=`cmd //c echo $path`
15327  fi
15328
15329
15330  input_path="$new_path"
15331  # Check if we need to convert this using DOS-style short mode. If the path
15332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15333  # take no chances and rewrite it.
15334  # Note: m4 eats our [], so we need to use [ and ] instead.
15335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15336  if test "x$has_forbidden_chars" != x; then
15337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15339  fi
15340
15341
15342  windows_path="$new_path"
15343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15344    unix_path=`$CYGPATH -u "$windows_path"`
15345    new_path="$unix_path"
15346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15348    new_path="$unix_path"
15349  fi
15350
15351  if test "x$path" != "x$new_path"; then
15352    BOOT_JDK="$new_path"
15353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15355  fi
15356
15357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15359
15360  else
15361    # We're on a posix platform. Hooray! :)
15362    path="$BOOT_JDK"
15363    has_space=`$ECHO "$path" | $GREP " "`
15364    if test "x$has_space" != x; then
15365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15367      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15368    fi
15369
15370    # Use eval to expand a potential ~
15371    eval path="$path"
15372    if test ! -f "$path" && test ! -d "$path"; then
15373      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15374    fi
15375
15376    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15377  fi
15378
15379              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15380$as_echo_n "checking for Boot JDK... " >&6; }
15381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15382$as_echo "$BOOT_JDK" >&6; }
15383              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15384$as_echo_n "checking Boot JDK version... " >&6; }
15385              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15386              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15387$as_echo "$BOOT_JDK_VERSION" >&6; }
15388            fi # end check jdk version
15389          fi # end check rt.jar
15390        fi # end check javac
15391      fi # end check java
15392    fi # end check boot jdk found
15393  fi
15394
15395    done
15396  fi
15397
15398
15399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15401      # Do we have a bin/java?
15402      if test ! -x "$BOOT_JDK/bin/java"; then
15403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15405        BOOT_JDK_FOUND=no
15406      else
15407        # Do we have a bin/javac?
15408        if test ! -x "$BOOT_JDK/bin/javac"; then
15409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15413          BOOT_JDK_FOUND=no
15414        else
15415          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15416          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15417            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15419            BOOT_JDK_FOUND=no
15420          else
15421            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15422            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15423
15424            # Extra M4 quote needed to protect [] in grep expression.
15425            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15426            if test "x$FOUND_VERSION_78" = x; then
15427              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15429              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15430$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15431              BOOT_JDK_FOUND=no
15432            else
15433              # We're done! :-)
15434              BOOT_JDK_FOUND=yes
15435
15436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15437
15438  # Input might be given as Windows format, start by converting to
15439  # unix format.
15440  path="$BOOT_JDK"
15441  new_path=`$CYGPATH -u "$path"`
15442
15443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15446  # "foo.exe" is OK but "foo" is an error.
15447  #
15448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15449  # It is also a way to make sure we got the proper file name for the real test later on.
15450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15451  if test "x$test_shortpath" = x; then
15452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15454    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15455  fi
15456
15457  # Call helper function which possibly converts this using DOS-style short mode.
15458  # If so, the updated path is stored in $new_path.
15459
15460  input_path="$new_path"
15461  # Check if we need to convert this using DOS-style short mode. If the path
15462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15463  # take no chances and rewrite it.
15464  # Note: m4 eats our [], so we need to use [ and ] instead.
15465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15466  if test "x$has_forbidden_chars" != x; then
15467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15471      # Going to short mode and back again did indeed matter. Since short mode is
15472      # case insensitive, let's make it lowercase to improve readability.
15473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15474      # Now convert it back to Unix-stile (cygpath)
15475      input_path=`$CYGPATH -u "$shortmode_path"`
15476      new_path="$input_path"
15477    fi
15478  fi
15479
15480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15481  if test "x$test_cygdrive_prefix" = x; then
15482    # As a simple fix, exclude /usr/bin since it's not a real path.
15483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15485      # a path prefixed by /cygdrive for fixpath to work.
15486      new_path="$CYGWIN_ROOT_PATH$input_path"
15487    fi
15488  fi
15489
15490
15491  if test "x$path" != "x$new_path"; then
15492    BOOT_JDK="$new_path"
15493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15495  fi
15496
15497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15498
15499  path="$BOOT_JDK"
15500  has_colon=`$ECHO $path | $GREP ^.:`
15501  new_path="$path"
15502  if test "x$has_colon" = x; then
15503    # Not in mixed or Windows style, start by that.
15504    new_path=`cmd //c echo $path`
15505  fi
15506
15507
15508  input_path="$new_path"
15509  # Check if we need to convert this using DOS-style short mode. If the path
15510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15511  # take no chances and rewrite it.
15512  # Note: m4 eats our [], so we need to use [ and ] instead.
15513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15514  if test "x$has_forbidden_chars" != x; then
15515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15517  fi
15518
15519
15520  windows_path="$new_path"
15521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15522    unix_path=`$CYGPATH -u "$windows_path"`
15523    new_path="$unix_path"
15524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15526    new_path="$unix_path"
15527  fi
15528
15529  if test "x$path" != "x$new_path"; then
15530    BOOT_JDK="$new_path"
15531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15533  fi
15534
15535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15537
15538  else
15539    # We're on a posix platform. Hooray! :)
15540    path="$BOOT_JDK"
15541    has_space=`$ECHO "$path" | $GREP " "`
15542    if test "x$has_space" != x; then
15543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15546    fi
15547
15548    # Use eval to expand a potential ~
15549    eval path="$path"
15550    if test ! -f "$path" && test ! -d "$path"; then
15551      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15552    fi
15553
15554    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15555  fi
15556
15557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15558$as_echo_n "checking for Boot JDK... " >&6; }
15559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15560$as_echo "$BOOT_JDK" >&6; }
15561              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15562$as_echo_n "checking Boot JDK version... " >&6; }
15563              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15564              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15565$as_echo "$BOOT_JDK_VERSION" >&6; }
15566            fi # end check jdk version
15567          fi # end check rt.jar
15568        fi # end check javac
15569      fi # end check java
15570    fi # end check boot jdk found
15571  fi
15572
15573  fi
15574
15575
15576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15578      # Do we have a bin/java?
15579      if test ! -x "$BOOT_JDK/bin/java"; then
15580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15582        BOOT_JDK_FOUND=no
15583      else
15584        # Do we have a bin/javac?
15585        if test ! -x "$BOOT_JDK/bin/javac"; then
15586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15590          BOOT_JDK_FOUND=no
15591        else
15592          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15593          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15596            BOOT_JDK_FOUND=no
15597          else
15598            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15600
15601            # Extra M4 quote needed to protect [] in grep expression.
15602            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15603            if test "x$FOUND_VERSION_78" = x; then
15604              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15606              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15607$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15608              BOOT_JDK_FOUND=no
15609            else
15610              # We're done! :-)
15611              BOOT_JDK_FOUND=yes
15612
15613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15614
15615  # Input might be given as Windows format, start by converting to
15616  # unix format.
15617  path="$BOOT_JDK"
15618  new_path=`$CYGPATH -u "$path"`
15619
15620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15623  # "foo.exe" is OK but "foo" is an error.
15624  #
15625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15626  # It is also a way to make sure we got the proper file name for the real test later on.
15627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15628  if test "x$test_shortpath" = x; then
15629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15632  fi
15633
15634  # Call helper function which possibly converts this using DOS-style short mode.
15635  # If so, the updated path is stored in $new_path.
15636
15637  input_path="$new_path"
15638  # Check if we need to convert this using DOS-style short mode. If the path
15639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15640  # take no chances and rewrite it.
15641  # Note: m4 eats our [], so we need to use [ and ] instead.
15642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15643  if test "x$has_forbidden_chars" != x; then
15644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15648      # Going to short mode and back again did indeed matter. Since short mode is
15649      # case insensitive, let's make it lowercase to improve readability.
15650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15651      # Now convert it back to Unix-stile (cygpath)
15652      input_path=`$CYGPATH -u "$shortmode_path"`
15653      new_path="$input_path"
15654    fi
15655  fi
15656
15657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15658  if test "x$test_cygdrive_prefix" = x; then
15659    # As a simple fix, exclude /usr/bin since it's not a real path.
15660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15662      # a path prefixed by /cygdrive for fixpath to work.
15663      new_path="$CYGWIN_ROOT_PATH$input_path"
15664    fi
15665  fi
15666
15667
15668  if test "x$path" != "x$new_path"; then
15669    BOOT_JDK="$new_path"
15670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15672  fi
15673
15674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15675
15676  path="$BOOT_JDK"
15677  has_colon=`$ECHO $path | $GREP ^.:`
15678  new_path="$path"
15679  if test "x$has_colon" = x; then
15680    # Not in mixed or Windows style, start by that.
15681    new_path=`cmd //c echo $path`
15682  fi
15683
15684
15685  input_path="$new_path"
15686  # Check if we need to convert this using DOS-style short mode. If the path
15687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15688  # take no chances and rewrite it.
15689  # Note: m4 eats our [], so we need to use [ and ] instead.
15690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15691  if test "x$has_forbidden_chars" != x; then
15692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15694  fi
15695
15696
15697  windows_path="$new_path"
15698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15699    unix_path=`$CYGPATH -u "$windows_path"`
15700    new_path="$unix_path"
15701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15703    new_path="$unix_path"
15704  fi
15705
15706  if test "x$path" != "x$new_path"; then
15707    BOOT_JDK="$new_path"
15708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15710  fi
15711
15712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15714
15715  else
15716    # We're on a posix platform. Hooray! :)
15717    path="$BOOT_JDK"
15718    has_space=`$ECHO "$path" | $GREP " "`
15719    if test "x$has_space" != x; then
15720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15722      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15723    fi
15724
15725    # Use eval to expand a potential ~
15726    eval path="$path"
15727    if test ! -f "$path" && test ! -d "$path"; then
15728      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15729    fi
15730
15731    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15732  fi
15733
15734              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15735$as_echo_n "checking for Boot JDK... " >&6; }
15736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15737$as_echo "$BOOT_JDK" >&6; }
15738              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15739$as_echo_n "checking Boot JDK version... " >&6; }
15740              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15741              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15742$as_echo "$BOOT_JDK_VERSION" >&6; }
15743            fi # end check jdk version
15744          fi # end check rt.jar
15745        fi # end check javac
15746      fi # end check java
15747    fi # end check boot jdk found
15748  fi
15749
15750
15751  # If we haven't found anything yet, we've truly lost. Give up.
15752  if test "x$BOOT_JDK_FOUND" = xno; then
15753
15754  # Print a helpful message on how to acquire the necessary build dependency.
15755  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15756  MISSING_DEPENDENCY=openjdk
15757
15758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15759    cygwin_help $MISSING_DEPENDENCY
15760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15761    msys_help $MISSING_DEPENDENCY
15762  else
15763    PKGHANDLER_COMMAND=
15764
15765    case $PKGHANDLER in
15766      apt-get)
15767        apt_help     $MISSING_DEPENDENCY ;;
15768      yum)
15769        yum_help     $MISSING_DEPENDENCY ;;
15770      port)
15771        port_help    $MISSING_DEPENDENCY ;;
15772      pkgutil)
15773        pkgutil_help $MISSING_DEPENDENCY ;;
15774      pkgadd)
15775        pkgadd_help  $MISSING_DEPENDENCY ;;
15776      * )
15777        break ;;
15778    esac
15779
15780    if test "x$PKGHANDLER_COMMAND" != x; then
15781      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15782    fi
15783  fi
15784
15785    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15786$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15787    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15788$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15789    as_fn_error $? "Cannot continue" "$LINENO" 5
15790  fi
15791
15792  # Setup proper paths for what we found
15793  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15794  if test ! -f "$BOOT_RTJAR"; then
15795    # On MacOSX it is called classes.jar
15796    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15797    if test -f "$BOOT_RTJAR"; then
15798      # Remove the ..
15799      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15800    fi
15801  fi
15802  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15803  BOOT_JDK="$BOOT_JDK"
15804
15805
15806
15807
15808  # Setup tools from the Boot JDK.
15809
15810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15811$as_echo_n "checking for java in Boot JDK... " >&6; }
15812  JAVA=$BOOT_JDK/bin/java
15813  if test ! -x $JAVA; 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 java 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 javac in Boot JDK" >&5
15825$as_echo_n "checking for javac in Boot JDK... " >&6; }
15826  JAVAC=$BOOT_JDK/bin/javac
15827  if test ! -x $JAVAC; 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 javac 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 javah in Boot JDK" >&5
15839$as_echo_n "checking for javah in Boot JDK... " >&6; }
15840  JAVAH=$BOOT_JDK/bin/javah
15841  if test ! -x $JAVAH; 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 javah 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 javap in Boot JDK" >&5
15853$as_echo_n "checking for javap in Boot JDK... " >&6; }
15854  JAVAP=$BOOT_JDK/bin/javap
15855  if test ! -x $JAVAP; 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 javap 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  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15867$as_echo_n "checking for jar in Boot JDK... " >&6; }
15868  JAR=$BOOT_JDK/bin/jar
15869  if test ! -x $JAR; then
15870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15871$as_echo "not found" >&6; }
15872    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15873$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15874    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15875  fi
15876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15877$as_echo "ok" >&6; }
15878
15879
15880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15881$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15882  RMIC=$BOOT_JDK/bin/rmic
15883  if test ! -x $RMIC; then
15884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15885$as_echo "not found" >&6; }
15886    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15887$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15888    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15889  fi
15890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15891$as_echo "ok" >&6; }
15892
15893
15894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15895$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15896  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15897  if test ! -x $NATIVE2ASCII; then
15898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15899$as_echo "not found" >&6; }
15900    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15901$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15902    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15903  fi
15904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15905$as_echo "ok" >&6; }
15906
15907
15908  # Finally, set some other options...
15909
15910  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15911  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15912
15913
15914
15915
15916  ##############################################################################
15917  #
15918  # Specify options for anything that is run with the Boot JDK.
15919  #
15920
15921# Check whether --with-boot-jdk-jvmargs was given.
15922if test "${with_boot_jdk_jvmargs+set}" = set; then :
15923  withval=$with_boot_jdk_jvmargs;
15924fi
15925
15926
15927  if test "x$with_boot_jdk_jvmargs" = x; then
15928    # Not all JVM:s accept the same arguments on the command line.
15929    # OpenJDK specific increase in thread stack for JDK build,
15930    # well more specifically, when running javac.
15931    if test "x$BUILD_NUM_BITS" = x32; then
15932      STACK_SIZE=768
15933    else
15934      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15935      # since 64-bit pointers are pushed on the stach. Apparently, we need
15936      # to increase the stack space when javacing the JDK....
15937      STACK_SIZE=1536
15938    fi
15939
15940    # Minimum amount of heap memory.
15941
15942  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15943  $ECHO "Command: $JAVA -Xms64M -version" >&5
15944  OUTPUT=`$JAVA -Xms64M -version 2>&1`
15945  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15946  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15947  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15948    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15949    JVM_ARG_OK=true
15950  else
15951    $ECHO "Arg failed:" >&5
15952    $ECHO "$OUTPUT" >&5
15953    JVM_ARG_OK=false
15954  fi
15955
15956    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15957      # Why does macosx need more heap? Its the huge JDK batch.
15958
15959  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15960  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15961  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15962  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15963  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15964  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15965    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15966    JVM_ARG_OK=true
15967  else
15968    $ECHO "Arg failed:" >&5
15969    $ECHO "$OUTPUT" >&5
15970    JVM_ARG_OK=false
15971  fi
15972
15973    else
15974
15975  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15976  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15977  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15978  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15979  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15980  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15981    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15982    JVM_ARG_OK=true
15983  else
15984    $ECHO "Arg failed:" >&5
15985    $ECHO "$OUTPUT" >&5
15986    JVM_ARG_OK=false
15987  fi
15988
15989    fi
15990    # When is adding -client something that speeds up the JVM?
15991    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15992
15993  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15994  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15995  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15996  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15997  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15998  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15999    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16000    JVM_ARG_OK=true
16001  else
16002    $ECHO "Arg failed:" >&5
16003    $ECHO "$OUTPUT" >&5
16004    JVM_ARG_OK=false
16005  fi
16006
16007
16008  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16009  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16010  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16011  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16012  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16013  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16014    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16015    JVM_ARG_OK=true
16016  else
16017    $ECHO "Arg failed:" >&5
16018    $ECHO "$OUTPUT" >&5
16019    JVM_ARG_OK=false
16020  fi
16021
16022
16023  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16024  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16025  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16026  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16027  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16028  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16029    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16030    JVM_ARG_OK=true
16031  else
16032    $ECHO "Arg failed:" >&5
16033    $ECHO "$OUTPUT" >&5
16034    JVM_ARG_OK=false
16035  fi
16036
16037    # Disable special log output when a debug build is used as Boot JDK...
16038
16039  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16040  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16041  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16042  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16043  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16044  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16045    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16046    JVM_ARG_OK=true
16047  else
16048    $ECHO "Arg failed:" >&5
16049    $ECHO "$OUTPUT" >&5
16050    JVM_ARG_OK=false
16051  fi
16052
16053  fi
16054
16055  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16056
16057
16058
16059###############################################################################
16060#
16061# Configure the sources to use. We can add or override individual directories.
16062#
16063###############################################################################
16064
16065
16066  # Where are the sources. Any of these can be overridden
16067  # using --with-override-corba and the likes.
16068  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16069  CORBA_TOPDIR="$SRC_ROOT/corba"
16070  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16071  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16072  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16073  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16074  JDK_TOPDIR="$SRC_ROOT/jdk"
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085  ###############################################################################
16086  #
16087  # Pickup additional source for a component from outside of the source root
16088  # or override source for a component.
16089  #
16090
16091# Check whether --with-add-source-root was given.
16092if test "${with_add_source_root+set}" = set; then :
16093  withval=$with_add_source_root;
16094fi
16095
16096
16097
16098# Check whether --with-override-source-root was given.
16099if test "${with_override_source_root+set}" = set; then :
16100  withval=$with_override_source_root;
16101fi
16102
16103
16104
16105# Check whether --with-adds-and-overrides was given.
16106if test "${with_adds_and_overrides+set}" = set; then :
16107  withval=$with_adds_and_overrides;
16108fi
16109
16110
16111  if test "x$with_adds_and_overrides" != x; then
16112    with_add_source_root="$with_adds_and_overrides/adds"
16113    with_override_source_root="$with_adds_and_overrides/overrides"
16114  fi
16115
16116  if test "x$with_add_source_root" != x; then
16117    if ! test -d $with_add_source_root; then
16118      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16119    fi
16120    CURDIR="$PWD"
16121    cd "$with_add_source_root"
16122    ADD_SRC_ROOT="`pwd`"
16123    cd "$CURDIR"
16124    # Verify that the addon source root does not have any root makefiles.
16125    # If it does, then it is usually an error, prevent this.
16126    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16127      test -f $with_add_source_root/langtools/make/Makefile; then
16128      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
16129    fi
16130    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16131      test -f $with_add_source_root/corba/make/Makefile; then
16132      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
16133    fi
16134    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16135      test -f $with_add_source_root/jaxp/make/Makefile; then
16136      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
16137    fi
16138    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16139      test -f $with_add_source_root/jaxws/make/Makefile; then
16140      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
16141    fi
16142    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16143      test -f $with_add_source_root/hotspot/make/Makefile; then
16144      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
16145    fi
16146    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16147      test -f $with_add_source_root/nashorn/make/Makefile; then
16148      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16149    fi
16150    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16151      test -f $with_add_source_root/jdk/make/Makefile; then
16152      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
16153    fi
16154  fi
16155
16156
16157  if test "x$with_override_source_root" != x; then
16158    if ! test -d $with_override_source_root; then
16159      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16160    fi
16161    CURDIR="$PWD"
16162    cd "$with_override_source_root"
16163    OVERRIDE_SRC_ROOT="`pwd`"
16164    cd "$CURDIR"
16165    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16166      test -f $with_override_source_root/langtools/make/Makefile; then
16167      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
16168    fi
16169    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16170      test -f $with_override_source_root/corba/make/Makefile; then
16171      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
16172    fi
16173    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16174      test -f $with_override_source_root/jaxp/make/Makefile; then
16175      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
16176    fi
16177    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16178      test -f $with_override_source_root/jaxws/make/Makefile; then
16179      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
16180    fi
16181    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16182      test -f $with_override_source_root/hotspot/make/Makefile; then
16183      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
16184    fi
16185    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16186      test -f $with_override_source_root/nashorn/make/Makefile; then
16187      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16188    fi
16189    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16190      test -f $with_override_source_root/jdk/make/Makefile; then
16191      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
16192    fi
16193  fi
16194
16195
16196  ###############################################################################
16197  #
16198  # Override a repo completely, this is used for example when you have 3 small
16199  # development sandboxes of the langtools sources and want to avoid having 3 full
16200  # OpenJDK sources checked out on disk.
16201  #
16202  # Assuming that the 3 langtools sandboxes are located here:
16203  # /home/fredrik/sandbox1/langtools
16204  # /home/fredrik/sandbox2/langtools
16205  # /home/fredrik/sandbox3/langtools
16206  #
16207  # From the source root you create build subdirs manually:
16208  #     mkdir -p build1 build2 build3
16209  # in each build directory run:
16210  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16211  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16212  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16213  #
16214
16215
16216# Check whether --with-override-langtools was given.
16217if test "${with_override_langtools+set}" = set; then :
16218  withval=$with_override_langtools;
16219fi
16220
16221
16222
16223# Check whether --with-override-corba was given.
16224if test "${with_override_corba+set}" = set; then :
16225  withval=$with_override_corba;
16226fi
16227
16228
16229
16230# Check whether --with-override-jaxp was given.
16231if test "${with_override_jaxp+set}" = set; then :
16232  withval=$with_override_jaxp;
16233fi
16234
16235
16236
16237# Check whether --with-override-jaxws was given.
16238if test "${with_override_jaxws+set}" = set; then :
16239  withval=$with_override_jaxws;
16240fi
16241
16242
16243
16244# Check whether --with-override-hotspot was given.
16245if test "${with_override_hotspot+set}" = set; then :
16246  withval=$with_override_hotspot;
16247fi
16248
16249
16250
16251# Check whether --with-override-nashorn was given.
16252if test "${with_override_nashorn+set}" = set; then :
16253  withval=$with_override_nashorn;
16254fi
16255
16256
16257
16258# Check whether --with-override-jdk was given.
16259if test "${with_override_jdk+set}" = set; then :
16260  withval=$with_override_jdk;
16261fi
16262
16263
16264  if test "x$with_override_langtools" != x; then
16265    CURDIR="$PWD"
16266    cd "$with_override_langtools"
16267    LANGTOOLS_TOPDIR="`pwd`"
16268    cd "$CURDIR"
16269    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16270      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16271    fi
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16273$as_echo_n "checking if langtools should be overridden... " >&6; }
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16275$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16276  fi
16277  if test "x$with_override_corba" != x; then
16278    CURDIR="$PWD"
16279    cd "$with_override_corba"
16280    CORBA_TOPDIR="`pwd`"
16281    cd "$CURDIR"
16282    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16283      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16284    fi
16285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16286$as_echo_n "checking if corba should be overridden... " >&6; }
16287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16288$as_echo "yes with $CORBA_TOPDIR" >&6; }
16289  fi
16290  if test "x$with_override_jaxp" != x; then
16291    CURDIR="$PWD"
16292    cd "$with_override_jaxp"
16293    JAXP_TOPDIR="`pwd`"
16294    cd "$CURDIR"
16295    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16296      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16297    fi
16298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16299$as_echo_n "checking if jaxp should be overridden... " >&6; }
16300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16301$as_echo "yes with $JAXP_TOPDIR" >&6; }
16302  fi
16303  if test "x$with_override_jaxws" != x; then
16304    CURDIR="$PWD"
16305    cd "$with_override_jaxws"
16306    JAXWS_TOPDIR="`pwd`"
16307    cd "$CURDIR"
16308    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16309      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16310    fi
16311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16312$as_echo_n "checking if jaxws should be overridden... " >&6; }
16313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16314$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16315  fi
16316  if test "x$with_override_hotspot" != x; then
16317    CURDIR="$PWD"
16318    cd "$with_override_hotspot"
16319    HOTSPOT_TOPDIR="`pwd`"
16320    cd "$CURDIR"
16321    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16322        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16323      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16324    fi
16325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16326$as_echo_n "checking if hotspot should be overridden... " >&6; }
16327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16328$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16329  fi
16330  if test "x$with_override_nashorn" != x; then
16331    CURDIR="$PWD"
16332    cd "$with_override_nashorn"
16333    NASHORN_TOPDIR="`pwd`"
16334    cd "$CURDIR"
16335    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16336      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16337    fi
16338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16339$as_echo_n "checking if nashorn should be overridden... " >&6; }
16340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16341$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16342  fi
16343  if test "x$with_override_jdk" != x; then
16344    CURDIR="$PWD"
16345    cd "$with_override_jdk"
16346    JDK_TOPDIR="`pwd`"
16347    cd "$CURDIR"
16348    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16349      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16350    fi
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16352$as_echo_n "checking if JDK should be overridden... " >&6; }
16353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16354$as_echo "yes with $JDK_TOPDIR" >&6; }
16355  fi
16356
16357
16358  BUILD_OUTPUT="$OUTPUT_ROOT"
16359
16360
16361  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16362  BUILD_HOTSPOT=true
16363
16364
16365
16366# Check whether --with-import-hotspot was given.
16367if test "${with_import_hotspot+set}" = set; then :
16368  withval=$with_import_hotspot;
16369fi
16370
16371  if test "x$with_import_hotspot" != x; then
16372    CURDIR="$PWD"
16373    cd "$with_import_hotspot"
16374    HOTSPOT_DIST="`pwd`"
16375    cd "$CURDIR"
16376    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16377      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16378    fi
16379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16380$as_echo_n "checking if hotspot should be imported... " >&6; }
16381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16382$as_echo "yes from $HOTSPOT_DIST" >&6; }
16383    BUILD_HOTSPOT=false
16384  fi
16385
16386  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16387
16388
16389###############################################################################
16390#
16391# Setup the toolchain (compilers etc), i.e. the tools that need to be
16392# cross-compilation aware.
16393#
16394###############################################################################
16395
16396
16397  ###############################################################################
16398  #
16399  # Configure the development tool paths and potential sysroot.
16400  #
16401  ac_ext=cpp
16402ac_cpp='$CXXCPP $CPPFLAGS'
16403ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16404ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16405ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16406
16407
16408  # The option used to specify the target .o,.a or .so file.
16409  # When compiling, how to specify the to be created object file.
16410  CC_OUT_OPTION='-o$(SPACE)'
16411  # When linking, how to specify the to be created executable.
16412  EXE_OUT_OPTION='-o$(SPACE)'
16413  # When linking, how to specify the to be created dynamically linkable library.
16414  LD_OUT_OPTION='-o$(SPACE)'
16415  # When archiving, how to specify the to be create static archive for object files.
16416  AR_OUT_OPTION='rcs$(SPACE)'
16417
16418
16419
16420
16421
16422# Locate the actual tools
16423
16424
16425# Check whether --with-jtreg was given.
16426if test "${with_jtreg+set}" = set; then :
16427  withval=$with_jtreg;
16428else
16429  with_jtreg=no
16430fi
16431
16432
16433  if test "x$with_jtreg" = xno; then
16434    # jtreg disabled
16435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16436$as_echo_n "checking for jtreg... " >&6; }
16437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16438$as_echo "no" >&6; }
16439  else
16440    if test "x$with_jtreg" != xyes; then
16441      # with path specified.
16442      JT_HOME="$with_jtreg"
16443    fi
16444
16445    if test "x$JT_HOME" != x; then
16446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16447$as_echo_n "checking for jtreg... " >&6; }
16448
16449      # use JT_HOME enviroment var.
16450
16451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16452
16453  # Input might be given as Windows format, start by converting to
16454  # unix format.
16455  path="$JT_HOME"
16456  new_path=`$CYGPATH -u "$path"`
16457
16458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16461  # "foo.exe" is OK but "foo" is an error.
16462  #
16463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16464  # It is also a way to make sure we got the proper file name for the real test later on.
16465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16466  if test "x$test_shortpath" = x; then
16467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16468$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16469    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16470  fi
16471
16472  # Call helper function which possibly converts this using DOS-style short mode.
16473  # If so, the updated path is stored in $new_path.
16474
16475  input_path="$new_path"
16476  # Check if we need to convert this using DOS-style short mode. If the path
16477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16478  # take no chances and rewrite it.
16479  # Note: m4 eats our [], so we need to use [ and ] instead.
16480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16481  if test "x$has_forbidden_chars" != x; then
16482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16486      # Going to short mode and back again did indeed matter. Since short mode is
16487      # case insensitive, let's make it lowercase to improve readability.
16488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16489      # Now convert it back to Unix-stile (cygpath)
16490      input_path=`$CYGPATH -u "$shortmode_path"`
16491      new_path="$input_path"
16492    fi
16493  fi
16494
16495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16496  if test "x$test_cygdrive_prefix" = x; then
16497    # As a simple fix, exclude /usr/bin since it's not a real path.
16498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16500      # a path prefixed by /cygdrive for fixpath to work.
16501      new_path="$CYGWIN_ROOT_PATH$input_path"
16502    fi
16503  fi
16504
16505
16506  if test "x$path" != "x$new_path"; then
16507    JT_HOME="$new_path"
16508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16509$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16510  fi
16511
16512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16513
16514  path="$JT_HOME"
16515  has_colon=`$ECHO $path | $GREP ^.:`
16516  new_path="$path"
16517  if test "x$has_colon" = x; then
16518    # Not in mixed or Windows style, start by that.
16519    new_path=`cmd //c echo $path`
16520  fi
16521
16522
16523  input_path="$new_path"
16524  # Check if we need to convert this using DOS-style short mode. If the path
16525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16526  # take no chances and rewrite it.
16527  # Note: m4 eats our [], so we need to use [ and ] instead.
16528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16529  if test "x$has_forbidden_chars" != x; then
16530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16532  fi
16533
16534
16535  windows_path="$new_path"
16536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16537    unix_path=`$CYGPATH -u "$windows_path"`
16538    new_path="$unix_path"
16539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16541    new_path="$unix_path"
16542  fi
16543
16544  if test "x$path" != "x$new_path"; then
16545    JT_HOME="$new_path"
16546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16547$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16548  fi
16549
16550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16552
16553  else
16554    # We're on a posix platform. Hooray! :)
16555    path="$JT_HOME"
16556    has_space=`$ECHO "$path" | $GREP " "`
16557    if test "x$has_space" != x; then
16558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16559$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16560      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16561    fi
16562
16563    # Use eval to expand a potential ~
16564    eval path="$path"
16565    if test ! -f "$path" && test ! -d "$path"; then
16566      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16567    fi
16568
16569    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16570  fi
16571
16572
16573      # jtreg win32 script works for everybody
16574      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16575
16576      if test ! -f "$JTREGEXE"; then
16577        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16578      fi
16579
16580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16581$as_echo "$JTREGEXE" >&6; }
16582    else
16583      # try to find jtreg on path
16584
16585  for ac_prog in jtreg
16586do
16587  # Extract the first word of "$ac_prog", so it can be a program name with args.
16588set dummy $ac_prog; ac_word=$2
16589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16590$as_echo_n "checking for $ac_word... " >&6; }
16591if ${ac_cv_path_JTREGEXE+:} false; then :
16592  $as_echo_n "(cached) " >&6
16593else
16594  case $JTREGEXE in
16595  [\\/]* | ?:[\\/]*)
16596  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16597  ;;
16598  *)
16599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16600for as_dir in $PATH
16601do
16602  IFS=$as_save_IFS
16603  test -z "$as_dir" && as_dir=.
16604    for ac_exec_ext in '' $ac_executable_extensions; do
16605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16606    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16608    break 2
16609  fi
16610done
16611  done
16612IFS=$as_save_IFS
16613
16614  ;;
16615esac
16616fi
16617JTREGEXE=$ac_cv_path_JTREGEXE
16618if test -n "$JTREGEXE"; then
16619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16620$as_echo "$JTREGEXE" >&6; }
16621else
16622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16623$as_echo "no" >&6; }
16624fi
16625
16626
16627  test -n "$JTREGEXE" && break
16628done
16629
16630
16631  if test "x$JTREGEXE" = x; then
16632    if test "xjtreg" = x; then
16633      PROG_NAME=jtregexe
16634    else
16635      PROG_NAME=jtreg
16636    fi
16637    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16639    as_fn_error $? "Cannot continue" "$LINENO" 5
16640  fi
16641
16642
16643      JT_HOME="`$DIRNAME $JTREGEXE`"
16644    fi
16645  fi
16646
16647
16648
16649
16650
16651  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16652
16653  # Store path to cygwin link.exe to help excluding it when searching for
16654  # VS linker. This must be done before changing the PATH when looking for VS.
16655  # Extract the first word of "link", so it can be a program name with args.
16656set dummy link; ac_word=$2
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16658$as_echo_n "checking for $ac_word... " >&6; }
16659if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16660  $as_echo_n "(cached) " >&6
16661else
16662  case $CYGWIN_LINK in
16663  [\\/]* | ?:[\\/]*)
16664  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16665  ;;
16666  *)
16667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16668for as_dir in $PATH
16669do
16670  IFS=$as_save_IFS
16671  test -z "$as_dir" && as_dir=.
16672    for ac_exec_ext in '' $ac_executable_extensions; do
16673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16674    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16676    break 2
16677  fi
16678done
16679  done
16680IFS=$as_save_IFS
16681
16682  ;;
16683esac
16684fi
16685CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16686if test -n "$CYGWIN_LINK"; then
16687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16688$as_echo "$CYGWIN_LINK" >&6; }
16689else
16690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16691$as_echo "no" >&6; }
16692fi
16693
16694
16695  if test "x$CYGWIN_LINK" != x; then
16696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16697$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16698    "$CYGWIN_LINK" --version > /dev/null
16699    if test $? -eq 0 ; then
16700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16701$as_echo "yes" >&6; }
16702    else
16703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16704$as_echo "no" >&6; }
16705      # This might be the VS linker. Don't exclude it later on.
16706      CYGWIN_LINK=""
16707    fi
16708  fi
16709
16710  # First-hand choice is to locate and run the vsvars bat file.
16711
16712  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16713    VCVARSFILE="vc/bin/vcvars32.bat"
16714  else
16715    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16716  fi
16717
16718  VS_ENV_CMD=""
16719  VS_ENV_ARGS=""
16720  if test "x$with_toolsdir" != x; then
16721
16722  if test "x$VS_ENV_CMD" = x; then
16723    VS100BASE="$with_toolsdir/../.."
16724    METHOD="--with-tools-dir"
16725
16726  windows_path="$VS100BASE"
16727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16728    unix_path=`$CYGPATH -u "$windows_path"`
16729    VS100BASE="$unix_path"
16730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16732    VS100BASE="$unix_path"
16733  fi
16734
16735    if test -d "$VS100BASE"; then
16736      if test -f "$VS100BASE/$VCVARSFILE"; then
16737        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16738$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16739        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16740      else
16741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16742$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16743        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16744$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16745      fi
16746    fi
16747  fi
16748
16749  fi
16750
16751  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16752    # Having specified an argument which is incorrect will produce an instant failure;
16753    # we should not go on looking
16754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16755$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16756    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16757$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16758    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16759  fi
16760
16761  if test "x$VS100COMNTOOLS" != x; then
16762
16763  if test "x$VS_ENV_CMD" = x; then
16764    VS100BASE="$VS100COMNTOOLS/../.."
16765    METHOD="VS100COMNTOOLS variable"
16766
16767  windows_path="$VS100BASE"
16768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16769    unix_path=`$CYGPATH -u "$windows_path"`
16770    VS100BASE="$unix_path"
16771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16773    VS100BASE="$unix_path"
16774  fi
16775
16776    if test -d "$VS100BASE"; then
16777      if test -f "$VS100BASE/$VCVARSFILE"; then
16778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16779$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16780        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16781      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16785$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16786      fi
16787    fi
16788  fi
16789
16790  fi
16791  if test "x$PROGRAMFILES" != x; then
16792
16793  if test "x$VS_ENV_CMD" = x; then
16794    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16795    METHOD="well-known name"
16796
16797  windows_path="$VS100BASE"
16798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16799    unix_path=`$CYGPATH -u "$windows_path"`
16800    VS100BASE="$unix_path"
16801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16803    VS100BASE="$unix_path"
16804  fi
16805
16806    if test -d "$VS100BASE"; then
16807      if test -f "$VS100BASE/$VCVARSFILE"; then
16808        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16809$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16810        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16811      else
16812        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16813$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16814        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16815$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16816      fi
16817    fi
16818  fi
16819
16820  fi
16821
16822  if test "x$VS_ENV_CMD" = x; then
16823    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16824    METHOD="well-known name"
16825
16826  windows_path="$VS100BASE"
16827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16828    unix_path=`$CYGPATH -u "$windows_path"`
16829    VS100BASE="$unix_path"
16830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16832    VS100BASE="$unix_path"
16833  fi
16834
16835    if test -d "$VS100BASE"; then
16836      if test -f "$VS100BASE/$VCVARSFILE"; then
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16838$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16839        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16840      else
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16842$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16843        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16844$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16845      fi
16846    fi
16847  fi
16848
16849
16850  if test "x$VS_ENV_CMD" = x; then
16851    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16852    METHOD="well-known name"
16853
16854  windows_path="$VS100BASE"
16855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16856    unix_path=`$CYGPATH -u "$windows_path"`
16857    VS100BASE="$unix_path"
16858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16860    VS100BASE="$unix_path"
16861  fi
16862
16863    if test -d "$VS100BASE"; then
16864      if test -f "$VS100BASE/$VCVARSFILE"; then
16865        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16866$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16867        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16868      else
16869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16870$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16872$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16873      fi
16874    fi
16875  fi
16876
16877
16878  if test "x$ProgramW6432" != x; then
16879
16880  if test "x$VS_ENV_CMD" = x; then
16881    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16882    METHOD="well-known name"
16883
16884  windows_path="$WIN_SDK_BASE"
16885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16886    unix_path=`$CYGPATH -u "$windows_path"`
16887    WIN_SDK_BASE="$unix_path"
16888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16890    WIN_SDK_BASE="$unix_path"
16891  fi
16892
16893    if test -d "$WIN_SDK_BASE"; then
16894      # There have been cases of partial or broken SDK installations. A missing
16895      # lib dir is not going to work.
16896      if test ! -d "$WIN_SDK_BASE/../lib"; then
16897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16898$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16899        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16900$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16901      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16902        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16903$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16904        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16905        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16906          VS_ENV_ARGS="/x86"
16907        else
16908          VS_ENV_ARGS="/x64"
16909        fi
16910      else
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16912$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16914$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16915      fi
16916    fi
16917  fi
16918
16919  fi
16920  if test "x$PROGRAMW6432" != x; then
16921
16922  if test "x$VS_ENV_CMD" = x; then
16923    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16924    METHOD="well-known name"
16925
16926  windows_path="$WIN_SDK_BASE"
16927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16928    unix_path=`$CYGPATH -u "$windows_path"`
16929    WIN_SDK_BASE="$unix_path"
16930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16932    WIN_SDK_BASE="$unix_path"
16933  fi
16934
16935    if test -d "$WIN_SDK_BASE"; then
16936      # There have been cases of partial or broken SDK installations. A missing
16937      # lib dir is not going to work.
16938      if test ! -d "$WIN_SDK_BASE/../lib"; then
16939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16942$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16943      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16946        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16947        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16948          VS_ENV_ARGS="/x86"
16949        else
16950          VS_ENV_ARGS="/x64"
16951        fi
16952      else
16953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16954$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16956$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16957      fi
16958    fi
16959  fi
16960
16961  fi
16962  if test "x$PROGRAMFILES" != x; then
16963
16964  if test "x$VS_ENV_CMD" = x; then
16965    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16966    METHOD="well-known name"
16967
16968  windows_path="$WIN_SDK_BASE"
16969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16970    unix_path=`$CYGPATH -u "$windows_path"`
16971    WIN_SDK_BASE="$unix_path"
16972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16974    WIN_SDK_BASE="$unix_path"
16975  fi
16976
16977    if test -d "$WIN_SDK_BASE"; then
16978      # There have been cases of partial or broken SDK installations. A missing
16979      # lib dir is not going to work.
16980      if test ! -d "$WIN_SDK_BASE/../lib"; then
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, lib dir is missing. Ignoring" >&5
16984$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16985      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16987$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16988        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16989        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16990          VS_ENV_ARGS="/x86"
16991        else
16992          VS_ENV_ARGS="/x64"
16993        fi
16994      else
16995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16996$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16997        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16998$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16999      fi
17000    fi
17001  fi
17002
17003  fi
17004
17005  if test "x$VS_ENV_CMD" = x; then
17006    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17007    METHOD="well-known name"
17008
17009  windows_path="$WIN_SDK_BASE"
17010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17011    unix_path=`$CYGPATH -u "$windows_path"`
17012    WIN_SDK_BASE="$unix_path"
17013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17015    WIN_SDK_BASE="$unix_path"
17016  fi
17017
17018    if test -d "$WIN_SDK_BASE"; then
17019      # There have been cases of partial or broken SDK installations. A missing
17020      # lib dir is not going to work.
17021      if test ! -d "$WIN_SDK_BASE/../lib"; then
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17025$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17026      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17029        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17030        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17031          VS_ENV_ARGS="/x86"
17032        else
17033          VS_ENV_ARGS="/x64"
17034        fi
17035      else
17036        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17037$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17039$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17040      fi
17041    fi
17042  fi
17043
17044
17045  if test "x$VS_ENV_CMD" = x; then
17046    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17047    METHOD="well-known name"
17048
17049  windows_path="$WIN_SDK_BASE"
17050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17051    unix_path=`$CYGPATH -u "$windows_path"`
17052    WIN_SDK_BASE="$unix_path"
17053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17055    WIN_SDK_BASE="$unix_path"
17056  fi
17057
17058    if test -d "$WIN_SDK_BASE"; then
17059      # There have been cases of partial or broken SDK installations. A missing
17060      # lib dir is not going to work.
17061      if test ! -d "$WIN_SDK_BASE/../lib"; then
17062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17063$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17064        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17065$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17066      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17068$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17069        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17070        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17071          VS_ENV_ARGS="/x86"
17072        else
17073          VS_ENV_ARGS="/x64"
17074        fi
17075      else
17076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17077$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17078        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17079$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17080      fi
17081    fi
17082  fi
17083
17084
17085  if test "x$VS_ENV_CMD" != x; then
17086    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17087
17088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17089
17090  # First separate the path from the arguments. This will split at the first
17091  # space.
17092  complete="$VS_ENV_CMD"
17093  path="${complete%% *}"
17094  tmp="$complete EOL"
17095  arguments="${tmp#* }"
17096
17097  # Input might be given as Windows format, start by converting to
17098  # unix format.
17099  new_path=`$CYGPATH -u "$path"`
17100
17101  # Now try to locate executable using which
17102  new_path=`$WHICH "$new_path" 2> /dev/null`
17103  # bat and cmd files are not always considered executable in cygwin causing which
17104  # to not find them
17105  if test "x$new_path" = x \
17106      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17107      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17108    new_path=`$CYGPATH -u "$path"`
17109  fi
17110  if test "x$new_path" = x; then
17111    # Oops. Which didn't find the executable.
17112    # The splitting of arguments from the executable at a space might have been incorrect,
17113    # since paths with space are more likely in Windows. Give it another try with the whole
17114    # argument.
17115    path="$complete"
17116    arguments="EOL"
17117    new_path=`$CYGPATH -u "$path"`
17118    new_path=`$WHICH "$new_path" 2> /dev/null`
17119    # bat and cmd files are not always considered executable in cygwin causing which
17120    # to not find them
17121    if test "x$new_path" = x \
17122        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17123        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17124      new_path=`$CYGPATH -u "$path"`
17125    fi
17126    if test "x$new_path" = x; then
17127      # It's still not found. Now this is an unrecoverable error.
17128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17129$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17130      has_space=`$ECHO "$complete" | $GREP " "`
17131      if test "x$has_space" != x; then
17132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17134      fi
17135      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17136    fi
17137  fi
17138
17139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17142  # "foo.exe" is OK but "foo" is an error.
17143  #
17144  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17145  # It is also a way to make sure we got the proper file name for the real test later on.
17146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17147  if test "x$test_shortpath" = x; then
17148    # Short path failed, file does not exist as specified.
17149    # Try adding .exe or .cmd
17150    if test -f "${new_path}.exe"; then
17151      input_to_shortpath="${new_path}.exe"
17152    elif test -f "${new_path}.cmd"; then
17153      input_to_shortpath="${new_path}.cmd"
17154    else
17155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17156$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17157      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17158$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17159      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17160    fi
17161  else
17162    input_to_shortpath="$new_path"
17163  fi
17164
17165  # Call helper function which possibly converts this using DOS-style short mode.
17166  # If so, the updated path is stored in $new_path.
17167  new_path="$input_to_shortpath"
17168
17169  input_path="$input_to_shortpath"
17170  # Check if we need to convert this using DOS-style short mode. If the path
17171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17172  # take no chances and rewrite it.
17173  # Note: m4 eats our [], so we need to use [ and ] instead.
17174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17175  if test "x$has_forbidden_chars" != x; then
17176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17180      # Going to short mode and back again did indeed matter. Since short mode is
17181      # case insensitive, let's make it lowercase to improve readability.
17182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17183      # Now convert it back to Unix-stile (cygpath)
17184      input_path=`$CYGPATH -u "$shortmode_path"`
17185      new_path="$input_path"
17186    fi
17187  fi
17188
17189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17190  if test "x$test_cygdrive_prefix" = x; then
17191    # As a simple fix, exclude /usr/bin since it's not a real path.
17192    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17194      # a path prefixed by /cygdrive for fixpath to work.
17195      new_path="$CYGWIN_ROOT_PATH$input_path"
17196    fi
17197  fi
17198
17199  # remove trailing .exe if any
17200  new_path="${new_path/%.exe/}"
17201
17202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17203
17204  # First separate the path from the arguments. This will split at the first
17205  # space.
17206  complete="$VS_ENV_CMD"
17207  path="${complete%% *}"
17208  tmp="$complete EOL"
17209  arguments="${tmp#* }"
17210
17211  # Input might be given as Windows format, start by converting to
17212  # unix format.
17213  new_path="$path"
17214
17215  windows_path="$new_path"
17216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17217    unix_path=`$CYGPATH -u "$windows_path"`
17218    new_path="$unix_path"
17219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17221    new_path="$unix_path"
17222  fi
17223
17224
17225  # Now try to locate executable using which
17226  new_path=`$WHICH "$new_path" 2> /dev/null`
17227
17228  if test "x$new_path" = x; then
17229    # Oops. Which didn't find the executable.
17230    # The splitting of arguments from the executable at a space might have been incorrect,
17231    # since paths with space are more likely in Windows. Give it another try with the whole
17232    # argument.
17233    path="$complete"
17234    arguments="EOL"
17235    new_path="$path"
17236
17237  windows_path="$new_path"
17238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17239    unix_path=`$CYGPATH -u "$windows_path"`
17240    new_path="$unix_path"
17241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17243    new_path="$unix_path"
17244  fi
17245
17246
17247    new_path=`$WHICH "$new_path" 2> /dev/null`
17248
17249    if test "x$new_path" = x; then
17250      # It's still not found. Now this is an unrecoverable error.
17251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17252$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17253      has_space=`$ECHO "$complete" | $GREP " "`
17254      if test "x$has_space" != x; then
17255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17257      fi
17258      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17259    fi
17260  fi
17261
17262  # Now new_path has a complete unix path to the binary
17263  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17264    # Keep paths in /bin as-is, but remove trailing .exe if any
17265    new_path="${new_path/%.exe/}"
17266    # Do not save /bin paths to all_fixpath_prefixes!
17267  else
17268    # Not in mixed or Windows style, start by that.
17269    new_path=`cmd //c echo $new_path`
17270
17271  input_path="$new_path"
17272  # Check if we need to convert this using DOS-style short mode. If the path
17273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17274  # take no chances and rewrite it.
17275  # Note: m4 eats our [], so we need to use [ and ] instead.
17276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17277  if test "x$has_forbidden_chars" != x; then
17278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17280  fi
17281
17282    # Output is in $new_path
17283
17284  windows_path="$new_path"
17285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17286    unix_path=`$CYGPATH -u "$windows_path"`
17287    new_path="$unix_path"
17288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17290    new_path="$unix_path"
17291  fi
17292
17293    # remove trailing .exe if any
17294    new_path="${new_path/%.exe/}"
17295
17296    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17297    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17298  fi
17299
17300  else
17301    # We're on a posix platform. Hooray! :)
17302    # First separate the path from the arguments. This will split at the first
17303    # space.
17304    complete="$VS_ENV_CMD"
17305    path="${complete%% *}"
17306    tmp="$complete EOL"
17307    arguments="${tmp#* }"
17308
17309    # Cannot rely on the command "which" here since it doesn't always work.
17310    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17311    if test -z "$is_absolute_path"; then
17312      # Path to executable is not absolute. Find it.
17313      IFS_save="$IFS"
17314      IFS=:
17315      for p in $PATH; do
17316        if test -f "$p/$path" && test -x "$p/$path"; then
17317          new_path="$p/$path"
17318          break
17319        fi
17320      done
17321      IFS="$IFS_save"
17322    else
17323      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17324$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17325      new_path="$path"
17326    fi
17327
17328    if test "x$new_path" = x; then
17329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17330$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17331      has_space=`$ECHO "$complete" | $GREP " "`
17332      if test "x$has_space" != x; then
17333        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17334$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17335      fi
17336      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17337    fi
17338  fi
17339
17340  # Now join together the path and the arguments once again
17341  if test "x$arguments" != xEOL; then
17342    new_complete="$new_path ${arguments% *}"
17343  else
17344    new_complete="$new_path"
17345  fi
17346
17347  if test "x$complete" != "x$new_complete"; then
17348    VS_ENV_CMD="$new_complete"
17349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17350$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17351  fi
17352
17353
17354    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17355    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17356$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17357    cd $OUTPUT_ROOT
17358    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17359    # to autoconf standards.
17360
17361    #----
17362
17363    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17364    # but calculate the difference in Cygwin environment before/after running it and then
17365    # apply the diff.
17366
17367    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17368      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17369      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17370      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17371    else
17372      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17373      _dosbash=`cmd //c echo \`which bash\``
17374    fi
17375
17376    # generate the set of exported vars before/after the vs10 setup
17377    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17378    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17379    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17380    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17381
17382    # Now execute the newly created bat file.
17383    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17384    cmd /c localdevenvtmp.bat | cat
17385
17386    # apply the diff (less some non-vs10 vars named by "!")
17387    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17388    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17389    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17390
17391    # cleanup
17392    $RM localdevenvtmp*
17393    #----
17394    cd $CURDIR
17395    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17397$as_echo "no" >&6; }
17398      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17399$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17400      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17401$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17402      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17403$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17404      as_fn_error $? "Cannot continue" "$LINENO" 5
17405    fi
17406
17407    # Now set all paths and other env variables. This will allow the rest of
17408    # the configure script to find and run the compiler in the proper way.
17409    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17410$as_echo "$as_me: Setting extracted environment variables" >&6;}
17411    . $OUTPUT_ROOT/localdevenv.sh
17412  else
17413    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17414    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17415$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17416  fi
17417
17418  # At this point, we should have corrent variables in the environment, or we can't continue.
17419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17420$as_echo_n "checking for Visual Studio variables... " >&6; }
17421
17422  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17423    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17425$as_echo "present but broken" >&6; }
17426      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17427    else
17428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17429$as_echo "ok" >&6; }
17430      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17431      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17432      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17433      # Remove any paths containing # (typically F#) as that messes up make
17434      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17435      VS_PATH="$PATH"
17436
17437
17438
17439    fi
17440  else
17441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17442$as_echo "not found" >&6; }
17443
17444    if test "x$VS_ENV_CMD" = x; then
17445      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17446$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17447      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17448$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17449    else
17450      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17451$as_echo "$as_me: Running the extraction script failed." >&6;}
17452    fi
17453    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17454$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17455    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17456$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17457    as_fn_error $? "Cannot continue" "$LINENO" 5
17458  fi
17459
17460
17461
17462# Check whether --with-msvcr-dll was given.
17463if test "${with_msvcr_dll+set}" = set; then :
17464  withval=$with_msvcr_dll;
17465fi
17466
17467
17468  if test "x$with_msvcr_dll" != x; then
17469    # If given explicitely by user, do not probe. If not present, fail directly.
17470
17471  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17472  METHOD="--with-msvcr-dll"
17473  if test -e "$POSSIBLE_MSVCR_DLL"; then
17474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17475$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17476
17477    # Need to check if the found msvcr is correct architecture
17478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17479$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17480    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17481    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17482      CORRECT_MSVCR_ARCH=386
17483    else
17484      CORRECT_MSVCR_ARCH=x86-64
17485    fi
17486    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17488$as_echo "ok" >&6; }
17489      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17490      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17491$as_echo_n "checking for msvcr100.dll... " >&6; }
17492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17493$as_echo "$MSVCR_DLL" >&6; }
17494    else
17495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17496$as_echo "incorrect, ignoring" >&6; }
17497      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17498$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17499    fi
17500  fi
17501
17502    if test "x$MSVCR_DLL" = x; then
17503      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17504    fi
17505  fi
17506
17507  if test "x$MSVCR_DLL" = x; then
17508    # Probe: Using well-known location from Visual Studio 10.0
17509    if test "x$VCINSTALLDIR" != x; then
17510      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17511
17512  windows_path="$CYGWIN_VC_INSTALL_DIR"
17513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17514    unix_path=`$CYGPATH -u "$windows_path"`
17515    CYGWIN_VC_INSTALL_DIR="$unix_path"
17516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17518    CYGWIN_VC_INSTALL_DIR="$unix_path"
17519  fi
17520
17521      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17522        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17523      else
17524        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17525      fi
17526
17527  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17528  METHOD="well-known location in VCINSTALLDIR"
17529  if test -e "$POSSIBLE_MSVCR_DLL"; then
17530    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17531$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17532
17533    # Need to check if the found msvcr is correct architecture
17534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17535$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17536    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17537    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17538      CORRECT_MSVCR_ARCH=386
17539    else
17540      CORRECT_MSVCR_ARCH=x86-64
17541    fi
17542    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17544$as_echo "ok" >&6; }
17545      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17547$as_echo_n "checking for msvcr100.dll... " >&6; }
17548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17549$as_echo "$MSVCR_DLL" >&6; }
17550    else
17551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17552$as_echo "incorrect, ignoring" >&6; }
17553      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17554$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17555    fi
17556  fi
17557
17558    fi
17559  fi
17560
17561  if test "x$MSVCR_DLL" = x; then
17562    # Probe: Check in the Boot JDK directory.
17563    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17564
17565  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17566  METHOD="well-known location in Boot JDK"
17567  if test -e "$POSSIBLE_MSVCR_DLL"; then
17568    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17569$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17570
17571    # Need to check if the found msvcr is correct architecture
17572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17573$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17574    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17575    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17576      CORRECT_MSVCR_ARCH=386
17577    else
17578      CORRECT_MSVCR_ARCH=x86-64
17579    fi
17580    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17582$as_echo "ok" >&6; }
17583      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17585$as_echo_n "checking for msvcr100.dll... " >&6; }
17586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17587$as_echo "$MSVCR_DLL" >&6; }
17588    else
17589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17590$as_echo "incorrect, ignoring" >&6; }
17591      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17592$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17593    fi
17594  fi
17595
17596  fi
17597
17598  if test "x$MSVCR_DLL" = x; then
17599    # Probe: Look in the Windows system32 directory
17600    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17601
17602  windows_path="$CYGWIN_SYSTEMROOT"
17603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17604    unix_path=`$CYGPATH -u "$windows_path"`
17605    CYGWIN_SYSTEMROOT="$unix_path"
17606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17608    CYGWIN_SYSTEMROOT="$unix_path"
17609  fi
17610
17611    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17612
17613  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17614  METHOD="well-known location in SYSTEMROOT"
17615  if test -e "$POSSIBLE_MSVCR_DLL"; then
17616    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17617$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17618
17619    # Need to check if the found msvcr is correct architecture
17620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17621$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17622    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17623    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17624      CORRECT_MSVCR_ARCH=386
17625    else
17626      CORRECT_MSVCR_ARCH=x86-64
17627    fi
17628    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17630$as_echo "ok" >&6; }
17631      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17633$as_echo_n "checking for msvcr100.dll... " >&6; }
17634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17635$as_echo "$MSVCR_DLL" >&6; }
17636    else
17637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17638$as_echo "incorrect, ignoring" >&6; }
17639      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17640$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17641    fi
17642  fi
17643
17644  fi
17645
17646  if test "x$MSVCR_DLL" = x; then
17647    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17648    if test "x$VS100COMNTOOLS" != x; then
17649      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17650
17651  windows_path="$CYGWIN_VS_TOOLS_DIR"
17652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17653    unix_path=`$CYGPATH -u "$windows_path"`
17654    CYGWIN_VS_TOOLS_DIR="$unix_path"
17655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17657    CYGWIN_VS_TOOLS_DIR="$unix_path"
17658  fi
17659
17660      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17661        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17662      else
17663        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17664      fi
17665
17666  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17667  METHOD="search of VS100COMNTOOLS"
17668  if test -e "$POSSIBLE_MSVCR_DLL"; then
17669    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17670$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17671
17672    # Need to check if the found msvcr is correct architecture
17673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17674$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17675    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17676    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17677      CORRECT_MSVCR_ARCH=386
17678    else
17679      CORRECT_MSVCR_ARCH=x86-64
17680    fi
17681    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17683$as_echo "ok" >&6; }
17684      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17685      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17686$as_echo_n "checking for msvcr100.dll... " >&6; }
17687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17688$as_echo "$MSVCR_DLL" >&6; }
17689    else
17690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17691$as_echo "incorrect, ignoring" >&6; }
17692      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17693$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17694    fi
17695  fi
17696
17697    fi
17698  fi
17699
17700  if test "x$MSVCR_DLL" = x; then
17701    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17702    # (This was the original behaviour; kept since it might turn up something)
17703    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17704      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17705        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17706      else
17707        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17708        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17709          # We're grasping at straws now...
17710          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17711        fi
17712      fi
17713
17714
17715  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17716  METHOD="search of VCINSTALLDIR"
17717  if test -e "$POSSIBLE_MSVCR_DLL"; then
17718    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17719$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17720
17721    # Need to check if the found msvcr is correct architecture
17722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17723$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17724    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17725    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17726      CORRECT_MSVCR_ARCH=386
17727    else
17728      CORRECT_MSVCR_ARCH=x86-64
17729    fi
17730    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17732$as_echo "ok" >&6; }
17733      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17734      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17735$as_echo_n "checking for msvcr100.dll... " >&6; }
17736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17737$as_echo "$MSVCR_DLL" >&6; }
17738    else
17739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17740$as_echo "incorrect, ignoring" >&6; }
17741      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17742$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17743    fi
17744  fi
17745
17746    fi
17747  fi
17748
17749  if test "x$MSVCR_DLL" = x; then
17750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17751$as_echo_n "checking for msvcr100.dll... " >&6; }
17752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17753$as_echo "no" >&6; }
17754    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17755  fi
17756
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="$MSVCR_DLL"
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 MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17775$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17776    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$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    MSVCR_DLL="$new_path"
17815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17816$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17817  fi
17818
17819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17820
17821  path="$MSVCR_DLL"
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    MSVCR_DLL="$new_path"
17853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17854$as_echo "$as_me: Rewriting MSVCR_DLL 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="$MSVCR_DLL"
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 MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17866$as_echo "$as_me: The path of MSVCR_DLL, 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 MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17874    fi
17875
17876    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17877  fi
17878
17879
17880
17881
17882# Check whether --with-dxsdk was given.
17883if test "${with_dxsdk+set}" = set; then :
17884  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17885$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17886fi
17887
17888
17889
17890
17891# Check whether --with-dxsdk-lib was given.
17892if test "${with_dxsdk_lib+set}" = set; then :
17893  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17894$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17895fi
17896
17897
17898
17899
17900# Check whether --with-dxsdk-include was given.
17901if test "${with_dxsdk_include+set}" = set; then :
17902  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17903$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17904fi
17905
17906
17907  fi
17908
17909
17910
17911  # If --build AND --host is set, then the configure script will find any
17912  # cross compilation tools in the PATH. Cross compilation tools
17913  # follows the cross compilation standard where they are prefixed with ${host}.
17914  # For example the binary i686-sun-solaris2.10-gcc
17915  # will cross compile for i686-sun-solaris2.10
17916  # If neither of build and host is not set, then build=host and the
17917  # default compiler found in the path will be used.
17918  # Setting only --host, does not seem to be really supported.
17919  # Please set both --build and --host if you want to cross compile.
17920
17921  if test "x$COMPILE_TYPE" = "xcross"; then
17922    # Now we to find a C/C++ compiler that can build executables for the build
17923    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17924    # once. Also, we need to do this before adding a tools dir to the path,
17925    # otherwise we might pick up cross-compilers which don't use standard naming.
17926    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17927    # to wait until they are properly discovered.
17928    for ac_prog in cl cc gcc
17929do
17930  # Extract the first word of "$ac_prog", so it can be a program name with args.
17931set dummy $ac_prog; ac_word=$2
17932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17933$as_echo_n "checking for $ac_word... " >&6; }
17934if ${ac_cv_path_BUILD_CC+:} false; then :
17935  $as_echo_n "(cached) " >&6
17936else
17937  case $BUILD_CC in
17938  [\\/]* | ?:[\\/]*)
17939  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17940  ;;
17941  *)
17942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17943for as_dir in $PATH
17944do
17945  IFS=$as_save_IFS
17946  test -z "$as_dir" && as_dir=.
17947    for ac_exec_ext in '' $ac_executable_extensions; do
17948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17949    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17951    break 2
17952  fi
17953done
17954  done
17955IFS=$as_save_IFS
17956
17957  ;;
17958esac
17959fi
17960BUILD_CC=$ac_cv_path_BUILD_CC
17961if test -n "$BUILD_CC"; then
17962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17963$as_echo "$BUILD_CC" >&6; }
17964else
17965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17966$as_echo "no" >&6; }
17967fi
17968
17969
17970  test -n "$BUILD_CC" && break
17971done
17972
17973
17974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17975
17976  # First separate the path from the arguments. This will split at the first
17977  # space.
17978  complete="$BUILD_CC"
17979  path="${complete%% *}"
17980  tmp="$complete EOL"
17981  arguments="${tmp#* }"
17982
17983  # Input might be given as Windows format, start by converting to
17984  # unix format.
17985  new_path=`$CYGPATH -u "$path"`
17986
17987  # Now try to locate executable using which
17988  new_path=`$WHICH "$new_path" 2> /dev/null`
17989  # bat and cmd files are not always considered executable in cygwin causing which
17990  # to not find them
17991  if test "x$new_path" = x \
17992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17994    new_path=`$CYGPATH -u "$path"`
17995  fi
17996  if test "x$new_path" = x; then
17997    # Oops. Which didn't find the executable.
17998    # The splitting of arguments from the executable at a space might have been incorrect,
17999    # since paths with space are more likely in Windows. Give it another try with the whole
18000    # argument.
18001    path="$complete"
18002    arguments="EOL"
18003    new_path=`$CYGPATH -u "$path"`
18004    new_path=`$WHICH "$new_path" 2> /dev/null`
18005    # bat and cmd files are not always considered executable in cygwin causing which
18006    # to not find them
18007    if test "x$new_path" = x \
18008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18010      new_path=`$CYGPATH -u "$path"`
18011    fi
18012    if test "x$new_path" = x; then
18013      # It's still not found. Now this is an unrecoverable error.
18014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18015$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18016      has_space=`$ECHO "$complete" | $GREP " "`
18017      if test "x$has_space" != x; then
18018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18020      fi
18021      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18022    fi
18023  fi
18024
18025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18028  # "foo.exe" is OK but "foo" is an error.
18029  #
18030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18031  # It is also a way to make sure we got the proper file name for the real test later on.
18032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18033  if test "x$test_shortpath" = x; then
18034    # Short path failed, file does not exist as specified.
18035    # Try adding .exe or .cmd
18036    if test -f "${new_path}.exe"; then
18037      input_to_shortpath="${new_path}.exe"
18038    elif test -f "${new_path}.cmd"; then
18039      input_to_shortpath="${new_path}.cmd"
18040    else
18041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18042$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18045      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18046    fi
18047  else
18048    input_to_shortpath="$new_path"
18049  fi
18050
18051  # Call helper function which possibly converts this using DOS-style short mode.
18052  # If so, the updated path is stored in $new_path.
18053  new_path="$input_to_shortpath"
18054
18055  input_path="$input_to_shortpath"
18056  # Check if we need to convert this using DOS-style short mode. If the path
18057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18058  # take no chances and rewrite it.
18059  # Note: m4 eats our [], so we need to use [ and ] instead.
18060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18061  if test "x$has_forbidden_chars" != x; then
18062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18066      # Going to short mode and back again did indeed matter. Since short mode is
18067      # case insensitive, let's make it lowercase to improve readability.
18068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18069      # Now convert it back to Unix-stile (cygpath)
18070      input_path=`$CYGPATH -u "$shortmode_path"`
18071      new_path="$input_path"
18072    fi
18073  fi
18074
18075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18076  if test "x$test_cygdrive_prefix" = x; then
18077    # As a simple fix, exclude /usr/bin since it's not a real path.
18078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18080      # a path prefixed by /cygdrive for fixpath to work.
18081      new_path="$CYGWIN_ROOT_PATH$input_path"
18082    fi
18083  fi
18084
18085  # remove trailing .exe if any
18086  new_path="${new_path/%.exe/}"
18087
18088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18089
18090  # First separate the path from the arguments. This will split at the first
18091  # space.
18092  complete="$BUILD_CC"
18093  path="${complete%% *}"
18094  tmp="$complete EOL"
18095  arguments="${tmp#* }"
18096
18097  # Input might be given as Windows format, start by converting to
18098  # unix format.
18099  new_path="$path"
18100
18101  windows_path="$new_path"
18102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18103    unix_path=`$CYGPATH -u "$windows_path"`
18104    new_path="$unix_path"
18105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18107    new_path="$unix_path"
18108  fi
18109
18110
18111  # Now try to locate executable using which
18112  new_path=`$WHICH "$new_path" 2> /dev/null`
18113
18114  if test "x$new_path" = x; then
18115    # Oops. Which didn't find the executable.
18116    # The splitting of arguments from the executable at a space might have been incorrect,
18117    # since paths with space are more likely in Windows. Give it another try with the whole
18118    # argument.
18119    path="$complete"
18120    arguments="EOL"
18121    new_path="$path"
18122
18123  windows_path="$new_path"
18124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18125    unix_path=`$CYGPATH -u "$windows_path"`
18126    new_path="$unix_path"
18127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18129    new_path="$unix_path"
18130  fi
18131
18132
18133    new_path=`$WHICH "$new_path" 2> /dev/null`
18134
18135    if test "x$new_path" = x; then
18136      # It's still not found. Now this is an unrecoverable error.
18137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18138$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18139      has_space=`$ECHO "$complete" | $GREP " "`
18140      if test "x$has_space" != x; then
18141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18143      fi
18144      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18145    fi
18146  fi
18147
18148  # Now new_path has a complete unix path to the binary
18149  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18150    # Keep paths in /bin as-is, but remove trailing .exe if any
18151    new_path="${new_path/%.exe/}"
18152    # Do not save /bin paths to all_fixpath_prefixes!
18153  else
18154    # Not in mixed or Windows style, start by that.
18155    new_path=`cmd //c echo $new_path`
18156
18157  input_path="$new_path"
18158  # Check if we need to convert this using DOS-style short mode. If the path
18159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18160  # take no chances and rewrite it.
18161  # Note: m4 eats our [], so we need to use [ and ] instead.
18162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18163  if test "x$has_forbidden_chars" != x; then
18164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18166  fi
18167
18168    # Output is in $new_path
18169
18170  windows_path="$new_path"
18171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18172    unix_path=`$CYGPATH -u "$windows_path"`
18173    new_path="$unix_path"
18174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18176    new_path="$unix_path"
18177  fi
18178
18179    # remove trailing .exe if any
18180    new_path="${new_path/%.exe/}"
18181
18182    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18183    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18184  fi
18185
18186  else
18187    # We're on a posix platform. Hooray! :)
18188    # First separate the path from the arguments. This will split at the first
18189    # space.
18190    complete="$BUILD_CC"
18191    path="${complete%% *}"
18192    tmp="$complete EOL"
18193    arguments="${tmp#* }"
18194
18195    # Cannot rely on the command "which" here since it doesn't always work.
18196    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18197    if test -z "$is_absolute_path"; then
18198      # Path to executable is not absolute. Find it.
18199      IFS_save="$IFS"
18200      IFS=:
18201      for p in $PATH; do
18202        if test -f "$p/$path" && test -x "$p/$path"; then
18203          new_path="$p/$path"
18204          break
18205        fi
18206      done
18207      IFS="$IFS_save"
18208    else
18209      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18210$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18211      new_path="$path"
18212    fi
18213
18214    if test "x$new_path" = x; then
18215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18216$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18217      has_space=`$ECHO "$complete" | $GREP " "`
18218      if test "x$has_space" != x; then
18219        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18221      fi
18222      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18223    fi
18224  fi
18225
18226  # Now join together the path and the arguments once again
18227  if test "x$arguments" != xEOL; then
18228    new_complete="$new_path ${arguments% *}"
18229  else
18230    new_complete="$new_path"
18231  fi
18232
18233  if test "x$complete" != "x$new_complete"; then
18234    BUILD_CC="$new_complete"
18235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18236$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18237  fi
18238
18239    for ac_prog in cl CC g++
18240do
18241  # Extract the first word of "$ac_prog", so it can be a program name with args.
18242set dummy $ac_prog; ac_word=$2
18243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18244$as_echo_n "checking for $ac_word... " >&6; }
18245if ${ac_cv_path_BUILD_CXX+:} false; then :
18246  $as_echo_n "(cached) " >&6
18247else
18248  case $BUILD_CXX in
18249  [\\/]* | ?:[\\/]*)
18250  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18251  ;;
18252  *)
18253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18254for as_dir in $PATH
18255do
18256  IFS=$as_save_IFS
18257  test -z "$as_dir" && as_dir=.
18258    for ac_exec_ext in '' $ac_executable_extensions; do
18259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18260    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18262    break 2
18263  fi
18264done
18265  done
18266IFS=$as_save_IFS
18267
18268  ;;
18269esac
18270fi
18271BUILD_CXX=$ac_cv_path_BUILD_CXX
18272if test -n "$BUILD_CXX"; then
18273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18274$as_echo "$BUILD_CXX" >&6; }
18275else
18276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18277$as_echo "no" >&6; }
18278fi
18279
18280
18281  test -n "$BUILD_CXX" && break
18282done
18283
18284
18285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18286
18287  # First separate the path from the arguments. This will split at the first
18288  # space.
18289  complete="$BUILD_CXX"
18290  path="${complete%% *}"
18291  tmp="$complete EOL"
18292  arguments="${tmp#* }"
18293
18294  # Input might be given as Windows format, start by converting to
18295  # unix format.
18296  new_path=`$CYGPATH -u "$path"`
18297
18298  # Now try to locate executable using which
18299  new_path=`$WHICH "$new_path" 2> /dev/null`
18300  # bat and cmd files are not always considered executable in cygwin causing which
18301  # to not find them
18302  if test "x$new_path" = x \
18303      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18304      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18305    new_path=`$CYGPATH -u "$path"`
18306  fi
18307  if test "x$new_path" = x; then
18308    # Oops. Which didn't find the executable.
18309    # The splitting of arguments from the executable at a space might have been incorrect,
18310    # since paths with space are more likely in Windows. Give it another try with the whole
18311    # argument.
18312    path="$complete"
18313    arguments="EOL"
18314    new_path=`$CYGPATH -u "$path"`
18315    new_path=`$WHICH "$new_path" 2> /dev/null`
18316    # bat and cmd files are not always considered executable in cygwin causing which
18317    # to not find them
18318    if test "x$new_path" = x \
18319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18321      new_path=`$CYGPATH -u "$path"`
18322    fi
18323    if test "x$new_path" = x; then
18324      # It's still not found. Now this is an unrecoverable error.
18325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18326$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18327      has_space=`$ECHO "$complete" | $GREP " "`
18328      if test "x$has_space" != x; then
18329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18331      fi
18332      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18333    fi
18334  fi
18335
18336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18339  # "foo.exe" is OK but "foo" is an error.
18340  #
18341  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18342  # It is also a way to make sure we got the proper file name for the real test later on.
18343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18344  if test "x$test_shortpath" = x; then
18345    # Short path failed, file does not exist as specified.
18346    # Try adding .exe or .cmd
18347    if test -f "${new_path}.exe"; then
18348      input_to_shortpath="${new_path}.exe"
18349    elif test -f "${new_path}.cmd"; then
18350      input_to_shortpath="${new_path}.cmd"
18351    else
18352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18353$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18356      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18357    fi
18358  else
18359    input_to_shortpath="$new_path"
18360  fi
18361
18362  # Call helper function which possibly converts this using DOS-style short mode.
18363  # If so, the updated path is stored in $new_path.
18364  new_path="$input_to_shortpath"
18365
18366  input_path="$input_to_shortpath"
18367  # Check if we need to convert this using DOS-style short mode. If the path
18368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18369  # take no chances and rewrite it.
18370  # Note: m4 eats our [], so we need to use [ and ] instead.
18371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18372  if test "x$has_forbidden_chars" != x; then
18373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18377      # Going to short mode and back again did indeed matter. Since short mode is
18378      # case insensitive, let's make it lowercase to improve readability.
18379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18380      # Now convert it back to Unix-stile (cygpath)
18381      input_path=`$CYGPATH -u "$shortmode_path"`
18382      new_path="$input_path"
18383    fi
18384  fi
18385
18386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18387  if test "x$test_cygdrive_prefix" = x; then
18388    # As a simple fix, exclude /usr/bin since it's not a real path.
18389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18391      # a path prefixed by /cygdrive for fixpath to work.
18392      new_path="$CYGWIN_ROOT_PATH$input_path"
18393    fi
18394  fi
18395
18396  # remove trailing .exe if any
18397  new_path="${new_path/%.exe/}"
18398
18399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18400
18401  # First separate the path from the arguments. This will split at the first
18402  # space.
18403  complete="$BUILD_CXX"
18404  path="${complete%% *}"
18405  tmp="$complete EOL"
18406  arguments="${tmp#* }"
18407
18408  # Input might be given as Windows format, start by converting to
18409  # unix format.
18410  new_path="$path"
18411
18412  windows_path="$new_path"
18413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18414    unix_path=`$CYGPATH -u "$windows_path"`
18415    new_path="$unix_path"
18416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18418    new_path="$unix_path"
18419  fi
18420
18421
18422  # Now try to locate executable using which
18423  new_path=`$WHICH "$new_path" 2> /dev/null`
18424
18425  if test "x$new_path" = x; then
18426    # Oops. Which didn't find the executable.
18427    # The splitting of arguments from the executable at a space might have been incorrect,
18428    # since paths with space are more likely in Windows. Give it another try with the whole
18429    # argument.
18430    path="$complete"
18431    arguments="EOL"
18432    new_path="$path"
18433
18434  windows_path="$new_path"
18435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18436    unix_path=`$CYGPATH -u "$windows_path"`
18437    new_path="$unix_path"
18438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18440    new_path="$unix_path"
18441  fi
18442
18443
18444    new_path=`$WHICH "$new_path" 2> /dev/null`
18445
18446    if test "x$new_path" = x; then
18447      # It's still not found. Now this is an unrecoverable error.
18448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18449$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18450      has_space=`$ECHO "$complete" | $GREP " "`
18451      if test "x$has_space" != x; then
18452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18454      fi
18455      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18456    fi
18457  fi
18458
18459  # Now new_path has a complete unix path to the binary
18460  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18461    # Keep paths in /bin as-is, but remove trailing .exe if any
18462    new_path="${new_path/%.exe/}"
18463    # Do not save /bin paths to all_fixpath_prefixes!
18464  else
18465    # Not in mixed or Windows style, start by that.
18466    new_path=`cmd //c echo $new_path`
18467
18468  input_path="$new_path"
18469  # Check if we need to convert this using DOS-style short mode. If the path
18470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18471  # take no chances and rewrite it.
18472  # Note: m4 eats our [], so we need to use [ and ] instead.
18473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18474  if test "x$has_forbidden_chars" != x; then
18475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18477  fi
18478
18479    # Output is in $new_path
18480
18481  windows_path="$new_path"
18482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18483    unix_path=`$CYGPATH -u "$windows_path"`
18484    new_path="$unix_path"
18485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18487    new_path="$unix_path"
18488  fi
18489
18490    # remove trailing .exe if any
18491    new_path="${new_path/%.exe/}"
18492
18493    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18494    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18495  fi
18496
18497  else
18498    # We're on a posix platform. Hooray! :)
18499    # First separate the path from the arguments. This will split at the first
18500    # space.
18501    complete="$BUILD_CXX"
18502    path="${complete%% *}"
18503    tmp="$complete EOL"
18504    arguments="${tmp#* }"
18505
18506    # Cannot rely on the command "which" here since it doesn't always work.
18507    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18508    if test -z "$is_absolute_path"; then
18509      # Path to executable is not absolute. Find it.
18510      IFS_save="$IFS"
18511      IFS=:
18512      for p in $PATH; do
18513        if test -f "$p/$path" && test -x "$p/$path"; then
18514          new_path="$p/$path"
18515          break
18516        fi
18517      done
18518      IFS="$IFS_save"
18519    else
18520      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18521$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18522      new_path="$path"
18523    fi
18524
18525    if test "x$new_path" = x; then
18526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18527$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18528      has_space=`$ECHO "$complete" | $GREP " "`
18529      if test "x$has_space" != x; then
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18532      fi
18533      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18534    fi
18535  fi
18536
18537  # Now join together the path and the arguments once again
18538  if test "x$arguments" != xEOL; then
18539    new_complete="$new_path ${arguments% *}"
18540  else
18541    new_complete="$new_path"
18542  fi
18543
18544  if test "x$complete" != "x$new_complete"; then
18545    BUILD_CXX="$new_complete"
18546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18547$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18548  fi
18549
18550    # Extract the first word of "ld", so it can be a program name with args.
18551set dummy ld; ac_word=$2
18552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18553$as_echo_n "checking for $ac_word... " >&6; }
18554if ${ac_cv_path_BUILD_LD+:} false; then :
18555  $as_echo_n "(cached) " >&6
18556else
18557  case $BUILD_LD in
18558  [\\/]* | ?:[\\/]*)
18559  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18560  ;;
18561  *)
18562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18563for as_dir in $PATH
18564do
18565  IFS=$as_save_IFS
18566  test -z "$as_dir" && as_dir=.
18567    for ac_exec_ext in '' $ac_executable_extensions; do
18568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18569    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18571    break 2
18572  fi
18573done
18574  done
18575IFS=$as_save_IFS
18576
18577  ;;
18578esac
18579fi
18580BUILD_LD=$ac_cv_path_BUILD_LD
18581if test -n "$BUILD_LD"; then
18582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18583$as_echo "$BUILD_LD" >&6; }
18584else
18585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18586$as_echo "no" >&6; }
18587fi
18588
18589
18590
18591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18592
18593  # First separate the path from the arguments. This will split at the first
18594  # space.
18595  complete="$BUILD_LD"
18596  path="${complete%% *}"
18597  tmp="$complete EOL"
18598  arguments="${tmp#* }"
18599
18600  # Input might be given as Windows format, start by converting to
18601  # unix format.
18602  new_path=`$CYGPATH -u "$path"`
18603
18604  # Now try to locate executable using which
18605  new_path=`$WHICH "$new_path" 2> /dev/null`
18606  # bat and cmd files are not always considered executable in cygwin causing which
18607  # to not find them
18608  if test "x$new_path" = x \
18609      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18610      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18611    new_path=`$CYGPATH -u "$path"`
18612  fi
18613  if test "x$new_path" = x; then
18614    # Oops. Which didn't find the executable.
18615    # The splitting of arguments from the executable at a space might have been incorrect,
18616    # since paths with space are more likely in Windows. Give it another try with the whole
18617    # argument.
18618    path="$complete"
18619    arguments="EOL"
18620    new_path=`$CYGPATH -u "$path"`
18621    new_path=`$WHICH "$new_path" 2> /dev/null`
18622    # bat and cmd files are not always considered executable in cygwin causing which
18623    # to not find them
18624    if test "x$new_path" = x \
18625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18627      new_path=`$CYGPATH -u "$path"`
18628    fi
18629    if test "x$new_path" = x; then
18630      # It's still not found. Now this is an unrecoverable error.
18631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18632$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18633      has_space=`$ECHO "$complete" | $GREP " "`
18634      if test "x$has_space" != x; then
18635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18637      fi
18638      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18639    fi
18640  fi
18641
18642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18645  # "foo.exe" is OK but "foo" is an error.
18646  #
18647  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18648  # It is also a way to make sure we got the proper file name for the real test later on.
18649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18650  if test "x$test_shortpath" = x; then
18651    # Short path failed, file does not exist as specified.
18652    # Try adding .exe or .cmd
18653    if test -f "${new_path}.exe"; then
18654      input_to_shortpath="${new_path}.exe"
18655    elif test -f "${new_path}.cmd"; then
18656      input_to_shortpath="${new_path}.cmd"
18657    else
18658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18659$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18660      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18661$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18662      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18663    fi
18664  else
18665    input_to_shortpath="$new_path"
18666  fi
18667
18668  # Call helper function which possibly converts this using DOS-style short mode.
18669  # If so, the updated path is stored in $new_path.
18670  new_path="$input_to_shortpath"
18671
18672  input_path="$input_to_shortpath"
18673  # Check if we need to convert this using DOS-style short mode. If the path
18674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18675  # take no chances and rewrite it.
18676  # Note: m4 eats our [], so we need to use [ and ] instead.
18677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18678  if test "x$has_forbidden_chars" != x; then
18679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18683      # Going to short mode and back again did indeed matter. Since short mode is
18684      # case insensitive, let's make it lowercase to improve readability.
18685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18686      # Now convert it back to Unix-stile (cygpath)
18687      input_path=`$CYGPATH -u "$shortmode_path"`
18688      new_path="$input_path"
18689    fi
18690  fi
18691
18692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18693  if test "x$test_cygdrive_prefix" = x; then
18694    # As a simple fix, exclude /usr/bin since it's not a real path.
18695    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18697      # a path prefixed by /cygdrive for fixpath to work.
18698      new_path="$CYGWIN_ROOT_PATH$input_path"
18699    fi
18700  fi
18701
18702  # remove trailing .exe if any
18703  new_path="${new_path/%.exe/}"
18704
18705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18706
18707  # First separate the path from the arguments. This will split at the first
18708  # space.
18709  complete="$BUILD_LD"
18710  path="${complete%% *}"
18711  tmp="$complete EOL"
18712  arguments="${tmp#* }"
18713
18714  # Input might be given as Windows format, start by converting to
18715  # unix format.
18716  new_path="$path"
18717
18718  windows_path="$new_path"
18719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18720    unix_path=`$CYGPATH -u "$windows_path"`
18721    new_path="$unix_path"
18722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18724    new_path="$unix_path"
18725  fi
18726
18727
18728  # Now try to locate executable using which
18729  new_path=`$WHICH "$new_path" 2> /dev/null`
18730
18731  if test "x$new_path" = x; then
18732    # Oops. Which didn't find the executable.
18733    # The splitting of arguments from the executable at a space might have been incorrect,
18734    # since paths with space are more likely in Windows. Give it another try with the whole
18735    # argument.
18736    path="$complete"
18737    arguments="EOL"
18738    new_path="$path"
18739
18740  windows_path="$new_path"
18741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18742    unix_path=`$CYGPATH -u "$windows_path"`
18743    new_path="$unix_path"
18744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18746    new_path="$unix_path"
18747  fi
18748
18749
18750    new_path=`$WHICH "$new_path" 2> /dev/null`
18751
18752    if test "x$new_path" = x; then
18753      # It's still not found. Now this is an unrecoverable error.
18754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18755$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18756      has_space=`$ECHO "$complete" | $GREP " "`
18757      if test "x$has_space" != x; then
18758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18760      fi
18761      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18762    fi
18763  fi
18764
18765  # Now new_path has a complete unix path to the binary
18766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18767    # Keep paths in /bin as-is, but remove trailing .exe if any
18768    new_path="${new_path/%.exe/}"
18769    # Do not save /bin paths to all_fixpath_prefixes!
18770  else
18771    # Not in mixed or Windows style, start by that.
18772    new_path=`cmd //c echo $new_path`
18773
18774  input_path="$new_path"
18775  # Check if we need to convert this using DOS-style short mode. If the path
18776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18777  # take no chances and rewrite it.
18778  # Note: m4 eats our [], so we need to use [ and ] instead.
18779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18780  if test "x$has_forbidden_chars" != x; then
18781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18783  fi
18784
18785    # Output is in $new_path
18786
18787  windows_path="$new_path"
18788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18789    unix_path=`$CYGPATH -u "$windows_path"`
18790    new_path="$unix_path"
18791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18793    new_path="$unix_path"
18794  fi
18795
18796    # remove trailing .exe if any
18797    new_path="${new_path/%.exe/}"
18798
18799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18801  fi
18802
18803  else
18804    # We're on a posix platform. Hooray! :)
18805    # First separate the path from the arguments. This will split at the first
18806    # space.
18807    complete="$BUILD_LD"
18808    path="${complete%% *}"
18809    tmp="$complete EOL"
18810    arguments="${tmp#* }"
18811
18812    # Cannot rely on the command "which" here since it doesn't always work.
18813    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18814    if test -z "$is_absolute_path"; then
18815      # Path to executable is not absolute. Find it.
18816      IFS_save="$IFS"
18817      IFS=:
18818      for p in $PATH; do
18819        if test -f "$p/$path" && test -x "$p/$path"; then
18820          new_path="$p/$path"
18821          break
18822        fi
18823      done
18824      IFS="$IFS_save"
18825    else
18826      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18827$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18828      new_path="$path"
18829    fi
18830
18831    if test "x$new_path" = x; then
18832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18833$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18834      has_space=`$ECHO "$complete" | $GREP " "`
18835      if test "x$has_space" != x; then
18836        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18838      fi
18839      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18840    fi
18841  fi
18842
18843  # Now join together the path and the arguments once again
18844  if test "x$arguments" != xEOL; then
18845    new_complete="$new_path ${arguments% *}"
18846  else
18847    new_complete="$new_path"
18848  fi
18849
18850  if test "x$complete" != "x$new_complete"; then
18851    BUILD_LD="$new_complete"
18852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18853$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18854  fi
18855
18856  fi
18857
18858
18859
18860
18861  # If a devkit is found on the builddeps server, then prepend its path to the
18862  # PATH variable. If there are cross compilers available in the devkit, these
18863  # will be found by AC_PROG_CC et al.
18864  DEVKIT=
18865
18866
18867  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18868    # Source the builddeps file again, to make sure it uses the latest variables!
18869    . $builddepsfile
18870    # Look for a target and build machine specific resource!
18871    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18872    if test "x$resource" = x; then
18873      # Ok, lets instead look for a target specific resource
18874      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18875    fi
18876    if test "x$resource" = x; then
18877      # Ok, lets instead look for a build specific resource
18878      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18879    fi
18880    if test "x$resource" = x; then
18881      # Ok, lets instead look for a generic resource
18882      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18883      resource=${builddep_devkit}
18884    fi
18885    if test "x$resource" != x; then
18886      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18887$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18888      # If the resource in the builddeps.conf file is an existing directory,
18889      # for example /java/linux/cups
18890      if test -d ${resource}; then
18891        depdir=${resource}
18892      else
18893
18894  # devkit is for example mymodule
18895  # $resource is for example libs/general/libmymod_1_2_3.zip
18896  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18897  # $with_builddeps_dir is for example /localhome/builddeps
18898  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18899  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18900  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18901  filename=`basename $resource`
18902  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18903  filebase=${filename%%.*}
18904  extension=${filename#*.}
18905  installdir=$with_builddeps_dir/$filebase
18906  if test ! -f $installdir/$filename.unpacked; then
18907    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18908$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18909    if test ! -d $installdir; then
18910      mkdir -p $installdir
18911    fi
18912    if test ! -d $installdir; then
18913      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18914    fi
18915    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18916    touch $tmpfile
18917    if test ! -f $tmpfile; then
18918      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18919    fi
18920
18921  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18922  # $tmpfile is the local file name for the downloaded file.
18923  VALID_TOOL=no
18924  if test "x$BDEPS_FTP" = xwget; then
18925    VALID_TOOL=yes
18926    wget -O $tmpfile $with_builddeps_server/$resource
18927  fi
18928  if test "x$BDEPS_FTP" = xlftp; then
18929    VALID_TOOL=yes
18930    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18931  fi
18932  if test "x$BDEPS_FTP" = xftp; then
18933    VALID_TOOL=yes
18934    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18935    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18936    FTPUSERPWD=${FTPSERVER%%@*}
18937    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18938      FTPUSER=${userpwd%%:*}
18939      FTPPWD=${userpwd#*@}
18940      FTPSERVER=${FTPSERVER#*@}
18941    else
18942      FTPUSER=ftp
18943      FTPPWD=ftp
18944    fi
18945    # the "pass" command does not work on some
18946    # ftp clients (read ftp.exe) but if it works,
18947    # passive mode is better!
18948    ( \
18949        echo "user $FTPUSER $FTPPWD"        ; \
18950        echo "pass"                         ; \
18951        echo "bin"                          ; \
18952        echo "get $FTPPATH $tmpfile"              ; \
18953    ) | ftp -in $FTPSERVER
18954  fi
18955  if test "x$VALID_TOOL" != xyes; then
18956    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18957  fi
18958
18959    mv $tmpfile $installdir/$filename
18960    if test ! -s $installdir/$filename; then
18961      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18962    fi
18963    case "$extension" in
18964      zip)  echo "Unzipping $installdir/$filename..."
18965        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18966        ;;
18967      tar.gz) echo "Untaring $installdir/$filename..."
18968        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18969        ;;
18970      tgz) echo "Untaring $installdir/$filename..."
18971        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18972        ;;
18973      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18974        ;;
18975    esac
18976  fi
18977  if test -f $installdir/$filename.unpacked; then
18978    depdir=$installdir
18979  fi
18980
18981      fi
18982      # Source the builddeps file again, because in the previous command, the depdir
18983      # was updated to point at the current build dependency install directory.
18984      . $builddepsfile
18985      # Now extract variables from the builddeps.conf files.
18986      theroot=${builddep_devkit_ROOT}
18987      thecflags=${builddep_devkit_CFLAGS}
18988      thelibs=${builddep_devkit_LIBS}
18989      if test "x$depdir" = x; then
18990        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18991      fi
18992      DEVKIT=$depdir
18993      if test "x$theroot" != x; then
18994        DEVKIT="$theroot"
18995      fi
18996      if test "x$thecflags" != x; then
18997        DEVKIT_CFLAGS="$thecflags"
18998      fi
18999      if test "x$thelibs" != x; then
19000        DEVKIT_LIBS="$thelibs"
19001      fi
19002
19003        # Found devkit
19004        PATH="$DEVKIT/bin:$PATH"
19005        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19006        if test "x$x_includes" = "xNONE"; then
19007          x_includes="$SYS_ROOT/usr/include/X11"
19008        fi
19009        if test "x$x_libraries" = "xNONE"; then
19010          x_libraries="$SYS_ROOT/usr/lib"
19011        fi
19012
19013
19014    fi
19015
19016  fi
19017
19018
19019  # Store the CFLAGS etal passed to the configure script.
19020  ORG_CFLAGS="$CFLAGS"
19021  ORG_CXXFLAGS="$CXXFLAGS"
19022  ORG_OBJCFLAGS="$OBJCFLAGS"
19023
19024  # autoconf magic only relies on PATH, so update it if tools dir is specified
19025  OLD_PATH="$PATH"
19026  if test "x$TOOLS_DIR" != x; then
19027    PATH=$TOOLS_DIR:$PATH
19028  fi
19029
19030
19031  ### Locate C compiler (CC)
19032
19033  # On windows, only cl.exe is supported.
19034  # On Solaris, cc is preferred to gcc.
19035  # Elsewhere, gcc is preferred to cc.
19036
19037  if test "x$CC" != x; then
19038    COMPILER_CHECK_LIST="$CC"
19039  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19040    COMPILER_CHECK_LIST="cl"
19041  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19042    COMPILER_CHECK_LIST="cc gcc"
19043  else
19044    COMPILER_CHECK_LIST="gcc cc"
19045  fi
19046
19047
19048  COMPILER_NAME=C
19049
19050  CC=
19051  # If TOOLS_DIR is set, check for all compiler names in there first
19052  # before checking the rest of the PATH.
19053  if test -n "$TOOLS_DIR"; then
19054    PATH_save="$PATH"
19055    PATH="$TOOLS_DIR"
19056    for ac_prog in $COMPILER_CHECK_LIST
19057do
19058  # Extract the first word of "$ac_prog", so it can be a program name with args.
19059set dummy $ac_prog; ac_word=$2
19060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19061$as_echo_n "checking for $ac_word... " >&6; }
19062if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19063  $as_echo_n "(cached) " >&6
19064else
19065  case $TOOLS_DIR_CC in
19066  [\\/]* | ?:[\\/]*)
19067  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19068  ;;
19069  *)
19070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19071for as_dir in $PATH
19072do
19073  IFS=$as_save_IFS
19074  test -z "$as_dir" && as_dir=.
19075    for ac_exec_ext in '' $ac_executable_extensions; do
19076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19077    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19079    break 2
19080  fi
19081done
19082  done
19083IFS=$as_save_IFS
19084
19085  ;;
19086esac
19087fi
19088TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19089if test -n "$TOOLS_DIR_CC"; then
19090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19091$as_echo "$TOOLS_DIR_CC" >&6; }
19092else
19093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19094$as_echo "no" >&6; }
19095fi
19096
19097
19098  test -n "$TOOLS_DIR_CC" && break
19099done
19100
19101    CC=$TOOLS_DIR_CC
19102    PATH="$PATH_save"
19103  fi
19104
19105  # AC_PATH_PROGS can't be run multiple times with the same variable,
19106  # so create a new name for this run.
19107  if test "x$CC" = x; then
19108    for ac_prog in $COMPILER_CHECK_LIST
19109do
19110  # Extract the first word of "$ac_prog", so it can be a program name with args.
19111set dummy $ac_prog; ac_word=$2
19112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19113$as_echo_n "checking for $ac_word... " >&6; }
19114if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19115  $as_echo_n "(cached) " >&6
19116else
19117  case $POTENTIAL_CC in
19118  [\\/]* | ?:[\\/]*)
19119  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19120  ;;
19121  *)
19122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19123for as_dir in $PATH
19124do
19125  IFS=$as_save_IFS
19126  test -z "$as_dir" && as_dir=.
19127    for ac_exec_ext in '' $ac_executable_extensions; do
19128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19129    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19131    break 2
19132  fi
19133done
19134  done
19135IFS=$as_save_IFS
19136
19137  ;;
19138esac
19139fi
19140POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19141if test -n "$POTENTIAL_CC"; then
19142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19143$as_echo "$POTENTIAL_CC" >&6; }
19144else
19145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19146$as_echo "no" >&6; }
19147fi
19148
19149
19150  test -n "$POTENTIAL_CC" && break
19151done
19152
19153    CC=$POTENTIAL_CC
19154  fi
19155
19156  if test "x$CC" = x; then
19157
19158  # Print a helpful message on how to acquire the necessary build dependency.
19159  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19160  MISSING_DEPENDENCY=devkit
19161
19162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19163    cygwin_help $MISSING_DEPENDENCY
19164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19165    msys_help $MISSING_DEPENDENCY
19166  else
19167    PKGHANDLER_COMMAND=
19168
19169    case $PKGHANDLER in
19170      apt-get)
19171        apt_help     $MISSING_DEPENDENCY ;;
19172      yum)
19173        yum_help     $MISSING_DEPENDENCY ;;
19174      port)
19175        port_help    $MISSING_DEPENDENCY ;;
19176      pkgutil)
19177        pkgutil_help $MISSING_DEPENDENCY ;;
19178      pkgadd)
19179        pkgadd_help  $MISSING_DEPENDENCY ;;
19180      * )
19181        break ;;
19182    esac
19183
19184    if test "x$PKGHANDLER_COMMAND" != x; then
19185      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19186    fi
19187  fi
19188
19189    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19190  fi
19191
19192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19193
19194  # First separate the path from the arguments. This will split at the first
19195  # space.
19196  complete="$CC"
19197  path="${complete%% *}"
19198  tmp="$complete EOL"
19199  arguments="${tmp#* }"
19200
19201  # Input might be given as Windows format, start by converting to
19202  # unix format.
19203  new_path=`$CYGPATH -u "$path"`
19204
19205  # Now try to locate executable using which
19206  new_path=`$WHICH "$new_path" 2> /dev/null`
19207  # bat and cmd files are not always considered executable in cygwin causing which
19208  # to not find them
19209  if test "x$new_path" = x \
19210      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19211      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19212    new_path=`$CYGPATH -u "$path"`
19213  fi
19214  if test "x$new_path" = x; then
19215    # Oops. Which didn't find the executable.
19216    # The splitting of arguments from the executable at a space might have been incorrect,
19217    # since paths with space are more likely in Windows. Give it another try with the whole
19218    # argument.
19219    path="$complete"
19220    arguments="EOL"
19221    new_path=`$CYGPATH -u "$path"`
19222    new_path=`$WHICH "$new_path" 2> /dev/null`
19223    # bat and cmd files are not always considered executable in cygwin causing which
19224    # to not find them
19225    if test "x$new_path" = x \
19226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19228      new_path=`$CYGPATH -u "$path"`
19229    fi
19230    if test "x$new_path" = x; then
19231      # It's still not found. Now this is an unrecoverable error.
19232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19233$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19234      has_space=`$ECHO "$complete" | $GREP " "`
19235      if test "x$has_space" != x; then
19236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19238      fi
19239      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19240    fi
19241  fi
19242
19243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19246  # "foo.exe" is OK but "foo" is an error.
19247  #
19248  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19249  # It is also a way to make sure we got the proper file name for the real test later on.
19250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19251  if test "x$test_shortpath" = x; then
19252    # Short path failed, file does not exist as specified.
19253    # Try adding .exe or .cmd
19254    if test -f "${new_path}.exe"; then
19255      input_to_shortpath="${new_path}.exe"
19256    elif test -f "${new_path}.cmd"; then
19257      input_to_shortpath="${new_path}.cmd"
19258    else
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19260$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19261      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19262$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19263      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19264    fi
19265  else
19266    input_to_shortpath="$new_path"
19267  fi
19268
19269  # Call helper function which possibly converts this using DOS-style short mode.
19270  # If so, the updated path is stored in $new_path.
19271  new_path="$input_to_shortpath"
19272
19273  input_path="$input_to_shortpath"
19274  # Check if we need to convert this using DOS-style short mode. If the path
19275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19276  # take no chances and rewrite it.
19277  # Note: m4 eats our [], so we need to use [ and ] instead.
19278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19279  if test "x$has_forbidden_chars" != x; then
19280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19284      # Going to short mode and back again did indeed matter. Since short mode is
19285      # case insensitive, let's make it lowercase to improve readability.
19286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19287      # Now convert it back to Unix-stile (cygpath)
19288      input_path=`$CYGPATH -u "$shortmode_path"`
19289      new_path="$input_path"
19290    fi
19291  fi
19292
19293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19294  if test "x$test_cygdrive_prefix" = x; then
19295    # As a simple fix, exclude /usr/bin since it's not a real path.
19296    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19298      # a path prefixed by /cygdrive for fixpath to work.
19299      new_path="$CYGWIN_ROOT_PATH$input_path"
19300    fi
19301  fi
19302
19303  # remove trailing .exe if any
19304  new_path="${new_path/%.exe/}"
19305
19306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19307
19308  # First separate the path from the arguments. This will split at the first
19309  # space.
19310  complete="$CC"
19311  path="${complete%% *}"
19312  tmp="$complete EOL"
19313  arguments="${tmp#* }"
19314
19315  # Input might be given as Windows format, start by converting to
19316  # unix format.
19317  new_path="$path"
19318
19319  windows_path="$new_path"
19320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19321    unix_path=`$CYGPATH -u "$windows_path"`
19322    new_path="$unix_path"
19323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19325    new_path="$unix_path"
19326  fi
19327
19328
19329  # Now try to locate executable using which
19330  new_path=`$WHICH "$new_path" 2> /dev/null`
19331
19332  if test "x$new_path" = x; then
19333    # Oops. Which didn't find the executable.
19334    # The splitting of arguments from the executable at a space might have been incorrect,
19335    # since paths with space are more likely in Windows. Give it another try with the whole
19336    # argument.
19337    path="$complete"
19338    arguments="EOL"
19339    new_path="$path"
19340
19341  windows_path="$new_path"
19342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19343    unix_path=`$CYGPATH -u "$windows_path"`
19344    new_path="$unix_path"
19345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19347    new_path="$unix_path"
19348  fi
19349
19350
19351    new_path=`$WHICH "$new_path" 2> /dev/null`
19352
19353    if test "x$new_path" = x; then
19354      # It's still not found. Now this is an unrecoverable error.
19355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19356$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19357      has_space=`$ECHO "$complete" | $GREP " "`
19358      if test "x$has_space" != x; then
19359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19361      fi
19362      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19363    fi
19364  fi
19365
19366  # Now new_path has a complete unix path to the binary
19367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19368    # Keep paths in /bin as-is, but remove trailing .exe if any
19369    new_path="${new_path/%.exe/}"
19370    # Do not save /bin paths to all_fixpath_prefixes!
19371  else
19372    # Not in mixed or Windows style, start by that.
19373    new_path=`cmd //c echo $new_path`
19374
19375  input_path="$new_path"
19376  # Check if we need to convert this using DOS-style short mode. If the path
19377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19378  # take no chances and rewrite it.
19379  # Note: m4 eats our [], so we need to use [ and ] instead.
19380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19381  if test "x$has_forbidden_chars" != x; then
19382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19384  fi
19385
19386    # Output is in $new_path
19387
19388  windows_path="$new_path"
19389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19390    unix_path=`$CYGPATH -u "$windows_path"`
19391    new_path="$unix_path"
19392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19394    new_path="$unix_path"
19395  fi
19396
19397    # remove trailing .exe if any
19398    new_path="${new_path/%.exe/}"
19399
19400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19402  fi
19403
19404  else
19405    # We're on a posix platform. Hooray! :)
19406    # First separate the path from the arguments. This will split at the first
19407    # space.
19408    complete="$CC"
19409    path="${complete%% *}"
19410    tmp="$complete EOL"
19411    arguments="${tmp#* }"
19412
19413    # Cannot rely on the command "which" here since it doesn't always work.
19414    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19415    if test -z "$is_absolute_path"; then
19416      # Path to executable is not absolute. Find it.
19417      IFS_save="$IFS"
19418      IFS=:
19419      for p in $PATH; do
19420        if test -f "$p/$path" && test -x "$p/$path"; then
19421          new_path="$p/$path"
19422          break
19423        fi
19424      done
19425      IFS="$IFS_save"
19426    else
19427      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19428$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19429      new_path="$path"
19430    fi
19431
19432    if test "x$new_path" = x; then
19433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19434$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19435      has_space=`$ECHO "$complete" | $GREP " "`
19436      if test "x$has_space" != x; then
19437        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19438$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19439      fi
19440      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19441    fi
19442  fi
19443
19444  # Now join together the path and the arguments once again
19445  if test "x$arguments" != xEOL; then
19446    new_complete="$new_path ${arguments% *}"
19447  else
19448    new_complete="$new_path"
19449  fi
19450
19451  if test "x$complete" != "x$new_complete"; then
19452    CC="$new_complete"
19453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19454$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19455  fi
19456
19457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19458$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19459  TEST_COMPILER="$CC"
19460
19461  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19462    # Follow a chain of symbolic links. Use readlink
19463    # where it exists, else fall back to horribly
19464    # complicated shell code.
19465    if test "x$READLINK_TESTED" != yes; then
19466      # On MacOSX there is a readlink tool with a different
19467      # purpose than the GNU readlink tool. Check the found readlink.
19468      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19469      if test "x$ISGNU" = x; then
19470        # A readlink that we do not know how to use.
19471        # Are there other non-GNU readlinks out there?
19472        READLINK_TESTED=yes
19473        READLINK=
19474      fi
19475    fi
19476
19477    if test "x$READLINK" != x; then
19478      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19479    else
19480      # Save the current directory for restoring afterwards
19481      STARTDIR=$PWD
19482      COUNTER=0
19483      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19484      sym_link_file=`$BASENAME $TEST_COMPILER`
19485      cd $sym_link_dir
19486      # Use -P flag to resolve symlinks in directories.
19487      cd `$THEPWDCMD -P`
19488      sym_link_dir=`$THEPWDCMD -P`
19489      # Resolve file symlinks
19490      while test $COUNTER -lt 20; do
19491        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19492        if test "x$ISLINK" == x; then
19493          # This is not a symbolic link! We are done!
19494          break
19495        fi
19496        # Again resolve directory symlinks since the target of the just found
19497        # link could be in a different directory
19498        cd `$DIRNAME $ISLINK`
19499        sym_link_dir=`$THEPWDCMD -P`
19500        sym_link_file=`$BASENAME $ISLINK`
19501        let COUNTER=COUNTER+1
19502      done
19503      cd $STARTDIR
19504      TEST_COMPILER=$sym_link_dir/$sym_link_file
19505    fi
19506  fi
19507
19508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19509$as_echo "$TEST_COMPILER" >&6; }
19510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19511$as_echo_n "checking if CC is disguised ccache... " >&6; }
19512
19513  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19514  if test "x$COMPILER_BASENAME" = "xccache"; then
19515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19516$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19517    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19518    # We want to control ccache invocation ourselves, so ignore this cc and try
19519    # searching again.
19520
19521    # Remove the path to the fake ccache cc from the PATH
19522    RETRY_COMPILER_SAVED_PATH="$PATH"
19523    COMPILER_DIRNAME=`$DIRNAME $CC`
19524    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19525
19526    # Try again looking for our compiler
19527    if test -n "$ac_tool_prefix"; then
19528  for ac_prog in $COMPILER_CHECK_LIST
19529  do
19530    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19533$as_echo_n "checking for $ac_word... " >&6; }
19534if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19535  $as_echo_n "(cached) " >&6
19536else
19537  if test -n "$PROPER_COMPILER_CC"; then
19538  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19539else
19540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19541for as_dir in $PATH
19542do
19543  IFS=$as_save_IFS
19544  test -z "$as_dir" && as_dir=.
19545    for ac_exec_ext in '' $ac_executable_extensions; do
19546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19547    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19549    break 2
19550  fi
19551done
19552  done
19553IFS=$as_save_IFS
19554
19555fi
19556fi
19557PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19558if test -n "$PROPER_COMPILER_CC"; then
19559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19560$as_echo "$PROPER_COMPILER_CC" >&6; }
19561else
19562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19563$as_echo "no" >&6; }
19564fi
19565
19566
19567    test -n "$PROPER_COMPILER_CC" && break
19568  done
19569fi
19570if test -z "$PROPER_COMPILER_CC"; then
19571  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19572  for ac_prog in $COMPILER_CHECK_LIST
19573do
19574  # Extract the first word of "$ac_prog", so it can be a program name with args.
19575set dummy $ac_prog; ac_word=$2
19576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19577$as_echo_n "checking for $ac_word... " >&6; }
19578if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19579  $as_echo_n "(cached) " >&6
19580else
19581  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19582  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19583else
19584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19585for as_dir in $PATH
19586do
19587  IFS=$as_save_IFS
19588  test -z "$as_dir" && as_dir=.
19589    for ac_exec_ext in '' $ac_executable_extensions; do
19590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19591    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19593    break 2
19594  fi
19595done
19596  done
19597IFS=$as_save_IFS
19598
19599fi
19600fi
19601ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19602if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19604$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19605else
19606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19607$as_echo "no" >&6; }
19608fi
19609
19610
19611  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19612done
19613
19614  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19615    PROPER_COMPILER_CC=""
19616  else
19617    case $cross_compiling:$ac_tool_warned in
19618yes:)
19619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19621ac_tool_warned=yes ;;
19622esac
19623    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19624  fi
19625fi
19626
19627
19628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19629
19630  # First separate the path from the arguments. This will split at the first
19631  # space.
19632  complete="$PROPER_COMPILER_CC"
19633  path="${complete%% *}"
19634  tmp="$complete EOL"
19635  arguments="${tmp#* }"
19636
19637  # Input might be given as Windows format, start by converting to
19638  # unix format.
19639  new_path=`$CYGPATH -u "$path"`
19640
19641  # Now try to locate executable using which
19642  new_path=`$WHICH "$new_path" 2> /dev/null`
19643  # bat and cmd files are not always considered executable in cygwin causing which
19644  # to not find them
19645  if test "x$new_path" = x \
19646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19648    new_path=`$CYGPATH -u "$path"`
19649  fi
19650  if test "x$new_path" = x; then
19651    # Oops. Which didn't find the executable.
19652    # The splitting of arguments from the executable at a space might have been incorrect,
19653    # since paths with space are more likely in Windows. Give it another try with the whole
19654    # argument.
19655    path="$complete"
19656    arguments="EOL"
19657    new_path=`$CYGPATH -u "$path"`
19658    new_path=`$WHICH "$new_path" 2> /dev/null`
19659    # bat and cmd files are not always considered executable in cygwin causing which
19660    # to not find them
19661    if test "x$new_path" = x \
19662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19664      new_path=`$CYGPATH -u "$path"`
19665    fi
19666    if test "x$new_path" = x; then
19667      # It's still not found. Now this is an unrecoverable error.
19668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19669$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19670      has_space=`$ECHO "$complete" | $GREP " "`
19671      if test "x$has_space" != x; then
19672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19674      fi
19675      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19676    fi
19677  fi
19678
19679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19682  # "foo.exe" is OK but "foo" is an error.
19683  #
19684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19685  # It is also a way to make sure we got the proper file name for the real test later on.
19686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19687  if test "x$test_shortpath" = x; then
19688    # Short path failed, file does not exist as specified.
19689    # Try adding .exe or .cmd
19690    if test -f "${new_path}.exe"; then
19691      input_to_shortpath="${new_path}.exe"
19692    elif test -f "${new_path}.cmd"; then
19693      input_to_shortpath="${new_path}.cmd"
19694    else
19695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19696$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19699      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19700    fi
19701  else
19702    input_to_shortpath="$new_path"
19703  fi
19704
19705  # Call helper function which possibly converts this using DOS-style short mode.
19706  # If so, the updated path is stored in $new_path.
19707  new_path="$input_to_shortpath"
19708
19709  input_path="$input_to_shortpath"
19710  # Check if we need to convert this using DOS-style short mode. If the path
19711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19712  # take no chances and rewrite it.
19713  # Note: m4 eats our [], so we need to use [ and ] instead.
19714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19715  if test "x$has_forbidden_chars" != x; then
19716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19720      # Going to short mode and back again did indeed matter. Since short mode is
19721      # case insensitive, let's make it lowercase to improve readability.
19722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19723      # Now convert it back to Unix-stile (cygpath)
19724      input_path=`$CYGPATH -u "$shortmode_path"`
19725      new_path="$input_path"
19726    fi
19727  fi
19728
19729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19730  if test "x$test_cygdrive_prefix" = x; then
19731    # As a simple fix, exclude /usr/bin since it's not a real path.
19732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19734      # a path prefixed by /cygdrive for fixpath to work.
19735      new_path="$CYGWIN_ROOT_PATH$input_path"
19736    fi
19737  fi
19738
19739  # remove trailing .exe if any
19740  new_path="${new_path/%.exe/}"
19741
19742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19743
19744  # First separate the path from the arguments. This will split at the first
19745  # space.
19746  complete="$PROPER_COMPILER_CC"
19747  path="${complete%% *}"
19748  tmp="$complete EOL"
19749  arguments="${tmp#* }"
19750
19751  # Input might be given as Windows format, start by converting to
19752  # unix format.
19753  new_path="$path"
19754
19755  windows_path="$new_path"
19756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19757    unix_path=`$CYGPATH -u "$windows_path"`
19758    new_path="$unix_path"
19759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19761    new_path="$unix_path"
19762  fi
19763
19764
19765  # Now try to locate executable using which
19766  new_path=`$WHICH "$new_path" 2> /dev/null`
19767
19768  if test "x$new_path" = x; then
19769    # Oops. Which didn't find the executable.
19770    # The splitting of arguments from the executable at a space might have been incorrect,
19771    # since paths with space are more likely in Windows. Give it another try with the whole
19772    # argument.
19773    path="$complete"
19774    arguments="EOL"
19775    new_path="$path"
19776
19777  windows_path="$new_path"
19778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19779    unix_path=`$CYGPATH -u "$windows_path"`
19780    new_path="$unix_path"
19781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19783    new_path="$unix_path"
19784  fi
19785
19786
19787    new_path=`$WHICH "$new_path" 2> /dev/null`
19788
19789    if test "x$new_path" = x; then
19790      # It's still not found. Now this is an unrecoverable error.
19791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19792$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19793      has_space=`$ECHO "$complete" | $GREP " "`
19794      if test "x$has_space" != x; then
19795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19797      fi
19798      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19799    fi
19800  fi
19801
19802  # Now new_path has a complete unix path to the binary
19803  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19804    # Keep paths in /bin as-is, but remove trailing .exe if any
19805    new_path="${new_path/%.exe/}"
19806    # Do not save /bin paths to all_fixpath_prefixes!
19807  else
19808    # Not in mixed or Windows style, start by that.
19809    new_path=`cmd //c echo $new_path`
19810
19811  input_path="$new_path"
19812  # Check if we need to convert this using DOS-style short mode. If the path
19813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19814  # take no chances and rewrite it.
19815  # Note: m4 eats our [], so we need to use [ and ] instead.
19816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19817  if test "x$has_forbidden_chars" != x; then
19818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19820  fi
19821
19822    # Output is in $new_path
19823
19824  windows_path="$new_path"
19825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19826    unix_path=`$CYGPATH -u "$windows_path"`
19827    new_path="$unix_path"
19828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19830    new_path="$unix_path"
19831  fi
19832
19833    # remove trailing .exe if any
19834    new_path="${new_path/%.exe/}"
19835
19836    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19837    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19838  fi
19839
19840  else
19841    # We're on a posix platform. Hooray! :)
19842    # First separate the path from the arguments. This will split at the first
19843    # space.
19844    complete="$PROPER_COMPILER_CC"
19845    path="${complete%% *}"
19846    tmp="$complete EOL"
19847    arguments="${tmp#* }"
19848
19849    # Cannot rely on the command "which" here since it doesn't always work.
19850    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19851    if test -z "$is_absolute_path"; then
19852      # Path to executable is not absolute. Find it.
19853      IFS_save="$IFS"
19854      IFS=:
19855      for p in $PATH; do
19856        if test -f "$p/$path" && test -x "$p/$path"; then
19857          new_path="$p/$path"
19858          break
19859        fi
19860      done
19861      IFS="$IFS_save"
19862    else
19863      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19864$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19865      new_path="$path"
19866    fi
19867
19868    if test "x$new_path" = x; then
19869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19870$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19871      has_space=`$ECHO "$complete" | $GREP " "`
19872      if test "x$has_space" != x; then
19873        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19874$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19875      fi
19876      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19877    fi
19878  fi
19879
19880  # Now join together the path and the arguments once again
19881  if test "x$arguments" != xEOL; then
19882    new_complete="$new_path ${arguments% *}"
19883  else
19884    new_complete="$new_path"
19885  fi
19886
19887  if test "x$complete" != "x$new_complete"; then
19888    PROPER_COMPILER_CC="$new_complete"
19889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19890$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19891  fi
19892
19893    PATH="$RETRY_COMPILER_SAVED_PATH"
19894
19895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19896$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19897
19898  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19899    # Follow a chain of symbolic links. Use readlink
19900    # where it exists, else fall back to horribly
19901    # complicated shell code.
19902    if test "x$READLINK_TESTED" != yes; then
19903      # On MacOSX there is a readlink tool with a different
19904      # purpose than the GNU readlink tool. Check the found readlink.
19905      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19906      if test "x$ISGNU" = x; then
19907        # A readlink that we do not know how to use.
19908        # Are there other non-GNU readlinks out there?
19909        READLINK_TESTED=yes
19910        READLINK=
19911      fi
19912    fi
19913
19914    if test "x$READLINK" != x; then
19915      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19916    else
19917      # Save the current directory for restoring afterwards
19918      STARTDIR=$PWD
19919      COUNTER=0
19920      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19921      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19922      cd $sym_link_dir
19923      # Use -P flag to resolve symlinks in directories.
19924      cd `$THEPWDCMD -P`
19925      sym_link_dir=`$THEPWDCMD -P`
19926      # Resolve file symlinks
19927      while test $COUNTER -lt 20; do
19928        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19929        if test "x$ISLINK" == x; then
19930          # This is not a symbolic link! We are done!
19931          break
19932        fi
19933        # Again resolve directory symlinks since the target of the just found
19934        # link could be in a different directory
19935        cd `$DIRNAME $ISLINK`
19936        sym_link_dir=`$THEPWDCMD -P`
19937        sym_link_file=`$BASENAME $ISLINK`
19938        let COUNTER=COUNTER+1
19939      done
19940      cd $STARTDIR
19941      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19942    fi
19943  fi
19944
19945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19946$as_echo "$PROPER_COMPILER_CC" >&6; }
19947    CC="$PROPER_COMPILER_CC"
19948  else
19949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19950$as_echo "no, keeping CC" >&6; }
19951    CC="$TEST_COMPILER"
19952  fi
19953
19954  COMPILER=$CC
19955  COMPILER_NAME=$COMPILER_NAME
19956
19957  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19958    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19959    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19960    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19961    if test $? -ne 0; then
19962      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19963
19964      { $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
19965$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19966      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19967$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19968      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19969    else
19970      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19971      COMPILER_VENDOR="Sun Studio"
19972    fi
19973  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19974    # First line typically looks something like:
19975    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
19976    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19977    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19978    COMPILER_VENDOR="Microsoft CL.EXE"
19979    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19980    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19981      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19982        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19983      fi
19984    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19985      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19986        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19987      fi
19988    fi
19989  else
19990    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19991    # Check that this is likely to be GCC.
19992    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19993    if test $? -ne 0; then
19994      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19995$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19997$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19998      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19999    fi
20000
20001    # First line typically looks something like:
20002    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20003    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20004    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20005  fi
20006  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20007  CC_VERSION="$COMPILER_VERSION"
20008  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20009  CC_VENDOR="$COMPILER_VENDOR"
20010
20011  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20012$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20013
20014
20015  # Now that we have resolved CC ourself, let autoconf have its go at it
20016  ac_ext=c
20017ac_cpp='$CPP $CPPFLAGS'
20018ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20019ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20020ac_compiler_gnu=$ac_cv_c_compiler_gnu
20021if test -n "$ac_tool_prefix"; then
20022  for ac_prog in $CC
20023  do
20024    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20025set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20027$as_echo_n "checking for $ac_word... " >&6; }
20028if ${ac_cv_prog_CC+:} false; then :
20029  $as_echo_n "(cached) " >&6
20030else
20031  if test -n "$CC"; then
20032  ac_cv_prog_CC="$CC" # Let the user override the test.
20033else
20034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20035for as_dir in $PATH
20036do
20037  IFS=$as_save_IFS
20038  test -z "$as_dir" && as_dir=.
20039    for ac_exec_ext in '' $ac_executable_extensions; do
20040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20041    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20043    break 2
20044  fi
20045done
20046  done
20047IFS=$as_save_IFS
20048
20049fi
20050fi
20051CC=$ac_cv_prog_CC
20052if test -n "$CC"; then
20053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20054$as_echo "$CC" >&6; }
20055else
20056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20057$as_echo "no" >&6; }
20058fi
20059
20060
20061    test -n "$CC" && break
20062  done
20063fi
20064if test -z "$CC"; then
20065  ac_ct_CC=$CC
20066  for ac_prog in $CC
20067do
20068  # Extract the first word of "$ac_prog", so it can be a program name with args.
20069set dummy $ac_prog; ac_word=$2
20070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20071$as_echo_n "checking for $ac_word... " >&6; }
20072if ${ac_cv_prog_ac_ct_CC+:} false; then :
20073  $as_echo_n "(cached) " >&6
20074else
20075  if test -n "$ac_ct_CC"; then
20076  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20077else
20078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20079for as_dir in $PATH
20080do
20081  IFS=$as_save_IFS
20082  test -z "$as_dir" && as_dir=.
20083    for ac_exec_ext in '' $ac_executable_extensions; do
20084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20085    ac_cv_prog_ac_ct_CC="$ac_prog"
20086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20087    break 2
20088  fi
20089done
20090  done
20091IFS=$as_save_IFS
20092
20093fi
20094fi
20095ac_ct_CC=$ac_cv_prog_ac_ct_CC
20096if test -n "$ac_ct_CC"; then
20097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20098$as_echo "$ac_ct_CC" >&6; }
20099else
20100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20101$as_echo "no" >&6; }
20102fi
20103
20104
20105  test -n "$ac_ct_CC" && break
20106done
20107
20108  if test "x$ac_ct_CC" = x; then
20109    CC=""
20110  else
20111    case $cross_compiling:$ac_tool_warned in
20112yes:)
20113{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20114$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20115ac_tool_warned=yes ;;
20116esac
20117    CC=$ac_ct_CC
20118  fi
20119fi
20120
20121
20122test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20124as_fn_error $? "no acceptable C compiler found in \$PATH
20125See \`config.log' for more details" "$LINENO" 5; }
20126
20127# Provide some information about the compiler.
20128$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20129set X $ac_compile
20130ac_compiler=$2
20131for ac_option in --version -v -V -qversion; do
20132  { { ac_try="$ac_compiler $ac_option >&5"
20133case "(($ac_try" in
20134  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20135  *) ac_try_echo=$ac_try;;
20136esac
20137eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20138$as_echo "$ac_try_echo"; } >&5
20139  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20140  ac_status=$?
20141  if test -s conftest.err; then
20142    sed '10a\
20143... rest of stderr output deleted ...
20144         10q' conftest.err >conftest.er1
20145    cat conftest.er1 >&5
20146  fi
20147  rm -f conftest.er1 conftest.err
20148  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20149  test $ac_status = 0; }
20150done
20151
20152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20153/* end confdefs.h.  */
20154
20155int
20156main ()
20157{
20158
20159  ;
20160  return 0;
20161}
20162_ACEOF
20163ac_clean_files_save=$ac_clean_files
20164ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20165# Try to create an executable without -o first, disregard a.out.
20166# It will help us diagnose broken compilers, and finding out an intuition
20167# of exeext.
20168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20169$as_echo_n "checking whether the C compiler works... " >&6; }
20170ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20171
20172# The possible output files:
20173ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20174
20175ac_rmfiles=
20176for ac_file in $ac_files
20177do
20178  case $ac_file in
20179    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20180    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20181  esac
20182done
20183rm -f $ac_rmfiles
20184
20185if { { ac_try="$ac_link_default"
20186case "(($ac_try" in
20187  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20188  *) ac_try_echo=$ac_try;;
20189esac
20190eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20191$as_echo "$ac_try_echo"; } >&5
20192  (eval "$ac_link_default") 2>&5
20193  ac_status=$?
20194  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20195  test $ac_status = 0; }; then :
20196  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20197# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20198# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20199# so that the user can short-circuit this test for compilers unknown to
20200# Autoconf.
20201for ac_file in $ac_files ''
20202do
20203  test -f "$ac_file" || continue
20204  case $ac_file in
20205    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20206	;;
20207    [ab].out )
20208	# We found the default executable, but exeext='' is most
20209	# certainly right.
20210	break;;
20211    *.* )
20212	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20213	then :; else
20214	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20215	fi
20216	# We set ac_cv_exeext here because the later test for it is not
20217	# safe: cross compilers may not add the suffix if given an `-o'
20218	# argument, so we may need to know it at that point already.
20219	# Even if this section looks crufty: it has the advantage of
20220	# actually working.
20221	break;;
20222    * )
20223	break;;
20224  esac
20225done
20226test "$ac_cv_exeext" = no && ac_cv_exeext=
20227
20228else
20229  ac_file=''
20230fi
20231if test -z "$ac_file"; then :
20232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20233$as_echo "no" >&6; }
20234$as_echo "$as_me: failed program was:" >&5
20235sed 's/^/| /' conftest.$ac_ext >&5
20236
20237{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20239as_fn_error 77 "C compiler cannot create executables
20240See \`config.log' for more details" "$LINENO" 5; }
20241else
20242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20243$as_echo "yes" >&6; }
20244fi
20245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20246$as_echo_n "checking for C compiler default output file name... " >&6; }
20247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20248$as_echo "$ac_file" >&6; }
20249ac_exeext=$ac_cv_exeext
20250
20251rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20252ac_clean_files=$ac_clean_files_save
20253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20254$as_echo_n "checking for suffix of executables... " >&6; }
20255if { { ac_try="$ac_link"
20256case "(($ac_try" in
20257  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20258  *) ac_try_echo=$ac_try;;
20259esac
20260eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20261$as_echo "$ac_try_echo"; } >&5
20262  (eval "$ac_link") 2>&5
20263  ac_status=$?
20264  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20265  test $ac_status = 0; }; then :
20266  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20267# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20268# work properly (i.e., refer to `conftest.exe'), while it won't with
20269# `rm'.
20270for ac_file in conftest.exe conftest conftest.*; do
20271  test -f "$ac_file" || continue
20272  case $ac_file in
20273    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20274    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20275	  break;;
20276    * ) break;;
20277  esac
20278done
20279else
20280  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20282as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20283See \`config.log' for more details" "$LINENO" 5; }
20284fi
20285rm -f conftest conftest$ac_cv_exeext
20286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20287$as_echo "$ac_cv_exeext" >&6; }
20288
20289rm -f conftest.$ac_ext
20290EXEEXT=$ac_cv_exeext
20291ac_exeext=$EXEEXT
20292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20293/* end confdefs.h.  */
20294#include <stdio.h>
20295int
20296main ()
20297{
20298FILE *f = fopen ("conftest.out", "w");
20299 return ferror (f) || fclose (f) != 0;
20300
20301  ;
20302  return 0;
20303}
20304_ACEOF
20305ac_clean_files="$ac_clean_files conftest.out"
20306# Check that the compiler produces executables we can run.  If not, either
20307# the compiler is broken, or we cross compile.
20308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20309$as_echo_n "checking whether we are cross compiling... " >&6; }
20310if test "$cross_compiling" != yes; then
20311  { { ac_try="$ac_link"
20312case "(($ac_try" in
20313  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20314  *) ac_try_echo=$ac_try;;
20315esac
20316eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20317$as_echo "$ac_try_echo"; } >&5
20318  (eval "$ac_link") 2>&5
20319  ac_status=$?
20320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20321  test $ac_status = 0; }
20322  if { ac_try='./conftest$ac_cv_exeext'
20323  { { case "(($ac_try" in
20324  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20325  *) ac_try_echo=$ac_try;;
20326esac
20327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20328$as_echo "$ac_try_echo"; } >&5
20329  (eval "$ac_try") 2>&5
20330  ac_status=$?
20331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20332  test $ac_status = 0; }; }; then
20333    cross_compiling=no
20334  else
20335    if test "$cross_compiling" = maybe; then
20336	cross_compiling=yes
20337    else
20338	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20339$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20340as_fn_error $? "cannot run C compiled programs.
20341If you meant to cross compile, use \`--host'.
20342See \`config.log' for more details" "$LINENO" 5; }
20343    fi
20344  fi
20345fi
20346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20347$as_echo "$cross_compiling" >&6; }
20348
20349rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20350ac_clean_files=$ac_clean_files_save
20351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20352$as_echo_n "checking for suffix of object files... " >&6; }
20353if ${ac_cv_objext+:} false; then :
20354  $as_echo_n "(cached) " >&6
20355else
20356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20357/* end confdefs.h.  */
20358
20359int
20360main ()
20361{
20362
20363  ;
20364  return 0;
20365}
20366_ACEOF
20367rm -f conftest.o conftest.obj
20368if { { ac_try="$ac_compile"
20369case "(($ac_try" in
20370  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20371  *) ac_try_echo=$ac_try;;
20372esac
20373eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20374$as_echo "$ac_try_echo"; } >&5
20375  (eval "$ac_compile") 2>&5
20376  ac_status=$?
20377  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20378  test $ac_status = 0; }; then :
20379  for ac_file in conftest.o conftest.obj conftest.*; do
20380  test -f "$ac_file" || continue;
20381  case $ac_file in
20382    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20383    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20384       break;;
20385  esac
20386done
20387else
20388  $as_echo "$as_me: failed program was:" >&5
20389sed 's/^/| /' conftest.$ac_ext >&5
20390
20391{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20393as_fn_error $? "cannot compute suffix of object files: cannot compile
20394See \`config.log' for more details" "$LINENO" 5; }
20395fi
20396rm -f conftest.$ac_cv_objext conftest.$ac_ext
20397fi
20398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20399$as_echo "$ac_cv_objext" >&6; }
20400OBJEXT=$ac_cv_objext
20401ac_objext=$OBJEXT
20402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20403$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20404if ${ac_cv_c_compiler_gnu+:} false; then :
20405  $as_echo_n "(cached) " >&6
20406else
20407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20408/* end confdefs.h.  */
20409
20410int
20411main ()
20412{
20413#ifndef __GNUC__
20414       choke me
20415#endif
20416
20417  ;
20418  return 0;
20419}
20420_ACEOF
20421if ac_fn_c_try_compile "$LINENO"; then :
20422  ac_compiler_gnu=yes
20423else
20424  ac_compiler_gnu=no
20425fi
20426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20427ac_cv_c_compiler_gnu=$ac_compiler_gnu
20428
20429fi
20430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20431$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20432if test $ac_compiler_gnu = yes; then
20433  GCC=yes
20434else
20435  GCC=
20436fi
20437ac_test_CFLAGS=${CFLAGS+set}
20438ac_save_CFLAGS=$CFLAGS
20439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20440$as_echo_n "checking whether $CC accepts -g... " >&6; }
20441if ${ac_cv_prog_cc_g+:} false; then :
20442  $as_echo_n "(cached) " >&6
20443else
20444  ac_save_c_werror_flag=$ac_c_werror_flag
20445   ac_c_werror_flag=yes
20446   ac_cv_prog_cc_g=no
20447   CFLAGS="-g"
20448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20449/* end confdefs.h.  */
20450
20451int
20452main ()
20453{
20454
20455  ;
20456  return 0;
20457}
20458_ACEOF
20459if ac_fn_c_try_compile "$LINENO"; then :
20460  ac_cv_prog_cc_g=yes
20461else
20462  CFLAGS=""
20463      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20464/* end confdefs.h.  */
20465
20466int
20467main ()
20468{
20469
20470  ;
20471  return 0;
20472}
20473_ACEOF
20474if ac_fn_c_try_compile "$LINENO"; then :
20475
20476else
20477  ac_c_werror_flag=$ac_save_c_werror_flag
20478	 CFLAGS="-g"
20479	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20480/* end confdefs.h.  */
20481
20482int
20483main ()
20484{
20485
20486  ;
20487  return 0;
20488}
20489_ACEOF
20490if ac_fn_c_try_compile "$LINENO"; then :
20491  ac_cv_prog_cc_g=yes
20492fi
20493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20494fi
20495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20496fi
20497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20498   ac_c_werror_flag=$ac_save_c_werror_flag
20499fi
20500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20501$as_echo "$ac_cv_prog_cc_g" >&6; }
20502if test "$ac_test_CFLAGS" = set; then
20503  CFLAGS=$ac_save_CFLAGS
20504elif test $ac_cv_prog_cc_g = yes; then
20505  if test "$GCC" = yes; then
20506    CFLAGS="-g -O2"
20507  else
20508    CFLAGS="-g"
20509  fi
20510else
20511  if test "$GCC" = yes; then
20512    CFLAGS="-O2"
20513  else
20514    CFLAGS=
20515  fi
20516fi
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20518$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20519if ${ac_cv_prog_cc_c89+:} false; then :
20520  $as_echo_n "(cached) " >&6
20521else
20522  ac_cv_prog_cc_c89=no
20523ac_save_CC=$CC
20524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20525/* end confdefs.h.  */
20526#include <stdarg.h>
20527#include <stdio.h>
20528struct stat;
20529/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20530struct buf { int x; };
20531FILE * (*rcsopen) (struct buf *, struct stat *, int);
20532static char *e (p, i)
20533     char **p;
20534     int i;
20535{
20536  return p[i];
20537}
20538static char *f (char * (*g) (char **, int), char **p, ...)
20539{
20540  char *s;
20541  va_list v;
20542  va_start (v,p);
20543  s = g (p, va_arg (v,int));
20544  va_end (v);
20545  return s;
20546}
20547
20548/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20549   function prototypes and stuff, but not '\xHH' hex character constants.
20550   These don't provoke an error unfortunately, instead are silently treated
20551   as 'x'.  The following induces an error, until -std is added to get
20552   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20553   array size at least.  It's necessary to write '\x00'==0 to get something
20554   that's true only with -std.  */
20555int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20556
20557/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20558   inside strings and character constants.  */
20559#define FOO(x) 'x'
20560int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20561
20562int test (int i, double x);
20563struct s1 {int (*f) (int a);};
20564struct s2 {int (*f) (double a);};
20565int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20566int argc;
20567char **argv;
20568int
20569main ()
20570{
20571return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20572  ;
20573  return 0;
20574}
20575_ACEOF
20576for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20577	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20578do
20579  CC="$ac_save_CC $ac_arg"
20580  if ac_fn_c_try_compile "$LINENO"; then :
20581  ac_cv_prog_cc_c89=$ac_arg
20582fi
20583rm -f core conftest.err conftest.$ac_objext
20584  test "x$ac_cv_prog_cc_c89" != "xno" && break
20585done
20586rm -f conftest.$ac_ext
20587CC=$ac_save_CC
20588
20589fi
20590# AC_CACHE_VAL
20591case "x$ac_cv_prog_cc_c89" in
20592  x)
20593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20594$as_echo "none needed" >&6; } ;;
20595  xno)
20596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20597$as_echo "unsupported" >&6; } ;;
20598  *)
20599    CC="$CC $ac_cv_prog_cc_c89"
20600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20601$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20602esac
20603if test "x$ac_cv_prog_cc_c89" != xno; then :
20604
20605fi
20606
20607ac_ext=cpp
20608ac_cpp='$CXXCPP $CPPFLAGS'
20609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20612
20613
20614  ### Locate C++ compiler (CXX)
20615
20616  if test "x$CXX" != x; then
20617    COMPILER_CHECK_LIST="$CXX"
20618  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20619    COMPILER_CHECK_LIST="cl"
20620  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20621    COMPILER_CHECK_LIST="CC g++"
20622  else
20623    COMPILER_CHECK_LIST="g++ CC"
20624  fi
20625
20626
20627  COMPILER_NAME=C++
20628
20629  CXX=
20630  # If TOOLS_DIR is set, check for all compiler names in there first
20631  # before checking the rest of the PATH.
20632  if test -n "$TOOLS_DIR"; then
20633    PATH_save="$PATH"
20634    PATH="$TOOLS_DIR"
20635    for ac_prog in $COMPILER_CHECK_LIST
20636do
20637  # Extract the first word of "$ac_prog", so it can be a program name with args.
20638set dummy $ac_prog; ac_word=$2
20639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20640$as_echo_n "checking for $ac_word... " >&6; }
20641if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20642  $as_echo_n "(cached) " >&6
20643else
20644  case $TOOLS_DIR_CXX in
20645  [\\/]* | ?:[\\/]*)
20646  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20647  ;;
20648  *)
20649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20650for as_dir in $PATH
20651do
20652  IFS=$as_save_IFS
20653  test -z "$as_dir" && as_dir=.
20654    for ac_exec_ext in '' $ac_executable_extensions; do
20655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20656    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20658    break 2
20659  fi
20660done
20661  done
20662IFS=$as_save_IFS
20663
20664  ;;
20665esac
20666fi
20667TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20668if test -n "$TOOLS_DIR_CXX"; then
20669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20670$as_echo "$TOOLS_DIR_CXX" >&6; }
20671else
20672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20673$as_echo "no" >&6; }
20674fi
20675
20676
20677  test -n "$TOOLS_DIR_CXX" && break
20678done
20679
20680    CXX=$TOOLS_DIR_CXX
20681    PATH="$PATH_save"
20682  fi
20683
20684  # AC_PATH_PROGS can't be run multiple times with the same variable,
20685  # so create a new name for this run.
20686  if test "x$CXX" = x; then
20687    for ac_prog in $COMPILER_CHECK_LIST
20688do
20689  # Extract the first word of "$ac_prog", so it can be a program name with args.
20690set dummy $ac_prog; ac_word=$2
20691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20692$as_echo_n "checking for $ac_word... " >&6; }
20693if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20694  $as_echo_n "(cached) " >&6
20695else
20696  case $POTENTIAL_CXX in
20697  [\\/]* | ?:[\\/]*)
20698  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20699  ;;
20700  *)
20701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20702for as_dir in $PATH
20703do
20704  IFS=$as_save_IFS
20705  test -z "$as_dir" && as_dir=.
20706    for ac_exec_ext in '' $ac_executable_extensions; do
20707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20708    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20710    break 2
20711  fi
20712done
20713  done
20714IFS=$as_save_IFS
20715
20716  ;;
20717esac
20718fi
20719POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20720if test -n "$POTENTIAL_CXX"; then
20721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20722$as_echo "$POTENTIAL_CXX" >&6; }
20723else
20724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20725$as_echo "no" >&6; }
20726fi
20727
20728
20729  test -n "$POTENTIAL_CXX" && break
20730done
20731
20732    CXX=$POTENTIAL_CXX
20733  fi
20734
20735  if test "x$CXX" = x; then
20736
20737  # Print a helpful message on how to acquire the necessary build dependency.
20738  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20739  MISSING_DEPENDENCY=devkit
20740
20741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20742    cygwin_help $MISSING_DEPENDENCY
20743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20744    msys_help $MISSING_DEPENDENCY
20745  else
20746    PKGHANDLER_COMMAND=
20747
20748    case $PKGHANDLER in
20749      apt-get)
20750        apt_help     $MISSING_DEPENDENCY ;;
20751      yum)
20752        yum_help     $MISSING_DEPENDENCY ;;
20753      port)
20754        port_help    $MISSING_DEPENDENCY ;;
20755      pkgutil)
20756        pkgutil_help $MISSING_DEPENDENCY ;;
20757      pkgadd)
20758        pkgadd_help  $MISSING_DEPENDENCY ;;
20759      * )
20760        break ;;
20761    esac
20762
20763    if test "x$PKGHANDLER_COMMAND" != x; then
20764      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20765    fi
20766  fi
20767
20768    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20769  fi
20770
20771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20772
20773  # First separate the path from the arguments. This will split at the first
20774  # space.
20775  complete="$CXX"
20776  path="${complete%% *}"
20777  tmp="$complete EOL"
20778  arguments="${tmp#* }"
20779
20780  # Input might be given as Windows format, start by converting to
20781  # unix format.
20782  new_path=`$CYGPATH -u "$path"`
20783
20784  # Now try to locate executable using which
20785  new_path=`$WHICH "$new_path" 2> /dev/null`
20786  # bat and cmd files are not always considered executable in cygwin causing which
20787  # to not find them
20788  if test "x$new_path" = x \
20789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20791    new_path=`$CYGPATH -u "$path"`
20792  fi
20793  if test "x$new_path" = x; then
20794    # Oops. Which didn't find the executable.
20795    # The splitting of arguments from the executable at a space might have been incorrect,
20796    # since paths with space are more likely in Windows. Give it another try with the whole
20797    # argument.
20798    path="$complete"
20799    arguments="EOL"
20800    new_path=`$CYGPATH -u "$path"`
20801    new_path=`$WHICH "$new_path" 2> /dev/null`
20802    # bat and cmd files are not always considered executable in cygwin causing which
20803    # to not find them
20804    if test "x$new_path" = x \
20805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20807      new_path=`$CYGPATH -u "$path"`
20808    fi
20809    if test "x$new_path" = x; then
20810      # It's still not found. Now this is an unrecoverable error.
20811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20812$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20813      has_space=`$ECHO "$complete" | $GREP " "`
20814      if test "x$has_space" != x; then
20815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20817      fi
20818      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20819    fi
20820  fi
20821
20822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20825  # "foo.exe" is OK but "foo" is an error.
20826  #
20827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20828  # It is also a way to make sure we got the proper file name for the real test later on.
20829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20830  if test "x$test_shortpath" = x; then
20831    # Short path failed, file does not exist as specified.
20832    # Try adding .exe or .cmd
20833    if test -f "${new_path}.exe"; then
20834      input_to_shortpath="${new_path}.exe"
20835    elif test -f "${new_path}.cmd"; then
20836      input_to_shortpath="${new_path}.cmd"
20837    else
20838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20839$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20842      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20843    fi
20844  else
20845    input_to_shortpath="$new_path"
20846  fi
20847
20848  # Call helper function which possibly converts this using DOS-style short mode.
20849  # If so, the updated path is stored in $new_path.
20850  new_path="$input_to_shortpath"
20851
20852  input_path="$input_to_shortpath"
20853  # Check if we need to convert this using DOS-style short mode. If the path
20854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20855  # take no chances and rewrite it.
20856  # Note: m4 eats our [], so we need to use [ and ] instead.
20857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20858  if test "x$has_forbidden_chars" != x; then
20859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20863      # Going to short mode and back again did indeed matter. Since short mode is
20864      # case insensitive, let's make it lowercase to improve readability.
20865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20866      # Now convert it back to Unix-stile (cygpath)
20867      input_path=`$CYGPATH -u "$shortmode_path"`
20868      new_path="$input_path"
20869    fi
20870  fi
20871
20872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20873  if test "x$test_cygdrive_prefix" = x; then
20874    # As a simple fix, exclude /usr/bin since it's not a real path.
20875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20877      # a path prefixed by /cygdrive for fixpath to work.
20878      new_path="$CYGWIN_ROOT_PATH$input_path"
20879    fi
20880  fi
20881
20882  # remove trailing .exe if any
20883  new_path="${new_path/%.exe/}"
20884
20885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20886
20887  # First separate the path from the arguments. This will split at the first
20888  # space.
20889  complete="$CXX"
20890  path="${complete%% *}"
20891  tmp="$complete EOL"
20892  arguments="${tmp#* }"
20893
20894  # Input might be given as Windows format, start by converting to
20895  # unix format.
20896  new_path="$path"
20897
20898  windows_path="$new_path"
20899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20900    unix_path=`$CYGPATH -u "$windows_path"`
20901    new_path="$unix_path"
20902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20904    new_path="$unix_path"
20905  fi
20906
20907
20908  # Now try to locate executable using which
20909  new_path=`$WHICH "$new_path" 2> /dev/null`
20910
20911  if test "x$new_path" = x; then
20912    # Oops. Which didn't find the executable.
20913    # The splitting of arguments from the executable at a space might have been incorrect,
20914    # since paths with space are more likely in Windows. Give it another try with the whole
20915    # argument.
20916    path="$complete"
20917    arguments="EOL"
20918    new_path="$path"
20919
20920  windows_path="$new_path"
20921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20922    unix_path=`$CYGPATH -u "$windows_path"`
20923    new_path="$unix_path"
20924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20926    new_path="$unix_path"
20927  fi
20928
20929
20930    new_path=`$WHICH "$new_path" 2> /dev/null`
20931
20932    if test "x$new_path" = x; then
20933      # It's still not found. Now this is an unrecoverable error.
20934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20935$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20936      has_space=`$ECHO "$complete" | $GREP " "`
20937      if test "x$has_space" != x; then
20938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20940      fi
20941      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20942    fi
20943  fi
20944
20945  # Now new_path has a complete unix path to the binary
20946  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20947    # Keep paths in /bin as-is, but remove trailing .exe if any
20948    new_path="${new_path/%.exe/}"
20949    # Do not save /bin paths to all_fixpath_prefixes!
20950  else
20951    # Not in mixed or Windows style, start by that.
20952    new_path=`cmd //c echo $new_path`
20953
20954  input_path="$new_path"
20955  # Check if we need to convert this using DOS-style short mode. If the path
20956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20957  # take no chances and rewrite it.
20958  # Note: m4 eats our [], so we need to use [ and ] instead.
20959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20960  if test "x$has_forbidden_chars" != x; then
20961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20963  fi
20964
20965    # Output is in $new_path
20966
20967  windows_path="$new_path"
20968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20969    unix_path=`$CYGPATH -u "$windows_path"`
20970    new_path="$unix_path"
20971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20973    new_path="$unix_path"
20974  fi
20975
20976    # remove trailing .exe if any
20977    new_path="${new_path/%.exe/}"
20978
20979    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20980    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20981  fi
20982
20983  else
20984    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
20993    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20994    if test -z "$is_absolute_path"; then
20995      # Path to executable is not absolute. Find it.
20996      IFS_save="$IFS"
20997      IFS=:
20998      for p in $PATH; do
20999        if test -f "$p/$path" && test -x "$p/$path"; then
21000          new_path="$p/$path"
21001          break
21002        fi
21003      done
21004      IFS="$IFS_save"
21005    else
21006      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21007$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21008      new_path="$path"
21009    fi
21010
21011    if test "x$new_path" = x; then
21012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21013$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21014      has_space=`$ECHO "$complete" | $GREP " "`
21015      if test "x$has_space" != x; then
21016        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21018      fi
21019      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21020    fi
21021  fi
21022
21023  # Now join together the path and the arguments once again
21024  if test "x$arguments" != xEOL; then
21025    new_complete="$new_path ${arguments% *}"
21026  else
21027    new_complete="$new_path"
21028  fi
21029
21030  if test "x$complete" != "x$new_complete"; then
21031    CXX="$new_complete"
21032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21033$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21034  fi
21035
21036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21037$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21038  TEST_COMPILER="$CXX"
21039
21040  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21041    # Follow a chain of symbolic links. Use readlink
21042    # where it exists, else fall back to horribly
21043    # complicated shell code.
21044    if test "x$READLINK_TESTED" != yes; then
21045      # On MacOSX there is a readlink tool with a different
21046      # purpose than the GNU readlink tool. Check the found readlink.
21047      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21048      if test "x$ISGNU" = x; then
21049        # A readlink that we do not know how to use.
21050        # Are there other non-GNU readlinks out there?
21051        READLINK_TESTED=yes
21052        READLINK=
21053      fi
21054    fi
21055
21056    if test "x$READLINK" != x; then
21057      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21058    else
21059      # Save the current directory for restoring afterwards
21060      STARTDIR=$PWD
21061      COUNTER=0
21062      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21063      sym_link_file=`$BASENAME $TEST_COMPILER`
21064      cd $sym_link_dir
21065      # Use -P flag to resolve symlinks in directories.
21066      cd `$THEPWDCMD -P`
21067      sym_link_dir=`$THEPWDCMD -P`
21068      # Resolve file symlinks
21069      while test $COUNTER -lt 20; do
21070        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21071        if test "x$ISLINK" == x; then
21072          # This is not a symbolic link! We are done!
21073          break
21074        fi
21075        # Again resolve directory symlinks since the target of the just found
21076        # link could be in a different directory
21077        cd `$DIRNAME $ISLINK`
21078        sym_link_dir=`$THEPWDCMD -P`
21079        sym_link_file=`$BASENAME $ISLINK`
21080        let COUNTER=COUNTER+1
21081      done
21082      cd $STARTDIR
21083      TEST_COMPILER=$sym_link_dir/$sym_link_file
21084    fi
21085  fi
21086
21087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21088$as_echo "$TEST_COMPILER" >&6; }
21089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21090$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21091
21092  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21093  if test "x$COMPILER_BASENAME" = "xccache"; then
21094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21095$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21096    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21097    # We want to control ccache invocation ourselves, so ignore this cc and try
21098    # searching again.
21099
21100    # Remove the path to the fake ccache cc from the PATH
21101    RETRY_COMPILER_SAVED_PATH="$PATH"
21102    COMPILER_DIRNAME=`$DIRNAME $CXX`
21103    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21104
21105    # Try again looking for our compiler
21106    if test -n "$ac_tool_prefix"; then
21107  for ac_prog in $COMPILER_CHECK_LIST
21108  do
21109    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21110set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21112$as_echo_n "checking for $ac_word... " >&6; }
21113if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21114  $as_echo_n "(cached) " >&6
21115else
21116  if test -n "$PROPER_COMPILER_CXX"; then
21117  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21118else
21119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21120for as_dir in $PATH
21121do
21122  IFS=$as_save_IFS
21123  test -z "$as_dir" && as_dir=.
21124    for ac_exec_ext in '' $ac_executable_extensions; do
21125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21126    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21128    break 2
21129  fi
21130done
21131  done
21132IFS=$as_save_IFS
21133
21134fi
21135fi
21136PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21137if test -n "$PROPER_COMPILER_CXX"; then
21138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21139$as_echo "$PROPER_COMPILER_CXX" >&6; }
21140else
21141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21142$as_echo "no" >&6; }
21143fi
21144
21145
21146    test -n "$PROPER_COMPILER_CXX" && break
21147  done
21148fi
21149if test -z "$PROPER_COMPILER_CXX"; then
21150  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21151  for ac_prog in $COMPILER_CHECK_LIST
21152do
21153  # Extract the first word of "$ac_prog", so it can be a program name with args.
21154set dummy $ac_prog; ac_word=$2
21155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21156$as_echo_n "checking for $ac_word... " >&6; }
21157if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21158  $as_echo_n "(cached) " >&6
21159else
21160  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21161  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21162else
21163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21164for as_dir in $PATH
21165do
21166  IFS=$as_save_IFS
21167  test -z "$as_dir" && as_dir=.
21168    for ac_exec_ext in '' $ac_executable_extensions; do
21169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21170    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21172    break 2
21173  fi
21174done
21175  done
21176IFS=$as_save_IFS
21177
21178fi
21179fi
21180ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21181if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21183$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21184else
21185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21186$as_echo "no" >&6; }
21187fi
21188
21189
21190  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21191done
21192
21193  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21194    PROPER_COMPILER_CXX=""
21195  else
21196    case $cross_compiling:$ac_tool_warned in
21197yes:)
21198{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21199$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21200ac_tool_warned=yes ;;
21201esac
21202    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21203  fi
21204fi
21205
21206
21207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21208
21209  # First separate the path from the arguments. This will split at the first
21210  # space.
21211  complete="$PROPER_COMPILER_CXX"
21212  path="${complete%% *}"
21213  tmp="$complete EOL"
21214  arguments="${tmp#* }"
21215
21216  # Input might be given as Windows format, start by converting to
21217  # unix format.
21218  new_path=`$CYGPATH -u "$path"`
21219
21220  # Now try to locate executable using which
21221  new_path=`$WHICH "$new_path" 2> /dev/null`
21222  # bat and cmd files are not always considered executable in cygwin causing which
21223  # to not find them
21224  if test "x$new_path" = x \
21225      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21226      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21227    new_path=`$CYGPATH -u "$path"`
21228  fi
21229  if test "x$new_path" = x; then
21230    # Oops. Which didn't find the executable.
21231    # The splitting of arguments from the executable at a space might have been incorrect,
21232    # since paths with space are more likely in Windows. Give it another try with the whole
21233    # argument.
21234    path="$complete"
21235    arguments="EOL"
21236    new_path=`$CYGPATH -u "$path"`
21237    new_path=`$WHICH "$new_path" 2> /dev/null`
21238    # bat and cmd files are not always considered executable in cygwin causing which
21239    # to not find them
21240    if test "x$new_path" = x \
21241        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21242        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21243      new_path=`$CYGPATH -u "$path"`
21244    fi
21245    if test "x$new_path" = x; then
21246      # It's still not found. Now this is an unrecoverable error.
21247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21248$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21249      has_space=`$ECHO "$complete" | $GREP " "`
21250      if test "x$has_space" != x; then
21251        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21252$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21253      fi
21254      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21255    fi
21256  fi
21257
21258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21261  # "foo.exe" is OK but "foo" is an error.
21262  #
21263  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21264  # It is also a way to make sure we got the proper file name for the real test later on.
21265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21266  if test "x$test_shortpath" = x; then
21267    # Short path failed, file does not exist as specified.
21268    # Try adding .exe or .cmd
21269    if test -f "${new_path}.exe"; then
21270      input_to_shortpath="${new_path}.exe"
21271    elif test -f "${new_path}.cmd"; then
21272      input_to_shortpath="${new_path}.cmd"
21273    else
21274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21275$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21276      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21277$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21278      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21279    fi
21280  else
21281    input_to_shortpath="$new_path"
21282  fi
21283
21284  # Call helper function which possibly converts this using DOS-style short mode.
21285  # If so, the updated path is stored in $new_path.
21286  new_path="$input_to_shortpath"
21287
21288  input_path="$input_to_shortpath"
21289  # Check if we need to convert this using DOS-style short mode. If the path
21290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21291  # take no chances and rewrite it.
21292  # Note: m4 eats our [], so we need to use [ and ] instead.
21293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21294  if test "x$has_forbidden_chars" != x; then
21295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21299      # Going to short mode and back again did indeed matter. Since short mode is
21300      # case insensitive, let's make it lowercase to improve readability.
21301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21302      # Now convert it back to Unix-stile (cygpath)
21303      input_path=`$CYGPATH -u "$shortmode_path"`
21304      new_path="$input_path"
21305    fi
21306  fi
21307
21308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21309  if test "x$test_cygdrive_prefix" = x; then
21310    # As a simple fix, exclude /usr/bin since it's not a real path.
21311    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21313      # a path prefixed by /cygdrive for fixpath to work.
21314      new_path="$CYGWIN_ROOT_PATH$input_path"
21315    fi
21316  fi
21317
21318  # remove trailing .exe if any
21319  new_path="${new_path/%.exe/}"
21320
21321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21322
21323  # First separate the path from the arguments. This will split at the first
21324  # space.
21325  complete="$PROPER_COMPILER_CXX"
21326  path="${complete%% *}"
21327  tmp="$complete EOL"
21328  arguments="${tmp#* }"
21329
21330  # Input might be given as Windows format, start by converting to
21331  # unix format.
21332  new_path="$path"
21333
21334  windows_path="$new_path"
21335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21336    unix_path=`$CYGPATH -u "$windows_path"`
21337    new_path="$unix_path"
21338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21340    new_path="$unix_path"
21341  fi
21342
21343
21344  # Now try to locate executable using which
21345  new_path=`$WHICH "$new_path" 2> /dev/null`
21346
21347  if test "x$new_path" = x; then
21348    # Oops. Which didn't find the executable.
21349    # The splitting of arguments from the executable at a space might have been incorrect,
21350    # since paths with space are more likely in Windows. Give it another try with the whole
21351    # argument.
21352    path="$complete"
21353    arguments="EOL"
21354    new_path="$path"
21355
21356  windows_path="$new_path"
21357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21358    unix_path=`$CYGPATH -u "$windows_path"`
21359    new_path="$unix_path"
21360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21362    new_path="$unix_path"
21363  fi
21364
21365
21366    new_path=`$WHICH "$new_path" 2> /dev/null`
21367
21368    if test "x$new_path" = x; then
21369      # It's still not found. Now this is an unrecoverable error.
21370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21371$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21372      has_space=`$ECHO "$complete" | $GREP " "`
21373      if test "x$has_space" != x; then
21374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21376      fi
21377      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21378    fi
21379  fi
21380
21381  # Now new_path has a complete unix path to the binary
21382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21383    # Keep paths in /bin as-is, but remove trailing .exe if any
21384    new_path="${new_path/%.exe/}"
21385    # Do not save /bin paths to all_fixpath_prefixes!
21386  else
21387    # Not in mixed or Windows style, start by that.
21388    new_path=`cmd //c echo $new_path`
21389
21390  input_path="$new_path"
21391  # Check if we need to convert this using DOS-style short mode. If the path
21392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21393  # take no chances and rewrite it.
21394  # Note: m4 eats our [], so we need to use [ and ] instead.
21395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21396  if test "x$has_forbidden_chars" != x; then
21397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21399  fi
21400
21401    # Output is in $new_path
21402
21403  windows_path="$new_path"
21404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21405    unix_path=`$CYGPATH -u "$windows_path"`
21406    new_path="$unix_path"
21407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21409    new_path="$unix_path"
21410  fi
21411
21412    # remove trailing .exe if any
21413    new_path="${new_path/%.exe/}"
21414
21415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21417  fi
21418
21419  else
21420    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
21429    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21430    if test -z "$is_absolute_path"; then
21431      # Path to executable is not absolute. Find it.
21432      IFS_save="$IFS"
21433      IFS=:
21434      for p in $PATH; do
21435        if test -f "$p/$path" && test -x "$p/$path"; then
21436          new_path="$p/$path"
21437          break
21438        fi
21439      done
21440      IFS="$IFS_save"
21441    else
21442      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21443$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21444      new_path="$path"
21445    fi
21446
21447    if test "x$new_path" = x; then
21448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21449$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21450      has_space=`$ECHO "$complete" | $GREP " "`
21451      if test "x$has_space" != x; then
21452        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21453$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21454      fi
21455      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21456    fi
21457  fi
21458
21459  # Now join together the path and the arguments once again
21460  if test "x$arguments" != xEOL; then
21461    new_complete="$new_path ${arguments% *}"
21462  else
21463    new_complete="$new_path"
21464  fi
21465
21466  if test "x$complete" != "x$new_complete"; then
21467    PROPER_COMPILER_CXX="$new_complete"
21468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21469$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21470  fi
21471
21472    PATH="$RETRY_COMPILER_SAVED_PATH"
21473
21474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21475$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21476
21477  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21478    # Follow a chain of symbolic links. Use readlink
21479    # where it exists, else fall back to horribly
21480    # complicated shell code.
21481    if test "x$READLINK_TESTED" != yes; then
21482      # On MacOSX there is a readlink tool with a different
21483      # purpose than the GNU readlink tool. Check the found readlink.
21484      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21485      if test "x$ISGNU" = x; then
21486        # A readlink that we do not know how to use.
21487        # Are there other non-GNU readlinks out there?
21488        READLINK_TESTED=yes
21489        READLINK=
21490      fi
21491    fi
21492
21493    if test "x$READLINK" != x; then
21494      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21495    else
21496      # Save the current directory for restoring afterwards
21497      STARTDIR=$PWD
21498      COUNTER=0
21499      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21500      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21501      cd $sym_link_dir
21502      # Use -P flag to resolve symlinks in directories.
21503      cd `$THEPWDCMD -P`
21504      sym_link_dir=`$THEPWDCMD -P`
21505      # Resolve file symlinks
21506      while test $COUNTER -lt 20; do
21507        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21508        if test "x$ISLINK" == x; then
21509          # This is not a symbolic link! We are done!
21510          break
21511        fi
21512        # Again resolve directory symlinks since the target of the just found
21513        # link could be in a different directory
21514        cd `$DIRNAME $ISLINK`
21515        sym_link_dir=`$THEPWDCMD -P`
21516        sym_link_file=`$BASENAME $ISLINK`
21517        let COUNTER=COUNTER+1
21518      done
21519      cd $STARTDIR
21520      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21521    fi
21522  fi
21523
21524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21525$as_echo "$PROPER_COMPILER_CXX" >&6; }
21526    CXX="$PROPER_COMPILER_CXX"
21527  else
21528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21529$as_echo "no, keeping CXX" >&6; }
21530    CXX="$TEST_COMPILER"
21531  fi
21532
21533  COMPILER=$CXX
21534  COMPILER_NAME=$COMPILER_NAME
21535
21536  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21537    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21538    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21539    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21540    if test $? -ne 0; then
21541      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21542
21543      { $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
21544$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21545      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21546$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21547      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21548    else
21549      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21550      COMPILER_VENDOR="Sun Studio"
21551    fi
21552  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21553    # First line typically looks something like:
21554    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21555    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21556    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21557    COMPILER_VENDOR="Microsoft CL.EXE"
21558    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21559    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21560      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21561        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21562      fi
21563    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21564      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21565        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21566      fi
21567    fi
21568  else
21569    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21570    # Check that this is likely to be GCC.
21571    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21572    if test $? -ne 0; then
21573      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21574$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21575      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21576$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21577      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21578    fi
21579
21580    # First line typically looks something like:
21581    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21582    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21583    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21584  fi
21585  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21586  CXX_VERSION="$COMPILER_VERSION"
21587  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21588  CXX_VENDOR="$COMPILER_VENDOR"
21589
21590  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21591$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21592
21593
21594  # Now that we have resolved CXX ourself, let autoconf have its go at it
21595  ac_ext=cpp
21596ac_cpp='$CXXCPP $CPPFLAGS'
21597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21600if test -z "$CXX"; then
21601  if test -n "$CCC"; then
21602    CXX=$CCC
21603  else
21604    if test -n "$ac_tool_prefix"; then
21605  for ac_prog in $CXX
21606  do
21607    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21608set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21610$as_echo_n "checking for $ac_word... " >&6; }
21611if ${ac_cv_prog_CXX+:} false; then :
21612  $as_echo_n "(cached) " >&6
21613else
21614  if test -n "$CXX"; then
21615  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21616else
21617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21618for as_dir in $PATH
21619do
21620  IFS=$as_save_IFS
21621  test -z "$as_dir" && as_dir=.
21622    for ac_exec_ext in '' $ac_executable_extensions; do
21623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21624    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21626    break 2
21627  fi
21628done
21629  done
21630IFS=$as_save_IFS
21631
21632fi
21633fi
21634CXX=$ac_cv_prog_CXX
21635if test -n "$CXX"; then
21636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21637$as_echo "$CXX" >&6; }
21638else
21639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21640$as_echo "no" >&6; }
21641fi
21642
21643
21644    test -n "$CXX" && break
21645  done
21646fi
21647if test -z "$CXX"; then
21648  ac_ct_CXX=$CXX
21649  for ac_prog in $CXX
21650do
21651  # Extract the first word of "$ac_prog", so it can be a program name with args.
21652set dummy $ac_prog; ac_word=$2
21653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21654$as_echo_n "checking for $ac_word... " >&6; }
21655if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21656  $as_echo_n "(cached) " >&6
21657else
21658  if test -n "$ac_ct_CXX"; then
21659  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21660else
21661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21662for as_dir in $PATH
21663do
21664  IFS=$as_save_IFS
21665  test -z "$as_dir" && as_dir=.
21666    for ac_exec_ext in '' $ac_executable_extensions; do
21667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21668    ac_cv_prog_ac_ct_CXX="$ac_prog"
21669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21670    break 2
21671  fi
21672done
21673  done
21674IFS=$as_save_IFS
21675
21676fi
21677fi
21678ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21679if test -n "$ac_ct_CXX"; then
21680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21681$as_echo "$ac_ct_CXX" >&6; }
21682else
21683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21684$as_echo "no" >&6; }
21685fi
21686
21687
21688  test -n "$ac_ct_CXX" && break
21689done
21690
21691  if test "x$ac_ct_CXX" = x; then
21692    CXX="g++"
21693  else
21694    case $cross_compiling:$ac_tool_warned in
21695yes:)
21696{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21697$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21698ac_tool_warned=yes ;;
21699esac
21700    CXX=$ac_ct_CXX
21701  fi
21702fi
21703
21704  fi
21705fi
21706# Provide some information about the compiler.
21707$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21708set X $ac_compile
21709ac_compiler=$2
21710for ac_option in --version -v -V -qversion; do
21711  { { ac_try="$ac_compiler $ac_option >&5"
21712case "(($ac_try" in
21713  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21714  *) ac_try_echo=$ac_try;;
21715esac
21716eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21717$as_echo "$ac_try_echo"; } >&5
21718  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21719  ac_status=$?
21720  if test -s conftest.err; then
21721    sed '10a\
21722... rest of stderr output deleted ...
21723         10q' conftest.err >conftest.er1
21724    cat conftest.er1 >&5
21725  fi
21726  rm -f conftest.er1 conftest.err
21727  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21728  test $ac_status = 0; }
21729done
21730
21731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21732$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21733if ${ac_cv_cxx_compiler_gnu+:} false; then :
21734  $as_echo_n "(cached) " >&6
21735else
21736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21737/* end confdefs.h.  */
21738
21739int
21740main ()
21741{
21742#ifndef __GNUC__
21743       choke me
21744#endif
21745
21746  ;
21747  return 0;
21748}
21749_ACEOF
21750if ac_fn_cxx_try_compile "$LINENO"; then :
21751  ac_compiler_gnu=yes
21752else
21753  ac_compiler_gnu=no
21754fi
21755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21756ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21757
21758fi
21759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21760$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21761if test $ac_compiler_gnu = yes; then
21762  GXX=yes
21763else
21764  GXX=
21765fi
21766ac_test_CXXFLAGS=${CXXFLAGS+set}
21767ac_save_CXXFLAGS=$CXXFLAGS
21768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21769$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21770if ${ac_cv_prog_cxx_g+:} false; then :
21771  $as_echo_n "(cached) " >&6
21772else
21773  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21774   ac_cxx_werror_flag=yes
21775   ac_cv_prog_cxx_g=no
21776   CXXFLAGS="-g"
21777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21778/* end confdefs.h.  */
21779
21780int
21781main ()
21782{
21783
21784  ;
21785  return 0;
21786}
21787_ACEOF
21788if ac_fn_cxx_try_compile "$LINENO"; then :
21789  ac_cv_prog_cxx_g=yes
21790else
21791  CXXFLAGS=""
21792      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21793/* end confdefs.h.  */
21794
21795int
21796main ()
21797{
21798
21799  ;
21800  return 0;
21801}
21802_ACEOF
21803if ac_fn_cxx_try_compile "$LINENO"; then :
21804
21805else
21806  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21807	 CXXFLAGS="-g"
21808	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21809/* end confdefs.h.  */
21810
21811int
21812main ()
21813{
21814
21815  ;
21816  return 0;
21817}
21818_ACEOF
21819if ac_fn_cxx_try_compile "$LINENO"; then :
21820  ac_cv_prog_cxx_g=yes
21821fi
21822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21823fi
21824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21825fi
21826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21827   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21828fi
21829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21830$as_echo "$ac_cv_prog_cxx_g" >&6; }
21831if test "$ac_test_CXXFLAGS" = set; then
21832  CXXFLAGS=$ac_save_CXXFLAGS
21833elif test $ac_cv_prog_cxx_g = yes; then
21834  if test "$GXX" = yes; then
21835    CXXFLAGS="-g -O2"
21836  else
21837    CXXFLAGS="-g"
21838  fi
21839else
21840  if test "$GXX" = yes; then
21841    CXXFLAGS="-O2"
21842  else
21843    CXXFLAGS=
21844  fi
21845fi
21846ac_ext=cpp
21847ac_cpp='$CXXCPP $CPPFLAGS'
21848ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21849ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21850ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21851
21852
21853  ### Locate other tools
21854
21855  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21856    ac_ext=m
21857ac_cpp='$OBJCPP $CPPFLAGS'
21858ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21859ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21860ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21861if test -n "$ac_tool_prefix"; then
21862  for ac_prog in gcc objcc objc cc CC
21863  do
21864    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21865set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21867$as_echo_n "checking for $ac_word... " >&6; }
21868if ${ac_cv_prog_OBJC+:} false; then :
21869  $as_echo_n "(cached) " >&6
21870else
21871  if test -n "$OBJC"; then
21872  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21873else
21874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21875for as_dir in $PATH
21876do
21877  IFS=$as_save_IFS
21878  test -z "$as_dir" && as_dir=.
21879    for ac_exec_ext in '' $ac_executable_extensions; do
21880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21881    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21883    break 2
21884  fi
21885done
21886  done
21887IFS=$as_save_IFS
21888
21889fi
21890fi
21891OBJC=$ac_cv_prog_OBJC
21892if test -n "$OBJC"; then
21893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21894$as_echo "$OBJC" >&6; }
21895else
21896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21897$as_echo "no" >&6; }
21898fi
21899
21900
21901    test -n "$OBJC" && break
21902  done
21903fi
21904if test -z "$OBJC"; then
21905  ac_ct_OBJC=$OBJC
21906  for ac_prog in gcc objcc objc cc CC
21907do
21908  # Extract the first word of "$ac_prog", so it can be a program name with args.
21909set dummy $ac_prog; ac_word=$2
21910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21911$as_echo_n "checking for $ac_word... " >&6; }
21912if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21913  $as_echo_n "(cached) " >&6
21914else
21915  if test -n "$ac_ct_OBJC"; then
21916  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21917else
21918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21919for as_dir in $PATH
21920do
21921  IFS=$as_save_IFS
21922  test -z "$as_dir" && as_dir=.
21923    for ac_exec_ext in '' $ac_executable_extensions; do
21924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21925    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21927    break 2
21928  fi
21929done
21930  done
21931IFS=$as_save_IFS
21932
21933fi
21934fi
21935ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21936if test -n "$ac_ct_OBJC"; then
21937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21938$as_echo "$ac_ct_OBJC" >&6; }
21939else
21940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21941$as_echo "no" >&6; }
21942fi
21943
21944
21945  test -n "$ac_ct_OBJC" && break
21946done
21947
21948  if test "x$ac_ct_OBJC" = x; then
21949    OBJC="gcc"
21950  else
21951    case $cross_compiling:$ac_tool_warned in
21952yes:)
21953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21955ac_tool_warned=yes ;;
21956esac
21957    OBJC=$ac_ct_OBJC
21958  fi
21959fi
21960
21961# Provide some information about the compiler.
21962$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21963set X $ac_compile
21964ac_compiler=$2
21965for ac_option in --version -v -V -qversion; do
21966  { { ac_try="$ac_compiler $ac_option >&5"
21967case "(($ac_try" in
21968  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21969  *) ac_try_echo=$ac_try;;
21970esac
21971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21972$as_echo "$ac_try_echo"; } >&5
21973  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21974  ac_status=$?
21975  if test -s conftest.err; then
21976    sed '10a\
21977... rest of stderr output deleted ...
21978         10q' conftest.err >conftest.er1
21979    cat conftest.er1 >&5
21980  fi
21981  rm -f conftest.er1 conftest.err
21982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21983  test $ac_status = 0; }
21984done
21985
21986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21987$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21988if ${ac_cv_objc_compiler_gnu+:} false; then :
21989  $as_echo_n "(cached) " >&6
21990else
21991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21992/* end confdefs.h.  */
21993
21994int
21995main ()
21996{
21997#ifndef __GNUC__
21998       choke me
21999#endif
22000
22001  ;
22002  return 0;
22003}
22004_ACEOF
22005if ac_fn_objc_try_compile "$LINENO"; then :
22006  ac_compiler_gnu=yes
22007else
22008  ac_compiler_gnu=no
22009fi
22010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22011ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22012
22013fi
22014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22015$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22016if test $ac_compiler_gnu = yes; then
22017  GOBJC=yes
22018else
22019  GOBJC=
22020fi
22021ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22022ac_save_OBJCFLAGS=$OBJCFLAGS
22023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22024$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22025if ${ac_cv_prog_objc_g+:} false; then :
22026  $as_echo_n "(cached) " >&6
22027else
22028  ac_save_objc_werror_flag=$ac_objc_werror_flag
22029   ac_objc_werror_flag=yes
22030   ac_cv_prog_objc_g=no
22031   OBJCFLAGS="-g"
22032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22033/* end confdefs.h.  */
22034
22035int
22036main ()
22037{
22038
22039  ;
22040  return 0;
22041}
22042_ACEOF
22043if ac_fn_objc_try_compile "$LINENO"; then :
22044  ac_cv_prog_objc_g=yes
22045else
22046  OBJCFLAGS=""
22047      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22048/* end confdefs.h.  */
22049
22050int
22051main ()
22052{
22053
22054  ;
22055  return 0;
22056}
22057_ACEOF
22058if ac_fn_objc_try_compile "$LINENO"; then :
22059
22060else
22061  ac_objc_werror_flag=$ac_save_objc_werror_flag
22062	 OBJCFLAGS="-g"
22063	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22064/* end confdefs.h.  */
22065
22066int
22067main ()
22068{
22069
22070  ;
22071  return 0;
22072}
22073_ACEOF
22074if ac_fn_objc_try_compile "$LINENO"; then :
22075  ac_cv_prog_objc_g=yes
22076fi
22077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22078fi
22079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22080fi
22081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22082   ac_objc_werror_flag=$ac_save_objc_werror_flag
22083fi
22084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22085$as_echo "$ac_cv_prog_objc_g" >&6; }
22086if test "$ac_test_OBJCFLAGS" = set; then
22087  OBJCFLAGS=$ac_save_OBJCFLAGS
22088elif test $ac_cv_prog_objc_g = yes; then
22089  if test "$GOBJC" = yes; then
22090    OBJCFLAGS="-g -O2"
22091  else
22092    OBJCFLAGS="-g"
22093  fi
22094else
22095  if test "$GOBJC" = yes; then
22096    OBJCFLAGS="-O2"
22097  else
22098    OBJCFLAGS=
22099  fi
22100fi
22101ac_ext=cpp
22102ac_cpp='$CXXCPP $CPPFLAGS'
22103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22106
22107
22108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22109
22110  # First separate the path from the arguments. This will split at the first
22111  # space.
22112  complete="$OBJC"
22113  path="${complete%% *}"
22114  tmp="$complete EOL"
22115  arguments="${tmp#* }"
22116
22117  # Input might be given as Windows format, start by converting to
22118  # unix format.
22119  new_path=`$CYGPATH -u "$path"`
22120
22121  # Now try to locate executable using which
22122  new_path=`$WHICH "$new_path" 2> /dev/null`
22123  # bat and cmd files are not always considered executable in cygwin causing which
22124  # to not find them
22125  if test "x$new_path" = x \
22126      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22127      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22128    new_path=`$CYGPATH -u "$path"`
22129  fi
22130  if test "x$new_path" = x; then
22131    # Oops. Which didn't find the executable.
22132    # The splitting of arguments from the executable at a space might have been incorrect,
22133    # since paths with space are more likely in Windows. Give it another try with the whole
22134    # argument.
22135    path="$complete"
22136    arguments="EOL"
22137    new_path=`$CYGPATH -u "$path"`
22138    new_path=`$WHICH "$new_path" 2> /dev/null`
22139    # bat and cmd files are not always considered executable in cygwin causing which
22140    # to not find them
22141    if test "x$new_path" = x \
22142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22144      new_path=`$CYGPATH -u "$path"`
22145    fi
22146    if test "x$new_path" = x; then
22147      # It's still not found. Now this is an unrecoverable error.
22148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22149$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22150      has_space=`$ECHO "$complete" | $GREP " "`
22151      if test "x$has_space" != x; then
22152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22154      fi
22155      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22156    fi
22157  fi
22158
22159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22162  # "foo.exe" is OK but "foo" is an error.
22163  #
22164  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22165  # It is also a way to make sure we got the proper file name for the real test later on.
22166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22167  if test "x$test_shortpath" = x; then
22168    # Short path failed, file does not exist as specified.
22169    # Try adding .exe or .cmd
22170    if test -f "${new_path}.exe"; then
22171      input_to_shortpath="${new_path}.exe"
22172    elif test -f "${new_path}.cmd"; then
22173      input_to_shortpath="${new_path}.cmd"
22174    else
22175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22176$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22179      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22180    fi
22181  else
22182    input_to_shortpath="$new_path"
22183  fi
22184
22185  # Call helper function which possibly converts this using DOS-style short mode.
22186  # If so, the updated path is stored in $new_path.
22187  new_path="$input_to_shortpath"
22188
22189  input_path="$input_to_shortpath"
22190  # Check if we need to convert this using DOS-style short mode. If the path
22191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22192  # take no chances and rewrite it.
22193  # Note: m4 eats our [], so we need to use [ and ] instead.
22194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22195  if test "x$has_forbidden_chars" != x; then
22196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22200      # Going to short mode and back again did indeed matter. Since short mode is
22201      # case insensitive, let's make it lowercase to improve readability.
22202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22203      # Now convert it back to Unix-stile (cygpath)
22204      input_path=`$CYGPATH -u "$shortmode_path"`
22205      new_path="$input_path"
22206    fi
22207  fi
22208
22209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22210  if test "x$test_cygdrive_prefix" = x; then
22211    # As a simple fix, exclude /usr/bin since it's not a real path.
22212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22214      # a path prefixed by /cygdrive for fixpath to work.
22215      new_path="$CYGWIN_ROOT_PATH$input_path"
22216    fi
22217  fi
22218
22219  # remove trailing .exe if any
22220  new_path="${new_path/%.exe/}"
22221
22222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22223
22224  # First separate the path from the arguments. This will split at the first
22225  # space.
22226  complete="$OBJC"
22227  path="${complete%% *}"
22228  tmp="$complete EOL"
22229  arguments="${tmp#* }"
22230
22231  # Input might be given as Windows format, start by converting to
22232  # unix format.
22233  new_path="$path"
22234
22235  windows_path="$new_path"
22236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22237    unix_path=`$CYGPATH -u "$windows_path"`
22238    new_path="$unix_path"
22239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22241    new_path="$unix_path"
22242  fi
22243
22244
22245  # Now try to locate executable using which
22246  new_path=`$WHICH "$new_path" 2> /dev/null`
22247
22248  if test "x$new_path" = x; then
22249    # Oops. Which didn't find the executable.
22250    # The splitting of arguments from the executable at a space might have been incorrect,
22251    # since paths with space are more likely in Windows. Give it another try with the whole
22252    # argument.
22253    path="$complete"
22254    arguments="EOL"
22255    new_path="$path"
22256
22257  windows_path="$new_path"
22258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22259    unix_path=`$CYGPATH -u "$windows_path"`
22260    new_path="$unix_path"
22261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22263    new_path="$unix_path"
22264  fi
22265
22266
22267    new_path=`$WHICH "$new_path" 2> /dev/null`
22268
22269    if test "x$new_path" = x; then
22270      # It's still not found. Now this is an unrecoverable error.
22271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22272$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22273      has_space=`$ECHO "$complete" | $GREP " "`
22274      if test "x$has_space" != x; then
22275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22277      fi
22278      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22279    fi
22280  fi
22281
22282  # Now new_path has a complete unix path to the binary
22283  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22284    # Keep paths in /bin as-is, but remove trailing .exe if any
22285    new_path="${new_path/%.exe/}"
22286    # Do not save /bin paths to all_fixpath_prefixes!
22287  else
22288    # Not in mixed or Windows style, start by that.
22289    new_path=`cmd //c echo $new_path`
22290
22291  input_path="$new_path"
22292  # Check if we need to convert this using DOS-style short mode. If the path
22293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22294  # take no chances and rewrite it.
22295  # Note: m4 eats our [], so we need to use [ and ] instead.
22296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22297  if test "x$has_forbidden_chars" != x; then
22298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22300  fi
22301
22302    # Output is in $new_path
22303
22304  windows_path="$new_path"
22305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22306    unix_path=`$CYGPATH -u "$windows_path"`
22307    new_path="$unix_path"
22308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22310    new_path="$unix_path"
22311  fi
22312
22313    # remove trailing .exe if any
22314    new_path="${new_path/%.exe/}"
22315
22316    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22317    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22318  fi
22319
22320  else
22321    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
22330    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22331    if test -z "$is_absolute_path"; then
22332      # Path to executable is not absolute. Find it.
22333      IFS_save="$IFS"
22334      IFS=:
22335      for p in $PATH; do
22336        if test -f "$p/$path" && test -x "$p/$path"; then
22337          new_path="$p/$path"
22338          break
22339        fi
22340      done
22341      IFS="$IFS_save"
22342    else
22343      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22344$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22345      new_path="$path"
22346    fi
22347
22348    if test "x$new_path" = x; then
22349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22350$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22351      has_space=`$ECHO "$complete" | $GREP " "`
22352      if test "x$has_space" != x; then
22353        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22355      fi
22356      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22357    fi
22358  fi
22359
22360  # Now join together the path and the arguments once again
22361  if test "x$arguments" != xEOL; then
22362    new_complete="$new_path ${arguments% *}"
22363  else
22364    new_complete="$new_path"
22365  fi
22366
22367  if test "x$complete" != "x$new_complete"; then
22368    OBJC="$new_complete"
22369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22370$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22371  fi
22372
22373  else
22374    OBJC=
22375  fi
22376
22377  # Restore the flags to the user specified values.
22378  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22379  CFLAGS="$ORG_CFLAGS"
22380  CXXFLAGS="$ORG_CXXFLAGS"
22381  OBJCFLAGS="$ORG_OBJCFLAGS"
22382
22383  LD="$CC"
22384  LDEXE="$CC"
22385  LDCXX="$CXX"
22386  LDEXECXX="$CXX"
22387
22388  # LDEXE is the linker to use, when creating executables.
22389
22390  # Linking C++ libraries.
22391
22392  # Linking C++ executables.
22393
22394
22395  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22396    if test -n "$ac_tool_prefix"; then
22397  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22398set dummy ${ac_tool_prefix}ar; ac_word=$2
22399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22400$as_echo_n "checking for $ac_word... " >&6; }
22401if ${ac_cv_prog_AR+:} false; then :
22402  $as_echo_n "(cached) " >&6
22403else
22404  if test -n "$AR"; then
22405  ac_cv_prog_AR="$AR" # Let the user override the test.
22406else
22407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22408for as_dir in $PATH
22409do
22410  IFS=$as_save_IFS
22411  test -z "$as_dir" && as_dir=.
22412    for ac_exec_ext in '' $ac_executable_extensions; do
22413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22414    ac_cv_prog_AR="${ac_tool_prefix}ar"
22415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22416    break 2
22417  fi
22418done
22419  done
22420IFS=$as_save_IFS
22421
22422fi
22423fi
22424AR=$ac_cv_prog_AR
22425if test -n "$AR"; then
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22427$as_echo "$AR" >&6; }
22428else
22429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22430$as_echo "no" >&6; }
22431fi
22432
22433
22434fi
22435if test -z "$ac_cv_prog_AR"; then
22436  ac_ct_AR=$AR
22437  # Extract the first word of "ar", so it can be a program name with args.
22438set dummy ar; ac_word=$2
22439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22440$as_echo_n "checking for $ac_word... " >&6; }
22441if ${ac_cv_prog_ac_ct_AR+:} false; then :
22442  $as_echo_n "(cached) " >&6
22443else
22444  if test -n "$ac_ct_AR"; then
22445  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22446else
22447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22448for as_dir in $PATH
22449do
22450  IFS=$as_save_IFS
22451  test -z "$as_dir" && as_dir=.
22452    for ac_exec_ext in '' $ac_executable_extensions; do
22453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22454    ac_cv_prog_ac_ct_AR="ar"
22455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22456    break 2
22457  fi
22458done
22459  done
22460IFS=$as_save_IFS
22461
22462fi
22463fi
22464ac_ct_AR=$ac_cv_prog_ac_ct_AR
22465if test -n "$ac_ct_AR"; then
22466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22467$as_echo "$ac_ct_AR" >&6; }
22468else
22469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22470$as_echo "no" >&6; }
22471fi
22472
22473  if test "x$ac_ct_AR" = x; then
22474    AR=""
22475  else
22476    case $cross_compiling:$ac_tool_warned in
22477yes:)
22478{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22479$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22480ac_tool_warned=yes ;;
22481esac
22482    AR=$ac_ct_AR
22483  fi
22484else
22485  AR="$ac_cv_prog_AR"
22486fi
22487
22488
22489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22490
22491  # First separate the path from the arguments. This will split at the first
22492  # space.
22493  complete="$AR"
22494  path="${complete%% *}"
22495  tmp="$complete EOL"
22496  arguments="${tmp#* }"
22497
22498  # Input might be given as Windows format, start by converting to
22499  # unix format.
22500  new_path=`$CYGPATH -u "$path"`
22501
22502  # Now try to locate executable using which
22503  new_path=`$WHICH "$new_path" 2> /dev/null`
22504  # bat and cmd files are not always considered executable in cygwin causing which
22505  # to not find them
22506  if test "x$new_path" = x \
22507      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22508      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22509    new_path=`$CYGPATH -u "$path"`
22510  fi
22511  if test "x$new_path" = x; then
22512    # Oops. Which didn't find the executable.
22513    # The splitting of arguments from the executable at a space might have been incorrect,
22514    # since paths with space are more likely in Windows. Give it another try with the whole
22515    # argument.
22516    path="$complete"
22517    arguments="EOL"
22518    new_path=`$CYGPATH -u "$path"`
22519    new_path=`$WHICH "$new_path" 2> /dev/null`
22520    # bat and cmd files are not always considered executable in cygwin causing which
22521    # to not find them
22522    if test "x$new_path" = x \
22523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22525      new_path=`$CYGPATH -u "$path"`
22526    fi
22527    if test "x$new_path" = x; then
22528      # It's still not found. Now this is an unrecoverable error.
22529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22530$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22531      has_space=`$ECHO "$complete" | $GREP " "`
22532      if test "x$has_space" != x; then
22533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22535      fi
22536      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22537    fi
22538  fi
22539
22540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22543  # "foo.exe" is OK but "foo" is an error.
22544  #
22545  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22546  # It is also a way to make sure we got the proper file name for the real test later on.
22547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22548  if test "x$test_shortpath" = x; then
22549    # Short path failed, file does not exist as specified.
22550    # Try adding .exe or .cmd
22551    if test -f "${new_path}.exe"; then
22552      input_to_shortpath="${new_path}.exe"
22553    elif test -f "${new_path}.cmd"; then
22554      input_to_shortpath="${new_path}.cmd"
22555    else
22556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22557$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22558      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22559$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22560      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22561    fi
22562  else
22563    input_to_shortpath="$new_path"
22564  fi
22565
22566  # Call helper function which possibly converts this using DOS-style short mode.
22567  # If so, the updated path is stored in $new_path.
22568  new_path="$input_to_shortpath"
22569
22570  input_path="$input_to_shortpath"
22571  # Check if we need to convert this using DOS-style short mode. If the path
22572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22573  # take no chances and rewrite it.
22574  # Note: m4 eats our [], so we need to use [ and ] instead.
22575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22576  if test "x$has_forbidden_chars" != x; then
22577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22581      # Going to short mode and back again did indeed matter. Since short mode is
22582      # case insensitive, let's make it lowercase to improve readability.
22583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22584      # Now convert it back to Unix-stile (cygpath)
22585      input_path=`$CYGPATH -u "$shortmode_path"`
22586      new_path="$input_path"
22587    fi
22588  fi
22589
22590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22591  if test "x$test_cygdrive_prefix" = x; then
22592    # As a simple fix, exclude /usr/bin since it's not a real path.
22593    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22595      # a path prefixed by /cygdrive for fixpath to work.
22596      new_path="$CYGWIN_ROOT_PATH$input_path"
22597    fi
22598  fi
22599
22600  # remove trailing .exe if any
22601  new_path="${new_path/%.exe/}"
22602
22603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22604
22605  # First separate the path from the arguments. This will split at the first
22606  # space.
22607  complete="$AR"
22608  path="${complete%% *}"
22609  tmp="$complete EOL"
22610  arguments="${tmp#* }"
22611
22612  # Input might be given as Windows format, start by converting to
22613  # unix format.
22614  new_path="$path"
22615
22616  windows_path="$new_path"
22617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22618    unix_path=`$CYGPATH -u "$windows_path"`
22619    new_path="$unix_path"
22620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22622    new_path="$unix_path"
22623  fi
22624
22625
22626  # Now try to locate executable using which
22627  new_path=`$WHICH "$new_path" 2> /dev/null`
22628
22629  if test "x$new_path" = x; then
22630    # Oops. Which didn't find the executable.
22631    # The splitting of arguments from the executable at a space might have been incorrect,
22632    # since paths with space are more likely in Windows. Give it another try with the whole
22633    # argument.
22634    path="$complete"
22635    arguments="EOL"
22636    new_path="$path"
22637
22638  windows_path="$new_path"
22639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22640    unix_path=`$CYGPATH -u "$windows_path"`
22641    new_path="$unix_path"
22642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22644    new_path="$unix_path"
22645  fi
22646
22647
22648    new_path=`$WHICH "$new_path" 2> /dev/null`
22649
22650    if test "x$new_path" = x; then
22651      # It's still not found. Now this is an unrecoverable error.
22652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22653$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22654      has_space=`$ECHO "$complete" | $GREP " "`
22655      if test "x$has_space" != x; then
22656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22658      fi
22659      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22660    fi
22661  fi
22662
22663  # Now new_path has a complete unix path to the binary
22664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22665    # Keep paths in /bin as-is, but remove trailing .exe if any
22666    new_path="${new_path/%.exe/}"
22667    # Do not save /bin paths to all_fixpath_prefixes!
22668  else
22669    # Not in mixed or Windows style, start by that.
22670    new_path=`cmd //c echo $new_path`
22671
22672  input_path="$new_path"
22673  # Check if we need to convert this using DOS-style short mode. If the path
22674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22675  # take no chances and rewrite it.
22676  # Note: m4 eats our [], so we need to use [ and ] instead.
22677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22678  if test "x$has_forbidden_chars" != x; then
22679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22681  fi
22682
22683    # Output is in $new_path
22684
22685  windows_path="$new_path"
22686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22687    unix_path=`$CYGPATH -u "$windows_path"`
22688    new_path="$unix_path"
22689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22691    new_path="$unix_path"
22692  fi
22693
22694    # remove trailing .exe if any
22695    new_path="${new_path/%.exe/}"
22696
22697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22699  fi
22700
22701  else
22702    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
22711    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22712    if test -z "$is_absolute_path"; then
22713      # Path to executable is not absolute. Find it.
22714      IFS_save="$IFS"
22715      IFS=:
22716      for p in $PATH; do
22717        if test -f "$p/$path" && test -x "$p/$path"; then
22718          new_path="$p/$path"
22719          break
22720        fi
22721      done
22722      IFS="$IFS_save"
22723    else
22724      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22725$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22726      new_path="$path"
22727    fi
22728
22729    if test "x$new_path" = x; then
22730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22731$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22732      has_space=`$ECHO "$complete" | $GREP " "`
22733      if test "x$has_space" != x; then
22734        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22735$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22736      fi
22737      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22738    fi
22739  fi
22740
22741  # Now join together the path and the arguments once again
22742  if test "x$arguments" != xEOL; then
22743    new_complete="$new_path ${arguments% *}"
22744  else
22745    new_complete="$new_path"
22746  fi
22747
22748  if test "x$complete" != "x$new_complete"; then
22749    AR="$new_complete"
22750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22751$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22752  fi
22753
22754  fi
22755  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22756    ARFLAGS="-r"
22757  else
22758    ARFLAGS=""
22759  fi
22760
22761
22762  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22763  HOTSPOT_CXX="$CXX"
22764  HOTSPOT_LD="$LD"
22765
22766
22767
22768  COMPILER_NAME=gcc
22769  COMPILER_TYPE=CC
22770  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22771
22772    # For now, assume that we are always compiling using cl.exe.
22773    CC_OUT_OPTION=-Fo
22774    EXE_OUT_OPTION=-out:
22775    LD_OUT_OPTION=-out:
22776    AR_OUT_OPTION=-out:
22777    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22778    # program for something completely different.
22779    # Extract the first word of "link", so it can be a program name with args.
22780set dummy link; ac_word=$2
22781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22782$as_echo_n "checking for $ac_word... " >&6; }
22783if ${ac_cv_prog_WINLD+:} false; then :
22784  $as_echo_n "(cached) " >&6
22785else
22786  if test -n "$WINLD"; then
22787  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22788else
22789  ac_prog_rejected=no
22790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22791for as_dir in $PATH
22792do
22793  IFS=$as_save_IFS
22794  test -z "$as_dir" && as_dir=.
22795    for ac_exec_ext in '' $ac_executable_extensions; do
22796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22797    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22798       ac_prog_rejected=yes
22799       continue
22800     fi
22801    ac_cv_prog_WINLD="link"
22802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22803    break 2
22804  fi
22805done
22806  done
22807IFS=$as_save_IFS
22808
22809if test $ac_prog_rejected = yes; then
22810  # We found a bogon in the path, so make sure we never use it.
22811  set dummy $ac_cv_prog_WINLD
22812  shift
22813  if test $# != 0; then
22814    # We chose a different compiler from the bogus one.
22815    # However, it has the same basename, so the bogon will be chosen
22816    # first if we set WINLD to just the basename; use the full file name.
22817    shift
22818    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22819  fi
22820fi
22821fi
22822fi
22823WINLD=$ac_cv_prog_WINLD
22824if test -n "$WINLD"; then
22825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22826$as_echo "$WINLD" >&6; }
22827else
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22829$as_echo "no" >&6; }
22830fi
22831
22832
22833    # Since we must ignore the first found link, WINLD will contain
22834    # the full path to the link.exe program.
22835
22836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22837
22838  # First separate the path from the arguments. This will split at the first
22839  # space.
22840  complete="$WINLD"
22841  path="${complete%% *}"
22842  tmp="$complete EOL"
22843  arguments="${tmp#* }"
22844
22845  # Input might be given as Windows format, start by converting to
22846  # unix format.
22847  new_path=`$CYGPATH -u "$path"`
22848
22849  # Now try to locate executable using which
22850  new_path=`$WHICH "$new_path" 2> /dev/null`
22851  # bat and cmd files are not always considered executable in cygwin causing which
22852  # to not find them
22853  if test "x$new_path" = x \
22854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22856    new_path=`$CYGPATH -u "$path"`
22857  fi
22858  if test "x$new_path" = x; then
22859    # Oops. Which didn't find the executable.
22860    # The splitting of arguments from the executable at a space might have been incorrect,
22861    # since paths with space are more likely in Windows. Give it another try with the whole
22862    # argument.
22863    path="$complete"
22864    arguments="EOL"
22865    new_path=`$CYGPATH -u "$path"`
22866    new_path=`$WHICH "$new_path" 2> /dev/null`
22867    # bat and cmd files are not always considered executable in cygwin causing which
22868    # to not find them
22869    if test "x$new_path" = x \
22870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22872      new_path=`$CYGPATH -u "$path"`
22873    fi
22874    if test "x$new_path" = x; then
22875      # It's still not found. Now this is an unrecoverable error.
22876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22877$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22878      has_space=`$ECHO "$complete" | $GREP " "`
22879      if test "x$has_space" != x; then
22880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22882      fi
22883      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22884    fi
22885  fi
22886
22887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22890  # "foo.exe" is OK but "foo" is an error.
22891  #
22892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22893  # It is also a way to make sure we got the proper file name for the real test later on.
22894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22895  if test "x$test_shortpath" = x; then
22896    # Short path failed, file does not exist as specified.
22897    # Try adding .exe or .cmd
22898    if test -f "${new_path}.exe"; then
22899      input_to_shortpath="${new_path}.exe"
22900    elif test -f "${new_path}.cmd"; then
22901      input_to_shortpath="${new_path}.cmd"
22902    else
22903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22904$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22907      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22908    fi
22909  else
22910    input_to_shortpath="$new_path"
22911  fi
22912
22913  # Call helper function which possibly converts this using DOS-style short mode.
22914  # If so, the updated path is stored in $new_path.
22915  new_path="$input_to_shortpath"
22916
22917  input_path="$input_to_shortpath"
22918  # Check if we need to convert this using DOS-style short mode. If the path
22919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22920  # take no chances and rewrite it.
22921  # Note: m4 eats our [], so we need to use [ and ] instead.
22922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22923  if test "x$has_forbidden_chars" != x; then
22924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22928      # Going to short mode and back again did indeed matter. Since short mode is
22929      # case insensitive, let's make it lowercase to improve readability.
22930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22931      # Now convert it back to Unix-stile (cygpath)
22932      input_path=`$CYGPATH -u "$shortmode_path"`
22933      new_path="$input_path"
22934    fi
22935  fi
22936
22937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22938  if test "x$test_cygdrive_prefix" = x; then
22939    # As a simple fix, exclude /usr/bin since it's not a real path.
22940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22942      # a path prefixed by /cygdrive for fixpath to work.
22943      new_path="$CYGWIN_ROOT_PATH$input_path"
22944    fi
22945  fi
22946
22947  # remove trailing .exe if any
22948  new_path="${new_path/%.exe/}"
22949
22950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22951
22952  # First separate the path from the arguments. This will split at the first
22953  # space.
22954  complete="$WINLD"
22955  path="${complete%% *}"
22956  tmp="$complete EOL"
22957  arguments="${tmp#* }"
22958
22959  # Input might be given as Windows format, start by converting to
22960  # unix format.
22961  new_path="$path"
22962
22963  windows_path="$new_path"
22964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22965    unix_path=`$CYGPATH -u "$windows_path"`
22966    new_path="$unix_path"
22967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22969    new_path="$unix_path"
22970  fi
22971
22972
22973  # Now try to locate executable using which
22974  new_path=`$WHICH "$new_path" 2> /dev/null`
22975
22976  if test "x$new_path" = x; then
22977    # Oops. Which didn't find the executable.
22978    # The splitting of arguments from the executable at a space might have been incorrect,
22979    # since paths with space are more likely in Windows. Give it another try with the whole
22980    # argument.
22981    path="$complete"
22982    arguments="EOL"
22983    new_path="$path"
22984
22985  windows_path="$new_path"
22986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22987    unix_path=`$CYGPATH -u "$windows_path"`
22988    new_path="$unix_path"
22989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22991    new_path="$unix_path"
22992  fi
22993
22994
22995    new_path=`$WHICH "$new_path" 2> /dev/null`
22996
22997    if test "x$new_path" = x; then
22998      # It's still not found. Now this is an unrecoverable error.
22999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23000$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23001      has_space=`$ECHO "$complete" | $GREP " "`
23002      if test "x$has_space" != x; then
23003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23005      fi
23006      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23007    fi
23008  fi
23009
23010  # Now new_path has a complete unix path to the binary
23011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23012    # Keep paths in /bin as-is, but remove trailing .exe if any
23013    new_path="${new_path/%.exe/}"
23014    # Do not save /bin paths to all_fixpath_prefixes!
23015  else
23016    # Not in mixed or Windows style, start by that.
23017    new_path=`cmd //c echo $new_path`
23018
23019  input_path="$new_path"
23020  # Check if we need to convert this using DOS-style short mode. If the path
23021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23022  # take no chances and rewrite it.
23023  # Note: m4 eats our [], so we need to use [ and ] instead.
23024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23025  if test "x$has_forbidden_chars" != x; then
23026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23028  fi
23029
23030    # Output is in $new_path
23031
23032  windows_path="$new_path"
23033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23034    unix_path=`$CYGPATH -u "$windows_path"`
23035    new_path="$unix_path"
23036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23038    new_path="$unix_path"
23039  fi
23040
23041    # remove trailing .exe if any
23042    new_path="${new_path/%.exe/}"
23043
23044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23046  fi
23047
23048  else
23049    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
23058    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23059    if test -z "$is_absolute_path"; then
23060      # Path to executable is not absolute. Find it.
23061      IFS_save="$IFS"
23062      IFS=:
23063      for p in $PATH; do
23064        if test -f "$p/$path" && test -x "$p/$path"; then
23065          new_path="$p/$path"
23066          break
23067        fi
23068      done
23069      IFS="$IFS_save"
23070    else
23071      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23072$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23073      new_path="$path"
23074    fi
23075
23076    if test "x$new_path" = x; then
23077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23078$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23079      has_space=`$ECHO "$complete" | $GREP " "`
23080      if test "x$has_space" != x; then
23081        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23083      fi
23084      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23085    fi
23086  fi
23087
23088  # Now join together the path and the arguments once again
23089  if test "x$arguments" != xEOL; then
23090    new_complete="$new_path ${arguments% *}"
23091  else
23092    new_complete="$new_path"
23093  fi
23094
23095  if test "x$complete" != "x$new_complete"; then
23096    WINLD="$new_complete"
23097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23098$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23099  fi
23100
23101    printf "Windows linker was found at $WINLD\n"
23102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23103$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23104    "$WINLD" --version > /dev/null
23105    if test $? -eq 0 ; then
23106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23107$as_echo "no" >&6; }
23108      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23109    else
23110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23111$as_echo "yes" >&6; }
23112    fi
23113    LD="$WINLD"
23114    LDEXE="$WINLD"
23115    LDCXX="$WINLD"
23116    LDEXECXX="$WINLD"
23117
23118    # Extract the first word of "mt", so it can be a program name with args.
23119set dummy mt; ac_word=$2
23120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23121$as_echo_n "checking for $ac_word... " >&6; }
23122if ${ac_cv_prog_MT+:} false; then :
23123  $as_echo_n "(cached) " >&6
23124else
23125  if test -n "$MT"; then
23126  ac_cv_prog_MT="$MT" # Let the user override the test.
23127else
23128  ac_prog_rejected=no
23129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23130for as_dir in $PATH
23131do
23132  IFS=$as_save_IFS
23133  test -z "$as_dir" && as_dir=.
23134    for ac_exec_ext in '' $ac_executable_extensions; do
23135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23136    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23137       ac_prog_rejected=yes
23138       continue
23139     fi
23140    ac_cv_prog_MT="mt"
23141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23142    break 2
23143  fi
23144done
23145  done
23146IFS=$as_save_IFS
23147
23148if test $ac_prog_rejected = yes; then
23149  # We found a bogon in the path, so make sure we never use it.
23150  set dummy $ac_cv_prog_MT
23151  shift
23152  if test $# != 0; then
23153    # We chose a different compiler from the bogus one.
23154    # However, it has the same basename, so the bogon will be chosen
23155    # first if we set MT to just the basename; use the full file name.
23156    shift
23157    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23158  fi
23159fi
23160fi
23161fi
23162MT=$ac_cv_prog_MT
23163if test -n "$MT"; then
23164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23165$as_echo "$MT" >&6; }
23166else
23167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23168$as_echo "no" >&6; }
23169fi
23170
23171
23172
23173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23174
23175  # First separate the path from the arguments. This will split at the first
23176  # space.
23177  complete="$MT"
23178  path="${complete%% *}"
23179  tmp="$complete EOL"
23180  arguments="${tmp#* }"
23181
23182  # Input might be given as Windows format, start by converting to
23183  # unix format.
23184  new_path=`$CYGPATH -u "$path"`
23185
23186  # Now try to locate executable using which
23187  new_path=`$WHICH "$new_path" 2> /dev/null`
23188  # bat and cmd files are not always considered executable in cygwin causing which
23189  # to not find them
23190  if test "x$new_path" = x \
23191      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23192      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23193    new_path=`$CYGPATH -u "$path"`
23194  fi
23195  if test "x$new_path" = x; then
23196    # Oops. Which didn't find the executable.
23197    # The splitting of arguments from the executable at a space might have been incorrect,
23198    # since paths with space are more likely in Windows. Give it another try with the whole
23199    # argument.
23200    path="$complete"
23201    arguments="EOL"
23202    new_path=`$CYGPATH -u "$path"`
23203    new_path=`$WHICH "$new_path" 2> /dev/null`
23204    # bat and cmd files are not always considered executable in cygwin causing which
23205    # to not find them
23206    if test "x$new_path" = x \
23207        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23208        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23209      new_path=`$CYGPATH -u "$path"`
23210    fi
23211    if test "x$new_path" = x; then
23212      # It's still not found. Now this is an unrecoverable error.
23213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23214$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23215      has_space=`$ECHO "$complete" | $GREP " "`
23216      if test "x$has_space" != x; then
23217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23219      fi
23220      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23221    fi
23222  fi
23223
23224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23227  # "foo.exe" is OK but "foo" is an error.
23228  #
23229  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23230  # It is also a way to make sure we got the proper file name for the real test later on.
23231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23232  if test "x$test_shortpath" = x; then
23233    # Short path failed, file does not exist as specified.
23234    # Try adding .exe or .cmd
23235    if test -f "${new_path}.exe"; then
23236      input_to_shortpath="${new_path}.exe"
23237    elif test -f "${new_path}.cmd"; then
23238      input_to_shortpath="${new_path}.cmd"
23239    else
23240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23241$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23242      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23243$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23244      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23245    fi
23246  else
23247    input_to_shortpath="$new_path"
23248  fi
23249
23250  # Call helper function which possibly converts this using DOS-style short mode.
23251  # If so, the updated path is stored in $new_path.
23252  new_path="$input_to_shortpath"
23253
23254  input_path="$input_to_shortpath"
23255  # Check if we need to convert this using DOS-style short mode. If the path
23256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23257  # take no chances and rewrite it.
23258  # Note: m4 eats our [], so we need to use [ and ] instead.
23259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23260  if test "x$has_forbidden_chars" != x; then
23261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23265      # Going to short mode and back again did indeed matter. Since short mode is
23266      # case insensitive, let's make it lowercase to improve readability.
23267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23268      # Now convert it back to Unix-stile (cygpath)
23269      input_path=`$CYGPATH -u "$shortmode_path"`
23270      new_path="$input_path"
23271    fi
23272  fi
23273
23274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23275  if test "x$test_cygdrive_prefix" = x; then
23276    # As a simple fix, exclude /usr/bin since it's not a real path.
23277    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23279      # a path prefixed by /cygdrive for fixpath to work.
23280      new_path="$CYGWIN_ROOT_PATH$input_path"
23281    fi
23282  fi
23283
23284  # remove trailing .exe if any
23285  new_path="${new_path/%.exe/}"
23286
23287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23288
23289  # First separate the path from the arguments. This will split at the first
23290  # space.
23291  complete="$MT"
23292  path="${complete%% *}"
23293  tmp="$complete EOL"
23294  arguments="${tmp#* }"
23295
23296  # Input might be given as Windows format, start by converting to
23297  # unix format.
23298  new_path="$path"
23299
23300  windows_path="$new_path"
23301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23302    unix_path=`$CYGPATH -u "$windows_path"`
23303    new_path="$unix_path"
23304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23306    new_path="$unix_path"
23307  fi
23308
23309
23310  # Now try to locate executable using which
23311  new_path=`$WHICH "$new_path" 2> /dev/null`
23312
23313  if test "x$new_path" = x; then
23314    # Oops. Which didn't find the executable.
23315    # The splitting of arguments from the executable at a space might have been incorrect,
23316    # since paths with space are more likely in Windows. Give it another try with the whole
23317    # argument.
23318    path="$complete"
23319    arguments="EOL"
23320    new_path="$path"
23321
23322  windows_path="$new_path"
23323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23324    unix_path=`$CYGPATH -u "$windows_path"`
23325    new_path="$unix_path"
23326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23328    new_path="$unix_path"
23329  fi
23330
23331
23332    new_path=`$WHICH "$new_path" 2> /dev/null`
23333
23334    if test "x$new_path" = x; then
23335      # It's still not found. Now this is an unrecoverable error.
23336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23337$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23338      has_space=`$ECHO "$complete" | $GREP " "`
23339      if test "x$has_space" != x; then
23340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23342      fi
23343      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23344    fi
23345  fi
23346
23347  # Now new_path has a complete unix path to the binary
23348  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23349    # Keep paths in /bin as-is, but remove trailing .exe if any
23350    new_path="${new_path/%.exe/}"
23351    # Do not save /bin paths to all_fixpath_prefixes!
23352  else
23353    # Not in mixed or Windows style, start by that.
23354    new_path=`cmd //c echo $new_path`
23355
23356  input_path="$new_path"
23357  # Check if we need to convert this using DOS-style short mode. If the path
23358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23359  # take no chances and rewrite it.
23360  # Note: m4 eats our [], so we need to use [ and ] instead.
23361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23362  if test "x$has_forbidden_chars" != x; then
23363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23365  fi
23366
23367    # Output is in $new_path
23368
23369  windows_path="$new_path"
23370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23371    unix_path=`$CYGPATH -u "$windows_path"`
23372    new_path="$unix_path"
23373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23375    new_path="$unix_path"
23376  fi
23377
23378    # remove trailing .exe if any
23379    new_path="${new_path/%.exe/}"
23380
23381    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23382    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23383  fi
23384
23385  else
23386    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
23395    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23396    if test -z "$is_absolute_path"; then
23397      # Path to executable is not absolute. Find it.
23398      IFS_save="$IFS"
23399      IFS=:
23400      for p in $PATH; do
23401        if test -f "$p/$path" && test -x "$p/$path"; then
23402          new_path="$p/$path"
23403          break
23404        fi
23405      done
23406      IFS="$IFS_save"
23407    else
23408      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23409$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23410      new_path="$path"
23411    fi
23412
23413    if test "x$new_path" = x; then
23414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23415$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23416      has_space=`$ECHO "$complete" | $GREP " "`
23417      if test "x$has_space" != x; then
23418        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23419$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23420      fi
23421      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23422    fi
23423  fi
23424
23425  # Now join together the path and the arguments once again
23426  if test "x$arguments" != xEOL; then
23427    new_complete="$new_path ${arguments% *}"
23428  else
23429    new_complete="$new_path"
23430  fi
23431
23432  if test "x$complete" != "x$new_complete"; then
23433    MT="$new_complete"
23434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23435$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23436  fi
23437
23438    # The resource compiler
23439    # Extract the first word of "rc", so it can be a program name with args.
23440set dummy rc; ac_word=$2
23441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23442$as_echo_n "checking for $ac_word... " >&6; }
23443if ${ac_cv_prog_RC+:} false; then :
23444  $as_echo_n "(cached) " >&6
23445else
23446  if test -n "$RC"; then
23447  ac_cv_prog_RC="$RC" # Let the user override the test.
23448else
23449  ac_prog_rejected=no
23450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23451for as_dir in $PATH
23452do
23453  IFS=$as_save_IFS
23454  test -z "$as_dir" && as_dir=.
23455    for ac_exec_ext in '' $ac_executable_extensions; do
23456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23457    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23458       ac_prog_rejected=yes
23459       continue
23460     fi
23461    ac_cv_prog_RC="rc"
23462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23463    break 2
23464  fi
23465done
23466  done
23467IFS=$as_save_IFS
23468
23469if test $ac_prog_rejected = yes; then
23470  # We found a bogon in the path, so make sure we never use it.
23471  set dummy $ac_cv_prog_RC
23472  shift
23473  if test $# != 0; then
23474    # We chose a different compiler from the bogus one.
23475    # However, it has the same basename, so the bogon will be chosen
23476    # first if we set RC to just the basename; use the full file name.
23477    shift
23478    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23479  fi
23480fi
23481fi
23482fi
23483RC=$ac_cv_prog_RC
23484if test -n "$RC"; then
23485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23486$as_echo "$RC" >&6; }
23487else
23488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23489$as_echo "no" >&6; }
23490fi
23491
23492
23493
23494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23495
23496  # First separate the path from the arguments. This will split at the first
23497  # space.
23498  complete="$RC"
23499  path="${complete%% *}"
23500  tmp="$complete EOL"
23501  arguments="${tmp#* }"
23502
23503  # Input might be given as Windows format, start by converting to
23504  # unix format.
23505  new_path=`$CYGPATH -u "$path"`
23506
23507  # Now try to locate executable using which
23508  new_path=`$WHICH "$new_path" 2> /dev/null`
23509  # bat and cmd files are not always considered executable in cygwin causing which
23510  # to not find them
23511  if test "x$new_path" = x \
23512      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23513      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23514    new_path=`$CYGPATH -u "$path"`
23515  fi
23516  if test "x$new_path" = x; then
23517    # Oops. Which didn't find the executable.
23518    # The splitting of arguments from the executable at a space might have been incorrect,
23519    # since paths with space are more likely in Windows. Give it another try with the whole
23520    # argument.
23521    path="$complete"
23522    arguments="EOL"
23523    new_path=`$CYGPATH -u "$path"`
23524    new_path=`$WHICH "$new_path" 2> /dev/null`
23525    # bat and cmd files are not always considered executable in cygwin causing which
23526    # to not find them
23527    if test "x$new_path" = x \
23528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23530      new_path=`$CYGPATH -u "$path"`
23531    fi
23532    if test "x$new_path" = x; then
23533      # It's still not found. Now this is an unrecoverable error.
23534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23535$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23536      has_space=`$ECHO "$complete" | $GREP " "`
23537      if test "x$has_space" != x; then
23538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23540      fi
23541      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23542    fi
23543  fi
23544
23545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23548  # "foo.exe" is OK but "foo" is an error.
23549  #
23550  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23551  # It is also a way to make sure we got the proper file name for the real test later on.
23552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23553  if test "x$test_shortpath" = x; then
23554    # Short path failed, file does not exist as specified.
23555    # Try adding .exe or .cmd
23556    if test -f "${new_path}.exe"; then
23557      input_to_shortpath="${new_path}.exe"
23558    elif test -f "${new_path}.cmd"; then
23559      input_to_shortpath="${new_path}.cmd"
23560    else
23561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23562$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23565      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23566    fi
23567  else
23568    input_to_shortpath="$new_path"
23569  fi
23570
23571  # Call helper function which possibly converts this using DOS-style short mode.
23572  # If so, the updated path is stored in $new_path.
23573  new_path="$input_to_shortpath"
23574
23575  input_path="$input_to_shortpath"
23576  # Check if we need to convert this using DOS-style short mode. If the path
23577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23578  # take no chances and rewrite it.
23579  # Note: m4 eats our [], so we need to use [ and ] instead.
23580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23581  if test "x$has_forbidden_chars" != x; then
23582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23586      # Going to short mode and back again did indeed matter. Since short mode is
23587      # case insensitive, let's make it lowercase to improve readability.
23588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23589      # Now convert it back to Unix-stile (cygpath)
23590      input_path=`$CYGPATH -u "$shortmode_path"`
23591      new_path="$input_path"
23592    fi
23593  fi
23594
23595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23596  if test "x$test_cygdrive_prefix" = x; then
23597    # As a simple fix, exclude /usr/bin since it's not a real path.
23598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23600      # a path prefixed by /cygdrive for fixpath to work.
23601      new_path="$CYGWIN_ROOT_PATH$input_path"
23602    fi
23603  fi
23604
23605  # remove trailing .exe if any
23606  new_path="${new_path/%.exe/}"
23607
23608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23609
23610  # First separate the path from the arguments. This will split at the first
23611  # space.
23612  complete="$RC"
23613  path="${complete%% *}"
23614  tmp="$complete EOL"
23615  arguments="${tmp#* }"
23616
23617  # Input might be given as Windows format, start by converting to
23618  # unix format.
23619  new_path="$path"
23620
23621  windows_path="$new_path"
23622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23623    unix_path=`$CYGPATH -u "$windows_path"`
23624    new_path="$unix_path"
23625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23627    new_path="$unix_path"
23628  fi
23629
23630
23631  # Now try to locate executable using which
23632  new_path=`$WHICH "$new_path" 2> /dev/null`
23633
23634  if test "x$new_path" = x; then
23635    # Oops. Which didn't find the executable.
23636    # The splitting of arguments from the executable at a space might have been incorrect,
23637    # since paths with space are more likely in Windows. Give it another try with the whole
23638    # argument.
23639    path="$complete"
23640    arguments="EOL"
23641    new_path="$path"
23642
23643  windows_path="$new_path"
23644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23645    unix_path=`$CYGPATH -u "$windows_path"`
23646    new_path="$unix_path"
23647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23649    new_path="$unix_path"
23650  fi
23651
23652
23653    new_path=`$WHICH "$new_path" 2> /dev/null`
23654
23655    if test "x$new_path" = x; then
23656      # It's still not found. Now this is an unrecoverable error.
23657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23658$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23659      has_space=`$ECHO "$complete" | $GREP " "`
23660      if test "x$has_space" != x; then
23661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23663      fi
23664      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23665    fi
23666  fi
23667
23668  # Now new_path has a complete unix path to the binary
23669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23670    # Keep paths in /bin as-is, but remove trailing .exe if any
23671    new_path="${new_path/%.exe/}"
23672    # Do not save /bin paths to all_fixpath_prefixes!
23673  else
23674    # Not in mixed or Windows style, start by that.
23675    new_path=`cmd //c echo $new_path`
23676
23677  input_path="$new_path"
23678  # Check if we need to convert this using DOS-style short mode. If the path
23679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23680  # take no chances and rewrite it.
23681  # Note: m4 eats our [], so we need to use [ and ] instead.
23682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23683  if test "x$has_forbidden_chars" != x; then
23684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23686  fi
23687
23688    # Output is in $new_path
23689
23690  windows_path="$new_path"
23691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23692    unix_path=`$CYGPATH -u "$windows_path"`
23693    new_path="$unix_path"
23694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23696    new_path="$unix_path"
23697  fi
23698
23699    # remove trailing .exe if any
23700    new_path="${new_path/%.exe/}"
23701
23702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23704  fi
23705
23706  else
23707    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
23716    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23717    if test -z "$is_absolute_path"; then
23718      # Path to executable is not absolute. Find it.
23719      IFS_save="$IFS"
23720      IFS=:
23721      for p in $PATH; do
23722        if test -f "$p/$path" && test -x "$p/$path"; then
23723          new_path="$p/$path"
23724          break
23725        fi
23726      done
23727      IFS="$IFS_save"
23728    else
23729      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23730$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23731      new_path="$path"
23732    fi
23733
23734    if test "x$new_path" = x; then
23735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23736$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23737      has_space=`$ECHO "$complete" | $GREP " "`
23738      if test "x$has_space" != x; then
23739        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23741      fi
23742      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23743    fi
23744  fi
23745
23746  # Now join together the path and the arguments once again
23747  if test "x$arguments" != xEOL; then
23748    new_complete="$new_path ${arguments% *}"
23749  else
23750    new_complete="$new_path"
23751  fi
23752
23753  if test "x$complete" != "x$new_complete"; then
23754    RC="$new_complete"
23755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23756$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23757  fi
23758
23759
23760    # For hotspot, we need these in Windows mixed path,
23761    # so rewrite them all. Need added .exe suffix.
23762    HOTSPOT_CXX="$CXX.exe"
23763    HOTSPOT_LD="$LD.exe"
23764    HOTSPOT_MT="$MT.exe"
23765    HOTSPOT_RC="$RC.exe"
23766
23767  unix_path="$HOTSPOT_CXX"
23768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23769    windows_path=`$CYGPATH -m "$unix_path"`
23770    HOTSPOT_CXX="$windows_path"
23771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23772    windows_path=`cmd //c echo $unix_path`
23773    HOTSPOT_CXX="$windows_path"
23774  fi
23775
23776
23777  unix_path="$HOTSPOT_LD"
23778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23779    windows_path=`$CYGPATH -m "$unix_path"`
23780    HOTSPOT_LD="$windows_path"
23781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23782    windows_path=`cmd //c echo $unix_path`
23783    HOTSPOT_LD="$windows_path"
23784  fi
23785
23786
23787  unix_path="$HOTSPOT_MT"
23788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789    windows_path=`$CYGPATH -m "$unix_path"`
23790    HOTSPOT_MT="$windows_path"
23791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23792    windows_path=`cmd //c echo $unix_path`
23793    HOTSPOT_MT="$windows_path"
23794  fi
23795
23796
23797  unix_path="$HOTSPOT_RC"
23798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23799    windows_path=`$CYGPATH -m "$unix_path"`
23800    HOTSPOT_RC="$windows_path"
23801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23802    windows_path=`cmd //c echo $unix_path`
23803    HOTSPOT_RC="$windows_path"
23804  fi
23805
23806
23807
23808
23809    RC_FLAGS="-nologo -l 0x409 -r"
23810    if test "x$VARIANT" = xOPT; then :
23811
23812    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23813
23814fi
23815
23816  # The version variables used to create RC_FLAGS may be overridden
23817  # in a custom configure script, or possibly the command line.
23818  # Let those variables be expanded at make time in spec.gmk.
23819  # The \$ are escaped to the shell, and the $(...) variables
23820  # are evaluated by make.
23821  RC_FLAGS="$RC_FLAGS \
23822      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23823      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23824      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23825      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23826      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23827      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23828      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23829
23830  # lib.exe is used to create static libraries.
23831  # Extract the first word of "lib", so it can be a program name with args.
23832set dummy lib; ac_word=$2
23833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23834$as_echo_n "checking for $ac_word... " >&6; }
23835if ${ac_cv_prog_WINAR+:} false; then :
23836  $as_echo_n "(cached) " >&6
23837else
23838  if test -n "$WINAR"; then
23839  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23840else
23841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23842for as_dir in $PATH
23843do
23844  IFS=$as_save_IFS
23845  test -z "$as_dir" && as_dir=.
23846    for ac_exec_ext in '' $ac_executable_extensions; do
23847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23848    ac_cv_prog_WINAR="lib"
23849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23850    break 2
23851  fi
23852done
23853  done
23854IFS=$as_save_IFS
23855
23856fi
23857fi
23858WINAR=$ac_cv_prog_WINAR
23859if test -n "$WINAR"; then
23860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23861$as_echo "$WINAR" >&6; }
23862else
23863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23864$as_echo "no" >&6; }
23865fi
23866
23867
23868
23869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23870
23871  # First separate the path from the arguments. This will split at the first
23872  # space.
23873  complete="$WINAR"
23874  path="${complete%% *}"
23875  tmp="$complete EOL"
23876  arguments="${tmp#* }"
23877
23878  # Input might be given as Windows format, start by converting to
23879  # unix format.
23880  new_path=`$CYGPATH -u "$path"`
23881
23882  # Now try to locate executable using which
23883  new_path=`$WHICH "$new_path" 2> /dev/null`
23884  # bat and cmd files are not always considered executable in cygwin causing which
23885  # to not find them
23886  if test "x$new_path" = x \
23887      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23888      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23889    new_path=`$CYGPATH -u "$path"`
23890  fi
23891  if test "x$new_path" = x; then
23892    # Oops. Which didn't find the executable.
23893    # The splitting of arguments from the executable at a space might have been incorrect,
23894    # since paths with space are more likely in Windows. Give it another try with the whole
23895    # argument.
23896    path="$complete"
23897    arguments="EOL"
23898    new_path=`$CYGPATH -u "$path"`
23899    new_path=`$WHICH "$new_path" 2> /dev/null`
23900    # bat and cmd files are not always considered executable in cygwin causing which
23901    # to not find them
23902    if test "x$new_path" = x \
23903        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23904        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23905      new_path=`$CYGPATH -u "$path"`
23906    fi
23907    if test "x$new_path" = x; then
23908      # It's still not found. Now this is an unrecoverable error.
23909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23910$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23911      has_space=`$ECHO "$complete" | $GREP " "`
23912      if test "x$has_space" != x; then
23913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23915      fi
23916      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23917    fi
23918  fi
23919
23920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23923  # "foo.exe" is OK but "foo" is an error.
23924  #
23925  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23926  # It is also a way to make sure we got the proper file name for the real test later on.
23927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23928  if test "x$test_shortpath" = x; then
23929    # Short path failed, file does not exist as specified.
23930    # Try adding .exe or .cmd
23931    if test -f "${new_path}.exe"; then
23932      input_to_shortpath="${new_path}.exe"
23933    elif test -f "${new_path}.cmd"; then
23934      input_to_shortpath="${new_path}.cmd"
23935    else
23936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23937$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23938      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23939$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23940      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23941    fi
23942  else
23943    input_to_shortpath="$new_path"
23944  fi
23945
23946  # Call helper function which possibly converts this using DOS-style short mode.
23947  # If so, the updated path is stored in $new_path.
23948  new_path="$input_to_shortpath"
23949
23950  input_path="$input_to_shortpath"
23951  # Check if we need to convert this using DOS-style short mode. If the path
23952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23953  # take no chances and rewrite it.
23954  # Note: m4 eats our [], so we need to use [ and ] instead.
23955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23956  if test "x$has_forbidden_chars" != x; then
23957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23961      # Going to short mode and back again did indeed matter. Since short mode is
23962      # case insensitive, let's make it lowercase to improve readability.
23963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23964      # Now convert it back to Unix-stile (cygpath)
23965      input_path=`$CYGPATH -u "$shortmode_path"`
23966      new_path="$input_path"
23967    fi
23968  fi
23969
23970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23971  if test "x$test_cygdrive_prefix" = x; then
23972    # As a simple fix, exclude /usr/bin since it's not a real path.
23973    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23975      # a path prefixed by /cygdrive for fixpath to work.
23976      new_path="$CYGWIN_ROOT_PATH$input_path"
23977    fi
23978  fi
23979
23980  # remove trailing .exe if any
23981  new_path="${new_path/%.exe/}"
23982
23983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23984
23985  # First separate the path from the arguments. This will split at the first
23986  # space.
23987  complete="$WINAR"
23988  path="${complete%% *}"
23989  tmp="$complete EOL"
23990  arguments="${tmp#* }"
23991
23992  # Input might be given as Windows format, start by converting to
23993  # unix format.
23994  new_path="$path"
23995
23996  windows_path="$new_path"
23997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23998    unix_path=`$CYGPATH -u "$windows_path"`
23999    new_path="$unix_path"
24000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24002    new_path="$unix_path"
24003  fi
24004
24005
24006  # Now try to locate executable using which
24007  new_path=`$WHICH "$new_path" 2> /dev/null`
24008
24009  if test "x$new_path" = x; then
24010    # Oops. Which didn't find the executable.
24011    # The splitting of arguments from the executable at a space might have been incorrect,
24012    # since paths with space are more likely in Windows. Give it another try with the whole
24013    # argument.
24014    path="$complete"
24015    arguments="EOL"
24016    new_path="$path"
24017
24018  windows_path="$new_path"
24019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24020    unix_path=`$CYGPATH -u "$windows_path"`
24021    new_path="$unix_path"
24022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24024    new_path="$unix_path"
24025  fi
24026
24027
24028    new_path=`$WHICH "$new_path" 2> /dev/null`
24029
24030    if test "x$new_path" = x; then
24031      # It's still not found. Now this is an unrecoverable error.
24032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24033$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24034      has_space=`$ECHO "$complete" | $GREP " "`
24035      if test "x$has_space" != x; then
24036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24038      fi
24039      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24040    fi
24041  fi
24042
24043  # Now new_path has a complete unix path to the binary
24044  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24045    # Keep paths in /bin as-is, but remove trailing .exe if any
24046    new_path="${new_path/%.exe/}"
24047    # Do not save /bin paths to all_fixpath_prefixes!
24048  else
24049    # Not in mixed or Windows style, start by that.
24050    new_path=`cmd //c echo $new_path`
24051
24052  input_path="$new_path"
24053  # Check if we need to convert this using DOS-style short mode. If the path
24054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24055  # take no chances and rewrite it.
24056  # Note: m4 eats our [], so we need to use [ and ] instead.
24057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24058  if test "x$has_forbidden_chars" != x; then
24059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24061  fi
24062
24063    # Output is in $new_path
24064
24065  windows_path="$new_path"
24066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24067    unix_path=`$CYGPATH -u "$windows_path"`
24068    new_path="$unix_path"
24069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24071    new_path="$unix_path"
24072  fi
24073
24074    # remove trailing .exe if any
24075    new_path="${new_path/%.exe/}"
24076
24077    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24078    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24079  fi
24080
24081  else
24082    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
24091    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24092    if test -z "$is_absolute_path"; then
24093      # Path to executable is not absolute. Find it.
24094      IFS_save="$IFS"
24095      IFS=:
24096      for p in $PATH; do
24097        if test -f "$p/$path" && test -x "$p/$path"; then
24098          new_path="$p/$path"
24099          break
24100        fi
24101      done
24102      IFS="$IFS_save"
24103    else
24104      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24105$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24106      new_path="$path"
24107    fi
24108
24109    if test "x$new_path" = x; then
24110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24111$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24112      has_space=`$ECHO "$complete" | $GREP " "`
24113      if test "x$has_space" != x; then
24114        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24116      fi
24117      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24118    fi
24119  fi
24120
24121  # Now join together the path and the arguments once again
24122  if test "x$arguments" != xEOL; then
24123    new_complete="$new_path ${arguments% *}"
24124  else
24125    new_complete="$new_path"
24126  fi
24127
24128  if test "x$complete" != "x$new_complete"; then
24129    WINAR="$new_complete"
24130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24131$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24132  fi
24133
24134  AR="$WINAR"
24135  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24136
24137  # Extract the first word of "dumpbin", so it can be a program name with args.
24138set dummy dumpbin; ac_word=$2
24139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24140$as_echo_n "checking for $ac_word... " >&6; }
24141if ${ac_cv_prog_DUMPBIN+:} false; then :
24142  $as_echo_n "(cached) " >&6
24143else
24144  if test -n "$DUMPBIN"; then
24145  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24146else
24147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24148for as_dir in $PATH
24149do
24150  IFS=$as_save_IFS
24151  test -z "$as_dir" && as_dir=.
24152    for ac_exec_ext in '' $ac_executable_extensions; do
24153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24154    ac_cv_prog_DUMPBIN="dumpbin"
24155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24156    break 2
24157  fi
24158done
24159  done
24160IFS=$as_save_IFS
24161
24162fi
24163fi
24164DUMPBIN=$ac_cv_prog_DUMPBIN
24165if test -n "$DUMPBIN"; then
24166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24167$as_echo "$DUMPBIN" >&6; }
24168else
24169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24170$as_echo "no" >&6; }
24171fi
24172
24173
24174
24175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24176
24177  # First separate the path from the arguments. This will split at the first
24178  # space.
24179  complete="$DUMPBIN"
24180  path="${complete%% *}"
24181  tmp="$complete EOL"
24182  arguments="${tmp#* }"
24183
24184  # Input might be given as Windows format, start by converting to
24185  # unix format.
24186  new_path=`$CYGPATH -u "$path"`
24187
24188  # Now try to locate executable using which
24189  new_path=`$WHICH "$new_path" 2> /dev/null`
24190  # bat and cmd files are not always considered executable in cygwin causing which
24191  # to not find them
24192  if test "x$new_path" = x \
24193      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24194      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24195    new_path=`$CYGPATH -u "$path"`
24196  fi
24197  if test "x$new_path" = x; then
24198    # Oops. Which didn't find the executable.
24199    # The splitting of arguments from the executable at a space might have been incorrect,
24200    # since paths with space are more likely in Windows. Give it another try with the whole
24201    # argument.
24202    path="$complete"
24203    arguments="EOL"
24204    new_path=`$CYGPATH -u "$path"`
24205    new_path=`$WHICH "$new_path" 2> /dev/null`
24206    # bat and cmd files are not always considered executable in cygwin causing which
24207    # to not find them
24208    if test "x$new_path" = x \
24209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24211      new_path=`$CYGPATH -u "$path"`
24212    fi
24213    if test "x$new_path" = x; then
24214      # It's still not found. Now this is an unrecoverable error.
24215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24216$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24217      has_space=`$ECHO "$complete" | $GREP " "`
24218      if test "x$has_space" != x; then
24219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24221      fi
24222      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24223    fi
24224  fi
24225
24226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24229  # "foo.exe" is OK but "foo" is an error.
24230  #
24231  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24232  # It is also a way to make sure we got the proper file name for the real test later on.
24233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24234  if test "x$test_shortpath" = x; then
24235    # Short path failed, file does not exist as specified.
24236    # Try adding .exe or .cmd
24237    if test -f "${new_path}.exe"; then
24238      input_to_shortpath="${new_path}.exe"
24239    elif test -f "${new_path}.cmd"; then
24240      input_to_shortpath="${new_path}.cmd"
24241    else
24242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24243$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24246      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24247    fi
24248  else
24249    input_to_shortpath="$new_path"
24250  fi
24251
24252  # Call helper function which possibly converts this using DOS-style short mode.
24253  # If so, the updated path is stored in $new_path.
24254  new_path="$input_to_shortpath"
24255
24256  input_path="$input_to_shortpath"
24257  # Check if we need to convert this using DOS-style short mode. If the path
24258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24259  # take no chances and rewrite it.
24260  # Note: m4 eats our [], so we need to use [ and ] instead.
24261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24262  if test "x$has_forbidden_chars" != x; then
24263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24267      # Going to short mode and back again did indeed matter. Since short mode is
24268      # case insensitive, let's make it lowercase to improve readability.
24269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24270      # Now convert it back to Unix-stile (cygpath)
24271      input_path=`$CYGPATH -u "$shortmode_path"`
24272      new_path="$input_path"
24273    fi
24274  fi
24275
24276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24277  if test "x$test_cygdrive_prefix" = x; then
24278    # As a simple fix, exclude /usr/bin since it's not a real path.
24279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24281      # a path prefixed by /cygdrive for fixpath to work.
24282      new_path="$CYGWIN_ROOT_PATH$input_path"
24283    fi
24284  fi
24285
24286  # remove trailing .exe if any
24287  new_path="${new_path/%.exe/}"
24288
24289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24290
24291  # First separate the path from the arguments. This will split at the first
24292  # space.
24293  complete="$DUMPBIN"
24294  path="${complete%% *}"
24295  tmp="$complete EOL"
24296  arguments="${tmp#* }"
24297
24298  # Input might be given as Windows format, start by converting to
24299  # unix format.
24300  new_path="$path"
24301
24302  windows_path="$new_path"
24303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24304    unix_path=`$CYGPATH -u "$windows_path"`
24305    new_path="$unix_path"
24306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24308    new_path="$unix_path"
24309  fi
24310
24311
24312  # Now try to locate executable using which
24313  new_path=`$WHICH "$new_path" 2> /dev/null`
24314
24315  if test "x$new_path" = x; then
24316    # Oops. Which didn't find the executable.
24317    # The splitting of arguments from the executable at a space might have been incorrect,
24318    # since paths with space are more likely in Windows. Give it another try with the whole
24319    # argument.
24320    path="$complete"
24321    arguments="EOL"
24322    new_path="$path"
24323
24324  windows_path="$new_path"
24325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24326    unix_path=`$CYGPATH -u "$windows_path"`
24327    new_path="$unix_path"
24328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24330    new_path="$unix_path"
24331  fi
24332
24333
24334    new_path=`$WHICH "$new_path" 2> /dev/null`
24335
24336    if test "x$new_path" = x; then
24337      # It's still not found. Now this is an unrecoverable error.
24338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24339$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24340      has_space=`$ECHO "$complete" | $GREP " "`
24341      if test "x$has_space" != x; then
24342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24344      fi
24345      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24346    fi
24347  fi
24348
24349  # Now new_path has a complete unix path to the binary
24350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24351    # Keep paths in /bin as-is, but remove trailing .exe if any
24352    new_path="${new_path/%.exe/}"
24353    # Do not save /bin paths to all_fixpath_prefixes!
24354  else
24355    # Not in mixed or Windows style, start by that.
24356    new_path=`cmd //c echo $new_path`
24357
24358  input_path="$new_path"
24359  # Check if we need to convert this using DOS-style short mode. If the path
24360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24361  # take no chances and rewrite it.
24362  # Note: m4 eats our [], so we need to use [ and ] instead.
24363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24364  if test "x$has_forbidden_chars" != x; then
24365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24367  fi
24368
24369    # Output is in $new_path
24370
24371  windows_path="$new_path"
24372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24373    unix_path=`$CYGPATH -u "$windows_path"`
24374    new_path="$unix_path"
24375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24377    new_path="$unix_path"
24378  fi
24379
24380    # remove trailing .exe if any
24381    new_path="${new_path/%.exe/}"
24382
24383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24385  fi
24386
24387  else
24388    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
24397    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24398    if test -z "$is_absolute_path"; then
24399      # Path to executable is not absolute. Find it.
24400      IFS_save="$IFS"
24401      IFS=:
24402      for p in $PATH; do
24403        if test -f "$p/$path" && test -x "$p/$path"; then
24404          new_path="$p/$path"
24405          break
24406        fi
24407      done
24408      IFS="$IFS_save"
24409    else
24410      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24411$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24412      new_path="$path"
24413    fi
24414
24415    if test "x$new_path" = x; then
24416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24417$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24418      has_space=`$ECHO "$complete" | $GREP " "`
24419      if test "x$has_space" != x; then
24420        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24421$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24422      fi
24423      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24424    fi
24425  fi
24426
24427  # Now join together the path and the arguments once again
24428  if test "x$arguments" != xEOL; then
24429    new_complete="$new_path ${arguments% *}"
24430  else
24431    new_complete="$new_path"
24432  fi
24433
24434  if test "x$complete" != "x$new_complete"; then
24435    DUMPBIN="$new_complete"
24436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24437$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24438  fi
24439
24440
24441      COMPILER_TYPE=CL
24442      CCXXFLAGS="$CCXXFLAGS -nologo"
24443
24444fi
24445
24446
24447
24448  ac_ext=c
24449ac_cpp='$CPP $CPPFLAGS'
24450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24452ac_compiler_gnu=$ac_cv_c_compiler_gnu
24453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24454$as_echo_n "checking how to run the C preprocessor... " >&6; }
24455# On Suns, sometimes $CPP names a directory.
24456if test -n "$CPP" && test -d "$CPP"; then
24457  CPP=
24458fi
24459if test -z "$CPP"; then
24460  if ${ac_cv_prog_CPP+:} false; then :
24461  $as_echo_n "(cached) " >&6
24462else
24463      # Double quotes because CPP needs to be expanded
24464    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24465    do
24466      ac_preproc_ok=false
24467for ac_c_preproc_warn_flag in '' yes
24468do
24469  # Use a header file that comes with gcc, so configuring glibc
24470  # with a fresh cross-compiler works.
24471  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24472  # <limits.h> exists even on freestanding compilers.
24473  # On the NeXT, cc -E runs the code through the compiler's parser,
24474  # not just through cpp. "Syntax error" is here to catch this case.
24475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24476/* end confdefs.h.  */
24477#ifdef __STDC__
24478# include <limits.h>
24479#else
24480# include <assert.h>
24481#endif
24482		     Syntax error
24483_ACEOF
24484if ac_fn_c_try_cpp "$LINENO"; then :
24485
24486else
24487  # Broken: fails on valid input.
24488continue
24489fi
24490rm -f conftest.err conftest.i conftest.$ac_ext
24491
24492  # OK, works on sane cases.  Now check whether nonexistent headers
24493  # can be detected and how.
24494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24495/* end confdefs.h.  */
24496#include <ac_nonexistent.h>
24497_ACEOF
24498if ac_fn_c_try_cpp "$LINENO"; then :
24499  # Broken: success on invalid input.
24500continue
24501else
24502  # Passes both tests.
24503ac_preproc_ok=:
24504break
24505fi
24506rm -f conftest.err conftest.i conftest.$ac_ext
24507
24508done
24509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24510rm -f conftest.i conftest.err conftest.$ac_ext
24511if $ac_preproc_ok; then :
24512  break
24513fi
24514
24515    done
24516    ac_cv_prog_CPP=$CPP
24517
24518fi
24519  CPP=$ac_cv_prog_CPP
24520else
24521  ac_cv_prog_CPP=$CPP
24522fi
24523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24524$as_echo "$CPP" >&6; }
24525ac_preproc_ok=false
24526for ac_c_preproc_warn_flag in '' yes
24527do
24528  # Use a header file that comes with gcc, so configuring glibc
24529  # with a fresh cross-compiler works.
24530  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24531  # <limits.h> exists even on freestanding compilers.
24532  # On the NeXT, cc -E runs the code through the compiler's parser,
24533  # not just through cpp. "Syntax error" is here to catch this case.
24534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24535/* end confdefs.h.  */
24536#ifdef __STDC__
24537# include <limits.h>
24538#else
24539# include <assert.h>
24540#endif
24541		     Syntax error
24542_ACEOF
24543if ac_fn_c_try_cpp "$LINENO"; then :
24544
24545else
24546  # Broken: fails on valid input.
24547continue
24548fi
24549rm -f conftest.err conftest.i conftest.$ac_ext
24550
24551  # OK, works on sane cases.  Now check whether nonexistent headers
24552  # can be detected and how.
24553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554/* end confdefs.h.  */
24555#include <ac_nonexistent.h>
24556_ACEOF
24557if ac_fn_c_try_cpp "$LINENO"; then :
24558  # Broken: success on invalid input.
24559continue
24560else
24561  # Passes both tests.
24562ac_preproc_ok=:
24563break
24564fi
24565rm -f conftest.err conftest.i conftest.$ac_ext
24566
24567done
24568# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24569rm -f conftest.i conftest.err conftest.$ac_ext
24570if $ac_preproc_ok; then :
24571
24572else
24573  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24575as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24576See \`config.log' for more details" "$LINENO" 5; }
24577fi
24578
24579ac_ext=cpp
24580ac_cpp='$CXXCPP $CPPFLAGS'
24581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24584
24585
24586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24587
24588  # First separate the path from the arguments. This will split at the first
24589  # space.
24590  complete="$CPP"
24591  path="${complete%% *}"
24592  tmp="$complete EOL"
24593  arguments="${tmp#* }"
24594
24595  # Input might be given as Windows format, start by converting to
24596  # unix format.
24597  new_path=`$CYGPATH -u "$path"`
24598
24599  # Now try to locate executable using which
24600  new_path=`$WHICH "$new_path" 2> /dev/null`
24601  # bat and cmd files are not always considered executable in cygwin causing which
24602  # to not find them
24603  if test "x$new_path" = x \
24604      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24605      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24606    new_path=`$CYGPATH -u "$path"`
24607  fi
24608  if test "x$new_path" = x; then
24609    # Oops. Which didn't find the executable.
24610    # The splitting of arguments from the executable at a space might have been incorrect,
24611    # since paths with space are more likely in Windows. Give it another try with the whole
24612    # argument.
24613    path="$complete"
24614    arguments="EOL"
24615    new_path=`$CYGPATH -u "$path"`
24616    new_path=`$WHICH "$new_path" 2> /dev/null`
24617    # bat and cmd files are not always considered executable in cygwin causing which
24618    # to not find them
24619    if test "x$new_path" = x \
24620        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24621        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24622      new_path=`$CYGPATH -u "$path"`
24623    fi
24624    if test "x$new_path" = x; then
24625      # It's still not found. Now this is an unrecoverable error.
24626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24627$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24628      has_space=`$ECHO "$complete" | $GREP " "`
24629      if test "x$has_space" != x; then
24630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24632      fi
24633      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24634    fi
24635  fi
24636
24637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24640  # "foo.exe" is OK but "foo" is an error.
24641  #
24642  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24643  # It is also a way to make sure we got the proper file name for the real test later on.
24644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24645  if test "x$test_shortpath" = x; then
24646    # Short path failed, file does not exist as specified.
24647    # Try adding .exe or .cmd
24648    if test -f "${new_path}.exe"; then
24649      input_to_shortpath="${new_path}.exe"
24650    elif test -f "${new_path}.cmd"; then
24651      input_to_shortpath="${new_path}.cmd"
24652    else
24653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24654$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24655      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24656$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24657      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24658    fi
24659  else
24660    input_to_shortpath="$new_path"
24661  fi
24662
24663  # Call helper function which possibly converts this using DOS-style short mode.
24664  # If so, the updated path is stored in $new_path.
24665  new_path="$input_to_shortpath"
24666
24667  input_path="$input_to_shortpath"
24668  # Check if we need to convert this using DOS-style short mode. If the path
24669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24670  # take no chances and rewrite it.
24671  # Note: m4 eats our [], so we need to use [ and ] instead.
24672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24673  if test "x$has_forbidden_chars" != x; then
24674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24678      # Going to short mode and back again did indeed matter. Since short mode is
24679      # case insensitive, let's make it lowercase to improve readability.
24680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24681      # Now convert it back to Unix-stile (cygpath)
24682      input_path=`$CYGPATH -u "$shortmode_path"`
24683      new_path="$input_path"
24684    fi
24685  fi
24686
24687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24688  if test "x$test_cygdrive_prefix" = x; then
24689    # As a simple fix, exclude /usr/bin since it's not a real path.
24690    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24692      # a path prefixed by /cygdrive for fixpath to work.
24693      new_path="$CYGWIN_ROOT_PATH$input_path"
24694    fi
24695  fi
24696
24697  # remove trailing .exe if any
24698  new_path="${new_path/%.exe/}"
24699
24700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24701
24702  # First separate the path from the arguments. This will split at the first
24703  # space.
24704  complete="$CPP"
24705  path="${complete%% *}"
24706  tmp="$complete EOL"
24707  arguments="${tmp#* }"
24708
24709  # Input might be given as Windows format, start by converting to
24710  # unix format.
24711  new_path="$path"
24712
24713  windows_path="$new_path"
24714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24715    unix_path=`$CYGPATH -u "$windows_path"`
24716    new_path="$unix_path"
24717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24719    new_path="$unix_path"
24720  fi
24721
24722
24723  # Now try to locate executable using which
24724  new_path=`$WHICH "$new_path" 2> /dev/null`
24725
24726  if test "x$new_path" = x; then
24727    # Oops. Which didn't find the executable.
24728    # The splitting of arguments from the executable at a space might have been incorrect,
24729    # since paths with space are more likely in Windows. Give it another try with the whole
24730    # argument.
24731    path="$complete"
24732    arguments="EOL"
24733    new_path="$path"
24734
24735  windows_path="$new_path"
24736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24737    unix_path=`$CYGPATH -u "$windows_path"`
24738    new_path="$unix_path"
24739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24741    new_path="$unix_path"
24742  fi
24743
24744
24745    new_path=`$WHICH "$new_path" 2> /dev/null`
24746
24747    if test "x$new_path" = x; then
24748      # It's still not found. Now this is an unrecoverable error.
24749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24750$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24751      has_space=`$ECHO "$complete" | $GREP " "`
24752      if test "x$has_space" != x; then
24753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24755      fi
24756      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24757    fi
24758  fi
24759
24760  # Now new_path has a complete unix path to the binary
24761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24762    # Keep paths in /bin as-is, but remove trailing .exe if any
24763    new_path="${new_path/%.exe/}"
24764    # Do not save /bin paths to all_fixpath_prefixes!
24765  else
24766    # Not in mixed or Windows style, start by that.
24767    new_path=`cmd //c echo $new_path`
24768
24769  input_path="$new_path"
24770  # Check if we need to convert this using DOS-style short mode. If the path
24771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24772  # take no chances and rewrite it.
24773  # Note: m4 eats our [], so we need to use [ and ] instead.
24774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24775  if test "x$has_forbidden_chars" != x; then
24776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24778  fi
24779
24780    # Output is in $new_path
24781
24782  windows_path="$new_path"
24783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24784    unix_path=`$CYGPATH -u "$windows_path"`
24785    new_path="$unix_path"
24786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24788    new_path="$unix_path"
24789  fi
24790
24791    # remove trailing .exe if any
24792    new_path="${new_path/%.exe/}"
24793
24794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24796  fi
24797
24798  else
24799    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
24808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24809    if test -z "$is_absolute_path"; then
24810      # Path to executable is not absolute. Find it.
24811      IFS_save="$IFS"
24812      IFS=:
24813      for p in $PATH; do
24814        if test -f "$p/$path" && test -x "$p/$path"; then
24815          new_path="$p/$path"
24816          break
24817        fi
24818      done
24819      IFS="$IFS_save"
24820    else
24821      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24822$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24823      new_path="$path"
24824    fi
24825
24826    if test "x$new_path" = x; then
24827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24828$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24829      has_space=`$ECHO "$complete" | $GREP " "`
24830      if test "x$has_space" != x; then
24831        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24833      fi
24834      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24835    fi
24836  fi
24837
24838  # Now join together the path and the arguments once again
24839  if test "x$arguments" != xEOL; then
24840    new_complete="$new_path ${arguments% *}"
24841  else
24842    new_complete="$new_path"
24843  fi
24844
24845  if test "x$complete" != "x$new_complete"; then
24846    CPP="$new_complete"
24847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24848$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24849  fi
24850
24851
24852  ac_ext=cpp
24853ac_cpp='$CXXCPP $CPPFLAGS'
24854ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24855ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24856ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24858$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24859if test -z "$CXXCPP"; then
24860  if ${ac_cv_prog_CXXCPP+:} false; then :
24861  $as_echo_n "(cached) " >&6
24862else
24863      # Double quotes because CXXCPP needs to be expanded
24864    for CXXCPP in "$CXX -E" "/lib/cpp"
24865    do
24866      ac_preproc_ok=false
24867for ac_cxx_preproc_warn_flag in '' yes
24868do
24869  # Use a header file that comes with gcc, so configuring glibc
24870  # with a fresh cross-compiler works.
24871  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24872  # <limits.h> exists even on freestanding compilers.
24873  # On the NeXT, cc -E runs the code through the compiler's parser,
24874  # not just through cpp. "Syntax error" is here to catch this case.
24875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24876/* end confdefs.h.  */
24877#ifdef __STDC__
24878# include <limits.h>
24879#else
24880# include <assert.h>
24881#endif
24882		     Syntax error
24883_ACEOF
24884if ac_fn_cxx_try_cpp "$LINENO"; then :
24885
24886else
24887  # Broken: fails on valid input.
24888continue
24889fi
24890rm -f conftest.err conftest.i conftest.$ac_ext
24891
24892  # OK, works on sane cases.  Now check whether nonexistent headers
24893  # can be detected and how.
24894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24895/* end confdefs.h.  */
24896#include <ac_nonexistent.h>
24897_ACEOF
24898if ac_fn_cxx_try_cpp "$LINENO"; then :
24899  # Broken: success on invalid input.
24900continue
24901else
24902  # Passes both tests.
24903ac_preproc_ok=:
24904break
24905fi
24906rm -f conftest.err conftest.i conftest.$ac_ext
24907
24908done
24909# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24910rm -f conftest.i conftest.err conftest.$ac_ext
24911if $ac_preproc_ok; then :
24912  break
24913fi
24914
24915    done
24916    ac_cv_prog_CXXCPP=$CXXCPP
24917
24918fi
24919  CXXCPP=$ac_cv_prog_CXXCPP
24920else
24921  ac_cv_prog_CXXCPP=$CXXCPP
24922fi
24923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24924$as_echo "$CXXCPP" >&6; }
24925ac_preproc_ok=false
24926for ac_cxx_preproc_warn_flag in '' yes
24927do
24928  # Use a header file that comes with gcc, so configuring glibc
24929  # with a fresh cross-compiler works.
24930  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24931  # <limits.h> exists even on freestanding compilers.
24932  # On the NeXT, cc -E runs the code through the compiler's parser,
24933  # not just through cpp. "Syntax error" is here to catch this case.
24934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24935/* end confdefs.h.  */
24936#ifdef __STDC__
24937# include <limits.h>
24938#else
24939# include <assert.h>
24940#endif
24941		     Syntax error
24942_ACEOF
24943if ac_fn_cxx_try_cpp "$LINENO"; then :
24944
24945else
24946  # Broken: fails on valid input.
24947continue
24948fi
24949rm -f conftest.err conftest.i conftest.$ac_ext
24950
24951  # OK, works on sane cases.  Now check whether nonexistent headers
24952  # can be detected and how.
24953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24954/* end confdefs.h.  */
24955#include <ac_nonexistent.h>
24956_ACEOF
24957if ac_fn_cxx_try_cpp "$LINENO"; then :
24958  # Broken: success on invalid input.
24959continue
24960else
24961  # Passes both tests.
24962ac_preproc_ok=:
24963break
24964fi
24965rm -f conftest.err conftest.i conftest.$ac_ext
24966
24967done
24968# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24969rm -f conftest.i conftest.err conftest.$ac_ext
24970if $ac_preproc_ok; then :
24971
24972else
24973  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24974$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24975as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24976See \`config.log' for more details" "$LINENO" 5; }
24977fi
24978
24979ac_ext=cpp
24980ac_cpp='$CXXCPP $CPPFLAGS'
24981ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24982ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24983ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24984
24985
24986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24987
24988  # First separate the path from the arguments. This will split at the first
24989  # space.
24990  complete="$CXXCPP"
24991  path="${complete%% *}"
24992  tmp="$complete EOL"
24993  arguments="${tmp#* }"
24994
24995  # Input might be given as Windows format, start by converting to
24996  # unix format.
24997  new_path=`$CYGPATH -u "$path"`
24998
24999  # Now try to locate executable using which
25000  new_path=`$WHICH "$new_path" 2> /dev/null`
25001  # bat and cmd files are not always considered executable in cygwin causing which
25002  # to not find them
25003  if test "x$new_path" = x \
25004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25006    new_path=`$CYGPATH -u "$path"`
25007  fi
25008  if test "x$new_path" = x; then
25009    # Oops. Which didn't find the executable.
25010    # The splitting of arguments from the executable at a space might have been incorrect,
25011    # since paths with space are more likely in Windows. Give it another try with the whole
25012    # argument.
25013    path="$complete"
25014    arguments="EOL"
25015    new_path=`$CYGPATH -u "$path"`
25016    new_path=`$WHICH "$new_path" 2> /dev/null`
25017    # bat and cmd files are not always considered executable in cygwin causing which
25018    # to not find them
25019    if test "x$new_path" = x \
25020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25022      new_path=`$CYGPATH -u "$path"`
25023    fi
25024    if test "x$new_path" = x; then
25025      # It's still not found. Now this is an unrecoverable error.
25026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25027$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25028      has_space=`$ECHO "$complete" | $GREP " "`
25029      if test "x$has_space" != x; then
25030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25032      fi
25033      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25034    fi
25035  fi
25036
25037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25040  # "foo.exe" is OK but "foo" is an error.
25041  #
25042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25043  # It is also a way to make sure we got the proper file name for the real test later on.
25044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25045  if test "x$test_shortpath" = x; then
25046    # Short path failed, file does not exist as specified.
25047    # Try adding .exe or .cmd
25048    if test -f "${new_path}.exe"; then
25049      input_to_shortpath="${new_path}.exe"
25050    elif test -f "${new_path}.cmd"; then
25051      input_to_shortpath="${new_path}.cmd"
25052    else
25053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25054$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25057      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25058    fi
25059  else
25060    input_to_shortpath="$new_path"
25061  fi
25062
25063  # Call helper function which possibly converts this using DOS-style short mode.
25064  # If so, the updated path is stored in $new_path.
25065  new_path="$input_to_shortpath"
25066
25067  input_path="$input_to_shortpath"
25068  # Check if we need to convert this using DOS-style short mode. If the path
25069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25070  # take no chances and rewrite it.
25071  # Note: m4 eats our [], so we need to use [ and ] instead.
25072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25073  if test "x$has_forbidden_chars" != x; then
25074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25078      # Going to short mode and back again did indeed matter. Since short mode is
25079      # case insensitive, let's make it lowercase to improve readability.
25080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25081      # Now convert it back to Unix-stile (cygpath)
25082      input_path=`$CYGPATH -u "$shortmode_path"`
25083      new_path="$input_path"
25084    fi
25085  fi
25086
25087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25088  if test "x$test_cygdrive_prefix" = x; then
25089    # As a simple fix, exclude /usr/bin since it's not a real path.
25090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25092      # a path prefixed by /cygdrive for fixpath to work.
25093      new_path="$CYGWIN_ROOT_PATH$input_path"
25094    fi
25095  fi
25096
25097  # remove trailing .exe if any
25098  new_path="${new_path/%.exe/}"
25099
25100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25101
25102  # First separate the path from the arguments. This will split at the first
25103  # space.
25104  complete="$CXXCPP"
25105  path="${complete%% *}"
25106  tmp="$complete EOL"
25107  arguments="${tmp#* }"
25108
25109  # Input might be given as Windows format, start by converting to
25110  # unix format.
25111  new_path="$path"
25112
25113  windows_path="$new_path"
25114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25115    unix_path=`$CYGPATH -u "$windows_path"`
25116    new_path="$unix_path"
25117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25119    new_path="$unix_path"
25120  fi
25121
25122
25123  # Now try to locate executable using which
25124  new_path=`$WHICH "$new_path" 2> /dev/null`
25125
25126  if test "x$new_path" = x; then
25127    # Oops. Which didn't find the executable.
25128    # The splitting of arguments from the executable at a space might have been incorrect,
25129    # since paths with space are more likely in Windows. Give it another try with the whole
25130    # argument.
25131    path="$complete"
25132    arguments="EOL"
25133    new_path="$path"
25134
25135  windows_path="$new_path"
25136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25137    unix_path=`$CYGPATH -u "$windows_path"`
25138    new_path="$unix_path"
25139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25141    new_path="$unix_path"
25142  fi
25143
25144
25145    new_path=`$WHICH "$new_path" 2> /dev/null`
25146
25147    if test "x$new_path" = x; then
25148      # It's still not found. Now this is an unrecoverable error.
25149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25150$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25151      has_space=`$ECHO "$complete" | $GREP " "`
25152      if test "x$has_space" != x; then
25153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25155      fi
25156      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25157    fi
25158  fi
25159
25160  # Now new_path has a complete unix path to the binary
25161  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25162    # Keep paths in /bin as-is, but remove trailing .exe if any
25163    new_path="${new_path/%.exe/}"
25164    # Do not save /bin paths to all_fixpath_prefixes!
25165  else
25166    # Not in mixed or Windows style, start by that.
25167    new_path=`cmd //c echo $new_path`
25168
25169  input_path="$new_path"
25170  # Check if we need to convert this using DOS-style short mode. If the path
25171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25172  # take no chances and rewrite it.
25173  # Note: m4 eats our [], so we need to use [ and ] instead.
25174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25175  if test "x$has_forbidden_chars" != x; then
25176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25178  fi
25179
25180    # Output is in $new_path
25181
25182  windows_path="$new_path"
25183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25184    unix_path=`$CYGPATH -u "$windows_path"`
25185    new_path="$unix_path"
25186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25188    new_path="$unix_path"
25189  fi
25190
25191    # remove trailing .exe if any
25192    new_path="${new_path/%.exe/}"
25193
25194    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25195    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25196  fi
25197
25198  else
25199    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
25208    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25209    if test -z "$is_absolute_path"; then
25210      # Path to executable is not absolute. Find it.
25211      IFS_save="$IFS"
25212      IFS=:
25213      for p in $PATH; do
25214        if test -f "$p/$path" && test -x "$p/$path"; then
25215          new_path="$p/$path"
25216          break
25217        fi
25218      done
25219      IFS="$IFS_save"
25220    else
25221      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25222$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25223      new_path="$path"
25224    fi
25225
25226    if test "x$new_path" = x; then
25227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25228$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25229      has_space=`$ECHO "$complete" | $GREP " "`
25230      if test "x$has_space" != x; then
25231        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25232$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25233      fi
25234      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25235    fi
25236  fi
25237
25238  # Now join together the path and the arguments once again
25239  if test "x$arguments" != xEOL; then
25240    new_complete="$new_path ${arguments% *}"
25241  else
25242    new_complete="$new_path"
25243  fi
25244
25245  if test "x$complete" != "x$new_complete"; then
25246    CXXCPP="$new_complete"
25247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25248$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25249  fi
25250
25251
25252  if test "x$COMPILE_TYPE" != "xcross"; then
25253    # If we are not cross compiling, use the same compilers for
25254    # building the build platform executables. The cross-compilation
25255    # case needed to be done earlier, but this can only be done after
25256    # the native tools have been localized.
25257    BUILD_CC="$CC"
25258    BUILD_CXX="$CXX"
25259    BUILD_LD="$LD"
25260  fi
25261
25262  # for solaris we really need solaris tools, and not gnu equivalent
25263  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25264  #   starting to probe
25265  #
25266  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25267  #         so that it can be overriden --with-tools-dir
25268  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25269    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25270  fi
25271
25272  # Find the right assembler.
25273  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25274    # Extract the first word of "as", so it can be a program name with args.
25275set dummy as; ac_word=$2
25276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25277$as_echo_n "checking for $ac_word... " >&6; }
25278if ${ac_cv_path_AS+:} false; then :
25279  $as_echo_n "(cached) " >&6
25280else
25281  case $AS in
25282  [\\/]* | ?:[\\/]*)
25283  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25284  ;;
25285  *)
25286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25287for as_dir in $PATH
25288do
25289  IFS=$as_save_IFS
25290  test -z "$as_dir" && as_dir=.
25291    for ac_exec_ext in '' $ac_executable_extensions; do
25292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25293    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25295    break 2
25296  fi
25297done
25298  done
25299IFS=$as_save_IFS
25300
25301  ;;
25302esac
25303fi
25304AS=$ac_cv_path_AS
25305if test -n "$AS"; then
25306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25307$as_echo "$AS" >&6; }
25308else
25309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25310$as_echo "no" >&6; }
25311fi
25312
25313
25314
25315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25316
25317  # First separate the path from the arguments. This will split at the first
25318  # space.
25319  complete="$AS"
25320  path="${complete%% *}"
25321  tmp="$complete EOL"
25322  arguments="${tmp#* }"
25323
25324  # Input might be given as Windows format, start by converting to
25325  # unix format.
25326  new_path=`$CYGPATH -u "$path"`
25327
25328  # Now try to locate executable using which
25329  new_path=`$WHICH "$new_path" 2> /dev/null`
25330  # bat and cmd files are not always considered executable in cygwin causing which
25331  # to not find them
25332  if test "x$new_path" = x \
25333      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25334      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25335    new_path=`$CYGPATH -u "$path"`
25336  fi
25337  if test "x$new_path" = x; then
25338    # Oops. Which didn't find the executable.
25339    # The splitting of arguments from the executable at a space might have been incorrect,
25340    # since paths with space are more likely in Windows. Give it another try with the whole
25341    # argument.
25342    path="$complete"
25343    arguments="EOL"
25344    new_path=`$CYGPATH -u "$path"`
25345    new_path=`$WHICH "$new_path" 2> /dev/null`
25346    # bat and cmd files are not always considered executable in cygwin causing which
25347    # to not find them
25348    if test "x$new_path" = x \
25349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25351      new_path=`$CYGPATH -u "$path"`
25352    fi
25353    if test "x$new_path" = x; then
25354      # It's still not found. Now this is an unrecoverable error.
25355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25356$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25357      has_space=`$ECHO "$complete" | $GREP " "`
25358      if test "x$has_space" != x; then
25359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25361      fi
25362      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25363    fi
25364  fi
25365
25366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25369  # "foo.exe" is OK but "foo" is an error.
25370  #
25371  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25372  # It is also a way to make sure we got the proper file name for the real test later on.
25373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25374  if test "x$test_shortpath" = x; then
25375    # Short path failed, file does not exist as specified.
25376    # Try adding .exe or .cmd
25377    if test -f "${new_path}.exe"; then
25378      input_to_shortpath="${new_path}.exe"
25379    elif test -f "${new_path}.cmd"; then
25380      input_to_shortpath="${new_path}.cmd"
25381    else
25382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25383$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25386      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25387    fi
25388  else
25389    input_to_shortpath="$new_path"
25390  fi
25391
25392  # Call helper function which possibly converts this using DOS-style short mode.
25393  # If so, the updated path is stored in $new_path.
25394  new_path="$input_to_shortpath"
25395
25396  input_path="$input_to_shortpath"
25397  # Check if we need to convert this using DOS-style short mode. If the path
25398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25399  # take no chances and rewrite it.
25400  # Note: m4 eats our [], so we need to use [ and ] instead.
25401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25402  if test "x$has_forbidden_chars" != x; then
25403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25407      # Going to short mode and back again did indeed matter. Since short mode is
25408      # case insensitive, let's make it lowercase to improve readability.
25409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25410      # Now convert it back to Unix-stile (cygpath)
25411      input_path=`$CYGPATH -u "$shortmode_path"`
25412      new_path="$input_path"
25413    fi
25414  fi
25415
25416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25417  if test "x$test_cygdrive_prefix" = x; then
25418    # As a simple fix, exclude /usr/bin since it's not a real path.
25419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25421      # a path prefixed by /cygdrive for fixpath to work.
25422      new_path="$CYGWIN_ROOT_PATH$input_path"
25423    fi
25424  fi
25425
25426  # remove trailing .exe if any
25427  new_path="${new_path/%.exe/}"
25428
25429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25430
25431  # First separate the path from the arguments. This will split at the first
25432  # space.
25433  complete="$AS"
25434  path="${complete%% *}"
25435  tmp="$complete EOL"
25436  arguments="${tmp#* }"
25437
25438  # Input might be given as Windows format, start by converting to
25439  # unix format.
25440  new_path="$path"
25441
25442  windows_path="$new_path"
25443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25444    unix_path=`$CYGPATH -u "$windows_path"`
25445    new_path="$unix_path"
25446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25448    new_path="$unix_path"
25449  fi
25450
25451
25452  # Now try to locate executable using which
25453  new_path=`$WHICH "$new_path" 2> /dev/null`
25454
25455  if test "x$new_path" = x; then
25456    # Oops. Which didn't find the executable.
25457    # The splitting of arguments from the executable at a space might have been incorrect,
25458    # since paths with space are more likely in Windows. Give it another try with the whole
25459    # argument.
25460    path="$complete"
25461    arguments="EOL"
25462    new_path="$path"
25463
25464  windows_path="$new_path"
25465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25466    unix_path=`$CYGPATH -u "$windows_path"`
25467    new_path="$unix_path"
25468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25470    new_path="$unix_path"
25471  fi
25472
25473
25474    new_path=`$WHICH "$new_path" 2> /dev/null`
25475
25476    if test "x$new_path" = x; then
25477      # It's still not found. Now this is an unrecoverable error.
25478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25479$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25480      has_space=`$ECHO "$complete" | $GREP " "`
25481      if test "x$has_space" != x; then
25482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25484      fi
25485      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25486    fi
25487  fi
25488
25489  # Now new_path has a complete unix path to the binary
25490  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25491    # Keep paths in /bin as-is, but remove trailing .exe if any
25492    new_path="${new_path/%.exe/}"
25493    # Do not save /bin paths to all_fixpath_prefixes!
25494  else
25495    # Not in mixed or Windows style, start by that.
25496    new_path=`cmd //c echo $new_path`
25497
25498  input_path="$new_path"
25499  # Check if we need to convert this using DOS-style short mode. If the path
25500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25501  # take no chances and rewrite it.
25502  # Note: m4 eats our [], so we need to use [ and ] instead.
25503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25504  if test "x$has_forbidden_chars" != x; then
25505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25507  fi
25508
25509    # Output is in $new_path
25510
25511  windows_path="$new_path"
25512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25513    unix_path=`$CYGPATH -u "$windows_path"`
25514    new_path="$unix_path"
25515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25517    new_path="$unix_path"
25518  fi
25519
25520    # remove trailing .exe if any
25521    new_path="${new_path/%.exe/}"
25522
25523    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25524    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25525  fi
25526
25527  else
25528    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
25537    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25538    if test -z "$is_absolute_path"; then
25539      # Path to executable is not absolute. Find it.
25540      IFS_save="$IFS"
25541      IFS=:
25542      for p in $PATH; do
25543        if test -f "$p/$path" && test -x "$p/$path"; then
25544          new_path="$p/$path"
25545          break
25546        fi
25547      done
25548      IFS="$IFS_save"
25549    else
25550      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25551$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25552      new_path="$path"
25553    fi
25554
25555    if test "x$new_path" = x; then
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25557$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25558      has_space=`$ECHO "$complete" | $GREP " "`
25559      if test "x$has_space" != x; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25561$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25562      fi
25563      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25564    fi
25565  fi
25566
25567  # Now join together the path and the arguments once again
25568  if test "x$arguments" != xEOL; then
25569    new_complete="$new_path ${arguments% *}"
25570  else
25571    new_complete="$new_path"
25572  fi
25573
25574  if test "x$complete" != "x$new_complete"; then
25575    AS="$new_complete"
25576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25577$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25578  fi
25579
25580  else
25581    AS="$CC -c"
25582  fi
25583
25584
25585  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25586    # Extract the first word of "nm", so it can be a program name with args.
25587set dummy nm; ac_word=$2
25588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25589$as_echo_n "checking for $ac_word... " >&6; }
25590if ${ac_cv_path_NM+:} false; then :
25591  $as_echo_n "(cached) " >&6
25592else
25593  case $NM in
25594  [\\/]* | ?:[\\/]*)
25595  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25596  ;;
25597  *)
25598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25599for as_dir in $PATH
25600do
25601  IFS=$as_save_IFS
25602  test -z "$as_dir" && as_dir=.
25603    for ac_exec_ext in '' $ac_executable_extensions; do
25604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25605    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25607    break 2
25608  fi
25609done
25610  done
25611IFS=$as_save_IFS
25612
25613  ;;
25614esac
25615fi
25616NM=$ac_cv_path_NM
25617if test -n "$NM"; then
25618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25619$as_echo "$NM" >&6; }
25620else
25621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25622$as_echo "no" >&6; }
25623fi
25624
25625
25626
25627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25628
25629  # First separate the path from the arguments. This will split at the first
25630  # space.
25631  complete="$NM"
25632  path="${complete%% *}"
25633  tmp="$complete EOL"
25634  arguments="${tmp#* }"
25635
25636  # Input might be given as Windows format, start by converting to
25637  # unix format.
25638  new_path=`$CYGPATH -u "$path"`
25639
25640  # Now try to locate executable using which
25641  new_path=`$WHICH "$new_path" 2> /dev/null`
25642  # bat and cmd files are not always considered executable in cygwin causing which
25643  # to not find them
25644  if test "x$new_path" = x \
25645      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25646      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25647    new_path=`$CYGPATH -u "$path"`
25648  fi
25649  if test "x$new_path" = x; then
25650    # Oops. Which didn't find the executable.
25651    # The splitting of arguments from the executable at a space might have been incorrect,
25652    # since paths with space are more likely in Windows. Give it another try with the whole
25653    # argument.
25654    path="$complete"
25655    arguments="EOL"
25656    new_path=`$CYGPATH -u "$path"`
25657    new_path=`$WHICH "$new_path" 2> /dev/null`
25658    # bat and cmd files are not always considered executable in cygwin causing which
25659    # to not find them
25660    if test "x$new_path" = x \
25661        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25662        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25663      new_path=`$CYGPATH -u "$path"`
25664    fi
25665    if test "x$new_path" = x; then
25666      # It's still not found. Now this is an unrecoverable error.
25667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25668$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25669      has_space=`$ECHO "$complete" | $GREP " "`
25670      if test "x$has_space" != x; then
25671        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25672$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25673      fi
25674      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25675    fi
25676  fi
25677
25678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25681  # "foo.exe" is OK but "foo" is an error.
25682  #
25683  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25684  # It is also a way to make sure we got the proper file name for the real test later on.
25685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25686  if test "x$test_shortpath" = x; then
25687    # Short path failed, file does not exist as specified.
25688    # Try adding .exe or .cmd
25689    if test -f "${new_path}.exe"; then
25690      input_to_shortpath="${new_path}.exe"
25691    elif test -f "${new_path}.cmd"; then
25692      input_to_shortpath="${new_path}.cmd"
25693    else
25694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25695$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25697$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25698      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25699    fi
25700  else
25701    input_to_shortpath="$new_path"
25702  fi
25703
25704  # Call helper function which possibly converts this using DOS-style short mode.
25705  # If so, the updated path is stored in $new_path.
25706  new_path="$input_to_shortpath"
25707
25708  input_path="$input_to_shortpath"
25709  # Check if we need to convert this using DOS-style short mode. If the path
25710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25711  # take no chances and rewrite it.
25712  # Note: m4 eats our [], so we need to use [ and ] instead.
25713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25714  if test "x$has_forbidden_chars" != x; then
25715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25719      # Going to short mode and back again did indeed matter. Since short mode is
25720      # case insensitive, let's make it lowercase to improve readability.
25721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25722      # Now convert it back to Unix-stile (cygpath)
25723      input_path=`$CYGPATH -u "$shortmode_path"`
25724      new_path="$input_path"
25725    fi
25726  fi
25727
25728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25729  if test "x$test_cygdrive_prefix" = x; then
25730    # As a simple fix, exclude /usr/bin since it's not a real path.
25731    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25733      # a path prefixed by /cygdrive for fixpath to work.
25734      new_path="$CYGWIN_ROOT_PATH$input_path"
25735    fi
25736  fi
25737
25738  # remove trailing .exe if any
25739  new_path="${new_path/%.exe/}"
25740
25741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25742
25743  # First separate the path from the arguments. This will split at the first
25744  # space.
25745  complete="$NM"
25746  path="${complete%% *}"
25747  tmp="$complete EOL"
25748  arguments="${tmp#* }"
25749
25750  # Input might be given as Windows format, start by converting to
25751  # unix format.
25752  new_path="$path"
25753
25754  windows_path="$new_path"
25755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25756    unix_path=`$CYGPATH -u "$windows_path"`
25757    new_path="$unix_path"
25758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25760    new_path="$unix_path"
25761  fi
25762
25763
25764  # Now try to locate executable using which
25765  new_path=`$WHICH "$new_path" 2> /dev/null`
25766
25767  if test "x$new_path" = x; then
25768    # Oops. Which didn't find the executable.
25769    # The splitting of arguments from the executable at a space might have been incorrect,
25770    # since paths with space are more likely in Windows. Give it another try with the whole
25771    # argument.
25772    path="$complete"
25773    arguments="EOL"
25774    new_path="$path"
25775
25776  windows_path="$new_path"
25777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25778    unix_path=`$CYGPATH -u "$windows_path"`
25779    new_path="$unix_path"
25780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25782    new_path="$unix_path"
25783  fi
25784
25785
25786    new_path=`$WHICH "$new_path" 2> /dev/null`
25787
25788    if test "x$new_path" = x; then
25789      # It's still not found. Now this is an unrecoverable error.
25790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25791$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25792      has_space=`$ECHO "$complete" | $GREP " "`
25793      if test "x$has_space" != x; then
25794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25796      fi
25797      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25798    fi
25799  fi
25800
25801  # Now new_path has a complete unix path to the binary
25802  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25803    # Keep paths in /bin as-is, but remove trailing .exe if any
25804    new_path="${new_path/%.exe/}"
25805    # Do not save /bin paths to all_fixpath_prefixes!
25806  else
25807    # Not in mixed or Windows style, start by that.
25808    new_path=`cmd //c echo $new_path`
25809
25810  input_path="$new_path"
25811  # Check if we need to convert this using DOS-style short mode. If the path
25812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25813  # take no chances and rewrite it.
25814  # Note: m4 eats our [], so we need to use [ and ] instead.
25815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25816  if test "x$has_forbidden_chars" != x; then
25817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25819  fi
25820
25821    # Output is in $new_path
25822
25823  windows_path="$new_path"
25824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25825    unix_path=`$CYGPATH -u "$windows_path"`
25826    new_path="$unix_path"
25827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25829    new_path="$unix_path"
25830  fi
25831
25832    # remove trailing .exe if any
25833    new_path="${new_path/%.exe/}"
25834
25835    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25836    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25837  fi
25838
25839  else
25840    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
25849    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25850    if test -z "$is_absolute_path"; then
25851      # Path to executable is not absolute. Find it.
25852      IFS_save="$IFS"
25853      IFS=:
25854      for p in $PATH; do
25855        if test -f "$p/$path" && test -x "$p/$path"; then
25856          new_path="$p/$path"
25857          break
25858        fi
25859      done
25860      IFS="$IFS_save"
25861    else
25862      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25863$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25864      new_path="$path"
25865    fi
25866
25867    if test "x$new_path" = x; then
25868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25869$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25870      has_space=`$ECHO "$complete" | $GREP " "`
25871      if test "x$has_space" != x; then
25872        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25874      fi
25875      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25876    fi
25877  fi
25878
25879  # Now join together the path and the arguments once again
25880  if test "x$arguments" != xEOL; then
25881    new_complete="$new_path ${arguments% *}"
25882  else
25883    new_complete="$new_path"
25884  fi
25885
25886  if test "x$complete" != "x$new_complete"; then
25887    NM="$new_complete"
25888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25889$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25890  fi
25891
25892    # Extract the first word of "gnm", so it can be a program name with args.
25893set dummy gnm; ac_word=$2
25894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25895$as_echo_n "checking for $ac_word... " >&6; }
25896if ${ac_cv_path_GNM+:} false; then :
25897  $as_echo_n "(cached) " >&6
25898else
25899  case $GNM in
25900  [\\/]* | ?:[\\/]*)
25901  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25902  ;;
25903  *)
25904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25905for as_dir in $PATH
25906do
25907  IFS=$as_save_IFS
25908  test -z "$as_dir" && as_dir=.
25909    for ac_exec_ext in '' $ac_executable_extensions; do
25910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25911    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25913    break 2
25914  fi
25915done
25916  done
25917IFS=$as_save_IFS
25918
25919  ;;
25920esac
25921fi
25922GNM=$ac_cv_path_GNM
25923if test -n "$GNM"; then
25924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25925$as_echo "$GNM" >&6; }
25926else
25927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25928$as_echo "no" >&6; }
25929fi
25930
25931
25932
25933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25934
25935  # First separate the path from the arguments. This will split at the first
25936  # space.
25937  complete="$GNM"
25938  path="${complete%% *}"
25939  tmp="$complete EOL"
25940  arguments="${tmp#* }"
25941
25942  # Input might be given as Windows format, start by converting to
25943  # unix format.
25944  new_path=`$CYGPATH -u "$path"`
25945
25946  # Now try to locate executable using which
25947  new_path=`$WHICH "$new_path" 2> /dev/null`
25948  # bat and cmd files are not always considered executable in cygwin causing which
25949  # to not find them
25950  if test "x$new_path" = x \
25951      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25952      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25953    new_path=`$CYGPATH -u "$path"`
25954  fi
25955  if test "x$new_path" = x; then
25956    # Oops. Which didn't find the executable.
25957    # The splitting of arguments from the executable at a space might have been incorrect,
25958    # since paths with space are more likely in Windows. Give it another try with the whole
25959    # argument.
25960    path="$complete"
25961    arguments="EOL"
25962    new_path=`$CYGPATH -u "$path"`
25963    new_path=`$WHICH "$new_path" 2> /dev/null`
25964    # bat and cmd files are not always considered executable in cygwin causing which
25965    # to not find them
25966    if test "x$new_path" = x \
25967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25969      new_path=`$CYGPATH -u "$path"`
25970    fi
25971    if test "x$new_path" = x; then
25972      # It's still not found. Now this is an unrecoverable error.
25973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25974$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25975      has_space=`$ECHO "$complete" | $GREP " "`
25976      if test "x$has_space" != x; then
25977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25979      fi
25980      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25981    fi
25982  fi
25983
25984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25987  # "foo.exe" is OK but "foo" is an error.
25988  #
25989  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25990  # It is also a way to make sure we got the proper file name for the real test later on.
25991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25992  if test "x$test_shortpath" = x; then
25993    # Short path failed, file does not exist as specified.
25994    # Try adding .exe or .cmd
25995    if test -f "${new_path}.exe"; then
25996      input_to_shortpath="${new_path}.exe"
25997    elif test -f "${new_path}.cmd"; then
25998      input_to_shortpath="${new_path}.cmd"
25999    else
26000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26001$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26002      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26003$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26004      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26005    fi
26006  else
26007    input_to_shortpath="$new_path"
26008  fi
26009
26010  # Call helper function which possibly converts this using DOS-style short mode.
26011  # If so, the updated path is stored in $new_path.
26012  new_path="$input_to_shortpath"
26013
26014  input_path="$input_to_shortpath"
26015  # Check if we need to convert this using DOS-style short mode. If the path
26016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26017  # take no chances and rewrite it.
26018  # Note: m4 eats our [], so we need to use [ and ] instead.
26019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26020  if test "x$has_forbidden_chars" != x; then
26021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26025      # Going to short mode and back again did indeed matter. Since short mode is
26026      # case insensitive, let's make it lowercase to improve readability.
26027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26028      # Now convert it back to Unix-stile (cygpath)
26029      input_path=`$CYGPATH -u "$shortmode_path"`
26030      new_path="$input_path"
26031    fi
26032  fi
26033
26034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26035  if test "x$test_cygdrive_prefix" = x; then
26036    # As a simple fix, exclude /usr/bin since it's not a real path.
26037    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26039      # a path prefixed by /cygdrive for fixpath to work.
26040      new_path="$CYGWIN_ROOT_PATH$input_path"
26041    fi
26042  fi
26043
26044  # remove trailing .exe if any
26045  new_path="${new_path/%.exe/}"
26046
26047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26048
26049  # First separate the path from the arguments. This will split at the first
26050  # space.
26051  complete="$GNM"
26052  path="${complete%% *}"
26053  tmp="$complete EOL"
26054  arguments="${tmp#* }"
26055
26056  # Input might be given as Windows format, start by converting to
26057  # unix format.
26058  new_path="$path"
26059
26060  windows_path="$new_path"
26061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26062    unix_path=`$CYGPATH -u "$windows_path"`
26063    new_path="$unix_path"
26064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26066    new_path="$unix_path"
26067  fi
26068
26069
26070  # Now try to locate executable using which
26071  new_path=`$WHICH "$new_path" 2> /dev/null`
26072
26073  if test "x$new_path" = x; then
26074    # Oops. Which didn't find the executable.
26075    # The splitting of arguments from the executable at a space might have been incorrect,
26076    # since paths with space are more likely in Windows. Give it another try with the whole
26077    # argument.
26078    path="$complete"
26079    arguments="EOL"
26080    new_path="$path"
26081
26082  windows_path="$new_path"
26083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26084    unix_path=`$CYGPATH -u "$windows_path"`
26085    new_path="$unix_path"
26086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26088    new_path="$unix_path"
26089  fi
26090
26091
26092    new_path=`$WHICH "$new_path" 2> /dev/null`
26093
26094    if test "x$new_path" = x; then
26095      # It's still not found. Now this is an unrecoverable error.
26096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26097$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26098      has_space=`$ECHO "$complete" | $GREP " "`
26099      if test "x$has_space" != x; then
26100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26102      fi
26103      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26104    fi
26105  fi
26106
26107  # Now new_path has a complete unix path to the binary
26108  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26109    # Keep paths in /bin as-is, but remove trailing .exe if any
26110    new_path="${new_path/%.exe/}"
26111    # Do not save /bin paths to all_fixpath_prefixes!
26112  else
26113    # Not in mixed or Windows style, start by that.
26114    new_path=`cmd //c echo $new_path`
26115
26116  input_path="$new_path"
26117  # Check if we need to convert this using DOS-style short mode. If the path
26118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26119  # take no chances and rewrite it.
26120  # Note: m4 eats our [], so we need to use [ and ] instead.
26121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26122  if test "x$has_forbidden_chars" != x; then
26123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26125  fi
26126
26127    # Output is in $new_path
26128
26129  windows_path="$new_path"
26130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26131    unix_path=`$CYGPATH -u "$windows_path"`
26132    new_path="$unix_path"
26133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26135    new_path="$unix_path"
26136  fi
26137
26138    # remove trailing .exe if any
26139    new_path="${new_path/%.exe/}"
26140
26141    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26142    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26143  fi
26144
26145  else
26146    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
26155    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26156    if test -z "$is_absolute_path"; then
26157      # Path to executable is not absolute. Find it.
26158      IFS_save="$IFS"
26159      IFS=:
26160      for p in $PATH; do
26161        if test -f "$p/$path" && test -x "$p/$path"; then
26162          new_path="$p/$path"
26163          break
26164        fi
26165      done
26166      IFS="$IFS_save"
26167    else
26168      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26169$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26170      new_path="$path"
26171    fi
26172
26173    if test "x$new_path" = x; then
26174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26175$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26176      has_space=`$ECHO "$complete" | $GREP " "`
26177      if test "x$has_space" != x; then
26178        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26180      fi
26181      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26182    fi
26183  fi
26184
26185  # Now join together the path and the arguments once again
26186  if test "x$arguments" != xEOL; then
26187    new_complete="$new_path ${arguments% *}"
26188  else
26189    new_complete="$new_path"
26190  fi
26191
26192  if test "x$complete" != "x$new_complete"; then
26193    GNM="$new_complete"
26194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26195$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26196  fi
26197
26198    # Extract the first word of "strip", so it can be a program name with args.
26199set dummy strip; ac_word=$2
26200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26201$as_echo_n "checking for $ac_word... " >&6; }
26202if ${ac_cv_path_STRIP+:} false; then :
26203  $as_echo_n "(cached) " >&6
26204else
26205  case $STRIP in
26206  [\\/]* | ?:[\\/]*)
26207  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26208  ;;
26209  *)
26210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26211for as_dir in $PATH
26212do
26213  IFS=$as_save_IFS
26214  test -z "$as_dir" && as_dir=.
26215    for ac_exec_ext in '' $ac_executable_extensions; do
26216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26217    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26219    break 2
26220  fi
26221done
26222  done
26223IFS=$as_save_IFS
26224
26225  ;;
26226esac
26227fi
26228STRIP=$ac_cv_path_STRIP
26229if test -n "$STRIP"; then
26230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26231$as_echo "$STRIP" >&6; }
26232else
26233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26234$as_echo "no" >&6; }
26235fi
26236
26237
26238
26239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26240
26241  # First separate the path from the arguments. This will split at the first
26242  # space.
26243  complete="$STRIP"
26244  path="${complete%% *}"
26245  tmp="$complete EOL"
26246  arguments="${tmp#* }"
26247
26248  # Input might be given as Windows format, start by converting to
26249  # unix format.
26250  new_path=`$CYGPATH -u "$path"`
26251
26252  # Now try to locate executable using which
26253  new_path=`$WHICH "$new_path" 2> /dev/null`
26254  # bat and cmd files are not always considered executable in cygwin causing which
26255  # to not find them
26256  if test "x$new_path" = x \
26257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26259    new_path=`$CYGPATH -u "$path"`
26260  fi
26261  if test "x$new_path" = x; then
26262    # Oops. Which didn't find the executable.
26263    # The splitting of arguments from the executable at a space might have been incorrect,
26264    # since paths with space are more likely in Windows. Give it another try with the whole
26265    # argument.
26266    path="$complete"
26267    arguments="EOL"
26268    new_path=`$CYGPATH -u "$path"`
26269    new_path=`$WHICH "$new_path" 2> /dev/null`
26270    # bat and cmd files are not always considered executable in cygwin causing which
26271    # to not find them
26272    if test "x$new_path" = x \
26273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26275      new_path=`$CYGPATH -u "$path"`
26276    fi
26277    if test "x$new_path" = x; then
26278      # It's still not found. Now this is an unrecoverable error.
26279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26280$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26281      has_space=`$ECHO "$complete" | $GREP " "`
26282      if test "x$has_space" != x; then
26283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26285      fi
26286      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26287    fi
26288  fi
26289
26290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26293  # "foo.exe" is OK but "foo" is an error.
26294  #
26295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26296  # It is also a way to make sure we got the proper file name for the real test later on.
26297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26298  if test "x$test_shortpath" = x; then
26299    # Short path failed, file does not exist as specified.
26300    # Try adding .exe or .cmd
26301    if test -f "${new_path}.exe"; then
26302      input_to_shortpath="${new_path}.exe"
26303    elif test -f "${new_path}.cmd"; then
26304      input_to_shortpath="${new_path}.cmd"
26305    else
26306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26307$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26310      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26311    fi
26312  else
26313    input_to_shortpath="$new_path"
26314  fi
26315
26316  # Call helper function which possibly converts this using DOS-style short mode.
26317  # If so, the updated path is stored in $new_path.
26318  new_path="$input_to_shortpath"
26319
26320  input_path="$input_to_shortpath"
26321  # Check if we need to convert this using DOS-style short mode. If the path
26322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26323  # take no chances and rewrite it.
26324  # Note: m4 eats our [], so we need to use [ and ] instead.
26325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26326  if test "x$has_forbidden_chars" != x; then
26327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26331      # Going to short mode and back again did indeed matter. Since short mode is
26332      # case insensitive, let's make it lowercase to improve readability.
26333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26334      # Now convert it back to Unix-stile (cygpath)
26335      input_path=`$CYGPATH -u "$shortmode_path"`
26336      new_path="$input_path"
26337    fi
26338  fi
26339
26340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26341  if test "x$test_cygdrive_prefix" = x; then
26342    # As a simple fix, exclude /usr/bin since it's not a real path.
26343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26345      # a path prefixed by /cygdrive for fixpath to work.
26346      new_path="$CYGWIN_ROOT_PATH$input_path"
26347    fi
26348  fi
26349
26350  # remove trailing .exe if any
26351  new_path="${new_path/%.exe/}"
26352
26353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26354
26355  # First separate the path from the arguments. This will split at the first
26356  # space.
26357  complete="$STRIP"
26358  path="${complete%% *}"
26359  tmp="$complete EOL"
26360  arguments="${tmp#* }"
26361
26362  # Input might be given as Windows format, start by converting to
26363  # unix format.
26364  new_path="$path"
26365
26366  windows_path="$new_path"
26367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26368    unix_path=`$CYGPATH -u "$windows_path"`
26369    new_path="$unix_path"
26370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26372    new_path="$unix_path"
26373  fi
26374
26375
26376  # Now try to locate executable using which
26377  new_path=`$WHICH "$new_path" 2> /dev/null`
26378
26379  if test "x$new_path" = x; then
26380    # Oops. Which didn't find the executable.
26381    # The splitting of arguments from the executable at a space might have been incorrect,
26382    # since paths with space are more likely in Windows. Give it another try with the whole
26383    # argument.
26384    path="$complete"
26385    arguments="EOL"
26386    new_path="$path"
26387
26388  windows_path="$new_path"
26389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26390    unix_path=`$CYGPATH -u "$windows_path"`
26391    new_path="$unix_path"
26392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26394    new_path="$unix_path"
26395  fi
26396
26397
26398    new_path=`$WHICH "$new_path" 2> /dev/null`
26399
26400    if test "x$new_path" = x; then
26401      # It's still not found. Now this is an unrecoverable error.
26402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26403$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26404      has_space=`$ECHO "$complete" | $GREP " "`
26405      if test "x$has_space" != x; then
26406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26408      fi
26409      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26410    fi
26411  fi
26412
26413  # Now new_path has a complete unix path to the binary
26414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26415    # Keep paths in /bin as-is, but remove trailing .exe if any
26416    new_path="${new_path/%.exe/}"
26417    # Do not save /bin paths to all_fixpath_prefixes!
26418  else
26419    # Not in mixed or Windows style, start by that.
26420    new_path=`cmd //c echo $new_path`
26421
26422  input_path="$new_path"
26423  # Check if we need to convert this using DOS-style short mode. If the path
26424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26425  # take no chances and rewrite it.
26426  # Note: m4 eats our [], so we need to use [ and ] instead.
26427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26428  if test "x$has_forbidden_chars" != x; then
26429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26431  fi
26432
26433    # Output is in $new_path
26434
26435  windows_path="$new_path"
26436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26437    unix_path=`$CYGPATH -u "$windows_path"`
26438    new_path="$unix_path"
26439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26441    new_path="$unix_path"
26442  fi
26443
26444    # remove trailing .exe if any
26445    new_path="${new_path/%.exe/}"
26446
26447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26449  fi
26450
26451  else
26452    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
26461    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26462    if test -z "$is_absolute_path"; then
26463      # Path to executable is not absolute. Find it.
26464      IFS_save="$IFS"
26465      IFS=:
26466      for p in $PATH; do
26467        if test -f "$p/$path" && test -x "$p/$path"; then
26468          new_path="$p/$path"
26469          break
26470        fi
26471      done
26472      IFS="$IFS_save"
26473    else
26474      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26475$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26476      new_path="$path"
26477    fi
26478
26479    if test "x$new_path" = x; then
26480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26481$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26482      has_space=`$ECHO "$complete" | $GREP " "`
26483      if test "x$has_space" != x; then
26484        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26486      fi
26487      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26488    fi
26489  fi
26490
26491  # Now join together the path and the arguments once again
26492  if test "x$arguments" != xEOL; then
26493    new_complete="$new_path ${arguments% *}"
26494  else
26495    new_complete="$new_path"
26496  fi
26497
26498  if test "x$complete" != "x$new_complete"; then
26499    STRIP="$new_complete"
26500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26501$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26502  fi
26503
26504    # Extract the first word of "mcs", so it can be a program name with args.
26505set dummy mcs; ac_word=$2
26506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26507$as_echo_n "checking for $ac_word... " >&6; }
26508if ${ac_cv_path_MCS+:} false; then :
26509  $as_echo_n "(cached) " >&6
26510else
26511  case $MCS in
26512  [\\/]* | ?:[\\/]*)
26513  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26514  ;;
26515  *)
26516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26517for as_dir in $PATH
26518do
26519  IFS=$as_save_IFS
26520  test -z "$as_dir" && as_dir=.
26521    for ac_exec_ext in '' $ac_executable_extensions; do
26522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26523    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26525    break 2
26526  fi
26527done
26528  done
26529IFS=$as_save_IFS
26530
26531  ;;
26532esac
26533fi
26534MCS=$ac_cv_path_MCS
26535if test -n "$MCS"; then
26536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26537$as_echo "$MCS" >&6; }
26538else
26539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26540$as_echo "no" >&6; }
26541fi
26542
26543
26544
26545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26546
26547  # First separate the path from the arguments. This will split at the first
26548  # space.
26549  complete="$MCS"
26550  path="${complete%% *}"
26551  tmp="$complete EOL"
26552  arguments="${tmp#* }"
26553
26554  # Input might be given as Windows format, start by converting to
26555  # unix format.
26556  new_path=`$CYGPATH -u "$path"`
26557
26558  # Now try to locate executable using which
26559  new_path=`$WHICH "$new_path" 2> /dev/null`
26560  # bat and cmd files are not always considered executable in cygwin causing which
26561  # to not find them
26562  if test "x$new_path" = x \
26563      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26564      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26565    new_path=`$CYGPATH -u "$path"`
26566  fi
26567  if test "x$new_path" = x; then
26568    # Oops. Which didn't find the executable.
26569    # The splitting of arguments from the executable at a space might have been incorrect,
26570    # since paths with space are more likely in Windows. Give it another try with the whole
26571    # argument.
26572    path="$complete"
26573    arguments="EOL"
26574    new_path=`$CYGPATH -u "$path"`
26575    new_path=`$WHICH "$new_path" 2> /dev/null`
26576    # bat and cmd files are not always considered executable in cygwin causing which
26577    # to not find them
26578    if test "x$new_path" = x \
26579        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26580        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26581      new_path=`$CYGPATH -u "$path"`
26582    fi
26583    if test "x$new_path" = x; then
26584      # It's still not found. Now this is an unrecoverable error.
26585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26586$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26587      has_space=`$ECHO "$complete" | $GREP " "`
26588      if test "x$has_space" != x; then
26589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26591      fi
26592      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26593    fi
26594  fi
26595
26596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26599  # "foo.exe" is OK but "foo" is an error.
26600  #
26601  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26602  # It is also a way to make sure we got the proper file name for the real test later on.
26603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26604  if test "x$test_shortpath" = x; then
26605    # Short path failed, file does not exist as specified.
26606    # Try adding .exe or .cmd
26607    if test -f "${new_path}.exe"; then
26608      input_to_shortpath="${new_path}.exe"
26609    elif test -f "${new_path}.cmd"; then
26610      input_to_shortpath="${new_path}.cmd"
26611    else
26612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26613$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26614      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26615$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26616      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26617    fi
26618  else
26619    input_to_shortpath="$new_path"
26620  fi
26621
26622  # Call helper function which possibly converts this using DOS-style short mode.
26623  # If so, the updated path is stored in $new_path.
26624  new_path="$input_to_shortpath"
26625
26626  input_path="$input_to_shortpath"
26627  # Check if we need to convert this using DOS-style short mode. If the path
26628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26629  # take no chances and rewrite it.
26630  # Note: m4 eats our [], so we need to use [ and ] instead.
26631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26632  if test "x$has_forbidden_chars" != x; then
26633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26637      # Going to short mode and back again did indeed matter. Since short mode is
26638      # case insensitive, let's make it lowercase to improve readability.
26639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26640      # Now convert it back to Unix-stile (cygpath)
26641      input_path=`$CYGPATH -u "$shortmode_path"`
26642      new_path="$input_path"
26643    fi
26644  fi
26645
26646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26647  if test "x$test_cygdrive_prefix" = x; then
26648    # As a simple fix, exclude /usr/bin since it's not a real path.
26649    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26651      # a path prefixed by /cygdrive for fixpath to work.
26652      new_path="$CYGWIN_ROOT_PATH$input_path"
26653    fi
26654  fi
26655
26656  # remove trailing .exe if any
26657  new_path="${new_path/%.exe/}"
26658
26659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26660
26661  # First separate the path from the arguments. This will split at the first
26662  # space.
26663  complete="$MCS"
26664  path="${complete%% *}"
26665  tmp="$complete EOL"
26666  arguments="${tmp#* }"
26667
26668  # Input might be given as Windows format, start by converting to
26669  # unix format.
26670  new_path="$path"
26671
26672  windows_path="$new_path"
26673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26674    unix_path=`$CYGPATH -u "$windows_path"`
26675    new_path="$unix_path"
26676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26678    new_path="$unix_path"
26679  fi
26680
26681
26682  # Now try to locate executable using which
26683  new_path=`$WHICH "$new_path" 2> /dev/null`
26684
26685  if test "x$new_path" = x; then
26686    # Oops. Which didn't find the executable.
26687    # The splitting of arguments from the executable at a space might have been incorrect,
26688    # since paths with space are more likely in Windows. Give it another try with the whole
26689    # argument.
26690    path="$complete"
26691    arguments="EOL"
26692    new_path="$path"
26693
26694  windows_path="$new_path"
26695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26696    unix_path=`$CYGPATH -u "$windows_path"`
26697    new_path="$unix_path"
26698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26700    new_path="$unix_path"
26701  fi
26702
26703
26704    new_path=`$WHICH "$new_path" 2> /dev/null`
26705
26706    if test "x$new_path" = x; then
26707      # It's still not found. Now this is an unrecoverable error.
26708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26709$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26710      has_space=`$ECHO "$complete" | $GREP " "`
26711      if test "x$has_space" != x; then
26712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26714      fi
26715      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26716    fi
26717  fi
26718
26719  # Now new_path has a complete unix path to the binary
26720  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26721    # Keep paths in /bin as-is, but remove trailing .exe if any
26722    new_path="${new_path/%.exe/}"
26723    # Do not save /bin paths to all_fixpath_prefixes!
26724  else
26725    # Not in mixed or Windows style, start by that.
26726    new_path=`cmd //c echo $new_path`
26727
26728  input_path="$new_path"
26729  # Check if we need to convert this using DOS-style short mode. If the path
26730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26731  # take no chances and rewrite it.
26732  # Note: m4 eats our [], so we need to use [ and ] instead.
26733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26734  if test "x$has_forbidden_chars" != x; then
26735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26737  fi
26738
26739    # Output is in $new_path
26740
26741  windows_path="$new_path"
26742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26743    unix_path=`$CYGPATH -u "$windows_path"`
26744    new_path="$unix_path"
26745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26747    new_path="$unix_path"
26748  fi
26749
26750    # remove trailing .exe if any
26751    new_path="${new_path/%.exe/}"
26752
26753    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26754    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26755  fi
26756
26757  else
26758    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
26767    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26768    if test -z "$is_absolute_path"; then
26769      # Path to executable is not absolute. Find it.
26770      IFS_save="$IFS"
26771      IFS=:
26772      for p in $PATH; do
26773        if test -f "$p/$path" && test -x "$p/$path"; then
26774          new_path="$p/$path"
26775          break
26776        fi
26777      done
26778      IFS="$IFS_save"
26779    else
26780      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26781$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26782      new_path="$path"
26783    fi
26784
26785    if test "x$new_path" = x; then
26786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26787$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26788      has_space=`$ECHO "$complete" | $GREP " "`
26789      if test "x$has_space" != x; then
26790        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26791$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26792      fi
26793      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26794    fi
26795  fi
26796
26797  # Now join together the path and the arguments once again
26798  if test "x$arguments" != xEOL; then
26799    new_complete="$new_path ${arguments% *}"
26800  else
26801    new_complete="$new_path"
26802  fi
26803
26804  if test "x$complete" != "x$new_complete"; then
26805    MCS="$new_complete"
26806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26807$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26808  fi
26809
26810  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26811    if test -n "$ac_tool_prefix"; then
26812  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26813set dummy ${ac_tool_prefix}nm; ac_word=$2
26814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26815$as_echo_n "checking for $ac_word... " >&6; }
26816if ${ac_cv_prog_NM+:} false; then :
26817  $as_echo_n "(cached) " >&6
26818else
26819  if test -n "$NM"; then
26820  ac_cv_prog_NM="$NM" # Let the user override the test.
26821else
26822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26823for as_dir in $PATH
26824do
26825  IFS=$as_save_IFS
26826  test -z "$as_dir" && as_dir=.
26827    for ac_exec_ext in '' $ac_executable_extensions; do
26828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26829    ac_cv_prog_NM="${ac_tool_prefix}nm"
26830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26831    break 2
26832  fi
26833done
26834  done
26835IFS=$as_save_IFS
26836
26837fi
26838fi
26839NM=$ac_cv_prog_NM
26840if test -n "$NM"; then
26841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26842$as_echo "$NM" >&6; }
26843else
26844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26845$as_echo "no" >&6; }
26846fi
26847
26848
26849fi
26850if test -z "$ac_cv_prog_NM"; then
26851  ac_ct_NM=$NM
26852  # Extract the first word of "nm", so it can be a program name with args.
26853set dummy nm; ac_word=$2
26854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26855$as_echo_n "checking for $ac_word... " >&6; }
26856if ${ac_cv_prog_ac_ct_NM+:} false; then :
26857  $as_echo_n "(cached) " >&6
26858else
26859  if test -n "$ac_ct_NM"; then
26860  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26861else
26862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26863for as_dir in $PATH
26864do
26865  IFS=$as_save_IFS
26866  test -z "$as_dir" && as_dir=.
26867    for ac_exec_ext in '' $ac_executable_extensions; do
26868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26869    ac_cv_prog_ac_ct_NM="nm"
26870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26871    break 2
26872  fi
26873done
26874  done
26875IFS=$as_save_IFS
26876
26877fi
26878fi
26879ac_ct_NM=$ac_cv_prog_ac_ct_NM
26880if test -n "$ac_ct_NM"; then
26881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26882$as_echo "$ac_ct_NM" >&6; }
26883else
26884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26885$as_echo "no" >&6; }
26886fi
26887
26888  if test "x$ac_ct_NM" = x; then
26889    NM=""
26890  else
26891    case $cross_compiling:$ac_tool_warned in
26892yes:)
26893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26895ac_tool_warned=yes ;;
26896esac
26897    NM=$ac_ct_NM
26898  fi
26899else
26900  NM="$ac_cv_prog_NM"
26901fi
26902
26903
26904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26905
26906  # First separate the path from the arguments. This will split at the first
26907  # space.
26908  complete="$NM"
26909  path="${complete%% *}"
26910  tmp="$complete EOL"
26911  arguments="${tmp#* }"
26912
26913  # Input might be given as Windows format, start by converting to
26914  # unix format.
26915  new_path=`$CYGPATH -u "$path"`
26916
26917  # Now try to locate executable using which
26918  new_path=`$WHICH "$new_path" 2> /dev/null`
26919  # bat and cmd files are not always considered executable in cygwin causing which
26920  # to not find them
26921  if test "x$new_path" = x \
26922      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26923      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26924    new_path=`$CYGPATH -u "$path"`
26925  fi
26926  if test "x$new_path" = x; then
26927    # Oops. Which didn't find the executable.
26928    # The splitting of arguments from the executable at a space might have been incorrect,
26929    # since paths with space are more likely in Windows. Give it another try with the whole
26930    # argument.
26931    path="$complete"
26932    arguments="EOL"
26933    new_path=`$CYGPATH -u "$path"`
26934    new_path=`$WHICH "$new_path" 2> /dev/null`
26935    # bat and cmd files are not always considered executable in cygwin causing which
26936    # to not find them
26937    if test "x$new_path" = x \
26938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26940      new_path=`$CYGPATH -u "$path"`
26941    fi
26942    if test "x$new_path" = x; then
26943      # It's still not found. Now this is an unrecoverable error.
26944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26945$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26946      has_space=`$ECHO "$complete" | $GREP " "`
26947      if test "x$has_space" != x; then
26948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26950      fi
26951      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26952    fi
26953  fi
26954
26955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26958  # "foo.exe" is OK but "foo" is an error.
26959  #
26960  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26961  # It is also a way to make sure we got the proper file name for the real test later on.
26962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26963  if test "x$test_shortpath" = x; then
26964    # Short path failed, file does not exist as specified.
26965    # Try adding .exe or .cmd
26966    if test -f "${new_path}.exe"; then
26967      input_to_shortpath="${new_path}.exe"
26968    elif test -f "${new_path}.cmd"; then
26969      input_to_shortpath="${new_path}.cmd"
26970    else
26971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26972$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26973      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26974$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26975      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26976    fi
26977  else
26978    input_to_shortpath="$new_path"
26979  fi
26980
26981  # Call helper function which possibly converts this using DOS-style short mode.
26982  # If so, the updated path is stored in $new_path.
26983  new_path="$input_to_shortpath"
26984
26985  input_path="$input_to_shortpath"
26986  # Check if we need to convert this using DOS-style short mode. If the path
26987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26988  # take no chances and rewrite it.
26989  # Note: m4 eats our [], so we need to use [ and ] instead.
26990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26991  if test "x$has_forbidden_chars" != x; then
26992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26996      # Going to short mode and back again did indeed matter. Since short mode is
26997      # case insensitive, let's make it lowercase to improve readability.
26998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26999      # Now convert it back to Unix-stile (cygpath)
27000      input_path=`$CYGPATH -u "$shortmode_path"`
27001      new_path="$input_path"
27002    fi
27003  fi
27004
27005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27006  if test "x$test_cygdrive_prefix" = x; then
27007    # As a simple fix, exclude /usr/bin since it's not a real path.
27008    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27010      # a path prefixed by /cygdrive for fixpath to work.
27011      new_path="$CYGWIN_ROOT_PATH$input_path"
27012    fi
27013  fi
27014
27015  # remove trailing .exe if any
27016  new_path="${new_path/%.exe/}"
27017
27018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27019
27020  # First separate the path from the arguments. This will split at the first
27021  # space.
27022  complete="$NM"
27023  path="${complete%% *}"
27024  tmp="$complete EOL"
27025  arguments="${tmp#* }"
27026
27027  # Input might be given as Windows format, start by converting to
27028  # unix format.
27029  new_path="$path"
27030
27031  windows_path="$new_path"
27032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27033    unix_path=`$CYGPATH -u "$windows_path"`
27034    new_path="$unix_path"
27035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27037    new_path="$unix_path"
27038  fi
27039
27040
27041  # Now try to locate executable using which
27042  new_path=`$WHICH "$new_path" 2> /dev/null`
27043
27044  if test "x$new_path" = x; then
27045    # Oops. Which didn't find the executable.
27046    # The splitting of arguments from the executable at a space might have been incorrect,
27047    # since paths with space are more likely in Windows. Give it another try with the whole
27048    # argument.
27049    path="$complete"
27050    arguments="EOL"
27051    new_path="$path"
27052
27053  windows_path="$new_path"
27054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27055    unix_path=`$CYGPATH -u "$windows_path"`
27056    new_path="$unix_path"
27057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27059    new_path="$unix_path"
27060  fi
27061
27062
27063    new_path=`$WHICH "$new_path" 2> /dev/null`
27064
27065    if test "x$new_path" = x; then
27066      # It's still not found. Now this is an unrecoverable error.
27067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27068$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27069      has_space=`$ECHO "$complete" | $GREP " "`
27070      if test "x$has_space" != x; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27073      fi
27074      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27075    fi
27076  fi
27077
27078  # Now new_path has a complete unix path to the binary
27079  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27080    # Keep paths in /bin as-is, but remove trailing .exe if any
27081    new_path="${new_path/%.exe/}"
27082    # Do not save /bin paths to all_fixpath_prefixes!
27083  else
27084    # Not in mixed or Windows style, start by that.
27085    new_path=`cmd //c echo $new_path`
27086
27087  input_path="$new_path"
27088  # Check if we need to convert this using DOS-style short mode. If the path
27089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27090  # take no chances and rewrite it.
27091  # Note: m4 eats our [], so we need to use [ and ] instead.
27092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27093  if test "x$has_forbidden_chars" != x; then
27094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27096  fi
27097
27098    # Output is in $new_path
27099
27100  windows_path="$new_path"
27101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27102    unix_path=`$CYGPATH -u "$windows_path"`
27103    new_path="$unix_path"
27104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27106    new_path="$unix_path"
27107  fi
27108
27109    # remove trailing .exe if any
27110    new_path="${new_path/%.exe/}"
27111
27112    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27113    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27114  fi
27115
27116  else
27117    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
27126    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27127    if test -z "$is_absolute_path"; then
27128      # Path to executable is not absolute. Find it.
27129      IFS_save="$IFS"
27130      IFS=:
27131      for p in $PATH; do
27132        if test -f "$p/$path" && test -x "$p/$path"; then
27133          new_path="$p/$path"
27134          break
27135        fi
27136      done
27137      IFS="$IFS_save"
27138    else
27139      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27140$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27141      new_path="$path"
27142    fi
27143
27144    if test "x$new_path" = x; then
27145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27146$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27147      has_space=`$ECHO "$complete" | $GREP " "`
27148      if test "x$has_space" != x; then
27149        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27150$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27151      fi
27152      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27153    fi
27154  fi
27155
27156  # Now join together the path and the arguments once again
27157  if test "x$arguments" != xEOL; then
27158    new_complete="$new_path ${arguments% *}"
27159  else
27160    new_complete="$new_path"
27161  fi
27162
27163  if test "x$complete" != "x$new_complete"; then
27164    NM="$new_complete"
27165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27166$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27167  fi
27168
27169    GNM="$NM"
27170
27171    if test -n "$ac_tool_prefix"; then
27172  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27173set dummy ${ac_tool_prefix}strip; ac_word=$2
27174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27175$as_echo_n "checking for $ac_word... " >&6; }
27176if ${ac_cv_prog_STRIP+:} false; then :
27177  $as_echo_n "(cached) " >&6
27178else
27179  if test -n "$STRIP"; then
27180  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27181else
27182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27183for as_dir in $PATH
27184do
27185  IFS=$as_save_IFS
27186  test -z "$as_dir" && as_dir=.
27187    for ac_exec_ext in '' $ac_executable_extensions; do
27188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27189    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27191    break 2
27192  fi
27193done
27194  done
27195IFS=$as_save_IFS
27196
27197fi
27198fi
27199STRIP=$ac_cv_prog_STRIP
27200if test -n "$STRIP"; then
27201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27202$as_echo "$STRIP" >&6; }
27203else
27204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27205$as_echo "no" >&6; }
27206fi
27207
27208
27209fi
27210if test -z "$ac_cv_prog_STRIP"; then
27211  ac_ct_STRIP=$STRIP
27212  # Extract the first word of "strip", so it can be a program name with args.
27213set dummy strip; ac_word=$2
27214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27215$as_echo_n "checking for $ac_word... " >&6; }
27216if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27217  $as_echo_n "(cached) " >&6
27218else
27219  if test -n "$ac_ct_STRIP"; then
27220  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27221else
27222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27223for as_dir in $PATH
27224do
27225  IFS=$as_save_IFS
27226  test -z "$as_dir" && as_dir=.
27227    for ac_exec_ext in '' $ac_executable_extensions; do
27228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27229    ac_cv_prog_ac_ct_STRIP="strip"
27230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27231    break 2
27232  fi
27233done
27234  done
27235IFS=$as_save_IFS
27236
27237fi
27238fi
27239ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27240if test -n "$ac_ct_STRIP"; then
27241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27242$as_echo "$ac_ct_STRIP" >&6; }
27243else
27244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27245$as_echo "no" >&6; }
27246fi
27247
27248  if test "x$ac_ct_STRIP" = x; then
27249    STRIP=""
27250  else
27251    case $cross_compiling:$ac_tool_warned in
27252yes:)
27253{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27255ac_tool_warned=yes ;;
27256esac
27257    STRIP=$ac_ct_STRIP
27258  fi
27259else
27260  STRIP="$ac_cv_prog_STRIP"
27261fi
27262
27263
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265
27266  # First separate the path from the arguments. This will split at the first
27267  # space.
27268  complete="$STRIP"
27269  path="${complete%% *}"
27270  tmp="$complete EOL"
27271  arguments="${tmp#* }"
27272
27273  # Input might be given as Windows format, start by converting to
27274  # unix format.
27275  new_path=`$CYGPATH -u "$path"`
27276
27277  # Now try to locate executable using which
27278  new_path=`$WHICH "$new_path" 2> /dev/null`
27279  # bat and cmd files are not always considered executable in cygwin causing which
27280  # to not find them
27281  if test "x$new_path" = x \
27282      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27283      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27284    new_path=`$CYGPATH -u "$path"`
27285  fi
27286  if test "x$new_path" = x; then
27287    # Oops. Which didn't find the executable.
27288    # The splitting of arguments from the executable at a space might have been incorrect,
27289    # since paths with space are more likely in Windows. Give it another try with the whole
27290    # argument.
27291    path="$complete"
27292    arguments="EOL"
27293    new_path=`$CYGPATH -u "$path"`
27294    new_path=`$WHICH "$new_path" 2> /dev/null`
27295    # bat and cmd files are not always considered executable in cygwin causing which
27296    # to not find them
27297    if test "x$new_path" = x \
27298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27300      new_path=`$CYGPATH -u "$path"`
27301    fi
27302    if test "x$new_path" = x; then
27303      # It's still not found. Now this is an unrecoverable error.
27304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27305$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27306      has_space=`$ECHO "$complete" | $GREP " "`
27307      if test "x$has_space" != x; then
27308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27310      fi
27311      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27312    fi
27313  fi
27314
27315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27318  # "foo.exe" is OK but "foo" is an error.
27319  #
27320  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27321  # It is also a way to make sure we got the proper file name for the real test later on.
27322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27323  if test "x$test_shortpath" = x; then
27324    # Short path failed, file does not exist as specified.
27325    # Try adding .exe or .cmd
27326    if test -f "${new_path}.exe"; then
27327      input_to_shortpath="${new_path}.exe"
27328    elif test -f "${new_path}.cmd"; then
27329      input_to_shortpath="${new_path}.cmd"
27330    else
27331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27332$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27333      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27334$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27335      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27336    fi
27337  else
27338    input_to_shortpath="$new_path"
27339  fi
27340
27341  # Call helper function which possibly converts this using DOS-style short mode.
27342  # If so, the updated path is stored in $new_path.
27343  new_path="$input_to_shortpath"
27344
27345  input_path="$input_to_shortpath"
27346  # Check if we need to convert this using DOS-style short mode. If the path
27347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27348  # take no chances and rewrite it.
27349  # Note: m4 eats our [], so we need to use [ and ] instead.
27350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27351  if test "x$has_forbidden_chars" != x; then
27352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27356      # Going to short mode and back again did indeed matter. Since short mode is
27357      # case insensitive, let's make it lowercase to improve readability.
27358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27359      # Now convert it back to Unix-stile (cygpath)
27360      input_path=`$CYGPATH -u "$shortmode_path"`
27361      new_path="$input_path"
27362    fi
27363  fi
27364
27365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27366  if test "x$test_cygdrive_prefix" = x; then
27367    # As a simple fix, exclude /usr/bin since it's not a real path.
27368    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27370      # a path prefixed by /cygdrive for fixpath to work.
27371      new_path="$CYGWIN_ROOT_PATH$input_path"
27372    fi
27373  fi
27374
27375  # remove trailing .exe if any
27376  new_path="${new_path/%.exe/}"
27377
27378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27379
27380  # First separate the path from the arguments. This will split at the first
27381  # space.
27382  complete="$STRIP"
27383  path="${complete%% *}"
27384  tmp="$complete EOL"
27385  arguments="${tmp#* }"
27386
27387  # Input might be given as Windows format, start by converting to
27388  # unix format.
27389  new_path="$path"
27390
27391  windows_path="$new_path"
27392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27393    unix_path=`$CYGPATH -u "$windows_path"`
27394    new_path="$unix_path"
27395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27397    new_path="$unix_path"
27398  fi
27399
27400
27401  # Now try to locate executable using which
27402  new_path=`$WHICH "$new_path" 2> /dev/null`
27403
27404  if test "x$new_path" = x; then
27405    # Oops. Which didn't find the executable.
27406    # The splitting of arguments from the executable at a space might have been incorrect,
27407    # since paths with space are more likely in Windows. Give it another try with the whole
27408    # argument.
27409    path="$complete"
27410    arguments="EOL"
27411    new_path="$path"
27412
27413  windows_path="$new_path"
27414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27415    unix_path=`$CYGPATH -u "$windows_path"`
27416    new_path="$unix_path"
27417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27419    new_path="$unix_path"
27420  fi
27421
27422
27423    new_path=`$WHICH "$new_path" 2> /dev/null`
27424
27425    if test "x$new_path" = x; then
27426      # It's still not found. Now this is an unrecoverable error.
27427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27428$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27429      has_space=`$ECHO "$complete" | $GREP " "`
27430      if test "x$has_space" != x; then
27431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27433      fi
27434      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27435    fi
27436  fi
27437
27438  # Now new_path has a complete unix path to the binary
27439  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27440    # Keep paths in /bin as-is, but remove trailing .exe if any
27441    new_path="${new_path/%.exe/}"
27442    # Do not save /bin paths to all_fixpath_prefixes!
27443  else
27444    # Not in mixed or Windows style, start by that.
27445    new_path=`cmd //c echo $new_path`
27446
27447  input_path="$new_path"
27448  # Check if we need to convert this using DOS-style short mode. If the path
27449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27450  # take no chances and rewrite it.
27451  # Note: m4 eats our [], so we need to use [ and ] instead.
27452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27453  if test "x$has_forbidden_chars" != x; then
27454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27456  fi
27457
27458    # Output is in $new_path
27459
27460  windows_path="$new_path"
27461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27462    unix_path=`$CYGPATH -u "$windows_path"`
27463    new_path="$unix_path"
27464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27466    new_path="$unix_path"
27467  fi
27468
27469    # remove trailing .exe if any
27470    new_path="${new_path/%.exe/}"
27471
27472    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27473    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27474  fi
27475
27476  else
27477    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
27486    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27487    if test -z "$is_absolute_path"; then
27488      # Path to executable is not absolute. Find it.
27489      IFS_save="$IFS"
27490      IFS=:
27491      for p in $PATH; do
27492        if test -f "$p/$path" && test -x "$p/$path"; then
27493          new_path="$p/$path"
27494          break
27495        fi
27496      done
27497      IFS="$IFS_save"
27498    else
27499      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27500$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27501      new_path="$path"
27502    fi
27503
27504    if test "x$new_path" = x; then
27505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27506$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27507      has_space=`$ECHO "$complete" | $GREP " "`
27508      if test "x$has_space" != x; then
27509        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27511      fi
27512      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27513    fi
27514  fi
27515
27516  # Now join together the path and the arguments once again
27517  if test "x$arguments" != xEOL; then
27518    new_complete="$new_path ${arguments% *}"
27519  else
27520    new_complete="$new_path"
27521  fi
27522
27523  if test "x$complete" != "x$new_complete"; then
27524    STRIP="$new_complete"
27525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27526$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27527  fi
27528
27529  fi
27530
27531  # objcopy is used for moving debug symbols to separate files when
27532  # full debug symbols are enabled.
27533  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27534    if test -n "$ac_tool_prefix"; then
27535  for ac_prog in gobjcopy objcopy
27536  do
27537    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27538set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27540$as_echo_n "checking for $ac_word... " >&6; }
27541if ${ac_cv_prog_OBJCOPY+:} false; then :
27542  $as_echo_n "(cached) " >&6
27543else
27544  if test -n "$OBJCOPY"; then
27545  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27546else
27547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27548for as_dir in $PATH
27549do
27550  IFS=$as_save_IFS
27551  test -z "$as_dir" && as_dir=.
27552    for ac_exec_ext in '' $ac_executable_extensions; do
27553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27554    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27556    break 2
27557  fi
27558done
27559  done
27560IFS=$as_save_IFS
27561
27562fi
27563fi
27564OBJCOPY=$ac_cv_prog_OBJCOPY
27565if test -n "$OBJCOPY"; then
27566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27567$as_echo "$OBJCOPY" >&6; }
27568else
27569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27570$as_echo "no" >&6; }
27571fi
27572
27573
27574    test -n "$OBJCOPY" && break
27575  done
27576fi
27577if test -z "$OBJCOPY"; then
27578  ac_ct_OBJCOPY=$OBJCOPY
27579  for ac_prog in gobjcopy objcopy
27580do
27581  # Extract the first word of "$ac_prog", so it can be a program name with args.
27582set dummy $ac_prog; ac_word=$2
27583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27584$as_echo_n "checking for $ac_word... " >&6; }
27585if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27586  $as_echo_n "(cached) " >&6
27587else
27588  if test -n "$ac_ct_OBJCOPY"; then
27589  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27590else
27591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27592for as_dir in $PATH
27593do
27594  IFS=$as_save_IFS
27595  test -z "$as_dir" && as_dir=.
27596    for ac_exec_ext in '' $ac_executable_extensions; do
27597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27598    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27600    break 2
27601  fi
27602done
27603  done
27604IFS=$as_save_IFS
27605
27606fi
27607fi
27608ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27609if test -n "$ac_ct_OBJCOPY"; then
27610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27611$as_echo "$ac_ct_OBJCOPY" >&6; }
27612else
27613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27614$as_echo "no" >&6; }
27615fi
27616
27617
27618  test -n "$ac_ct_OBJCOPY" && break
27619done
27620
27621  if test "x$ac_ct_OBJCOPY" = x; then
27622    OBJCOPY=""
27623  else
27624    case $cross_compiling:$ac_tool_warned in
27625yes:)
27626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27628ac_tool_warned=yes ;;
27629esac
27630    OBJCOPY=$ac_ct_OBJCOPY
27631  fi
27632fi
27633
27634    # Only call fixup if objcopy was found.
27635    if test -n "$OBJCOPY"; then
27636
27637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27638
27639  # First separate the path from the arguments. This will split at the first
27640  # space.
27641  complete="$OBJCOPY"
27642  path="${complete%% *}"
27643  tmp="$complete EOL"
27644  arguments="${tmp#* }"
27645
27646  # Input might be given as Windows format, start by converting to
27647  # unix format.
27648  new_path=`$CYGPATH -u "$path"`
27649
27650  # Now try to locate executable using which
27651  new_path=`$WHICH "$new_path" 2> /dev/null`
27652  # bat and cmd files are not always considered executable in cygwin causing which
27653  # to not find them
27654  if test "x$new_path" = x \
27655      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27656      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27657    new_path=`$CYGPATH -u "$path"`
27658  fi
27659  if test "x$new_path" = x; then
27660    # Oops. Which didn't find the executable.
27661    # The splitting of arguments from the executable at a space might have been incorrect,
27662    # since paths with space are more likely in Windows. Give it another try with the whole
27663    # argument.
27664    path="$complete"
27665    arguments="EOL"
27666    new_path=`$CYGPATH -u "$path"`
27667    new_path=`$WHICH "$new_path" 2> /dev/null`
27668    # bat and cmd files are not always considered executable in cygwin causing which
27669    # to not find them
27670    if test "x$new_path" = x \
27671        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27672        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27673      new_path=`$CYGPATH -u "$path"`
27674    fi
27675    if test "x$new_path" = x; then
27676      # It's still not found. Now this is an unrecoverable error.
27677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27678$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27679      has_space=`$ECHO "$complete" | $GREP " "`
27680      if test "x$has_space" != x; then
27681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27683      fi
27684      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27685    fi
27686  fi
27687
27688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27691  # "foo.exe" is OK but "foo" is an error.
27692  #
27693  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27694  # It is also a way to make sure we got the proper file name for the real test later on.
27695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27696  if test "x$test_shortpath" = x; then
27697    # Short path failed, file does not exist as specified.
27698    # Try adding .exe or .cmd
27699    if test -f "${new_path}.exe"; then
27700      input_to_shortpath="${new_path}.exe"
27701    elif test -f "${new_path}.cmd"; then
27702      input_to_shortpath="${new_path}.cmd"
27703    else
27704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27705$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27706      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27708      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27709    fi
27710  else
27711    input_to_shortpath="$new_path"
27712  fi
27713
27714  # Call helper function which possibly converts this using DOS-style short mode.
27715  # If so, the updated path is stored in $new_path.
27716  new_path="$input_to_shortpath"
27717
27718  input_path="$input_to_shortpath"
27719  # Check if we need to convert this using DOS-style short mode. If the path
27720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27721  # take no chances and rewrite it.
27722  # Note: m4 eats our [], so we need to use [ and ] instead.
27723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27724  if test "x$has_forbidden_chars" != x; then
27725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27729      # Going to short mode and back again did indeed matter. Since short mode is
27730      # case insensitive, let's make it lowercase to improve readability.
27731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27732      # Now convert it back to Unix-stile (cygpath)
27733      input_path=`$CYGPATH -u "$shortmode_path"`
27734      new_path="$input_path"
27735    fi
27736  fi
27737
27738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27739  if test "x$test_cygdrive_prefix" = x; then
27740    # As a simple fix, exclude /usr/bin since it's not a real path.
27741    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27743      # a path prefixed by /cygdrive for fixpath to work.
27744      new_path="$CYGWIN_ROOT_PATH$input_path"
27745    fi
27746  fi
27747
27748  # remove trailing .exe if any
27749  new_path="${new_path/%.exe/}"
27750
27751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27752
27753  # First separate the path from the arguments. This will split at the first
27754  # space.
27755  complete="$OBJCOPY"
27756  path="${complete%% *}"
27757  tmp="$complete EOL"
27758  arguments="${tmp#* }"
27759
27760  # Input might be given as Windows format, start by converting to
27761  # unix format.
27762  new_path="$path"
27763
27764  windows_path="$new_path"
27765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27766    unix_path=`$CYGPATH -u "$windows_path"`
27767    new_path="$unix_path"
27768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27770    new_path="$unix_path"
27771  fi
27772
27773
27774  # Now try to locate executable using which
27775  new_path=`$WHICH "$new_path" 2> /dev/null`
27776
27777  if test "x$new_path" = x; then
27778    # Oops. Which didn't find the executable.
27779    # The splitting of arguments from the executable at a space might have been incorrect,
27780    # since paths with space are more likely in Windows. Give it another try with the whole
27781    # argument.
27782    path="$complete"
27783    arguments="EOL"
27784    new_path="$path"
27785
27786  windows_path="$new_path"
27787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27788    unix_path=`$CYGPATH -u "$windows_path"`
27789    new_path="$unix_path"
27790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27792    new_path="$unix_path"
27793  fi
27794
27795
27796    new_path=`$WHICH "$new_path" 2> /dev/null`
27797
27798    if test "x$new_path" = x; then
27799      # It's still not found. Now this is an unrecoverable error.
27800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27801$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27802      has_space=`$ECHO "$complete" | $GREP " "`
27803      if test "x$has_space" != x; then
27804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27806      fi
27807      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27808    fi
27809  fi
27810
27811  # Now new_path has a complete unix path to the binary
27812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27813    # Keep paths in /bin as-is, but remove trailing .exe if any
27814    new_path="${new_path/%.exe/}"
27815    # Do not save /bin paths to all_fixpath_prefixes!
27816  else
27817    # Not in mixed or Windows style, start by that.
27818    new_path=`cmd //c echo $new_path`
27819
27820  input_path="$new_path"
27821  # Check if we need to convert this using DOS-style short mode. If the path
27822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27823  # take no chances and rewrite it.
27824  # Note: m4 eats our [], so we need to use [ and ] instead.
27825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27826  if test "x$has_forbidden_chars" != x; then
27827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27829  fi
27830
27831    # Output is in $new_path
27832
27833  windows_path="$new_path"
27834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27835    unix_path=`$CYGPATH -u "$windows_path"`
27836    new_path="$unix_path"
27837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27839    new_path="$unix_path"
27840  fi
27841
27842    # remove trailing .exe if any
27843    new_path="${new_path/%.exe/}"
27844
27845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27847  fi
27848
27849  else
27850    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
27859    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27860    if test -z "$is_absolute_path"; then
27861      # Path to executable is not absolute. Find it.
27862      IFS_save="$IFS"
27863      IFS=:
27864      for p in $PATH; do
27865        if test -f "$p/$path" && test -x "$p/$path"; then
27866          new_path="$p/$path"
27867          break
27868        fi
27869      done
27870      IFS="$IFS_save"
27871    else
27872      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27873$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27874      new_path="$path"
27875    fi
27876
27877    if test "x$new_path" = x; then
27878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27879$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27880      has_space=`$ECHO "$complete" | $GREP " "`
27881      if test "x$has_space" != x; then
27882        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27884      fi
27885      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27886    fi
27887  fi
27888
27889  # Now join together the path and the arguments once again
27890  if test "x$arguments" != xEOL; then
27891    new_complete="$new_path ${arguments% *}"
27892  else
27893    new_complete="$new_path"
27894  fi
27895
27896  if test "x$complete" != "x$new_complete"; then
27897    OBJCOPY="$new_complete"
27898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27899$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27900  fi
27901
27902    fi
27903  fi
27904
27905  if test -n "$ac_tool_prefix"; then
27906  for ac_prog in gobjdump objdump
27907  do
27908    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27911$as_echo_n "checking for $ac_word... " >&6; }
27912if ${ac_cv_prog_OBJDUMP+:} false; then :
27913  $as_echo_n "(cached) " >&6
27914else
27915  if test -n "$OBJDUMP"; then
27916  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27917else
27918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27919for as_dir in $PATH
27920do
27921  IFS=$as_save_IFS
27922  test -z "$as_dir" && as_dir=.
27923    for ac_exec_ext in '' $ac_executable_extensions; do
27924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27925    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27927    break 2
27928  fi
27929done
27930  done
27931IFS=$as_save_IFS
27932
27933fi
27934fi
27935OBJDUMP=$ac_cv_prog_OBJDUMP
27936if test -n "$OBJDUMP"; then
27937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27938$as_echo "$OBJDUMP" >&6; }
27939else
27940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27941$as_echo "no" >&6; }
27942fi
27943
27944
27945    test -n "$OBJDUMP" && break
27946  done
27947fi
27948if test -z "$OBJDUMP"; then
27949  ac_ct_OBJDUMP=$OBJDUMP
27950  for ac_prog in gobjdump objdump
27951do
27952  # Extract the first word of "$ac_prog", so it can be a program name with args.
27953set dummy $ac_prog; ac_word=$2
27954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27955$as_echo_n "checking for $ac_word... " >&6; }
27956if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27957  $as_echo_n "(cached) " >&6
27958else
27959  if test -n "$ac_ct_OBJDUMP"; then
27960  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27961else
27962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27963for as_dir in $PATH
27964do
27965  IFS=$as_save_IFS
27966  test -z "$as_dir" && as_dir=.
27967    for ac_exec_ext in '' $ac_executable_extensions; do
27968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27969    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27971    break 2
27972  fi
27973done
27974  done
27975IFS=$as_save_IFS
27976
27977fi
27978fi
27979ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27980if test -n "$ac_ct_OBJDUMP"; then
27981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27982$as_echo "$ac_ct_OBJDUMP" >&6; }
27983else
27984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27985$as_echo "no" >&6; }
27986fi
27987
27988
27989  test -n "$ac_ct_OBJDUMP" && break
27990done
27991
27992  if test "x$ac_ct_OBJDUMP" = x; then
27993    OBJDUMP=""
27994  else
27995    case $cross_compiling:$ac_tool_warned in
27996yes:)
27997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27999ac_tool_warned=yes ;;
28000esac
28001    OBJDUMP=$ac_ct_OBJDUMP
28002  fi
28003fi
28004
28005  if test "x$OBJDUMP" != x; then
28006    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28007
28008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28009
28010  # First separate the path from the arguments. This will split at the first
28011  # space.
28012  complete="$OBJDUMP"
28013  path="${complete%% *}"
28014  tmp="$complete EOL"
28015  arguments="${tmp#* }"
28016
28017  # Input might be given as Windows format, start by converting to
28018  # unix format.
28019  new_path=`$CYGPATH -u "$path"`
28020
28021  # Now try to locate executable using which
28022  new_path=`$WHICH "$new_path" 2> /dev/null`
28023  # bat and cmd files are not always considered executable in cygwin causing which
28024  # to not find them
28025  if test "x$new_path" = x \
28026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28028    new_path=`$CYGPATH -u "$path"`
28029  fi
28030  if test "x$new_path" = x; then
28031    # Oops. Which didn't find the executable.
28032    # The splitting of arguments from the executable at a space might have been incorrect,
28033    # since paths with space are more likely in Windows. Give it another try with the whole
28034    # argument.
28035    path="$complete"
28036    arguments="EOL"
28037    new_path=`$CYGPATH -u "$path"`
28038    new_path=`$WHICH "$new_path" 2> /dev/null`
28039    # bat and cmd files are not always considered executable in cygwin causing which
28040    # to not find them
28041    if test "x$new_path" = x \
28042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28044      new_path=`$CYGPATH -u "$path"`
28045    fi
28046    if test "x$new_path" = x; then
28047      # It's still not found. Now this is an unrecoverable error.
28048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28049$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28050      has_space=`$ECHO "$complete" | $GREP " "`
28051      if test "x$has_space" != x; then
28052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28054      fi
28055      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28056    fi
28057  fi
28058
28059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28062  # "foo.exe" is OK but "foo" is an error.
28063  #
28064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28065  # It is also a way to make sure we got the proper file name for the real test later on.
28066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28067  if test "x$test_shortpath" = x; then
28068    # Short path failed, file does not exist as specified.
28069    # Try adding .exe or .cmd
28070    if test -f "${new_path}.exe"; then
28071      input_to_shortpath="${new_path}.exe"
28072    elif test -f "${new_path}.cmd"; then
28073      input_to_shortpath="${new_path}.cmd"
28074    else
28075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28076$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28079      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28080    fi
28081  else
28082    input_to_shortpath="$new_path"
28083  fi
28084
28085  # Call helper function which possibly converts this using DOS-style short mode.
28086  # If so, the updated path is stored in $new_path.
28087  new_path="$input_to_shortpath"
28088
28089  input_path="$input_to_shortpath"
28090  # Check if we need to convert this using DOS-style short mode. If the path
28091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28092  # take no chances and rewrite it.
28093  # Note: m4 eats our [], so we need to use [ and ] instead.
28094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28095  if test "x$has_forbidden_chars" != x; then
28096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28100      # Going to short mode and back again did indeed matter. Since short mode is
28101      # case insensitive, let's make it lowercase to improve readability.
28102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28103      # Now convert it back to Unix-stile (cygpath)
28104      input_path=`$CYGPATH -u "$shortmode_path"`
28105      new_path="$input_path"
28106    fi
28107  fi
28108
28109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28110  if test "x$test_cygdrive_prefix" = x; then
28111    # As a simple fix, exclude /usr/bin since it's not a real path.
28112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28114      # a path prefixed by /cygdrive for fixpath to work.
28115      new_path="$CYGWIN_ROOT_PATH$input_path"
28116    fi
28117  fi
28118
28119  # remove trailing .exe if any
28120  new_path="${new_path/%.exe/}"
28121
28122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28123
28124  # First separate the path from the arguments. This will split at the first
28125  # space.
28126  complete="$OBJDUMP"
28127  path="${complete%% *}"
28128  tmp="$complete EOL"
28129  arguments="${tmp#* }"
28130
28131  # Input might be given as Windows format, start by converting to
28132  # unix format.
28133  new_path="$path"
28134
28135  windows_path="$new_path"
28136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28137    unix_path=`$CYGPATH -u "$windows_path"`
28138    new_path="$unix_path"
28139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28141    new_path="$unix_path"
28142  fi
28143
28144
28145  # Now try to locate executable using which
28146  new_path=`$WHICH "$new_path" 2> /dev/null`
28147
28148  if test "x$new_path" = x; then
28149    # Oops. Which didn't find the executable.
28150    # The splitting of arguments from the executable at a space might have been incorrect,
28151    # since paths with space are more likely in Windows. Give it another try with the whole
28152    # argument.
28153    path="$complete"
28154    arguments="EOL"
28155    new_path="$path"
28156
28157  windows_path="$new_path"
28158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28159    unix_path=`$CYGPATH -u "$windows_path"`
28160    new_path="$unix_path"
28161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28163    new_path="$unix_path"
28164  fi
28165
28166
28167    new_path=`$WHICH "$new_path" 2> /dev/null`
28168
28169    if test "x$new_path" = x; then
28170      # It's still not found. Now this is an unrecoverable error.
28171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28172$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28173      has_space=`$ECHO "$complete" | $GREP " "`
28174      if test "x$has_space" != x; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28177      fi
28178      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28179    fi
28180  fi
28181
28182  # Now new_path has a complete unix path to the binary
28183  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28184    # Keep paths in /bin as-is, but remove trailing .exe if any
28185    new_path="${new_path/%.exe/}"
28186    # Do not save /bin paths to all_fixpath_prefixes!
28187  else
28188    # Not in mixed or Windows style, start by that.
28189    new_path=`cmd //c echo $new_path`
28190
28191  input_path="$new_path"
28192  # Check if we need to convert this using DOS-style short mode. If the path
28193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28194  # take no chances and rewrite it.
28195  # Note: m4 eats our [], so we need to use [ and ] instead.
28196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28197  if test "x$has_forbidden_chars" != x; then
28198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28200  fi
28201
28202    # Output is in $new_path
28203
28204  windows_path="$new_path"
28205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28206    unix_path=`$CYGPATH -u "$windows_path"`
28207    new_path="$unix_path"
28208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28210    new_path="$unix_path"
28211  fi
28212
28213    # remove trailing .exe if any
28214    new_path="${new_path/%.exe/}"
28215
28216    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28217    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28218  fi
28219
28220  else
28221    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
28230    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28231    if test -z "$is_absolute_path"; then
28232      # Path to executable is not absolute. Find it.
28233      IFS_save="$IFS"
28234      IFS=:
28235      for p in $PATH; do
28236        if test -f "$p/$path" && test -x "$p/$path"; then
28237          new_path="$p/$path"
28238          break
28239        fi
28240      done
28241      IFS="$IFS_save"
28242    else
28243      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28244$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28245      new_path="$path"
28246    fi
28247
28248    if test "x$new_path" = x; then
28249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28250$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28251      has_space=`$ECHO "$complete" | $GREP " "`
28252      if test "x$has_space" != x; then
28253        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28255      fi
28256      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28257    fi
28258  fi
28259
28260  # Now join together the path and the arguments once again
28261  if test "x$arguments" != xEOL; then
28262    new_complete="$new_path ${arguments% *}"
28263  else
28264    new_complete="$new_path"
28265  fi
28266
28267  if test "x$complete" != "x$new_complete"; then
28268    OBJDUMP="$new_complete"
28269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28270$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28271  fi
28272
28273  fi
28274
28275  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28276    # Extract the first word of "lipo", so it can be a program name with args.
28277set dummy lipo; ac_word=$2
28278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28279$as_echo_n "checking for $ac_word... " >&6; }
28280if ${ac_cv_path_LIPO+:} false; then :
28281  $as_echo_n "(cached) " >&6
28282else
28283  case $LIPO in
28284  [\\/]* | ?:[\\/]*)
28285  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28286  ;;
28287  *)
28288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28289for as_dir in $PATH
28290do
28291  IFS=$as_save_IFS
28292  test -z "$as_dir" && as_dir=.
28293    for ac_exec_ext in '' $ac_executable_extensions; do
28294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28295    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28297    break 2
28298  fi
28299done
28300  done
28301IFS=$as_save_IFS
28302
28303  ;;
28304esac
28305fi
28306LIPO=$ac_cv_path_LIPO
28307if test -n "$LIPO"; then
28308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28309$as_echo "$LIPO" >&6; }
28310else
28311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28312$as_echo "no" >&6; }
28313fi
28314
28315
28316
28317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28318
28319  # First separate the path from the arguments. This will split at the first
28320  # space.
28321  complete="$LIPO"
28322  path="${complete%% *}"
28323  tmp="$complete EOL"
28324  arguments="${tmp#* }"
28325
28326  # Input might be given as Windows format, start by converting to
28327  # unix format.
28328  new_path=`$CYGPATH -u "$path"`
28329
28330  # Now try to locate executable using which
28331  new_path=`$WHICH "$new_path" 2> /dev/null`
28332  # bat and cmd files are not always considered executable in cygwin causing which
28333  # to not find them
28334  if test "x$new_path" = x \
28335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28337    new_path=`$CYGPATH -u "$path"`
28338  fi
28339  if test "x$new_path" = x; then
28340    # Oops. Which didn't find the executable.
28341    # The splitting of arguments from the executable at a space might have been incorrect,
28342    # since paths with space are more likely in Windows. Give it another try with the whole
28343    # argument.
28344    path="$complete"
28345    arguments="EOL"
28346    new_path=`$CYGPATH -u "$path"`
28347    new_path=`$WHICH "$new_path" 2> /dev/null`
28348    # bat and cmd files are not always considered executable in cygwin causing which
28349    # to not find them
28350    if test "x$new_path" = x \
28351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28353      new_path=`$CYGPATH -u "$path"`
28354    fi
28355    if test "x$new_path" = x; then
28356      # It's still not found. Now this is an unrecoverable error.
28357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28358$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28359      has_space=`$ECHO "$complete" | $GREP " "`
28360      if test "x$has_space" != x; then
28361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28363      fi
28364      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28365    fi
28366  fi
28367
28368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28371  # "foo.exe" is OK but "foo" is an error.
28372  #
28373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28374  # It is also a way to make sure we got the proper file name for the real test later on.
28375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28376  if test "x$test_shortpath" = x; then
28377    # Short path failed, file does not exist as specified.
28378    # Try adding .exe or .cmd
28379    if test -f "${new_path}.exe"; then
28380      input_to_shortpath="${new_path}.exe"
28381    elif test -f "${new_path}.cmd"; then
28382      input_to_shortpath="${new_path}.cmd"
28383    else
28384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28385$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28388      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28389    fi
28390  else
28391    input_to_shortpath="$new_path"
28392  fi
28393
28394  # Call helper function which possibly converts this using DOS-style short mode.
28395  # If so, the updated path is stored in $new_path.
28396  new_path="$input_to_shortpath"
28397
28398  input_path="$input_to_shortpath"
28399  # Check if we need to convert this using DOS-style short mode. If the path
28400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28401  # take no chances and rewrite it.
28402  # Note: m4 eats our [], so we need to use [ and ] instead.
28403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28404  if test "x$has_forbidden_chars" != x; then
28405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28409      # Going to short mode and back again did indeed matter. Since short mode is
28410      # case insensitive, let's make it lowercase to improve readability.
28411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28412      # Now convert it back to Unix-stile (cygpath)
28413      input_path=`$CYGPATH -u "$shortmode_path"`
28414      new_path="$input_path"
28415    fi
28416  fi
28417
28418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28419  if test "x$test_cygdrive_prefix" = x; then
28420    # As a simple fix, exclude /usr/bin since it's not a real path.
28421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28423      # a path prefixed by /cygdrive for fixpath to work.
28424      new_path="$CYGWIN_ROOT_PATH$input_path"
28425    fi
28426  fi
28427
28428  # remove trailing .exe if any
28429  new_path="${new_path/%.exe/}"
28430
28431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28432
28433  # First separate the path from the arguments. This will split at the first
28434  # space.
28435  complete="$LIPO"
28436  path="${complete%% *}"
28437  tmp="$complete EOL"
28438  arguments="${tmp#* }"
28439
28440  # Input might be given as Windows format, start by converting to
28441  # unix format.
28442  new_path="$path"
28443
28444  windows_path="$new_path"
28445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28446    unix_path=`$CYGPATH -u "$windows_path"`
28447    new_path="$unix_path"
28448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28450    new_path="$unix_path"
28451  fi
28452
28453
28454  # Now try to locate executable using which
28455  new_path=`$WHICH "$new_path" 2> /dev/null`
28456
28457  if test "x$new_path" = x; then
28458    # Oops. Which didn't find the executable.
28459    # The splitting of arguments from the executable at a space might have been incorrect,
28460    # since paths with space are more likely in Windows. Give it another try with the whole
28461    # argument.
28462    path="$complete"
28463    arguments="EOL"
28464    new_path="$path"
28465
28466  windows_path="$new_path"
28467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28468    unix_path=`$CYGPATH -u "$windows_path"`
28469    new_path="$unix_path"
28470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28472    new_path="$unix_path"
28473  fi
28474
28475
28476    new_path=`$WHICH "$new_path" 2> /dev/null`
28477
28478    if test "x$new_path" = x; then
28479      # It's still not found. Now this is an unrecoverable error.
28480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28481$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28482      has_space=`$ECHO "$complete" | $GREP " "`
28483      if test "x$has_space" != x; then
28484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28486      fi
28487      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28488    fi
28489  fi
28490
28491  # Now new_path has a complete unix path to the binary
28492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28493    # Keep paths in /bin as-is, but remove trailing .exe if any
28494    new_path="${new_path/%.exe/}"
28495    # Do not save /bin paths to all_fixpath_prefixes!
28496  else
28497    # Not in mixed or Windows style, start by that.
28498    new_path=`cmd //c echo $new_path`
28499
28500  input_path="$new_path"
28501  # Check if we need to convert this using DOS-style short mode. If the path
28502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28503  # take no chances and rewrite it.
28504  # Note: m4 eats our [], so we need to use [ and ] instead.
28505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28506  if test "x$has_forbidden_chars" != x; then
28507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28509  fi
28510
28511    # Output is in $new_path
28512
28513  windows_path="$new_path"
28514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28515    unix_path=`$CYGPATH -u "$windows_path"`
28516    new_path="$unix_path"
28517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28519    new_path="$unix_path"
28520  fi
28521
28522    # remove trailing .exe if any
28523    new_path="${new_path/%.exe/}"
28524
28525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28527  fi
28528
28529  else
28530    # We're on a posix platform. Hooray! :)
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    # Cannot rely on the command "which" here since it doesn't always work.
28539    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28540    if test -z "$is_absolute_path"; then
28541      # Path to executable is not absolute. Find it.
28542      IFS_save="$IFS"
28543      IFS=:
28544      for p in $PATH; do
28545        if test -f "$p/$path" && test -x "$p/$path"; then
28546          new_path="$p/$path"
28547          break
28548        fi
28549      done
28550      IFS="$IFS_save"
28551    else
28552      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28553$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28554      new_path="$path"
28555    fi
28556
28557    if test "x$new_path" = x; then
28558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28559$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28560      has_space=`$ECHO "$complete" | $GREP " "`
28561      if test "x$has_space" != x; then
28562        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28564      fi
28565      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28566    fi
28567  fi
28568
28569  # Now join together the path and the arguments once again
28570  if test "x$arguments" != xEOL; then
28571    new_complete="$new_path ${arguments% *}"
28572  else
28573    new_complete="$new_path"
28574  fi
28575
28576  if test "x$complete" != "x$new_complete"; then
28577    LIPO="$new_complete"
28578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28579$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28580  fi
28581
28582  fi
28583
28584
28585
28586  # Restore old path without tools dir
28587  PATH="$OLD_PATH"
28588
28589
28590# FIXME: Currently we must test this after paths but before flags. Fix!
28591
28592# And we can test some aspects on the target using configure macros.
28593
28594
28595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28596$as_echo_n "checking for ANSI C header files... " >&6; }
28597if ${ac_cv_header_stdc+:} false; then :
28598  $as_echo_n "(cached) " >&6
28599else
28600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28601/* end confdefs.h.  */
28602#include <stdlib.h>
28603#include <stdarg.h>
28604#include <string.h>
28605#include <float.h>
28606
28607int
28608main ()
28609{
28610
28611  ;
28612  return 0;
28613}
28614_ACEOF
28615if ac_fn_cxx_try_compile "$LINENO"; then :
28616  ac_cv_header_stdc=yes
28617else
28618  ac_cv_header_stdc=no
28619fi
28620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28621
28622if test $ac_cv_header_stdc = yes; then
28623  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28625/* end confdefs.h.  */
28626#include <string.h>
28627
28628_ACEOF
28629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28630  $EGREP "memchr" >/dev/null 2>&1; then :
28631
28632else
28633  ac_cv_header_stdc=no
28634fi
28635rm -f conftest*
28636
28637fi
28638
28639if test $ac_cv_header_stdc = yes; then
28640  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28642/* end confdefs.h.  */
28643#include <stdlib.h>
28644
28645_ACEOF
28646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28647  $EGREP "free" >/dev/null 2>&1; then :
28648
28649else
28650  ac_cv_header_stdc=no
28651fi
28652rm -f conftest*
28653
28654fi
28655
28656if test $ac_cv_header_stdc = yes; then
28657  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28658  if test "$cross_compiling" = yes; then :
28659  :
28660else
28661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28662/* end confdefs.h.  */
28663#include <ctype.h>
28664#include <stdlib.h>
28665#if ((' ' & 0x0FF) == 0x020)
28666# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28667# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28668#else
28669# define ISLOWER(c) \
28670		   (('a' <= (c) && (c) <= 'i') \
28671		     || ('j' <= (c) && (c) <= 'r') \
28672		     || ('s' <= (c) && (c) <= 'z'))
28673# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28674#endif
28675
28676#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28677int
28678main ()
28679{
28680  int i;
28681  for (i = 0; i < 256; i++)
28682    if (XOR (islower (i), ISLOWER (i))
28683	|| toupper (i) != TOUPPER (i))
28684      return 2;
28685  return 0;
28686}
28687_ACEOF
28688if ac_fn_cxx_try_run "$LINENO"; then :
28689
28690else
28691  ac_cv_header_stdc=no
28692fi
28693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28694  conftest.$ac_objext conftest.beam conftest.$ac_ext
28695fi
28696
28697fi
28698fi
28699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28700$as_echo "$ac_cv_header_stdc" >&6; }
28701if test $ac_cv_header_stdc = yes; then
28702
28703$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28704
28705fi
28706
28707# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28708for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28709		  inttypes.h stdint.h unistd.h
28710do :
28711  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28712ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28713"
28714if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28715  cat >>confdefs.h <<_ACEOF
28716#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28717_ACEOF
28718
28719fi
28720
28721done
28722
28723
28724
28725  ###############################################################################
28726  #
28727  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28728  # (The JVM can use 32 or 64 bit Java pointers but that decision
28729  # is made at runtime.)
28730  #
28731
28732  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28733    # Always specify -m flags on Solaris
28734
28735  # When we add flags to the "official" CFLAGS etc, we need to
28736  # keep track of these additions in ADDED_CFLAGS etc. These
28737  # will later be checked to make sure only controlled additions
28738  # have been made to CFLAGS etc.
28739  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28740  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28741  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28742
28743  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28744  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28745  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28746
28747  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28748  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28749  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28750
28751  elif test "x$COMPILE_TYPE" = xreduced; then
28752    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28753      # Specify -m if running reduced on other Posix platforms
28754
28755  # When we add flags to the "official" CFLAGS etc, we need to
28756  # keep track of these additions in ADDED_CFLAGS etc. These
28757  # will later be checked to make sure only controlled additions
28758  # have been made to CFLAGS etc.
28759  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28760  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28761  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28762
28763  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28764  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28765  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28766
28767  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28768  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28769  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28770
28771    fi
28772  fi
28773
28774  # Make compilation sanity check
28775  for ac_header in stdio.h
28776do :
28777  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28778if test "x$ac_cv_header_stdio_h" = xyes; then :
28779  cat >>confdefs.h <<_ACEOF
28780#define HAVE_STDIO_H 1
28781_ACEOF
28782
28783else
28784
28785    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28786$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28787    if test "x$COMPILE_TYPE" = xreduced; then
28788      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28789$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28790    elif test "x$COMPILE_TYPE" = xcross; then
28791      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28792$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28793    fi
28794    as_fn_error $? "Cannot continue." "$LINENO" 5
28795
28796fi
28797
28798done
28799
28800
28801  # The cast to long int works around a bug in the HP C Compiler
28802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28804# This bug is HP SR number 8606223364.
28805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28806$as_echo_n "checking size of int *... " >&6; }
28807if ${ac_cv_sizeof_int_p+:} false; then :
28808  $as_echo_n "(cached) " >&6
28809else
28810  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28811
28812else
28813  if test "$ac_cv_type_int_p" = yes; then
28814     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28816as_fn_error 77 "cannot compute sizeof (int *)
28817See \`config.log' for more details" "$LINENO" 5; }
28818   else
28819     ac_cv_sizeof_int_p=0
28820   fi
28821fi
28822
28823fi
28824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28825$as_echo "$ac_cv_sizeof_int_p" >&6; }
28826
28827
28828
28829cat >>confdefs.h <<_ACEOF
28830#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28831_ACEOF
28832
28833
28834
28835  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28836    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28837    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28838  fi
28839
28840  if test "x$SIZEOF_INT_P" = x; then
28841    # The test failed, lets stick to the assumed value.
28842    { $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
28843$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28844  else
28845    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28846
28847    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28848      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
28849    fi
28850  fi
28851
28852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28853$as_echo_n "checking for target address size... " >&6; }
28854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28855$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28856
28857
28858  ###############################################################################
28859  #
28860  # Is the target little of big endian?
28861  #
28862   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28863$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28864if ${ac_cv_c_bigendian+:} false; then :
28865  $as_echo_n "(cached) " >&6
28866else
28867  ac_cv_c_bigendian=unknown
28868    # See if we're dealing with a universal compiler.
28869    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28870/* end confdefs.h.  */
28871#ifndef __APPLE_CC__
28872	       not a universal capable compiler
28873	     #endif
28874	     typedef int dummy;
28875
28876_ACEOF
28877if ac_fn_cxx_try_compile "$LINENO"; then :
28878
28879	# Check for potential -arch flags.  It is not universal unless
28880	# there are at least two -arch flags with different values.
28881	ac_arch=
28882	ac_prev=
28883	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28884	 if test -n "$ac_prev"; then
28885	   case $ac_word in
28886	     i?86 | x86_64 | ppc | ppc64)
28887	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28888		 ac_arch=$ac_word
28889	       else
28890		 ac_cv_c_bigendian=universal
28891		 break
28892	       fi
28893	       ;;
28894	   esac
28895	   ac_prev=
28896	 elif test "x$ac_word" = "x-arch"; then
28897	   ac_prev=arch
28898	 fi
28899       done
28900fi
28901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28902    if test $ac_cv_c_bigendian = unknown; then
28903      # See if sys/param.h defines the BYTE_ORDER macro.
28904      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28905/* end confdefs.h.  */
28906#include <sys/types.h>
28907	     #include <sys/param.h>
28908
28909int
28910main ()
28911{
28912#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28913		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28914		     && LITTLE_ENDIAN)
28915	      bogus endian macros
28916	     #endif
28917
28918  ;
28919  return 0;
28920}
28921_ACEOF
28922if ac_fn_cxx_try_compile "$LINENO"; then :
28923  # It does; now see whether it defined to BIG_ENDIAN or not.
28924	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28925/* end confdefs.h.  */
28926#include <sys/types.h>
28927		#include <sys/param.h>
28928
28929int
28930main ()
28931{
28932#if BYTE_ORDER != BIG_ENDIAN
28933		 not big endian
28934		#endif
28935
28936  ;
28937  return 0;
28938}
28939_ACEOF
28940if ac_fn_cxx_try_compile "$LINENO"; then :
28941  ac_cv_c_bigendian=yes
28942else
28943  ac_cv_c_bigendian=no
28944fi
28945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28946fi
28947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28948    fi
28949    if test $ac_cv_c_bigendian = unknown; then
28950      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28951      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28952/* end confdefs.h.  */
28953#include <limits.h>
28954
28955int
28956main ()
28957{
28958#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28959	      bogus endian macros
28960	     #endif
28961
28962  ;
28963  return 0;
28964}
28965_ACEOF
28966if ac_fn_cxx_try_compile "$LINENO"; then :
28967  # It does; now see whether it defined to _BIG_ENDIAN or not.
28968	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28969/* end confdefs.h.  */
28970#include <limits.h>
28971
28972int
28973main ()
28974{
28975#ifndef _BIG_ENDIAN
28976		 not big endian
28977		#endif
28978
28979  ;
28980  return 0;
28981}
28982_ACEOF
28983if ac_fn_cxx_try_compile "$LINENO"; then :
28984  ac_cv_c_bigendian=yes
28985else
28986  ac_cv_c_bigendian=no
28987fi
28988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28989fi
28990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28991    fi
28992    if test $ac_cv_c_bigendian = unknown; then
28993      # Compile a test program.
28994      if test "$cross_compiling" = yes; then :
28995  # Try to guess by grepping values from an object file.
28996	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28997/* end confdefs.h.  */
28998short int ascii_mm[] =
28999		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29000		short int ascii_ii[] =
29001		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29002		int use_ascii (int i) {
29003		  return ascii_mm[i] + ascii_ii[i];
29004		}
29005		short int ebcdic_ii[] =
29006		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29007		short int ebcdic_mm[] =
29008		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29009		int use_ebcdic (int i) {
29010		  return ebcdic_mm[i] + ebcdic_ii[i];
29011		}
29012		extern int foo;
29013
29014int
29015main ()
29016{
29017return use_ascii (foo) == use_ebcdic (foo);
29018  ;
29019  return 0;
29020}
29021_ACEOF
29022if ac_fn_cxx_try_compile "$LINENO"; then :
29023  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29024	      ac_cv_c_bigendian=yes
29025	    fi
29026	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29027	      if test "$ac_cv_c_bigendian" = unknown; then
29028		ac_cv_c_bigendian=no
29029	      else
29030		# finding both strings is unlikely to happen, but who knows?
29031		ac_cv_c_bigendian=unknown
29032	      fi
29033	    fi
29034fi
29035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29036else
29037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29038/* end confdefs.h.  */
29039$ac_includes_default
29040int
29041main ()
29042{
29043
29044	     /* Are we little or big endian?  From Harbison&Steele.  */
29045	     union
29046	     {
29047	       long int l;
29048	       char c[sizeof (long int)];
29049	     } u;
29050	     u.l = 1;
29051	     return u.c[sizeof (long int) - 1] == 1;
29052
29053  ;
29054  return 0;
29055}
29056_ACEOF
29057if ac_fn_cxx_try_run "$LINENO"; then :
29058  ac_cv_c_bigendian=no
29059else
29060  ac_cv_c_bigendian=yes
29061fi
29062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29063  conftest.$ac_objext conftest.beam conftest.$ac_ext
29064fi
29065
29066    fi
29067fi
29068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29069$as_echo "$ac_cv_c_bigendian" >&6; }
29070 case $ac_cv_c_bigendian in #(
29071   yes)
29072     ENDIAN="big";; #(
29073   no)
29074     ENDIAN="little" ;; #(
29075   universal)
29076     ENDIAN="universal_endianness"
29077     ;; #(
29078   *)
29079     ENDIAN="unknown" ;;
29080 esac
29081
29082
29083  if test "x$ENDIAN" = xuniversal_endianness; then
29084    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29085  fi
29086  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29087    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
29088  fi
29089
29090
29091# Configure flags for the tools
29092
29093
29094  ###############################################################################
29095  #
29096  # How to compile shared libraries.
29097  #
29098
29099  if test "x$GCC" = xyes; then
29100    COMPILER_NAME=gcc
29101    PICFLAG="-fPIC"
29102    LIBRARY_PREFIX=lib
29103    SHARED_LIBRARY='lib$1.so'
29104    STATIC_LIBRARY='lib$1.a'
29105    SHARED_LIBRARY_FLAGS="-shared"
29106    SHARED_LIBRARY_SUFFIX='.so'
29107    STATIC_LIBRARY_SUFFIX='.a'
29108    OBJ_SUFFIX='.o'
29109    EXE_SUFFIX=''
29110    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29111    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29112    C_FLAG_REORDER=''
29113    CXX_FLAG_REORDER=''
29114    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29115    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29116    LD="$CC"
29117    LDEXE="$CC"
29118    LDCXX="$CXX"
29119    LDEXECXX="$CXX"
29120    POST_STRIP_CMD="$STRIP -g"
29121
29122    # Linking is different on MacOSX
29123    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29124      # Might change in the future to clang.
29125      COMPILER_NAME=gcc
29126      SHARED_LIBRARY='lib$1.dylib'
29127      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29128      SHARED_LIBRARY_SUFFIX='.dylib'
29129      EXE_SUFFIX=''
29130      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29131      SET_SHARED_LIBRARY_MAPFILE=''
29132      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29133      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29134      POST_STRIP_CMD="$STRIP -S"
29135    fi
29136  else
29137    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29138      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29139      COMPILER_NAME=ossc
29140      PICFLAG="-KPIC"
29141      LIBRARY_PREFIX=lib
29142      SHARED_LIBRARY='lib$1.so'
29143      STATIC_LIBRARY='lib$1.a'
29144      SHARED_LIBRARY_FLAGS="-G"
29145      SHARED_LIBRARY_SUFFIX='.so'
29146      STATIC_LIBRARY_SUFFIX='.a'
29147      OBJ_SUFFIX='.o'
29148      EXE_SUFFIX=''
29149      SET_SHARED_LIBRARY_NAME=''
29150      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29151      C_FLAG_REORDER='-xF'
29152      CXX_FLAG_REORDER='-xF'
29153      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29154      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29155      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29156      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29157      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29158      POST_STRIP_CMD="$STRIP -x"
29159      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29160    fi
29161    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29162      # If it is not gcc, then assume it is the MS Visual Studio compiler
29163      COMPILER_NAME=cl
29164      PICFLAG=""
29165      LIBRARY_PREFIX=
29166      SHARED_LIBRARY='$1.dll'
29167      STATIC_LIBRARY='$1.lib'
29168      SHARED_LIBRARY_FLAGS="-LD"
29169      SHARED_LIBRARY_SUFFIX='.dll'
29170      STATIC_LIBRARY_SUFFIX='.lib'
29171      OBJ_SUFFIX='.obj'
29172      EXE_SUFFIX='.exe'
29173      SET_SHARED_LIBRARY_NAME=''
29174      SET_SHARED_LIBRARY_MAPFILE=''
29175      SET_SHARED_LIBRARY_ORIGIN=''
29176      SET_EXECUTABLE_ORIGIN=''
29177    fi
29178  fi
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198  # The (cross) compiler is now configured, we can now test capabilities
29199  # of the target platform.
29200
29201
29202
29203  ###############################################################################
29204  #
29205  # Setup the opt flags for different compilers
29206  # and different operating systems.
29207  #
29208
29209  #
29210  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29211  #
29212  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29213    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29214    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29215    CFLAGS="$CFLAGS -mstackrealign"
29216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29217$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29218    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29219/* end confdefs.h.  */
29220int main() { return 0; }
29221_ACEOF
29222if ac_fn_cxx_try_link "$LINENO"; then :
29223
29224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29225$as_echo "yes" >&6; }
29226
29227else
29228
29229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29230$as_echo "no" >&6; }
29231          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29232
29233
29234fi
29235rm -f core conftest.err conftest.$ac_objext \
29236    conftest$ac_exeext conftest.$ac_ext
29237  fi
29238
29239  C_FLAG_DEPS="-MMD -MF"
29240  CXX_FLAG_DEPS="-MMD -MF"
29241
29242  case $COMPILER_TYPE in
29243    CC )
29244      case $COMPILER_NAME in
29245        gcc )
29246          case $OPENJDK_TARGET_OS in
29247            macosx )
29248              # On MacOSX we optimize for size, something
29249              # we should do for all platforms?
29250              C_O_FLAG_HI="-Os"
29251              C_O_FLAG_NORM="-Os"
29252              C_O_FLAG_NONE=""
29253              ;;
29254            *)
29255              C_O_FLAG_HI="-O3"
29256              C_O_FLAG_NORM="-O2"
29257              C_O_FLAG_NONE="-O0"
29258              ;;
29259          esac
29260          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29261          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29262          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29263          CFLAGS_DEBUG_SYMBOLS="-g"
29264          CXXFLAGS_DEBUG_SYMBOLS="-g"
29265          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29266            CFLAGS_DEBUG_SYMBOLS="-g1"
29267            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29268          fi
29269          ;;
29270        ossc )
29271          #
29272          # Forte has different names for this with their C++ compiler...
29273          #
29274          C_FLAG_DEPS="-xMMD -xMF"
29275          CXX_FLAG_DEPS="-xMMD -xMF"
29276
29277          # Extra options used with HIGHEST
29278          #
29279          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29280          #          done with care, there are some assumptions below that need to
29281          #          be understood about the use of pointers, and IEEE behavior.
29282          #
29283          # Use non-standard floating point mode (not IEEE 754)
29284          CC_HIGHEST="$CC_HIGHEST -fns"
29285          # Do some simplification of floating point arithmetic (not IEEE 754)
29286          CC_HIGHEST="$CC_HIGHEST -fsimple"
29287          # Use single precision floating point with 'float'
29288          CC_HIGHEST="$CC_HIGHEST -fsingle"
29289          # Assume memory references via basic pointer types do not alias
29290          #   (Source with excessing pointer casting and data access with mixed
29291          #    pointer types are not recommended)
29292          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29293          # Use intrinsic or inline versions for math/std functions
29294          #   (If you expect perfect errno behavior, do not use this)
29295          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29296          # Loop data dependency optimizations (need -xO3 or higher)
29297          CC_HIGHEST="$CC_HIGHEST -xdepend"
29298          # Pointer parameters to functions do not overlap
29299          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29300          #    If you pass in multiple pointers to the same data, do not use this)
29301          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29302          # Inline some library routines
29303          #   (If you expect perfect errno behavior, do not use this)
29304          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29305          # Use optimized math routines
29306          #   (If you expect perfect errno behavior, do not use this)
29307          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29308          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29309
29310          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29311            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29312            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29313          fi
29314
29315          case $OPENJDK_TARGET_CPU_ARCH in
29316            x86)
29317              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29318              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29319              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29320              C_O_FLAG_NONE="-xregs=no%frameptr"
29321              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29322              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29323              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29324              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29325              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29326                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29327                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29328              fi
29329              ;;
29330            sparc)
29331              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29332              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29333              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29334              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29335              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29336              C_O_FLAG_NONE=""
29337              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29338              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29339              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29340              CXX_O_FLAG_NONE=""
29341              ;;
29342          esac
29343
29344          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29345          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29346      esac
29347      ;;
29348    CL )
29349      C_O_FLAG_HIGHEST="-O2"
29350      C_O_FLAG_HI="-O1"
29351      C_O_FLAG_NORM="-O1"
29352      C_O_FLAG_NONE="-Od"
29353      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29354      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29355      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29356      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29357      ;;
29358  esac
29359
29360  if test -z "$C_O_FLAG_HIGHEST"; then
29361    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29362  fi
29363
29364  if test -z "$CXX_O_FLAG_HIGHEST"; then
29365    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29366  fi
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29383$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29384  fi
29385
29386  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29388$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29389  fi
29390
29391  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29392    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29393$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29394  fi
29395
29396
29397# Check whether --with-extra-cflags was given.
29398if test "${with_extra_cflags+set}" = set; then :
29399  withval=$with_extra_cflags;
29400fi
29401
29402
29403
29404# Check whether --with-extra-cxxflags was given.
29405if test "${with_extra_cxxflags+set}" = set; then :
29406  withval=$with_extra_cxxflags;
29407fi
29408
29409
29410
29411# Check whether --with-extra-ldflags was given.
29412if test "${with_extra_ldflags+set}" = set; then :
29413  withval=$with_extra_ldflags;
29414fi
29415
29416
29417  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29418  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29419  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29420
29421  # Hotspot needs these set in their legacy form
29422  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29423  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29424  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29425
29426
29427
29428
29429
29430  ###############################################################################
29431  #
29432  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29433  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29434  #
29435  case $COMPILER_NAME in
29436    gcc )
29437      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29438      -pipe \
29439      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29440      case $OPENJDK_TARGET_CPU_ARCH in
29441        arm )
29442          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29443          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29444          ;;
29445        ppc )
29446          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29447          ;;
29448        * )
29449          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29450          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29451          ;;
29452      esac
29453      ;;
29454    ossc )
29455      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29456      case $OPENJDK_TARGET_CPU_ARCH in
29457        x86 )
29458          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29459          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29460          ;;
29461      esac
29462
29463      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29464      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29465
29466      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29467      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29468      ;;
29469    cl )
29470      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29471      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29472      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29473      -DWIN32 -DIAL"
29474      case $OPENJDK_TARGET_CPU in
29475        x86 )
29476          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29477          ;;
29478        x86_64 )
29479          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29480          ;;
29481      esac
29482      ;;
29483  esac
29484
29485  ###############################################################################
29486
29487  # Adjust flags according to debug level.
29488  case $DEBUG_LEVEL in
29489    fastdebug )
29490      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29491      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29492      C_O_FLAG_HI="$C_O_FLAG_NORM"
29493      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29494      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29495      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29496      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29497      ;;
29498    slowdebug )
29499      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29500      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29501      C_O_FLAG_HI="$C_O_FLAG_NONE"
29502      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29503      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29504      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29505      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29506      ;;
29507  esac
29508
29509  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29510
29511  # The package path is used only on macosx?
29512  PACKAGE_PATH=/opt/local
29513
29514
29515  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29516    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29517    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29518    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29519    #   Note: -Dmacro         is the same as    #define macro 1
29520    #         -Dmacro=        is the same as    #define macro
29521    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29522      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29523    else
29524      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29525    fi
29526  else
29527    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29528  fi
29529  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29530    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29531  fi
29532  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29533    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29534  fi
29535  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29536    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29537  fi
29538  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29539    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29540    # Setting these parameters makes it an error to link to macosx APIs that are
29541    # newer than the given OS version and makes the linked binaries compatible even
29542    # if built on a newer version of the OS.
29543    # The expected format is X.Y.Z
29544    MACOSX_VERSION_MIN=10.7.0
29545
29546    # The macro takes the version with no dots, ex: 1070
29547    # Let the flags variables get resolved in make for easier override on make
29548    # command line.
29549    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29550    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29551  fi
29552  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29553    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29554  fi
29555  if test "x$DEBUG_LEVEL" = xrelease; then
29556    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29557  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29558    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29559  fi
29560  else
29561    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29562  fi
29563
29564  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29565  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29566
29567  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29568      -I${JDK_OUTPUTDIR}/include \
29569      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29570      -I${JDK_TOPDIR}/src/share/javavm/export \
29571      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29572      -I${JDK_TOPDIR}/src/share/native/common \
29573      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29574
29575  # The shared libraries are compiled using the picflag.
29576  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29577  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29578
29579  # Executable flags
29580  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29581  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29582
29583  # Now this is odd. The JDK native libraries have to link against libjvm.so
29584  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29585  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29586  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29587  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29588  # libraries will link to whatever is in memory. Yuck.
29589  #
29590  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29591  if test "x$COMPILER_NAME" = xcl; then
29592    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29593    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29594      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29595    fi
29596    # TODO: make -debug optional "--disable-full-debug-symbols"
29597    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29598    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29599    LDFLAGS_JDKLIB_SUFFIX=""
29600    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29601      LDFLAGS_STACK_SIZE=1048576
29602    else
29603      LDFLAGS_STACK_SIZE=327680
29604    fi
29605    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29606  else
29607    if test "x$COMPILER_NAME" = xgcc; then
29608      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29609      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29610      if test -n "$HAS_GNU_HASH"; then
29611        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29612      fi
29613      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29614        # And since we now know that the linker is gnu, then add -z defs, to forbid
29615        # undefined symbols in object files.
29616        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29617        if test "x$DEBUG_LEVEL" = "xrelease"; then
29618          # When building release libraries, tell the linker optimize them.
29619          # Should this be supplied to the OSS linker as well?
29620          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29621        fi
29622      fi
29623    fi
29624    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29625        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29626
29627    # On some platforms (mac) the linker warns about non existing -L dirs.
29628    # Add server first if available. Linking aginst client does not always produce the same results.
29629    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29630    # Default to server for other variants.
29631    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29632      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29633    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29634      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29635    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29636      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29637    else
29638      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29639    fi
29640
29641    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29642    if test "x$COMPILER_NAME" = xossc; then
29643      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29644    fi
29645
29646    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29647    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29648      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29649    fi
29650  fi
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666  # Some Zero and Shark settings.
29667  # ZERO_ARCHFLAG tells the compiler which mode to build for
29668  case "${OPENJDK_TARGET_CPU}" in
29669    s390)
29670      ZERO_ARCHFLAG="-m31"
29671      ;;
29672    *)
29673      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29674  esac
29675
29676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29677$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29678  supports=yes
29679
29680  saved_cflags="$CFLAGS"
29681  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29682  ac_ext=c
29683ac_cpp='$CPP $CPPFLAGS'
29684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29686ac_compiler_gnu=$ac_cv_c_compiler_gnu
29687
29688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29689/* end confdefs.h.  */
29690int i;
29691_ACEOF
29692if ac_fn_c_try_compile "$LINENO"; then :
29693
29694else
29695  supports=no
29696fi
29697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29698  ac_ext=cpp
29699ac_cpp='$CXXCPP $CPPFLAGS'
29700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29703
29704  CFLAGS="$saved_cflags"
29705
29706  saved_cxxflags="$CXXFLAGS"
29707  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29708  ac_ext=cpp
29709ac_cpp='$CXXCPP $CPPFLAGS'
29710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29713
29714  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29715/* end confdefs.h.  */
29716int i;
29717_ACEOF
29718if ac_fn_cxx_try_compile "$LINENO"; then :
29719
29720else
29721  supports=no
29722fi
29723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29724  ac_ext=cpp
29725ac_cpp='$CXXCPP $CPPFLAGS'
29726ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29727ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29728ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29729
29730  CXXFLAGS="$saved_cxxflags"
29731
29732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29733$as_echo "$supports" >&6; }
29734  if test "x$supports" = "xyes" ; then
29735    :
29736  else
29737    ZERO_ARCHFLAG=""
29738  fi
29739
29740
29741
29742  # Check that the compiler supports -mX flags
29743  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29744
29745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29746$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29747  supports=yes
29748
29749  saved_cflags="$CFLAGS"
29750  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29751  ac_ext=c
29752ac_cpp='$CPP $CPPFLAGS'
29753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29755ac_compiler_gnu=$ac_cv_c_compiler_gnu
29756
29757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29758/* end confdefs.h.  */
29759int i;
29760_ACEOF
29761if ac_fn_c_try_compile "$LINENO"; then :
29762
29763else
29764  supports=no
29765fi
29766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29767  ac_ext=cpp
29768ac_cpp='$CXXCPP $CPPFLAGS'
29769ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29770ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29771ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29772
29773  CFLAGS="$saved_cflags"
29774
29775  saved_cxxflags="$CXXFLAGS"
29776  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29777  ac_ext=cpp
29778ac_cpp='$CXXCPP $CPPFLAGS'
29779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29782
29783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29784/* end confdefs.h.  */
29785int i;
29786_ACEOF
29787if ac_fn_cxx_try_compile "$LINENO"; then :
29788
29789else
29790  supports=no
29791fi
29792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29793  ac_ext=cpp
29794ac_cpp='$CXXCPP $CPPFLAGS'
29795ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29796ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29797ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29798
29799  CXXFLAGS="$saved_cxxflags"
29800
29801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29802$as_echo "$supports" >&6; }
29803  if test "x$supports" = "xyes" ; then
29804    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29805  else
29806    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29807  fi
29808
29809
29810
29811
29812# Setup debug symbols (need objcopy from the toolchain for that)
29813
29814  #
29815  # ENABLE_DEBUG_SYMBOLS
29816  # This must be done after the toolchain is setup, since we're looking at objcopy.
29817  #
29818  # Check whether --enable-debug-symbols was given.
29819if test "${enable_debug_symbols+set}" = set; then :
29820  enableval=$enable_debug_symbols;
29821fi
29822
29823
29824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29825$as_echo_n "checking if we should generate debug symbols... " >&6; }
29826
29827  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29828    # explicit enabling of enable-debug-symbols and can't find objcopy
29829    #   this is an error
29830    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29831  fi
29832
29833  if test "x$enable_debug_symbols" = "xyes"; then
29834    ENABLE_DEBUG_SYMBOLS=true
29835  elif test "x$enable_debug_symbols" = "xno"; then
29836    ENABLE_DEBUG_SYMBOLS=false
29837  else
29838    # default on macosx is false
29839    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29840      ENABLE_DEBUG_SYMBOLS=false
29841      # Default is on if objcopy is found, otherwise off
29842    elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29843      ENABLE_DEBUG_SYMBOLS=true
29844    else
29845      ENABLE_DEBUG_SYMBOLS=false
29846    fi
29847  fi
29848
29849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29850$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29851
29852  #
29853  # ZIP_DEBUGINFO_FILES
29854  #
29855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29856$as_echo_n "checking if we should zip debug-info files... " >&6; }
29857  # Check whether --enable-zip-debug-info was given.
29858if test "${enable_zip_debug_info+set}" = set; then :
29859  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29860else
29861  enable_zip_debug_info="yes"
29862fi
29863
29864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29865$as_echo "${enable_zip_debug_info}" >&6; }
29866
29867  if test "x${enable_zip_debug_info}" = "xno"; then
29868    ZIP_DEBUGINFO_FILES=false
29869  else
29870    ZIP_DEBUGINFO_FILES=true
29871  fi
29872
29873
29874
29875
29876
29877
29878
29879###############################################################################
29880#
29881# Check dependencies for external and internal libraries.
29882#
29883###############################################################################
29884
29885
29886
29887  ###############################################################################
29888  #
29889  # OS specific settings that we never will need to probe.
29890  #
29891  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29893$as_echo_n "checking what is not needed on Linux?... " >&6; }
29894    PULSE_NOT_NEEDED=yes
29895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29896$as_echo "pulse" >&6; }
29897  fi
29898
29899  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29901$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29902    ALSA_NOT_NEEDED=yes
29903    PULSE_NOT_NEEDED=yes
29904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29905$as_echo "alsa pulse" >&6; }
29906  fi
29907
29908  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29910$as_echo_n "checking what is not needed on Windows?... " >&6; }
29911    CUPS_NOT_NEEDED=yes
29912    ALSA_NOT_NEEDED=yes
29913    PULSE_NOT_NEEDED=yes
29914    X11_NOT_NEEDED=yes
29915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29916$as_echo "alsa cups pulse x11" >&6; }
29917  fi
29918
29919  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29921$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29922    ALSA_NOT_NEEDED=yes
29923    PULSE_NOT_NEEDED=yes
29924    X11_NOT_NEEDED=yes
29925    FREETYPE2_NOT_NEEDED=yes
29926    # If the java runtime framework is disabled, then we need X11.
29927    # This will be adjusted below.
29928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11 freetype" >&5
29929$as_echo "alsa pulse x11 freetype" >&6; }
29930  fi
29931
29932  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29934$as_echo_n "checking what is not needed on bsd?... " >&6; }
29935    ALSA_NOT_NEEDED=yes
29936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29937$as_echo "alsa" >&6; }
29938  fi
29939
29940  if test "x$OPENJDK" = "xfalse"; then
29941    FREETYPE2_NOT_NEEDED=yes
29942  fi
29943
29944  if test "x$SUPPORT_HEADFUL" = xno; then
29945    X11_NOT_NEEDED=yes
29946  fi
29947
29948  ###############################################################################
29949  #
29950  # Check for MacOSX support for OpenJDK.
29951  #
29952
29953
29954  # Check whether --enable-macosx-runtime-support was given.
29955if test "${enable_macosx_runtime_support+set}" = set; then :
29956  enableval=$enable_macosx_runtime_support;
29957fi
29958
29959  if test "x$enable_macosx_runtime_support" != x; then
29960    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
29961$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
29962  fi
29963
29964
29965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
29966$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
29967  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
29969$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
29970  else
29971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29972$as_echo "no" >&6; }
29973  fi
29974
29975
29976
29977  ###############################################################################
29978  #
29979  # Check for X Windows
29980  #
29981
29982  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29983  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29984  # --x-libraries for the sysroot, if that seems to be correct.
29985  if test "x$SYS_ROOT" != "x/"; then
29986    if test "x$x_includes" = xNONE; then
29987      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29988        x_includes="$SYS_ROOT/usr/X11R6/include"
29989      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29990        x_includes="$SYS_ROOT/usr/include"
29991      fi
29992    fi
29993    if test "x$x_libraries" = xNONE; then
29994      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29995        x_libraries="$SYS_ROOT/usr/X11R6/lib"
29996      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29997        x_libraries="$SYS_ROOT/usr/lib64"
29998      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29999        x_libraries="$SYS_ROOT/usr/lib"
30000      fi
30001    fi
30002  fi
30003
30004  # Now let autoconf do it's magic
30005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30006$as_echo_n "checking for X... " >&6; }
30007
30008
30009# Check whether --with-x was given.
30010if test "${with_x+set}" = set; then :
30011  withval=$with_x;
30012fi
30013
30014# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30015if test "x$with_x" = xno; then
30016  # The user explicitly disabled X.
30017  have_x=disabled
30018else
30019  case $x_includes,$x_libraries in #(
30020    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30021    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30022  $as_echo_n "(cached) " >&6
30023else
30024  # One or both of the vars are not set, and there is no cached value.
30025ac_x_includes=no ac_x_libraries=no
30026rm -f -r conftest.dir
30027if mkdir conftest.dir; then
30028  cd conftest.dir
30029  cat >Imakefile <<'_ACEOF'
30030incroot:
30031	@echo incroot='${INCROOT}'
30032usrlibdir:
30033	@echo usrlibdir='${USRLIBDIR}'
30034libdir:
30035	@echo libdir='${LIBDIR}'
30036_ACEOF
30037  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30038    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30039    for ac_var in incroot usrlibdir libdir; do
30040      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30041    done
30042    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30043    for ac_extension in a so sl dylib la dll; do
30044      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30045	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30046	ac_im_usrlibdir=$ac_im_libdir; break
30047      fi
30048    done
30049    # Screen out bogus values from the imake configuration.  They are
30050    # bogus both because they are the default anyway, and because
30051    # using them would break gcc on systems where it needs fixed includes.
30052    case $ac_im_incroot in
30053	/usr/include) ac_x_includes= ;;
30054	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30055    esac
30056    case $ac_im_usrlibdir in
30057	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30058	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30059    esac
30060  fi
30061  cd ..
30062  rm -f -r conftest.dir
30063fi
30064
30065# Standard set of common directories for X headers.
30066# Check X11 before X11Rn because it is often a symlink to the current release.
30067ac_x_header_dirs='
30068/usr/X11/include
30069/usr/X11R7/include
30070/usr/X11R6/include
30071/usr/X11R5/include
30072/usr/X11R4/include
30073
30074/usr/include/X11
30075/usr/include/X11R7
30076/usr/include/X11R6
30077/usr/include/X11R5
30078/usr/include/X11R4
30079
30080/usr/local/X11/include
30081/usr/local/X11R7/include
30082/usr/local/X11R6/include
30083/usr/local/X11R5/include
30084/usr/local/X11R4/include
30085
30086/usr/local/include/X11
30087/usr/local/include/X11R7
30088/usr/local/include/X11R6
30089/usr/local/include/X11R5
30090/usr/local/include/X11R4
30091
30092/usr/X386/include
30093/usr/x386/include
30094/usr/XFree86/include/X11
30095
30096/usr/include
30097/usr/local/include
30098/usr/unsupported/include
30099/usr/athena/include
30100/usr/local/x11r5/include
30101/usr/lpp/Xamples/include
30102
30103/usr/openwin/include
30104/usr/openwin/share/include'
30105
30106if test "$ac_x_includes" = no; then
30107  # Guess where to find include files, by looking for Xlib.h.
30108  # First, try using that file with no special directory specified.
30109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30110/* end confdefs.h.  */
30111#include <X11/Xlib.h>
30112_ACEOF
30113if ac_fn_cxx_try_cpp "$LINENO"; then :
30114  # We can compile using X headers with no special include directory.
30115ac_x_includes=
30116else
30117  for ac_dir in $ac_x_header_dirs; do
30118  if test -r "$ac_dir/X11/Xlib.h"; then
30119    ac_x_includes=$ac_dir
30120    break
30121  fi
30122done
30123fi
30124rm -f conftest.err conftest.i conftest.$ac_ext
30125fi # $ac_x_includes = no
30126
30127if test "$ac_x_libraries" = no; then
30128  # Check for the libraries.
30129  # See if we find them without any special options.
30130  # Don't add to $LIBS permanently.
30131  ac_save_LIBS=$LIBS
30132  LIBS="-lX11 $LIBS"
30133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30134/* end confdefs.h.  */
30135#include <X11/Xlib.h>
30136int
30137main ()
30138{
30139XrmInitialize ()
30140  ;
30141  return 0;
30142}
30143_ACEOF
30144if ac_fn_cxx_try_link "$LINENO"; then :
30145  LIBS=$ac_save_LIBS
30146# We can link X programs with no special library path.
30147ac_x_libraries=
30148else
30149  LIBS=$ac_save_LIBS
30150for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30151do
30152  # Don't even attempt the hair of trying to link an X program!
30153  for ac_extension in a so sl dylib la dll; do
30154    if test -r "$ac_dir/libX11.$ac_extension"; then
30155      ac_x_libraries=$ac_dir
30156      break 2
30157    fi
30158  done
30159done
30160fi
30161rm -f core conftest.err conftest.$ac_objext \
30162    conftest$ac_exeext conftest.$ac_ext
30163fi # $ac_x_libraries = no
30164
30165case $ac_x_includes,$ac_x_libraries in #(
30166  no,* | *,no | *\'*)
30167    # Didn't find X, or a directory has "'" in its name.
30168    ac_cv_have_x="have_x=no";; #(
30169  *)
30170    # Record where we found X for the cache.
30171    ac_cv_have_x="have_x=yes\
30172	ac_x_includes='$ac_x_includes'\
30173	ac_x_libraries='$ac_x_libraries'"
30174esac
30175fi
30176;; #(
30177    *) have_x=yes;;
30178  esac
30179  eval "$ac_cv_have_x"
30180fi # $with_x != no
30181
30182if test "$have_x" != yes; then
30183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30184$as_echo "$have_x" >&6; }
30185  no_x=yes
30186else
30187  # If each of the values was on the command line, it overrides each guess.
30188  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30189  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30190  # Update the cache value to reflect the command line values.
30191  ac_cv_have_x="have_x=yes\
30192	ac_x_includes='$x_includes'\
30193	ac_x_libraries='$x_libraries'"
30194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30195$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30196fi
30197
30198  if test "$no_x" = yes; then
30199  # Not all programs may use this symbol, but it does not hurt to define it.
30200
30201$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30202
30203  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30204else
30205  if test -n "$x_includes"; then
30206    X_CFLAGS="$X_CFLAGS -I$x_includes"
30207  fi
30208
30209  # It would also be nice to do this for all -L options, not just this one.
30210  if test -n "$x_libraries"; then
30211    X_LIBS="$X_LIBS -L$x_libraries"
30212    # For Solaris; some versions of Sun CC require a space after -R and
30213    # others require no space.  Words are not sufficient . . . .
30214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30215$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30216    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30217    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30218    ac_cxx_werror_flag=yes
30219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30220/* end confdefs.h.  */
30221
30222int
30223main ()
30224{
30225
30226  ;
30227  return 0;
30228}
30229_ACEOF
30230if ac_fn_cxx_try_link "$LINENO"; then :
30231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30232$as_echo "no" >&6; }
30233       X_LIBS="$X_LIBS -R$x_libraries"
30234else
30235  LIBS="$ac_xsave_LIBS -R $x_libraries"
30236       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30237/* end confdefs.h.  */
30238
30239int
30240main ()
30241{
30242
30243  ;
30244  return 0;
30245}
30246_ACEOF
30247if ac_fn_cxx_try_link "$LINENO"; then :
30248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30249$as_echo "yes" >&6; }
30250	  X_LIBS="$X_LIBS -R $x_libraries"
30251else
30252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30253$as_echo "neither works" >&6; }
30254fi
30255rm -f core conftest.err conftest.$ac_objext \
30256    conftest$ac_exeext conftest.$ac_ext
30257fi
30258rm -f core conftest.err conftest.$ac_objext \
30259    conftest$ac_exeext conftest.$ac_ext
30260    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30261    LIBS=$ac_xsave_LIBS
30262  fi
30263
30264  # Check for system-dependent libraries X programs must link with.
30265  # Do this before checking for the system-independent R6 libraries
30266  # (-lICE), since we may need -lsocket or whatever for X linking.
30267
30268  if test "$ISC" = yes; then
30269    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30270  else
30271    # Martyn Johnson says this is needed for Ultrix, if the X
30272    # libraries were built with DECnet support.  And Karl Berry says
30273    # the Alpha needs dnet_stub (dnet does not exist).
30274    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30275    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30276/* end confdefs.h.  */
30277
30278/* Override any GCC internal prototype to avoid an error.
30279   Use char because int might match the return type of a GCC
30280   builtin and then its argument prototype would still apply.  */
30281#ifdef __cplusplus
30282extern "C"
30283#endif
30284char XOpenDisplay ();
30285int
30286main ()
30287{
30288return XOpenDisplay ();
30289  ;
30290  return 0;
30291}
30292_ACEOF
30293if ac_fn_cxx_try_link "$LINENO"; then :
30294
30295else
30296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30297$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30298if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30299  $as_echo_n "(cached) " >&6
30300else
30301  ac_check_lib_save_LIBS=$LIBS
30302LIBS="-ldnet  $LIBS"
30303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30304/* end confdefs.h.  */
30305
30306/* Override any GCC internal prototype to avoid an error.
30307   Use char because int might match the return type of a GCC
30308   builtin and then its argument prototype would still apply.  */
30309#ifdef __cplusplus
30310extern "C"
30311#endif
30312char dnet_ntoa ();
30313int
30314main ()
30315{
30316return dnet_ntoa ();
30317  ;
30318  return 0;
30319}
30320_ACEOF
30321if ac_fn_cxx_try_link "$LINENO"; then :
30322  ac_cv_lib_dnet_dnet_ntoa=yes
30323else
30324  ac_cv_lib_dnet_dnet_ntoa=no
30325fi
30326rm -f core conftest.err conftest.$ac_objext \
30327    conftest$ac_exeext conftest.$ac_ext
30328LIBS=$ac_check_lib_save_LIBS
30329fi
30330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30331$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30332if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30333  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30334fi
30335
30336    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30338$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30339if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30340  $as_echo_n "(cached) " >&6
30341else
30342  ac_check_lib_save_LIBS=$LIBS
30343LIBS="-ldnet_stub  $LIBS"
30344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30345/* end confdefs.h.  */
30346
30347/* Override any GCC internal prototype to avoid an error.
30348   Use char because int might match the return type of a GCC
30349   builtin and then its argument prototype would still apply.  */
30350#ifdef __cplusplus
30351extern "C"
30352#endif
30353char dnet_ntoa ();
30354int
30355main ()
30356{
30357return dnet_ntoa ();
30358  ;
30359  return 0;
30360}
30361_ACEOF
30362if ac_fn_cxx_try_link "$LINENO"; then :
30363  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30364else
30365  ac_cv_lib_dnet_stub_dnet_ntoa=no
30366fi
30367rm -f core conftest.err conftest.$ac_objext \
30368    conftest$ac_exeext conftest.$ac_ext
30369LIBS=$ac_check_lib_save_LIBS
30370fi
30371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30372$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30373if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30374  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30375fi
30376
30377    fi
30378fi
30379rm -f core conftest.err conftest.$ac_objext \
30380    conftest$ac_exeext conftest.$ac_ext
30381    LIBS="$ac_xsave_LIBS"
30382
30383    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30384    # to get the SysV transport functions.
30385    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30386    # needs -lnsl.
30387    # The nsl library prevents programs from opening the X display
30388    # on Irix 5.2, according to T.E. Dickey.
30389    # The functions gethostbyname, getservbyname, and inet_addr are
30390    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30391    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30392if test "x$ac_cv_func_gethostbyname" = xyes; then :
30393
30394fi
30395
30396    if test $ac_cv_func_gethostbyname = no; then
30397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30398$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30399if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30400  $as_echo_n "(cached) " >&6
30401else
30402  ac_check_lib_save_LIBS=$LIBS
30403LIBS="-lnsl  $LIBS"
30404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30405/* end confdefs.h.  */
30406
30407/* Override any GCC internal prototype to avoid an error.
30408   Use char because int might match the return type of a GCC
30409   builtin and then its argument prototype would still apply.  */
30410#ifdef __cplusplus
30411extern "C"
30412#endif
30413char gethostbyname ();
30414int
30415main ()
30416{
30417return gethostbyname ();
30418  ;
30419  return 0;
30420}
30421_ACEOF
30422if ac_fn_cxx_try_link "$LINENO"; then :
30423  ac_cv_lib_nsl_gethostbyname=yes
30424else
30425  ac_cv_lib_nsl_gethostbyname=no
30426fi
30427rm -f core conftest.err conftest.$ac_objext \
30428    conftest$ac_exeext conftest.$ac_ext
30429LIBS=$ac_check_lib_save_LIBS
30430fi
30431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30432$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30433if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30434  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30435fi
30436
30437      if test $ac_cv_lib_nsl_gethostbyname = no; then
30438	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30439$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30440if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30441  $as_echo_n "(cached) " >&6
30442else
30443  ac_check_lib_save_LIBS=$LIBS
30444LIBS="-lbsd  $LIBS"
30445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30446/* end confdefs.h.  */
30447
30448/* Override any GCC internal prototype to avoid an error.
30449   Use char because int might match the return type of a GCC
30450   builtin and then its argument prototype would still apply.  */
30451#ifdef __cplusplus
30452extern "C"
30453#endif
30454char gethostbyname ();
30455int
30456main ()
30457{
30458return gethostbyname ();
30459  ;
30460  return 0;
30461}
30462_ACEOF
30463if ac_fn_cxx_try_link "$LINENO"; then :
30464  ac_cv_lib_bsd_gethostbyname=yes
30465else
30466  ac_cv_lib_bsd_gethostbyname=no
30467fi
30468rm -f core conftest.err conftest.$ac_objext \
30469    conftest$ac_exeext conftest.$ac_ext
30470LIBS=$ac_check_lib_save_LIBS
30471fi
30472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30473$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30474if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30475  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30476fi
30477
30478      fi
30479    fi
30480
30481    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30482    # socket/setsockopt and other routines are undefined under SCO ODT
30483    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30484    # on later versions), says Simon Leinen: it contains gethostby*
30485    # variants that don't use the name server (or something).  -lsocket
30486    # must be given before -lnsl if both are needed.  We assume that
30487    # if connect needs -lnsl, so does gethostbyname.
30488    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30489if test "x$ac_cv_func_connect" = xyes; then :
30490
30491fi
30492
30493    if test $ac_cv_func_connect = no; then
30494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30495$as_echo_n "checking for connect in -lsocket... " >&6; }
30496if ${ac_cv_lib_socket_connect+:} false; then :
30497  $as_echo_n "(cached) " >&6
30498else
30499  ac_check_lib_save_LIBS=$LIBS
30500LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30502/* end confdefs.h.  */
30503
30504/* Override any GCC internal prototype to avoid an error.
30505   Use char because int might match the return type of a GCC
30506   builtin and then its argument prototype would still apply.  */
30507#ifdef __cplusplus
30508extern "C"
30509#endif
30510char connect ();
30511int
30512main ()
30513{
30514return connect ();
30515  ;
30516  return 0;
30517}
30518_ACEOF
30519if ac_fn_cxx_try_link "$LINENO"; then :
30520  ac_cv_lib_socket_connect=yes
30521else
30522  ac_cv_lib_socket_connect=no
30523fi
30524rm -f core conftest.err conftest.$ac_objext \
30525    conftest$ac_exeext conftest.$ac_ext
30526LIBS=$ac_check_lib_save_LIBS
30527fi
30528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30529$as_echo "$ac_cv_lib_socket_connect" >&6; }
30530if test "x$ac_cv_lib_socket_connect" = xyes; then :
30531  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30532fi
30533
30534    fi
30535
30536    # Guillermo Gomez says -lposix is necessary on A/UX.
30537    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30538if test "x$ac_cv_func_remove" = xyes; then :
30539
30540fi
30541
30542    if test $ac_cv_func_remove = no; then
30543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30544$as_echo_n "checking for remove in -lposix... " >&6; }
30545if ${ac_cv_lib_posix_remove+:} false; then :
30546  $as_echo_n "(cached) " >&6
30547else
30548  ac_check_lib_save_LIBS=$LIBS
30549LIBS="-lposix  $LIBS"
30550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30551/* end confdefs.h.  */
30552
30553/* Override any GCC internal prototype to avoid an error.
30554   Use char because int might match the return type of a GCC
30555   builtin and then its argument prototype would still apply.  */
30556#ifdef __cplusplus
30557extern "C"
30558#endif
30559char remove ();
30560int
30561main ()
30562{
30563return remove ();
30564  ;
30565  return 0;
30566}
30567_ACEOF
30568if ac_fn_cxx_try_link "$LINENO"; then :
30569  ac_cv_lib_posix_remove=yes
30570else
30571  ac_cv_lib_posix_remove=no
30572fi
30573rm -f core conftest.err conftest.$ac_objext \
30574    conftest$ac_exeext conftest.$ac_ext
30575LIBS=$ac_check_lib_save_LIBS
30576fi
30577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30578$as_echo "$ac_cv_lib_posix_remove" >&6; }
30579if test "x$ac_cv_lib_posix_remove" = xyes; then :
30580  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30581fi
30582
30583    fi
30584
30585    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30586    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30587if test "x$ac_cv_func_shmat" = xyes; then :
30588
30589fi
30590
30591    if test $ac_cv_func_shmat = no; then
30592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30593$as_echo_n "checking for shmat in -lipc... " >&6; }
30594if ${ac_cv_lib_ipc_shmat+:} false; then :
30595  $as_echo_n "(cached) " >&6
30596else
30597  ac_check_lib_save_LIBS=$LIBS
30598LIBS="-lipc  $LIBS"
30599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30600/* end confdefs.h.  */
30601
30602/* Override any GCC internal prototype to avoid an error.
30603   Use char because int might match the return type of a GCC
30604   builtin and then its argument prototype would still apply.  */
30605#ifdef __cplusplus
30606extern "C"
30607#endif
30608char shmat ();
30609int
30610main ()
30611{
30612return shmat ();
30613  ;
30614  return 0;
30615}
30616_ACEOF
30617if ac_fn_cxx_try_link "$LINENO"; then :
30618  ac_cv_lib_ipc_shmat=yes
30619else
30620  ac_cv_lib_ipc_shmat=no
30621fi
30622rm -f core conftest.err conftest.$ac_objext \
30623    conftest$ac_exeext conftest.$ac_ext
30624LIBS=$ac_check_lib_save_LIBS
30625fi
30626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30627$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30628if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30629  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30630fi
30631
30632    fi
30633  fi
30634
30635  # Check for libraries that X11R6 Xt/Xaw programs need.
30636  ac_save_LDFLAGS=$LDFLAGS
30637  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30638  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30639  # check for ICE first), but we must link in the order -lSM -lICE or
30640  # we get undefined symbols.  So assume we have SM if we have ICE.
30641  # These have to be linked with before -lX11, unlike the other
30642  # libraries we check for below, so use a different variable.
30643  # John Interrante, Karl Berry
30644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30645$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30646if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30647  $as_echo_n "(cached) " >&6
30648else
30649  ac_check_lib_save_LIBS=$LIBS
30650LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30652/* end confdefs.h.  */
30653
30654/* Override any GCC internal prototype to avoid an error.
30655   Use char because int might match the return type of a GCC
30656   builtin and then its argument prototype would still apply.  */
30657#ifdef __cplusplus
30658extern "C"
30659#endif
30660char IceConnectionNumber ();
30661int
30662main ()
30663{
30664return IceConnectionNumber ();
30665  ;
30666  return 0;
30667}
30668_ACEOF
30669if ac_fn_cxx_try_link "$LINENO"; then :
30670  ac_cv_lib_ICE_IceConnectionNumber=yes
30671else
30672  ac_cv_lib_ICE_IceConnectionNumber=no
30673fi
30674rm -f core conftest.err conftest.$ac_objext \
30675    conftest$ac_exeext conftest.$ac_ext
30676LIBS=$ac_check_lib_save_LIBS
30677fi
30678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30679$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30680if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30681  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30682fi
30683
30684  LDFLAGS=$ac_save_LDFLAGS
30685
30686fi
30687
30688
30689  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30690  # this doesn't make sense so we remove it.
30691  if test "x$COMPILE_TYPE" = xcross; then
30692    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30693  fi
30694
30695  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30696
30697  # Print a helpful message on how to acquire the necessary build dependency.
30698  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30699  MISSING_DEPENDENCY=x11
30700
30701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30702    cygwin_help $MISSING_DEPENDENCY
30703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30704    msys_help $MISSING_DEPENDENCY
30705  else
30706    PKGHANDLER_COMMAND=
30707
30708    case $PKGHANDLER in
30709      apt-get)
30710        apt_help     $MISSING_DEPENDENCY ;;
30711      yum)
30712        yum_help     $MISSING_DEPENDENCY ;;
30713      port)
30714        port_help    $MISSING_DEPENDENCY ;;
30715      pkgutil)
30716        pkgutil_help $MISSING_DEPENDENCY ;;
30717      pkgadd)
30718        pkgadd_help  $MISSING_DEPENDENCY ;;
30719      * )
30720        break ;;
30721    esac
30722
30723    if test "x$PKGHANDLER_COMMAND" != x; then
30724      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30725    fi
30726  fi
30727
30728    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30729  fi
30730
30731  # Some of the old makefiles require a setting of OPENWIN_HOME
30732  # Since the X11R6 directory has disappeared on later Linuxes,
30733  # we need to probe for it.
30734  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30735    if test -d "$SYS_ROOT/usr/X11R6"; then
30736      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30737    elif test -d "$SYS_ROOT/usr/include/X11"; then
30738      OPENWIN_HOME="$SYS_ROOT/usr"
30739    fi
30740  fi
30741  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30742    OPENWIN_HOME="/usr/openwin"
30743  fi
30744
30745
30746
30747  #
30748  # Weird Sol10 something check...TODO change to try compile
30749  #
30750  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30751    if test "`uname -r`" = "5.10"; then
30752      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30753        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30754      fi
30755    fi
30756  fi
30757
30758  ac_ext=c
30759ac_cpp='$CPP $CPPFLAGS'
30760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30762ac_compiler_gnu=$ac_cv_c_compiler_gnu
30763
30764  OLD_CFLAGS="$CFLAGS"
30765  CFLAGS="$CFLAGS $X_CFLAGS"
30766
30767  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30768  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30769do :
30770  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30771ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30772        # include <X11/Xlib.h>
30773        # include <X11/Xutil.h>
30774
30775
30776"
30777if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30778  cat >>confdefs.h <<_ACEOF
30779#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30780_ACEOF
30781 X11_A_OK=yes
30782else
30783  X11_A_OK=no; break
30784fi
30785
30786done
30787
30788
30789  CFLAGS="$OLD_CFLAGS"
30790  ac_ext=cpp
30791ac_cpp='$CXXCPP $CPPFLAGS'
30792ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30793ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30794ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30795
30796
30797  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30798
30799  # Print a helpful message on how to acquire the necessary build dependency.
30800  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30801  MISSING_DEPENDENCY=x11
30802
30803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30804    cygwin_help $MISSING_DEPENDENCY
30805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30806    msys_help $MISSING_DEPENDENCY
30807  else
30808    PKGHANDLER_COMMAND=
30809
30810    case $PKGHANDLER in
30811      apt-get)
30812        apt_help     $MISSING_DEPENDENCY ;;
30813      yum)
30814        yum_help     $MISSING_DEPENDENCY ;;
30815      port)
30816        port_help    $MISSING_DEPENDENCY ;;
30817      pkgutil)
30818        pkgutil_help $MISSING_DEPENDENCY ;;
30819      pkgadd)
30820        pkgadd_help  $MISSING_DEPENDENCY ;;
30821      * )
30822        break ;;
30823    esac
30824
30825    if test "x$PKGHANDLER_COMMAND" != x; then
30826      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30827    fi
30828  fi
30829
30830    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30831  fi
30832
30833
30834
30835
30836
30837
30838  ###############################################################################
30839  #
30840  # The common unix printing system cups is used to print from java.
30841  #
30842
30843# Check whether --with-cups was given.
30844if test "${with_cups+set}" = set; then :
30845  withval=$with_cups;
30846fi
30847
30848
30849# Check whether --with-cups-include was given.
30850if test "${with_cups_include+set}" = set; then :
30851  withval=$with_cups_include;
30852fi
30853
30854
30855  if test "x$CUPS_NOT_NEEDED" = xyes; then
30856    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30857      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30858$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30859    fi
30860    CUPS_CFLAGS=
30861  else
30862    CUPS_FOUND=no
30863
30864    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30865      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30866    fi
30867
30868    if test "x${with_cups}" != x; then
30869      CUPS_CFLAGS="-I${with_cups}/include"
30870      CUPS_FOUND=yes
30871    fi
30872    if test "x${with_cups_include}" != x; then
30873      CUPS_CFLAGS="-I${with_cups_include}"
30874      CUPS_FOUND=yes
30875    fi
30876    if test "x$CUPS_FOUND" = xno; then
30877
30878
30879  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30880    # Source the builddeps file again, to make sure it uses the latest variables!
30881    . $builddepsfile
30882    # Look for a target and build machine specific resource!
30883    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30884    if test "x$resource" = x; then
30885      # Ok, lets instead look for a target specific resource
30886      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30887    fi
30888    if test "x$resource" = x; then
30889      # Ok, lets instead look for a build specific resource
30890      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30891    fi
30892    if test "x$resource" = x; then
30893      # Ok, lets instead look for a generic resource
30894      # (The cups comes from M4 and not the shell, thus no need for eval here.)
30895      resource=${builddep_cups}
30896    fi
30897    if test "x$resource" != x; then
30898      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30899$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30900      # If the resource in the builddeps.conf file is an existing directory,
30901      # for example /java/linux/cups
30902      if test -d ${resource}; then
30903        depdir=${resource}
30904      else
30905
30906  # cups is for example mymodule
30907  # $resource is for example libs/general/libmymod_1_2_3.zip
30908  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30909  # $with_builddeps_dir is for example /localhome/builddeps
30910  # depdir is the name of the variable into which we store the depdir, eg MYMOD
30911  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30912  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30913  filename=`basename $resource`
30914  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30915  filebase=${filename%%.*}
30916  extension=${filename#*.}
30917  installdir=$with_builddeps_dir/$filebase
30918  if test ! -f $installdir/$filename.unpacked; then
30919    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30920$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30921    if test ! -d $installdir; then
30922      mkdir -p $installdir
30923    fi
30924    if test ! -d $installdir; then
30925      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30926    fi
30927    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30928    touch $tmpfile
30929    if test ! -f $tmpfile; then
30930      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30931    fi
30932
30933  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30934  # $tmpfile is the local file name for the downloaded file.
30935  VALID_TOOL=no
30936  if test "x$BDEPS_FTP" = xwget; then
30937    VALID_TOOL=yes
30938    wget -O $tmpfile $with_builddeps_server/$resource
30939  fi
30940  if test "x$BDEPS_FTP" = xlftp; then
30941    VALID_TOOL=yes
30942    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30943  fi
30944  if test "x$BDEPS_FTP" = xftp; then
30945    VALID_TOOL=yes
30946    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30947    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30948    FTPUSERPWD=${FTPSERVER%%@*}
30949    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30950      FTPUSER=${userpwd%%:*}
30951      FTPPWD=${userpwd#*@}
30952      FTPSERVER=${FTPSERVER#*@}
30953    else
30954      FTPUSER=ftp
30955      FTPPWD=ftp
30956    fi
30957    # the "pass" command does not work on some
30958    # ftp clients (read ftp.exe) but if it works,
30959    # passive mode is better!
30960    ( \
30961        echo "user $FTPUSER $FTPPWD"        ; \
30962        echo "pass"                         ; \
30963        echo "bin"                          ; \
30964        echo "get $FTPPATH $tmpfile"              ; \
30965    ) | ftp -in $FTPSERVER
30966  fi
30967  if test "x$VALID_TOOL" != xyes; then
30968    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30969  fi
30970
30971    mv $tmpfile $installdir/$filename
30972    if test ! -s $installdir/$filename; then
30973      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30974    fi
30975    case "$extension" in
30976      zip)  echo "Unzipping $installdir/$filename..."
30977        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30978        ;;
30979      tar.gz) echo "Untaring $installdir/$filename..."
30980        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30981        ;;
30982      tgz) echo "Untaring $installdir/$filename..."
30983        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30984        ;;
30985      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30986        ;;
30987    esac
30988  fi
30989  if test -f $installdir/$filename.unpacked; then
30990    depdir=$installdir
30991  fi
30992
30993      fi
30994      # Source the builddeps file again, because in the previous command, the depdir
30995      # was updated to point at the current build dependency install directory.
30996      . $builddepsfile
30997      # Now extract variables from the builddeps.conf files.
30998      theroot=${builddep_cups_ROOT}
30999      thecflags=${builddep_cups_CFLAGS}
31000      thelibs=${builddep_cups_LIBS}
31001      if test "x$depdir" = x; then
31002        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31003      fi
31004      CUPS=$depdir
31005      if test "x$theroot" != x; then
31006        CUPS="$theroot"
31007      fi
31008      if test "x$thecflags" != x; then
31009        CUPS_CFLAGS="$thecflags"
31010      fi
31011      if test "x$thelibs" != x; then
31012        CUPS_LIBS="$thelibs"
31013      fi
31014      CUPS_FOUND=yes
31015
31016    fi
31017
31018  fi
31019
31020    fi
31021    if test "x$CUPS_FOUND" = xno; then
31022      # Are the cups headers installed in the default /usr/include location?
31023      for ac_header in cups/cups.h cups/ppd.h
31024do :
31025  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31026ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31027if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31028  cat >>confdefs.h <<_ACEOF
31029#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31030_ACEOF
31031
31032            CUPS_FOUND=yes
31033            CUPS_CFLAGS=
31034            DEFAULT_CUPS=yes
31035
31036
31037fi
31038
31039done
31040
31041    fi
31042    if test "x$CUPS_FOUND" = xno; then
31043      # Getting nervous now? Lets poke around for standard Solaris third-party
31044      # package installation locations.
31045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31046$as_echo_n "checking for cups headers... " >&6; }
31047      if test -s /opt/sfw/cups/include/cups/cups.h; then
31048        # An SFW package seems to be installed!
31049        CUPS_FOUND=yes
31050        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31051      elif test -s /opt/csw/include/cups/cups.h; then
31052        # A CSW package seems to be installed!
31053        CUPS_FOUND=yes
31054        CUPS_CFLAGS="-I/opt/csw/include"
31055      fi
31056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31057$as_echo "$CUPS_FOUND" >&6; }
31058    fi
31059    if test "x$CUPS_FOUND" = xno; then
31060
31061  # Print a helpful message on how to acquire the necessary build dependency.
31062  # cups is the help tag: freetyp2, cups, pulse, alsa etc
31063  MISSING_DEPENDENCY=cups
31064
31065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31066    cygwin_help $MISSING_DEPENDENCY
31067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31068    msys_help $MISSING_DEPENDENCY
31069  else
31070    PKGHANDLER_COMMAND=
31071
31072    case $PKGHANDLER in
31073      apt-get)
31074        apt_help     $MISSING_DEPENDENCY ;;
31075      yum)
31076        yum_help     $MISSING_DEPENDENCY ;;
31077      port)
31078        port_help    $MISSING_DEPENDENCY ;;
31079      pkgutil)
31080        pkgutil_help $MISSING_DEPENDENCY ;;
31081      pkgadd)
31082        pkgadd_help  $MISSING_DEPENDENCY ;;
31083      * )
31084        break ;;
31085    esac
31086
31087    if test "x$PKGHANDLER_COMMAND" != x; then
31088      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31089    fi
31090  fi
31091
31092      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31093    fi
31094  fi
31095
31096
31097
31098
31099
31100
31101  ###############################################################################
31102  #
31103  # The ubiquitous freetype2 library is used to render fonts.
31104  #
31105
31106# Check whether --with-freetype was given.
31107if test "${with_freetype+set}" = set; then :
31108  withval=$with_freetype;
31109fi
31110
31111
31112  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31113  USING_SYSTEM_FT_LIB=false
31114
31115  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31116    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31117      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31118$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31119    fi
31120    FREETYPE2_CFLAGS=
31121    FREETYPE2_LIBS=
31122    FREETYPE2_LIB_PATH=
31123  else
31124    FREETYPE2_FOUND=no
31125
31126    if test "x$with_freetype" != x; then
31127
31128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31129
31130  # Input might be given as Windows format, start by converting to
31131  # unix format.
31132  path="$with_freetype"
31133  new_path=`$CYGPATH -u "$path"`
31134
31135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31138  # "foo.exe" is OK but "foo" is an error.
31139  #
31140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31141  # It is also a way to make sure we got the proper file name for the real test later on.
31142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31143  if test "x$test_shortpath" = x; then
31144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31145$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31146    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31147  fi
31148
31149  # Call helper function which possibly converts this using DOS-style short mode.
31150  # If so, the updated path is stored in $new_path.
31151
31152  input_path="$new_path"
31153  # Check if we need to convert this using DOS-style short mode. If the path
31154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31155  # take no chances and rewrite it.
31156  # Note: m4 eats our [], so we need to use [ and ] instead.
31157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31158  if test "x$has_forbidden_chars" != x; then
31159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31163      # Going to short mode and back again did indeed matter. Since short mode is
31164      # case insensitive, let's make it lowercase to improve readability.
31165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31166      # Now convert it back to Unix-stile (cygpath)
31167      input_path=`$CYGPATH -u "$shortmode_path"`
31168      new_path="$input_path"
31169    fi
31170  fi
31171
31172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31173  if test "x$test_cygdrive_prefix" = x; then
31174    # As a simple fix, exclude /usr/bin since it's not a real path.
31175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31177      # a path prefixed by /cygdrive for fixpath to work.
31178      new_path="$CYGWIN_ROOT_PATH$input_path"
31179    fi
31180  fi
31181
31182
31183  if test "x$path" != "x$new_path"; then
31184    with_freetype="$new_path"
31185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31186$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31187  fi
31188
31189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31190
31191  path="$with_freetype"
31192  has_colon=`$ECHO $path | $GREP ^.:`
31193  new_path="$path"
31194  if test "x$has_colon" = x; then
31195    # Not in mixed or Windows style, start by that.
31196    new_path=`cmd //c echo $path`
31197  fi
31198
31199
31200  input_path="$new_path"
31201  # Check if we need to convert this using DOS-style short mode. If the path
31202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31203  # take no chances and rewrite it.
31204  # Note: m4 eats our [], so we need to use [ and ] instead.
31205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31206  if test "x$has_forbidden_chars" != x; then
31207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31209  fi
31210
31211
31212  windows_path="$new_path"
31213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31214    unix_path=`$CYGPATH -u "$windows_path"`
31215    new_path="$unix_path"
31216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31218    new_path="$unix_path"
31219  fi
31220
31221  if test "x$path" != "x$new_path"; then
31222    with_freetype="$new_path"
31223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31224$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31225  fi
31226
31227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31229
31230  else
31231    # We're on a posix platform. Hooray! :)
31232    path="$with_freetype"
31233    has_space=`$ECHO "$path" | $GREP " "`
31234    if test "x$has_space" != x; then
31235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31236$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31237      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31238    fi
31239
31240    # Use eval to expand a potential ~
31241    eval path="$path"
31242    if test ! -f "$path" && test ! -d "$path"; then
31243      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31244    fi
31245
31246    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31247  fi
31248
31249      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31250      FREETYPE2_LIB_PATH="$with_freetype/lib"
31251      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31252        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31253        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31254      fi
31255      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31256        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31257      fi
31258      FREETYPE2_CFLAGS="-I$with_freetype/include"
31259      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31260        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31261      fi
31262      FREETYPE2_FOUND=yes
31263      if test "x$FREETYPE2_FOUND" = xyes; then
31264        # Verify that the directories exist
31265        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31266          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31267        fi
31268        # List the contents of the lib.
31269        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31270        if test "x$FREETYPELIB" = x; then
31271          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31272        fi
31273        # Check one h-file
31274        if ! test -s "$with_freetype/include/ft2build.h"; then
31275          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31276        fi
31277      fi
31278    fi
31279    if test "x$FREETYPE2_FOUND" = xno; then
31280
31281
31282  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31283    # Source the builddeps file again, to make sure it uses the latest variables!
31284    . $builddepsfile
31285    # Look for a target and build machine specific resource!
31286    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31287    if test "x$resource" = x; then
31288      # Ok, lets instead look for a target specific resource
31289      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31290    fi
31291    if test "x$resource" = x; then
31292      # Ok, lets instead look for a build specific resource
31293      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31294    fi
31295    if test "x$resource" = x; then
31296      # Ok, lets instead look for a generic resource
31297      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31298      resource=${builddep_freetype2}
31299    fi
31300    if test "x$resource" != x; then
31301      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31302$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31303      # If the resource in the builddeps.conf file is an existing directory,
31304      # for example /java/linux/cups
31305      if test -d ${resource}; then
31306        depdir=${resource}
31307      else
31308
31309  # freetype2 is for example mymodule
31310  # $resource is for example libs/general/libmymod_1_2_3.zip
31311  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31312  # $with_builddeps_dir is for example /localhome/builddeps
31313  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31314  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31315  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31316  filename=`basename $resource`
31317  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31318  filebase=${filename%%.*}
31319  extension=${filename#*.}
31320  installdir=$with_builddeps_dir/$filebase
31321  if test ! -f $installdir/$filename.unpacked; then
31322    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31323$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31324    if test ! -d $installdir; then
31325      mkdir -p $installdir
31326    fi
31327    if test ! -d $installdir; then
31328      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31329    fi
31330    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31331    touch $tmpfile
31332    if test ! -f $tmpfile; then
31333      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31334    fi
31335
31336  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31337  # $tmpfile is the local file name for the downloaded file.
31338  VALID_TOOL=no
31339  if test "x$BDEPS_FTP" = xwget; then
31340    VALID_TOOL=yes
31341    wget -O $tmpfile $with_builddeps_server/$resource
31342  fi
31343  if test "x$BDEPS_FTP" = xlftp; then
31344    VALID_TOOL=yes
31345    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31346  fi
31347  if test "x$BDEPS_FTP" = xftp; then
31348    VALID_TOOL=yes
31349    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31350    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31351    FTPUSERPWD=${FTPSERVER%%@*}
31352    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31353      FTPUSER=${userpwd%%:*}
31354      FTPPWD=${userpwd#*@}
31355      FTPSERVER=${FTPSERVER#*@}
31356    else
31357      FTPUSER=ftp
31358      FTPPWD=ftp
31359    fi
31360    # the "pass" command does not work on some
31361    # ftp clients (read ftp.exe) but if it works,
31362    # passive mode is better!
31363    ( \
31364        echo "user $FTPUSER $FTPPWD"        ; \
31365        echo "pass"                         ; \
31366        echo "bin"                          ; \
31367        echo "get $FTPPATH $tmpfile"              ; \
31368    ) | ftp -in $FTPSERVER
31369  fi
31370  if test "x$VALID_TOOL" != xyes; then
31371    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31372  fi
31373
31374    mv $tmpfile $installdir/$filename
31375    if test ! -s $installdir/$filename; then
31376      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31377    fi
31378    case "$extension" in
31379      zip)  echo "Unzipping $installdir/$filename..."
31380        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31381        ;;
31382      tar.gz) echo "Untaring $installdir/$filename..."
31383        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31384        ;;
31385      tgz) echo "Untaring $installdir/$filename..."
31386        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31387        ;;
31388      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31389        ;;
31390    esac
31391  fi
31392  if test -f $installdir/$filename.unpacked; then
31393    depdir=$installdir
31394  fi
31395
31396      fi
31397      # Source the builddeps file again, because in the previous command, the depdir
31398      # was updated to point at the current build dependency install directory.
31399      . $builddepsfile
31400      # Now extract variables from the builddeps.conf files.
31401      theroot=${builddep_freetype2_ROOT}
31402      thecflags=${builddep_freetype2_CFLAGS}
31403      thelibs=${builddep_freetype2_LIBS}
31404      if test "x$depdir" = x; then
31405        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31406      fi
31407      FREETYPE2=$depdir
31408      if test "x$theroot" != x; then
31409        FREETYPE2="$theroot"
31410      fi
31411      if test "x$thecflags" != x; then
31412        FREETYPE2_CFLAGS="$thecflags"
31413      fi
31414      if test "x$thelibs" != x; then
31415        FREETYPE2_LIBS="$thelibs"
31416      fi
31417      FREETYPE2_FOUND=yes
31418      else FREETYPE2_FOUND=no
31419
31420    fi
31421    else FREETYPE2_FOUND=no
31422
31423  fi
31424
31425      USING_SYSTEM_FT_LIB=true
31426    fi
31427    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31428      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31429
31430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31431
31432  # Input might be given as Windows format, start by converting to
31433  # unix format.
31434  path="$FREETYPELOCATION"
31435  new_path=`$CYGPATH -u "$path"`
31436
31437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31440  # "foo.exe" is OK but "foo" is an error.
31441  #
31442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31443  # It is also a way to make sure we got the proper file name for the real test later on.
31444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31445  if test "x$test_shortpath" = x; then
31446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31447$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31448    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31449  fi
31450
31451  # Call helper function which possibly converts this using DOS-style short mode.
31452  # If so, the updated path is stored in $new_path.
31453
31454  input_path="$new_path"
31455  # Check if we need to convert this using DOS-style short mode. If the path
31456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31457  # take no chances and rewrite it.
31458  # Note: m4 eats our [], so we need to use [ and ] instead.
31459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31460  if test "x$has_forbidden_chars" != x; then
31461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31465      # Going to short mode and back again did indeed matter. Since short mode is
31466      # case insensitive, let's make it lowercase to improve readability.
31467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31468      # Now convert it back to Unix-stile (cygpath)
31469      input_path=`$CYGPATH -u "$shortmode_path"`
31470      new_path="$input_path"
31471    fi
31472  fi
31473
31474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31475  if test "x$test_cygdrive_prefix" = x; then
31476    # As a simple fix, exclude /usr/bin since it's not a real path.
31477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31479      # a path prefixed by /cygdrive for fixpath to work.
31480      new_path="$CYGWIN_ROOT_PATH$input_path"
31481    fi
31482  fi
31483
31484
31485  if test "x$path" != "x$new_path"; then
31486    FREETYPELOCATION="$new_path"
31487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31488$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31489  fi
31490
31491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31492
31493  path="$FREETYPELOCATION"
31494  has_colon=`$ECHO $path | $GREP ^.:`
31495  new_path="$path"
31496  if test "x$has_colon" = x; then
31497    # Not in mixed or Windows style, start by that.
31498    new_path=`cmd //c echo $path`
31499  fi
31500
31501
31502  input_path="$new_path"
31503  # Check if we need to convert this using DOS-style short mode. If the path
31504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31505  # take no chances and rewrite it.
31506  # Note: m4 eats our [], so we need to use [ and ] instead.
31507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31508  if test "x$has_forbidden_chars" != x; then
31509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31511  fi
31512
31513
31514  windows_path="$new_path"
31515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31516    unix_path=`$CYGPATH -u "$windows_path"`
31517    new_path="$unix_path"
31518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31520    new_path="$unix_path"
31521  fi
31522
31523  if test "x$path" != "x$new_path"; then
31524    FREETYPELOCATION="$new_path"
31525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31526$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31527  fi
31528
31529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31531
31532  else
31533    # We're on a posix platform. Hooray! :)
31534    path="$FREETYPELOCATION"
31535    has_space=`$ECHO "$path" | $GREP " "`
31536    if test "x$has_space" != x; then
31537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31538$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31539      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31540    fi
31541
31542    # Use eval to expand a potential ~
31543    eval path="$path"
31544    if test ! -f "$path" && test ! -d "$path"; then
31545      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31546    fi
31547
31548    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31549  fi
31550
31551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31552$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31553      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31554        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31555        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31556        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31557        if ! test -s "$FREETYPE2_LIBS"; then
31558          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31559        fi
31560        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31561          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31562        fi
31563        USING_SYSTEM_FT_LIB=true
31564        FREETYPE2_FOUND=yes
31565      fi
31566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31567$as_echo "$FREETYPE2_FOUND" >&6; }
31568    fi
31569    if test "x$FREETYPE2_FOUND" = xno; then
31570
31571pkg_failed=no
31572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31573$as_echo_n "checking for FREETYPE2... " >&6; }
31574
31575if test -n "$FREETYPE2_CFLAGS"; then
31576    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31577 elif test -n "$PKG_CONFIG"; then
31578    if test -n "$PKG_CONFIG" && \
31579    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31580  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31581  ac_status=$?
31582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31583  test $ac_status = 0; }; then
31584  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31585else
31586  pkg_failed=yes
31587fi
31588 else
31589    pkg_failed=untried
31590fi
31591if test -n "$FREETYPE2_LIBS"; then
31592    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31593 elif test -n "$PKG_CONFIG"; then
31594    if test -n "$PKG_CONFIG" && \
31595    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31596  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31597  ac_status=$?
31598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31599  test $ac_status = 0; }; then
31600  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31601else
31602  pkg_failed=yes
31603fi
31604 else
31605    pkg_failed=untried
31606fi
31607
31608
31609
31610if test $pkg_failed = yes; then
31611
31612if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31613        _pkg_short_errors_supported=yes
31614else
31615        _pkg_short_errors_supported=no
31616fi
31617        if test $_pkg_short_errors_supported = yes; then
31618	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31619        else
31620	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31621        fi
31622	# Put the nasty error message in config.log where it belongs
31623	echo "$FREETYPE2_PKG_ERRORS" >&5
31624
31625	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31626$as_echo "no" >&6; }
31627                FREETYPE2_FOUND=no
31628elif test $pkg_failed = untried; then
31629	FREETYPE2_FOUND=no
31630else
31631	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31632	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31634$as_echo "yes" >&6; }
31635	FREETYPE2_FOUND=yes
31636fi
31637      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31638      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31639      USING_SYSTEM_FT_LIB=true
31640      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31641      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31642        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31643      fi
31644    fi
31645    if test "x$FREETYPE2_FOUND" = xno; then
31646      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31647$as_echo_n "checking for freetype in some standard locations... " >&6; }
31648
31649      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31650        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31651        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31652      fi
31653      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31654        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31655        DEFAULT_FREETYPE_LIBS="-lfreetype"
31656      fi
31657
31658      PREV_CXXCFLAGS="$CXXFLAGS"
31659      PREV_LDFLAGS="$LDFLAGS"
31660      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31661      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31662      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31663/* end confdefs.h.  */
31664
31665            #include<ft2build.h>
31666            #include FT_FREETYPE_H
31667            int main() { return 0; }
31668
31669_ACEOF
31670if ac_fn_cxx_try_link "$LINENO"; then :
31671
31672            # Yes, the default cflags and libs did the trick.
31673            FREETYPE2_FOUND=yes
31674            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31675            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31676
31677else
31678
31679            FREETYPE2_FOUND=no
31680
31681
31682fi
31683rm -f core conftest.err conftest.$ac_objext \
31684    conftest$ac_exeext conftest.$ac_ext
31685      CXXCFLAGS="$PREV_CXXFLAGS"
31686      LDFLAGS="$PREV_LDFLAGS"
31687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31688$as_echo "$FREETYPE2_FOUND" >&6; }
31689      USING_SYSTEM_FT_LIB=true
31690    fi
31691    if test "x$FREETYPE2_FOUND" = xno; then
31692
31693  # Print a helpful message on how to acquire the necessary build dependency.
31694  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31695  MISSING_DEPENDENCY=freetype2
31696
31697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31698    cygwin_help $MISSING_DEPENDENCY
31699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31700    msys_help $MISSING_DEPENDENCY
31701  else
31702    PKGHANDLER_COMMAND=
31703
31704    case $PKGHANDLER in
31705      apt-get)
31706        apt_help     $MISSING_DEPENDENCY ;;
31707      yum)
31708        yum_help     $MISSING_DEPENDENCY ;;
31709      port)
31710        port_help    $MISSING_DEPENDENCY ;;
31711      pkgutil)
31712        pkgutil_help $MISSING_DEPENDENCY ;;
31713      pkgadd)
31714        pkgadd_help  $MISSING_DEPENDENCY ;;
31715      * )
31716        break ;;
31717    esac
31718
31719    if test "x$PKGHANDLER_COMMAND" != x; then
31720      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31721    fi
31722  fi
31723
31724      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31725    fi
31726
31727    if test "x$OPENJDK_TARGET_OS" != xwindows; then
31728      # AC_CHECK_LIB does not support use of cl.exe
31729      PREV_LDFLAGS="$LDFLAGS"
31730      LDFLAGS="$FREETYPE2_LIBS"
31731      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31732$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31733if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31734  $as_echo_n "(cached) " >&6
31735else
31736  ac_check_lib_save_LIBS=$LIBS
31737LIBS="-lfreetype  $LIBS"
31738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31739/* end confdefs.h.  */
31740
31741/* Override any GCC internal prototype to avoid an error.
31742   Use char because int might match the return type of a GCC
31743   builtin and then its argument prototype would still apply.  */
31744#ifdef __cplusplus
31745extern "C"
31746#endif
31747char FT_Init_FreeType ();
31748int
31749main ()
31750{
31751return FT_Init_FreeType ();
31752  ;
31753  return 0;
31754}
31755_ACEOF
31756if ac_fn_cxx_try_link "$LINENO"; then :
31757  ac_cv_lib_freetype_FT_Init_FreeType=yes
31758else
31759  ac_cv_lib_freetype_FT_Init_FreeType=no
31760fi
31761rm -f core conftest.err conftest.$ac_objext \
31762    conftest$ac_exeext conftest.$ac_ext
31763LIBS=$ac_check_lib_save_LIBS
31764fi
31765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31766$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31767if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31768  FREETYPE2_FOUND=true
31769else
31770  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31771fi
31772
31773      LDFLAGS="$PREV_LDFLAGS"
31774    fi
31775  fi
31776
31777
31778
31779
31780
31781
31782
31783
31784  ###############################################################################
31785  #
31786  # Check for alsa headers and libraries. Used on Linux/GNU systems.
31787  #
31788
31789# Check whether --with-alsa was given.
31790if test "${with_alsa+set}" = set; then :
31791  withval=$with_alsa;
31792fi
31793
31794
31795# Check whether --with-alsa-include was given.
31796if test "${with_alsa_include+set}" = set; then :
31797  withval=$with_alsa_include;
31798fi
31799
31800
31801# Check whether --with-alsa-lib was given.
31802if test "${with_alsa_lib+set}" = set; then :
31803  withval=$with_alsa_lib;
31804fi
31805
31806
31807  if test "x$ALSA_NOT_NEEDED" = xyes; then
31808    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31809      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31810$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31811    fi
31812    ALSA_CFLAGS=
31813    ALSA_LIBS=
31814  else
31815    ALSA_FOUND=no
31816
31817    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31818      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31819    fi
31820
31821    if test "x${with_alsa}" != x; then
31822      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31823      ALSA_CFLAGS="-I${with_alsa}/include"
31824      ALSA_FOUND=yes
31825    fi
31826    if test "x${with_alsa_include}" != x; then
31827      ALSA_CFLAGS="-I${with_alsa_include}"
31828      ALSA_FOUND=yes
31829    fi
31830    if test "x${with_alsa_lib}" != x; then
31831      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31832      ALSA_FOUND=yes
31833    fi
31834    if test "x$ALSA_FOUND" = xno; then
31835
31836
31837  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31838    # Source the builddeps file again, to make sure it uses the latest variables!
31839    . $builddepsfile
31840    # Look for a target and build machine specific resource!
31841    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31842    if test "x$resource" = x; then
31843      # Ok, lets instead look for a target specific resource
31844      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31845    fi
31846    if test "x$resource" = x; then
31847      # Ok, lets instead look for a build specific resource
31848      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31849    fi
31850    if test "x$resource" = x; then
31851      # Ok, lets instead look for a generic resource
31852      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31853      resource=${builddep_alsa}
31854    fi
31855    if test "x$resource" != x; then
31856      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31857$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31858      # If the resource in the builddeps.conf file is an existing directory,
31859      # for example /java/linux/cups
31860      if test -d ${resource}; then
31861        depdir=${resource}
31862      else
31863
31864  # alsa is for example mymodule
31865  # $resource is for example libs/general/libmymod_1_2_3.zip
31866  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31867  # $with_builddeps_dir is for example /localhome/builddeps
31868  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31869  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31870  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31871  filename=`basename $resource`
31872  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31873  filebase=${filename%%.*}
31874  extension=${filename#*.}
31875  installdir=$with_builddeps_dir/$filebase
31876  if test ! -f $installdir/$filename.unpacked; then
31877    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31878$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31879    if test ! -d $installdir; then
31880      mkdir -p $installdir
31881    fi
31882    if test ! -d $installdir; then
31883      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31884    fi
31885    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31886    touch $tmpfile
31887    if test ! -f $tmpfile; then
31888      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31889    fi
31890
31891  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31892  # $tmpfile is the local file name for the downloaded file.
31893  VALID_TOOL=no
31894  if test "x$BDEPS_FTP" = xwget; then
31895    VALID_TOOL=yes
31896    wget -O $tmpfile $with_builddeps_server/$resource
31897  fi
31898  if test "x$BDEPS_FTP" = xlftp; then
31899    VALID_TOOL=yes
31900    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31901  fi
31902  if test "x$BDEPS_FTP" = xftp; then
31903    VALID_TOOL=yes
31904    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31905    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31906    FTPUSERPWD=${FTPSERVER%%@*}
31907    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31908      FTPUSER=${userpwd%%:*}
31909      FTPPWD=${userpwd#*@}
31910      FTPSERVER=${FTPSERVER#*@}
31911    else
31912      FTPUSER=ftp
31913      FTPPWD=ftp
31914    fi
31915    # the "pass" command does not work on some
31916    # ftp clients (read ftp.exe) but if it works,
31917    # passive mode is better!
31918    ( \
31919        echo "user $FTPUSER $FTPPWD"        ; \
31920        echo "pass"                         ; \
31921        echo "bin"                          ; \
31922        echo "get $FTPPATH $tmpfile"              ; \
31923    ) | ftp -in $FTPSERVER
31924  fi
31925  if test "x$VALID_TOOL" != xyes; then
31926    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31927  fi
31928
31929    mv $tmpfile $installdir/$filename
31930    if test ! -s $installdir/$filename; then
31931      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31932    fi
31933    case "$extension" in
31934      zip)  echo "Unzipping $installdir/$filename..."
31935        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31936        ;;
31937      tar.gz) echo "Untaring $installdir/$filename..."
31938        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31939        ;;
31940      tgz) echo "Untaring $installdir/$filename..."
31941        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31942        ;;
31943      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31944        ;;
31945    esac
31946  fi
31947  if test -f $installdir/$filename.unpacked; then
31948    depdir=$installdir
31949  fi
31950
31951      fi
31952      # Source the builddeps file again, because in the previous command, the depdir
31953      # was updated to point at the current build dependency install directory.
31954      . $builddepsfile
31955      # Now extract variables from the builddeps.conf files.
31956      theroot=${builddep_alsa_ROOT}
31957      thecflags=${builddep_alsa_CFLAGS}
31958      thelibs=${builddep_alsa_LIBS}
31959      if test "x$depdir" = x; then
31960        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31961      fi
31962      ALSA=$depdir
31963      if test "x$theroot" != x; then
31964        ALSA="$theroot"
31965      fi
31966      if test "x$thecflags" != x; then
31967        ALSA_CFLAGS="$thecflags"
31968      fi
31969      if test "x$thelibs" != x; then
31970        ALSA_LIBS="$thelibs"
31971      fi
31972      ALSA_FOUND=yes
31973      else ALSA_FOUND=no
31974
31975    fi
31976    else ALSA_FOUND=no
31977
31978  fi
31979
31980    fi
31981    if test "x$ALSA_FOUND" = xno; then
31982
31983pkg_failed=no
31984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31985$as_echo_n "checking for ALSA... " >&6; }
31986
31987if test -n "$ALSA_CFLAGS"; then
31988    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31989 elif test -n "$PKG_CONFIG"; then
31990    if test -n "$PKG_CONFIG" && \
31991    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31992  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31993  ac_status=$?
31994  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31995  test $ac_status = 0; }; then
31996  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31997else
31998  pkg_failed=yes
31999fi
32000 else
32001    pkg_failed=untried
32002fi
32003if test -n "$ALSA_LIBS"; then
32004    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32005 elif test -n "$PKG_CONFIG"; then
32006    if test -n "$PKG_CONFIG" && \
32007    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32008  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32009  ac_status=$?
32010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32011  test $ac_status = 0; }; then
32012  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32013else
32014  pkg_failed=yes
32015fi
32016 else
32017    pkg_failed=untried
32018fi
32019
32020
32021
32022if test $pkg_failed = yes; then
32023
32024if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32025        _pkg_short_errors_supported=yes
32026else
32027        _pkg_short_errors_supported=no
32028fi
32029        if test $_pkg_short_errors_supported = yes; then
32030	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32031        else
32032	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32033        fi
32034	# Put the nasty error message in config.log where it belongs
32035	echo "$ALSA_PKG_ERRORS" >&5
32036
32037	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32038$as_echo "no" >&6; }
32039                ALSA_FOUND=no
32040elif test $pkg_failed = untried; then
32041	ALSA_FOUND=no
32042else
32043	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32044	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32046$as_echo "yes" >&6; }
32047	ALSA_FOUND=yes
32048fi
32049    fi
32050    if test "x$ALSA_FOUND" = xno; then
32051      for ac_header in alsa/asoundlib.h
32052do :
32053  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32054if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32055  cat >>confdefs.h <<_ACEOF
32056#define HAVE_ALSA_ASOUNDLIB_H 1
32057_ACEOF
32058
32059            ALSA_FOUND=yes
32060            ALSA_CFLAGS=-Iignoreme
32061            ALSA_LIBS=-lasound
32062            DEFAULT_ALSA=yes
32063
32064else
32065  ALSA_FOUND=no
32066fi
32067
32068done
32069
32070    fi
32071    if test "x$ALSA_FOUND" = xno; then
32072
32073  # Print a helpful message on how to acquire the necessary build dependency.
32074  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32075  MISSING_DEPENDENCY=alsa
32076
32077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32078    cygwin_help $MISSING_DEPENDENCY
32079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32080    msys_help $MISSING_DEPENDENCY
32081  else
32082    PKGHANDLER_COMMAND=
32083
32084    case $PKGHANDLER in
32085      apt-get)
32086        apt_help     $MISSING_DEPENDENCY ;;
32087      yum)
32088        yum_help     $MISSING_DEPENDENCY ;;
32089      port)
32090        port_help    $MISSING_DEPENDENCY ;;
32091      pkgutil)
32092        pkgutil_help $MISSING_DEPENDENCY ;;
32093      pkgadd)
32094        pkgadd_help  $MISSING_DEPENDENCY ;;
32095      * )
32096        break ;;
32097    esac
32098
32099    if test "x$PKGHANDLER_COMMAND" != x; then
32100      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32101    fi
32102  fi
32103
32104      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32105    fi
32106  fi
32107
32108
32109
32110
32111
32112
32113  ###############################################################################
32114  #
32115  # Check for the jpeg library
32116  #
32117
32118  USE_EXTERNAL_LIBJPEG=true
32119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32120$as_echo_n "checking for main in -ljpeg... " >&6; }
32121if ${ac_cv_lib_jpeg_main+:} false; then :
32122  $as_echo_n "(cached) " >&6
32123else
32124  ac_check_lib_save_LIBS=$LIBS
32125LIBS="-ljpeg  $LIBS"
32126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32127/* end confdefs.h.  */
32128
32129
32130int
32131main ()
32132{
32133return main ();
32134  ;
32135  return 0;
32136}
32137_ACEOF
32138if ac_fn_cxx_try_link "$LINENO"; then :
32139  ac_cv_lib_jpeg_main=yes
32140else
32141  ac_cv_lib_jpeg_main=no
32142fi
32143rm -f core conftest.err conftest.$ac_objext \
32144    conftest$ac_exeext conftest.$ac_ext
32145LIBS=$ac_check_lib_save_LIBS
32146fi
32147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32148$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32149if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32150  cat >>confdefs.h <<_ACEOF
32151#define HAVE_LIBJPEG 1
32152_ACEOF
32153
32154  LIBS="-ljpeg $LIBS"
32155
32156else
32157   USE_EXTERNAL_LIBJPEG=false
32158      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32159$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32160
32161fi
32162
32163
32164
32165  ###############################################################################
32166  #
32167  # Check for the gif library
32168  #
32169
32170
32171# Check whether --with-giflib was given.
32172if test "${with_giflib+set}" = set; then :
32173  withval=$with_giflib;
32174fi
32175
32176
32177
32178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32179$as_echo_n "checking for which giflib to use... " >&6; }
32180
32181  # default is bundled
32182  DEFAULT_GIFLIB=bundled
32183
32184  #
32185  # if user didn't specify, use DEFAULT_GIFLIB
32186  #
32187  if test "x${with_giflib}" = "x"; then
32188    with_giflib=${DEFAULT_GIFLIB}
32189  fi
32190
32191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32192$as_echo "${with_giflib}" >&6; }
32193
32194  if test "x${with_giflib}" = "xbundled"; then
32195    USE_EXTERNAL_LIBGIF=false
32196  elif test "x${with_giflib}" = "xsystem"; then
32197    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32198if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32199
32200else
32201   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32202fi
32203
32204
32205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32206$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32207if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32208  $as_echo_n "(cached) " >&6
32209else
32210  ac_check_lib_save_LIBS=$LIBS
32211LIBS="-lgif  $LIBS"
32212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32213/* end confdefs.h.  */
32214
32215/* Override any GCC internal prototype to avoid an error.
32216   Use char because int might match the return type of a GCC
32217   builtin and then its argument prototype would still apply.  */
32218#ifdef __cplusplus
32219extern "C"
32220#endif
32221char DGifGetCode ();
32222int
32223main ()
32224{
32225return DGifGetCode ();
32226  ;
32227  return 0;
32228}
32229_ACEOF
32230if ac_fn_cxx_try_link "$LINENO"; then :
32231  ac_cv_lib_gif_DGifGetCode=yes
32232else
32233  ac_cv_lib_gif_DGifGetCode=no
32234fi
32235rm -f core conftest.err conftest.$ac_objext \
32236    conftest$ac_exeext conftest.$ac_ext
32237LIBS=$ac_check_lib_save_LIBS
32238fi
32239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32240$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32241if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32242  cat >>confdefs.h <<_ACEOF
32243#define HAVE_LIBGIF 1
32244_ACEOF
32245
32246  LIBS="-lgif $LIBS"
32247
32248else
32249   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32250fi
32251
32252
32253    USE_EXTERNAL_LIBGIF=true
32254  else
32255    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32256  fi
32257
32258
32259  ###############################################################################
32260  #
32261  # Check for the zlib library
32262  #
32263
32264
32265# Check whether --with-zlib was given.
32266if test "${with_zlib+set}" = set; then :
32267  withval=$with_zlib;
32268fi
32269
32270
32271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32272$as_echo_n "checking for compress in -lz... " >&6; }
32273if ${ac_cv_lib_z_compress+:} false; then :
32274  $as_echo_n "(cached) " >&6
32275else
32276  ac_check_lib_save_LIBS=$LIBS
32277LIBS="-lz  $LIBS"
32278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32279/* end confdefs.h.  */
32280
32281/* Override any GCC internal prototype to avoid an error.
32282   Use char because int might match the return type of a GCC
32283   builtin and then its argument prototype would still apply.  */
32284#ifdef __cplusplus
32285extern "C"
32286#endif
32287char compress ();
32288int
32289main ()
32290{
32291return compress ();
32292  ;
32293  return 0;
32294}
32295_ACEOF
32296if ac_fn_cxx_try_link "$LINENO"; then :
32297  ac_cv_lib_z_compress=yes
32298else
32299  ac_cv_lib_z_compress=no
32300fi
32301rm -f core conftest.err conftest.$ac_objext \
32302    conftest$ac_exeext conftest.$ac_ext
32303LIBS=$ac_check_lib_save_LIBS
32304fi
32305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32306$as_echo "$ac_cv_lib_z_compress" >&6; }
32307if test "x$ac_cv_lib_z_compress" = xyes; then :
32308   ZLIB_FOUND=yes
32309else
32310   ZLIB_FOUND=no
32311fi
32312
32313
32314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32315$as_echo_n "checking for which zlib to use... " >&6; }
32316
32317  DEFAULT_ZLIB=bundled
32318  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32319    #
32320    # On macosx default is system...on others default is
32321    #
32322    DEFAULT_ZLIB=system
32323  fi
32324
32325  if test "x${ZLIB_FOUND}" != "xyes"; then
32326    #
32327    # If we don't find any system...set default to bundled
32328    #
32329    DEFAULT_ZLIB=bundled
32330  fi
32331
32332  #
32333  # If user didn't specify, use DEFAULT_ZLIB
32334  #
32335  if test "x${with_zlib}" = "x"; then
32336    with_zlib=${DEFAULT_ZLIB}
32337  fi
32338
32339  if test "x${with_zlib}" = "xbundled"; then
32340    USE_EXTERNAL_LIBZ=false
32341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32342$as_echo "bundled" >&6; }
32343  elif test "x${with_zlib}" = "xsystem"; then
32344    if test "x${ZLIB_FOUND}" = "xyes"; then
32345      USE_EXTERNAL_LIBZ=true
32346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32347$as_echo "system" >&6; }
32348    else
32349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32350$as_echo "system not found" >&6; }
32351      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32352    fi
32353  else
32354    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32355  fi
32356
32357
32358
32359  ###############################################################################
32360  LIBZIP_CAN_USE_MMAP=true
32361
32362
32363
32364  ###############################################################################
32365  #
32366  # Check if altzone exists in time.h
32367  #
32368
32369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32370/* end confdefs.h.  */
32371#include <time.h>
32372int
32373main ()
32374{
32375return (int)altzone;
32376  ;
32377  return 0;
32378}
32379_ACEOF
32380if ac_fn_cxx_try_link "$LINENO"; then :
32381  has_altzone=yes
32382else
32383  has_altzone=no
32384fi
32385rm -f core conftest.err conftest.$ac_objext \
32386    conftest$ac_exeext conftest.$ac_ext
32387  if test "x$has_altzone" = xyes; then
32388
32389$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32390
32391  fi
32392
32393  ###############################################################################
32394  #
32395  # Check the maths library
32396  #
32397
32398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32399$as_echo_n "checking for cos in -lm... " >&6; }
32400if ${ac_cv_lib_m_cos+:} false; then :
32401  $as_echo_n "(cached) " >&6
32402else
32403  ac_check_lib_save_LIBS=$LIBS
32404LIBS="-lm  $LIBS"
32405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32406/* end confdefs.h.  */
32407
32408/* Override any GCC internal prototype to avoid an error.
32409   Use char because int might match the return type of a GCC
32410   builtin and then its argument prototype would still apply.  */
32411#ifdef __cplusplus
32412extern "C"
32413#endif
32414char cos ();
32415int
32416main ()
32417{
32418return cos ();
32419  ;
32420  return 0;
32421}
32422_ACEOF
32423if ac_fn_cxx_try_link "$LINENO"; then :
32424  ac_cv_lib_m_cos=yes
32425else
32426  ac_cv_lib_m_cos=no
32427fi
32428rm -f core conftest.err conftest.$ac_objext \
32429    conftest$ac_exeext conftest.$ac_ext
32430LIBS=$ac_check_lib_save_LIBS
32431fi
32432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32433$as_echo "$ac_cv_lib_m_cos" >&6; }
32434if test "x$ac_cv_lib_m_cos" = xyes; then :
32435  cat >>confdefs.h <<_ACEOF
32436#define HAVE_LIBM 1
32437_ACEOF
32438
32439  LIBS="-lm $LIBS"
32440
32441else
32442
32443        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32444$as_echo "$as_me: Maths library was not found" >&6;}
32445
32446
32447fi
32448
32449
32450
32451  ###############################################################################
32452  #
32453  # Check for libdl.so
32454
32455  save_LIBS="$LIBS"
32456  LIBS=""
32457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32458$as_echo_n "checking for dlopen in -ldl... " >&6; }
32459if ${ac_cv_lib_dl_dlopen+:} false; then :
32460  $as_echo_n "(cached) " >&6
32461else
32462  ac_check_lib_save_LIBS=$LIBS
32463LIBS="-ldl  $LIBS"
32464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32465/* end confdefs.h.  */
32466
32467/* Override any GCC internal prototype to avoid an error.
32468   Use char because int might match the return type of a GCC
32469   builtin and then its argument prototype would still apply.  */
32470#ifdef __cplusplus
32471extern "C"
32472#endif
32473char dlopen ();
32474int
32475main ()
32476{
32477return dlopen ();
32478  ;
32479  return 0;
32480}
32481_ACEOF
32482if ac_fn_cxx_try_link "$LINENO"; then :
32483  ac_cv_lib_dl_dlopen=yes
32484else
32485  ac_cv_lib_dl_dlopen=no
32486fi
32487rm -f core conftest.err conftest.$ac_objext \
32488    conftest$ac_exeext conftest.$ac_ext
32489LIBS=$ac_check_lib_save_LIBS
32490fi
32491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32492$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32493if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32494  cat >>confdefs.h <<_ACEOF
32495#define HAVE_LIBDL 1
32496_ACEOF
32497
32498  LIBS="-ldl $LIBS"
32499
32500fi
32501
32502  LIBDL="$LIBS"
32503
32504  LIBS="$save_LIBS"
32505
32506
32507  ###############################################################################
32508  #
32509  # statically link libstdc++ before C++ ABI is stablized on Linux unless
32510  # dynamic build is configured on command line.
32511  #
32512
32513# Check whether --with-stdc++lib was given.
32514if test "${with_stdc__lib+set}" = set; then :
32515  withval=$with_stdc__lib;
32516        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32517                && test "x$with_stdc__lib" != xdefault; then
32518          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32519        fi
32520
32521else
32522  with_stdc__lib=default
32523
32524fi
32525
32526
32527  if test "x$OPENJDK_TARGET_OS" = xlinux; then
32528    # Test if -lstdc++ works.
32529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32530$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32531    ac_ext=cpp
32532ac_cpp='$CXXCPP $CPPFLAGS'
32533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32536
32537    OLD_CXXFLAGS="$CXXFLAGS"
32538    CXXFLAGS="$CXXFLAGS -lstdc++"
32539    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32540/* end confdefs.h.  */
32541
32542int
32543main ()
32544{
32545return 0;
32546  ;
32547  return 0;
32548}
32549_ACEOF
32550if ac_fn_cxx_try_link "$LINENO"; then :
32551  has_dynamic_libstdcxx=yes
32552else
32553  has_dynamic_libstdcxx=no
32554fi
32555rm -f core conftest.err conftest.$ac_objext \
32556    conftest$ac_exeext conftest.$ac_ext
32557    CXXFLAGS="$OLD_CXXFLAGS"
32558    ac_ext=cpp
32559ac_cpp='$CXXCPP $CPPFLAGS'
32560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32563
32564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32565$as_echo "$has_dynamic_libstdcxx" >&6; }
32566
32567    # Test if stdc++ can be linked statically.
32568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32569$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32570    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32571    ac_ext=cpp
32572ac_cpp='$CXXCPP $CPPFLAGS'
32573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32576
32577    OLD_LIBS="$LIBS"
32578    OLD_CXX="$CXX"
32579    LIBS="$STATIC_STDCXX_FLAGS"
32580    CXX="$CC"
32581    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32582/* end confdefs.h.  */
32583
32584int
32585main ()
32586{
32587return 0;
32588  ;
32589  return 0;
32590}
32591_ACEOF
32592if ac_fn_cxx_try_link "$LINENO"; then :
32593  has_static_libstdcxx=yes
32594else
32595  has_static_libstdcxx=no
32596fi
32597rm -f core conftest.err conftest.$ac_objext \
32598    conftest$ac_exeext conftest.$ac_ext
32599    LIBS="$OLD_LIBS"
32600    CXX="$OLD_CXX"
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    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32608$as_echo "$has_static_libstdcxx" >&6; }
32609
32610    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32611      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32612    fi
32613
32614    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32615      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32616    fi
32617
32618    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32619      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32620    fi
32621
32622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32623$as_echo_n "checking how to link with libstdc++... " >&6; }
32624    # If dynamic was requested, it's available since it would fail above otherwise.
32625    # If dynamic wasn't requested, go with static unless it isn't available.
32626    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32627      LIBCXX="$LIBCXX -lstdc++"
32628      LDCXX="$CXX"
32629      STATIC_CXX_SETTING="STATIC_CXX=false"
32630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32631$as_echo "dynamic" >&6; }
32632    else
32633      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32634      LDCXX="$CC"
32635      STATIC_CXX_SETTING="STATIC_CXX=true"
32636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32637$as_echo "static" >&6; }
32638    fi
32639  fi
32640
32641
32642  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32643    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32644
32645pkg_failed=no
32646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32647$as_echo_n "checking for LIBFFI... " >&6; }
32648
32649if test -n "$LIBFFI_CFLAGS"; then
32650    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32651 elif test -n "$PKG_CONFIG"; then
32652    if test -n "$PKG_CONFIG" && \
32653    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32654  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32655  ac_status=$?
32656  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32657  test $ac_status = 0; }; then
32658  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32659else
32660  pkg_failed=yes
32661fi
32662 else
32663    pkg_failed=untried
32664fi
32665if test -n "$LIBFFI_LIBS"; then
32666    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32667 elif test -n "$PKG_CONFIG"; then
32668    if test -n "$PKG_CONFIG" && \
32669    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32670  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32671  ac_status=$?
32672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32673  test $ac_status = 0; }; then
32674  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32675else
32676  pkg_failed=yes
32677fi
32678 else
32679    pkg_failed=untried
32680fi
32681
32682
32683
32684if test $pkg_failed = yes; then
32685
32686if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32687        _pkg_short_errors_supported=yes
32688else
32689        _pkg_short_errors_supported=no
32690fi
32691        if test $_pkg_short_errors_supported = yes; then
32692	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32693        else
32694	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32695        fi
32696	# Put the nasty error message in config.log where it belongs
32697	echo "$LIBFFI_PKG_ERRORS" >&5
32698
32699	as_fn_error $? "Package requirements (libffi) were not met:
32700
32701$LIBFFI_PKG_ERRORS
32702
32703Consider adjusting the PKG_CONFIG_PATH environment variable if you
32704installed software in a non-standard prefix.
32705
32706Alternatively, you may set the environment variables LIBFFI_CFLAGS
32707and LIBFFI_LIBS to avoid the need to call pkg-config.
32708See the pkg-config man page for more details.
32709" "$LINENO" 5
32710elif test $pkg_failed = untried; then
32711	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32713as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32714is in your PATH or set the PKG_CONFIG environment variable to the full
32715path to pkg-config.
32716
32717Alternatively, you may set the environment variables LIBFFI_CFLAGS
32718and LIBFFI_LIBS to avoid the need to call pkg-config.
32719See the pkg-config man page for more details.
32720
32721To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32722See \`config.log' for more details" "$LINENO" 5; }
32723else
32724	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32725	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32727$as_echo "yes" >&6; }
32728	:
32729fi
32730
32731  fi
32732
32733  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32734    # Extract the first word of "llvm-config", so it can be a program name with args.
32735set dummy llvm-config; ac_word=$2
32736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32737$as_echo_n "checking for $ac_word... " >&6; }
32738if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32739  $as_echo_n "(cached) " >&6
32740else
32741  if test -n "$LLVM_CONFIG"; then
32742  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32743else
32744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32745for as_dir in $PATH
32746do
32747  IFS=$as_save_IFS
32748  test -z "$as_dir" && as_dir=.
32749    for ac_exec_ext in '' $ac_executable_extensions; do
32750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32751    ac_cv_prog_LLVM_CONFIG="llvm-config"
32752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32753    break 2
32754  fi
32755done
32756  done
32757IFS=$as_save_IFS
32758
32759fi
32760fi
32761LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32762if test -n "$LLVM_CONFIG"; then
32763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32764$as_echo "$LLVM_CONFIG" >&6; }
32765else
32766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32767$as_echo "no" >&6; }
32768fi
32769
32770
32771
32772    if test "x$LLVM_CONFIG" != xllvm-config; then
32773      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32774    fi
32775
32776    llvm_components="jit mcjit engine nativecodegen native"
32777    unset LLVM_CFLAGS
32778    for flag in $("$LLVM_CONFIG" --cxxflags); do
32779      if echo "${flag}" | grep -q '^-[ID]'; then
32780        if test "${flag}" != "-D_DEBUG" ; then
32781          if test "${LLVM_CFLAGS}" != "" ; then
32782            LLVM_CFLAGS="${LLVM_CFLAGS} "
32783          fi
32784          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32785        fi
32786      fi
32787    done
32788    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32789    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32790
32791    unset LLVM_LDFLAGS
32792    for flag in $("${LLVM_CONFIG}" --ldflags); do
32793      if echo "${flag}" | grep -q '^-L'; then
32794        if test "${LLVM_LDFLAGS}" != ""; then
32795          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32796        fi
32797        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32798      fi
32799    done
32800
32801    unset LLVM_LIBS
32802    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32803      if echo "${flag}" | grep -q '^-l'; then
32804        if test "${LLVM_LIBS}" != ""; then
32805          LLVM_LIBS="${LLVM_LIBS} "
32806        fi
32807        LLVM_LIBS="${LLVM_LIBS}${flag}"
32808      fi
32809    done
32810
32811
32812
32813
32814  fi
32815
32816  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32817  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32818    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32819  fi
32820
32821  # TODO better (platform agnostic) test
32822  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32823    LIBCXX="-lstdc++"
32824  fi
32825
32826
32827
32828
32829# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32830
32831  # When using cygwin or msys, we need a wrapper binary that renames
32832  # /cygdrive/c/ arguments into c:/ arguments and peeks into
32833  # @files and rewrites these too! This wrapper binary is
32834  # called fixpath.
32835  FIXPATH=
32836  if test "x$OPENJDK_BUILD_OS" = xwindows; then
32837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32838$as_echo_n "checking if fixpath can be created... " >&6; }
32839    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32840    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32841    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32842      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32843      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32844      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32845      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32846    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32847      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32848      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32849
32850      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32851      # @ was chosen as separator to minimize risk of other tools messing around with it
32852      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32853      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32854
32855      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32856    fi
32857    rm -f $OUTPUT_ROOT/fixpath*
32858    cd $OUTPUT_ROOT
32859    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32860    cd $CURDIR
32861
32862    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32864$as_echo "no" >&6; }
32865      cat $OUTPUT_ROOT/fixpath1.log
32866      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32867    fi
32868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32869$as_echo "yes" >&6; }
32870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32871$as_echo_n "checking if fixpath.exe works... " >&6; }
32872    cd $OUTPUT_ROOT
32873    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32874    cd $CURDIR
32875    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32877$as_echo "no" >&6; }
32878      cat $OUTPUT_ROOT/fixpath2.log
32879      as_fn_error $? "fixpath did not work!" "$LINENO" 5
32880    fi
32881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32882$as_echo "yes" >&6; }
32883    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32884  fi
32885
32886
32887
32888
32889###############################################################################
32890#
32891# We need to do some final tweaking, when everything else is done.
32892#
32893###############################################################################
32894
32895
32896  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32897
32898
32899  # The name of the Service Agent jar.
32900  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32901  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32902    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32903  fi
32904
32905
32906
32907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32908$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32909
32910    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32911      ENABLE_INTREE_EC=yes
32912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32913$as_echo "yes" >&6; }
32914    else
32915      ENABLE_INTREE_EC=no
32916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32917$as_echo "no" >&6; }
32918    fi
32919
32920
32921
32922
32923###############################################################################
32924#
32925# Configure parts of the build that only affect the build performance,
32926# not the result.
32927#
32928###############################################################################
32929
32930
32931  # How many cores do we have on this build system?
32932
32933# Check whether --with-num-cores was given.
32934if test "${with_num_cores+set}" = set; then :
32935  withval=$with_num_cores;
32936fi
32937
32938  if test "x$with_num_cores" = x; then
32939    # The number of cores were not specified, try to probe them.
32940
32941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32942$as_echo_n "checking for number of cores... " >&6; }
32943  NUM_CORES=1
32944  FOUND_CORES=no
32945
32946  if test -f /proc/cpuinfo; then
32947    # Looks like a Linux (or cygwin) system
32948    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32949    FOUND_CORES=yes
32950  elif test -x /usr/sbin/psrinfo; then
32951    # Looks like a Solaris system
32952    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32953    FOUND_CORES=yes
32954  elif test -x /usr/sbin/system_profiler; then
32955    # Looks like a MacOSX system
32956    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32957    FOUND_CORES=yes
32958  elif test -n "$NUMBER_OF_PROCESSORS"; then
32959    # On windows, look in the env
32960    NUM_CORES=$NUMBER_OF_PROCESSORS
32961    FOUND_CORES=yes
32962  fi
32963
32964  if test "x$FOUND_CORES" = xyes; then
32965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32966$as_echo "$NUM_CORES" >&6; }
32967  else
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32969$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32970    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32971$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32972  fi
32973
32974  else
32975    NUM_CORES=$with_num_cores
32976  fi
32977
32978
32979
32980  # How much memory do we have on this build system?
32981
32982# Check whether --with-memory-size was given.
32983if test "${with_memory_size+set}" = set; then :
32984  withval=$with_memory_size;
32985fi
32986
32987  if test "x$with_memory_size" = x; then
32988    # The memory size was not specified, try to probe it.
32989
32990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32991$as_echo_n "checking for memory size... " >&6; }
32992  # Default to 1024 MB
32993  MEMORY_SIZE=1024
32994  FOUND_MEM=no
32995
32996  if test -f /proc/meminfo; then
32997    # Looks like a Linux (or cygwin) system
32998    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32999    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33000    FOUND_MEM=yes
33001  elif test -x /usr/sbin/prtconf; then
33002    # Looks like a Solaris system
33003    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33004    FOUND_MEM=yes
33005  elif test -x /usr/sbin/system_profiler; then
33006    # Looks like a MacOSX system
33007    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33008    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33009    FOUND_MEM=yes
33010  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33011    # Windows, but without cygwin
33012    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33013    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33014    FOUND_MEM=yes
33015  fi
33016
33017  if test "x$FOUND_MEM" = xyes; then
33018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33019$as_echo "$MEMORY_SIZE MB" >&6; }
33020  else
33021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33022$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33023    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33024$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33025  fi
33026
33027  else
33028    MEMORY_SIZE=$with_memory_size
33029  fi
33030
33031
33032
33033  # Provide a decent default number of parallel jobs for make depending on
33034  # number of cores, amount of memory and machine architecture.
33035
33036# Check whether --with-jobs was given.
33037if test "${with_jobs+set}" = set; then :
33038  withval=$with_jobs;
33039fi
33040
33041  if test "x$with_jobs" = x; then
33042    # Number of jobs was not specified, calculate.
33043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33044$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33045    # Approximate memory in GB, rounding up a bit.
33046    memory_gb=`expr $MEMORY_SIZE / 1100`
33047    # Pick the lowest of memory in gb and number of cores.
33048    if test "$memory_gb" -lt "$NUM_CORES"; then
33049      JOBS="$memory_gb"
33050    else
33051      JOBS="$NUM_CORES"
33052      # On bigger machines, leave some room for other processes to run
33053      if test "$JOBS" -gt "4"; then
33054        JOBS=`expr $JOBS '*' 90 / 100`
33055      fi
33056    fi
33057    # Cap number of jobs to 16
33058    if test "$JOBS" -gt "16"; then
33059      JOBS=16
33060    fi
33061    if test "$JOBS" -eq "0"; then
33062      JOBS=1
33063    fi
33064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33065$as_echo "$JOBS" >&6; }
33066  else
33067    JOBS=$with_jobs
33068  fi
33069
33070
33071
33072# Setup smart javac (after cores and memory have been setup)
33073
33074
33075# Check whether --with-sjavac-server-java was given.
33076if test "${with_sjavac_server_java+set}" = set; then :
33077  withval=$with_sjavac_server_java;
33078fi
33079
33080
33081  if test "x$with_sjavac_server_java" != x; then
33082    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33083    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33084    if test "x$FOUND_VERSION" = x; then
33085      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33086    fi
33087  else
33088    SJAVAC_SERVER_JAVA=""
33089    # Hotspot specific options.
33090
33091  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33092  $ECHO "Command: $JAVA -verbosegc -version" >&5
33093  OUTPUT=`$JAVA -verbosegc -version 2>&1`
33094  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33095  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33096  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33097    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33098    JVM_ARG_OK=true
33099  else
33100    $ECHO "Arg failed:" >&5
33101    $ECHO "$OUTPUT" >&5
33102    JVM_ARG_OK=false
33103  fi
33104
33105    # JRockit specific options.
33106
33107  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33108  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33109  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33110  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33111  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33113    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33114    JVM_ARG_OK=true
33115  else
33116    $ECHO "Arg failed:" >&5
33117    $ECHO "$OUTPUT" >&5
33118    JVM_ARG_OK=false
33119  fi
33120
33121    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33122  fi
33123
33124
33125  if test "$MEMORY_SIZE" -gt "2500"; then
33126
33127  $ECHO "Check if jvm arg is ok: -d64" >&5
33128  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33129  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33130  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33131  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33132  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33133    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33134    JVM_ARG_OK=true
33135  else
33136    $ECHO "Arg failed:" >&5
33137    $ECHO "$OUTPUT" >&5
33138    JVM_ARG_OK=false
33139  fi
33140
33141    if test "$JVM_ARG_OK" = true; then
33142      JVM_64BIT=true
33143      JVM_ARG_OK=false
33144    fi
33145  fi
33146
33147  if test "$JVM_64BIT" = true; then
33148    if test "$MEMORY_SIZE" -gt "17000"; then
33149
33150  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33151  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33152  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33153  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33154  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33155  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33156    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33157    JVM_ARG_OK=true
33158  else
33159    $ECHO "Arg failed:" >&5
33160    $ECHO "$OUTPUT" >&5
33161    JVM_ARG_OK=false
33162  fi
33163
33164    fi
33165    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33166
33167  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33168  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33169  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33170  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33171  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33172  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33173    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33174    JVM_ARG_OK=true
33175  else
33176    $ECHO "Arg failed:" >&5
33177    $ECHO "$OUTPUT" >&5
33178    JVM_ARG_OK=false
33179  fi
33180
33181    fi
33182    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33183
33184  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33185  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33186  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33187  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33188  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33189  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33190    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33191    JVM_ARG_OK=true
33192  else
33193    $ECHO "Arg failed:" >&5
33194    $ECHO "$OUTPUT" >&5
33195    JVM_ARG_OK=false
33196  fi
33197
33198    fi
33199    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33200
33201  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33202  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33203  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33204  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33205  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33206  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33207    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33208    JVM_ARG_OK=true
33209  else
33210    $ECHO "Arg failed:" >&5
33211    $ECHO "$OUTPUT" >&5
33212    JVM_ARG_OK=false
33213  fi
33214
33215    fi
33216  fi
33217  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33218
33219  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33220  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33221  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33222  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33223  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33224  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33225    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33226    JVM_ARG_OK=true
33227  else
33228    $ECHO "Arg failed:" >&5
33229    $ECHO "$OUTPUT" >&5
33230    JVM_ARG_OK=false
33231  fi
33232
33233  fi
33234  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33235
33236  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33237  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33238  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33239  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33240  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33241  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33242    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33243    JVM_ARG_OK=true
33244  else
33245    $ECHO "Arg failed:" >&5
33246    $ECHO "$OUTPUT" >&5
33247    JVM_ARG_OK=false
33248  fi
33249
33250  fi
33251  if test "$JVM_ARG_OK" = false; then
33252
33253  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33254  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33255  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33256  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33257  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33258  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33259    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33260    JVM_ARG_OK=true
33261  else
33262    $ECHO "Arg failed:" >&5
33263    $ECHO "$OUTPUT" >&5
33264    JVM_ARG_OK=false
33265  fi
33266
33267  fi
33268
33269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33270$as_echo_n "checking whether to use sjavac... " >&6; }
33271  # Check whether --enable-sjavac was given.
33272if test "${enable_sjavac+set}" = set; then :
33273  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33274else
33275  ENABLE_SJAVAC='no'
33276fi
33277
33278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33279$as_echo "$ENABLE_SJAVAC" >&6; }
33280
33281
33282  if test "x$ENABLE_SJAVAC" = xyes; then
33283    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33284  else
33285    SJAVAC_SERVER_DIR=
33286  fi
33287
33288
33289
33290# Can the C/C++ compiler use precompiled headers?
33291
33292
33293  ###############################################################################
33294  #
33295  # Can the C/C++ compiler use precompiled headers?
33296  #
33297  # Check whether --enable-precompiled-headers was given.
33298if test "${enable_precompiled_headers+set}" = set; then :
33299  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33300else
33301  ENABLE_PRECOMPH=yes
33302fi
33303
33304
33305  USE_PRECOMPILED_HEADER=1
33306  if test "x$ENABLE_PRECOMPH" = xno; then
33307    USE_PRECOMPILED_HEADER=0
33308  fi
33309
33310  if test "x$ENABLE_PRECOMPH" = xyes; then
33311    # Check that the compiler actually supports precomp headers.
33312    if test "x$GCC" = xyes; then
33313      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33314$as_echo_n "checking that precompiled headers work... " >&6; }
33315      echo "int alfa();" > conftest.h
33316      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33317      if test ! -f conftest.hpp.gch; then
33318        USE_PRECOMPILED_HEADER=0
33319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33320$as_echo "no" >&6; }
33321      else
33322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33323$as_echo "yes" >&6; }
33324      fi
33325      rm -f conftest.h conftest.hpp.gch
33326    fi
33327  fi
33328
33329
33330
33331
33332# Setup use of ccache, if available
33333
33334  # Check whether --enable-ccache was given.
33335if test "${enable_ccache+set}" = set; then :
33336  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33337else
33338  ENABLE_CCACHE=yes
33339fi
33340
33341  if test "x$ENABLE_CCACHE" = xyes; then
33342    OLD_PATH="$PATH"
33343    if test "x$TOOLS_DIR" != x; then
33344      PATH=$TOOLS_DIR:$PATH
33345    fi
33346    # Extract the first word of "ccache", so it can be a program name with args.
33347set dummy ccache; ac_word=$2
33348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33349$as_echo_n "checking for $ac_word... " >&6; }
33350if ${ac_cv_path_CCACHE+:} false; then :
33351  $as_echo_n "(cached) " >&6
33352else
33353  case $CCACHE in
33354  [\\/]* | ?:[\\/]*)
33355  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33356  ;;
33357  *)
33358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33359for as_dir in $PATH
33360do
33361  IFS=$as_save_IFS
33362  test -z "$as_dir" && as_dir=.
33363    for ac_exec_ext in '' $ac_executable_extensions; do
33364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33365    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33367    break 2
33368  fi
33369done
33370  done
33371IFS=$as_save_IFS
33372
33373  ;;
33374esac
33375fi
33376CCACHE=$ac_cv_path_CCACHE
33377if test -n "$CCACHE"; then
33378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33379$as_echo "$CCACHE" >&6; }
33380else
33381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33382$as_echo "no" >&6; }
33383fi
33384
33385
33386    PATH="$OLD_PATH"
33387  else
33388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33389$as_echo_n "checking for ccache... " >&6; }
33390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33391$as_echo "explicitly disabled" >&6; }
33392    CCACHE=
33393  fi
33394
33395
33396
33397# Check whether --with-ccache-dir was given.
33398if test "${with_ccache_dir+set}" = set; then :
33399  withval=$with_ccache_dir;
33400fi
33401
33402
33403  if test "x$with_ccache_dir" != x; then
33404    # When using a non home ccache directory, assume the use is to share ccache files
33405    # with other users. Thus change the umask.
33406    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33407  fi
33408  CCACHE_FOUND=""
33409  if test "x$CCACHE" != x; then
33410
33411  if test "x$CCACHE" != x; then
33412    CCACHE_FOUND="true"
33413    # Only use ccache if it is 3.1.4 or later, which supports
33414    # precompiled headers.
33415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33416$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33417    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33418    if test "x$HAS_GOOD_CCACHE" = x; then
33419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33420$as_echo "no, disabling ccache" >&6; }
33421      CCACHE=
33422    else
33423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33424$as_echo "yes" >&6; }
33425      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33426$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33427      PUSHED_FLAGS="$CXXFLAGS"
33428      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33429      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33430/* end confdefs.h.  */
33431
33432int
33433main ()
33434{
33435
33436  ;
33437  return 0;
33438}
33439_ACEOF
33440if ac_fn_cxx_try_compile "$LINENO"; then :
33441  CC_KNOWS_CCACHE_TRICK=yes
33442else
33443  CC_KNOWS_CCACHE_TRICK=no
33444fi
33445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33446      CXXFLAGS="$PUSHED_FLAGS"
33447      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33449$as_echo "yes" >&6; }
33450      else
33451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33452$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33453        CCACHE=
33454      fi
33455    fi
33456  fi
33457
33458  if test "x$CCACHE" != x; then
33459    CCACHE_SLOPPINESS=time_macros
33460    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33461    CCACHE_FLAGS=-fpch-preprocess
33462
33463    if test "x$SET_CCACHE_DIR" != x; then
33464      mkdir -p $CCACHE_DIR > /dev/null 2>&1
33465      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33466    fi
33467  fi
33468
33469  fi
33470
33471
33472###############################################################################
33473#
33474# And now the finish...
33475#
33476###############################################################################
33477
33478# Check for some common pitfalls
33479
33480  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33481    file_to_test="$SRC_ROOT/LICENSE"
33482    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33483      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
33484    fi
33485  fi
33486
33487
33488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33489$as_echo_n "checking if build directory is on local disk... " >&6; }
33490
33491  # df -l lists only local disks; if the given directory is not found then
33492  # a non-zero exit code is given
33493  if test "x$DF" = x; then
33494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33495      # msys does not have df; use Windows "net use" instead.
33496      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33497      if test "x$IS_NETWORK_DISK" = x; then
33498        OUTPUT_DIR_IS_LOCAL="yes"
33499      else
33500        OUTPUT_DIR_IS_LOCAL="no"
33501      fi
33502    else
33503      # No df here, say it's local
33504      OUTPUT_DIR_IS_LOCAL="yes"
33505    fi
33506  else
33507    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33508      OUTPUT_DIR_IS_LOCAL="yes"
33509    else
33510      OUTPUT_DIR_IS_LOCAL="no"
33511    fi
33512  fi
33513
33514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33515$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33516
33517
33518
33519  # Check if the user has any old-style ALT_ variables set.
33520  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33521
33522  # Before generating output files, test if they exist. If they do, this is a reconfigure.
33523  # Since we can't properly handle the dependencies for this, warn the user about the situation
33524  if test -e $OUTPUT_ROOT/spec.gmk; then
33525    IS_RECONFIGURE=yes
33526  else
33527    IS_RECONFIGURE=no
33528  fi
33529
33530  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33531    HIDE_PERFORMANCE_HINTS=yes
33532  else
33533    HIDE_PERFORMANCE_HINTS=no
33534    # Hide it the next time around...
33535    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33536  fi
33537
33538
33539# At the end, call the custom hook. (Dummy macro if no custom sources available)
33540
33541
33542# We're messing a bit with internal autoconf variables to put the config.status
33543# in the output directory instead of the current directory.
33544CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33545
33546# Create the actual output files. Now the main work of configure is done.
33547cat >confcache <<\_ACEOF
33548# This file is a shell script that caches the results of configure
33549# tests run on this system so they can be shared between configure
33550# scripts and configure runs, see configure's option --config-cache.
33551# It is not useful on other systems.  If it contains results you don't
33552# want to keep, you may remove or edit it.
33553#
33554# config.status only pays attention to the cache file if you give it
33555# the --recheck option to rerun configure.
33556#
33557# `ac_cv_env_foo' variables (set or unset) will be overridden when
33558# loading this file, other *unset* `ac_cv_foo' will be assigned the
33559# following values.
33560
33561_ACEOF
33562
33563# The following way of writing the cache mishandles newlines in values,
33564# but we know of no workaround that is simple, portable, and efficient.
33565# So, we kill variables containing newlines.
33566# Ultrix sh set writes to stderr and can't be redirected directly,
33567# and sets the high bit in the cache file unless we assign to the vars.
33568(
33569  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33570    eval ac_val=\$$ac_var
33571    case $ac_val in #(
33572    *${as_nl}*)
33573      case $ac_var in #(
33574      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33575$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33576      esac
33577      case $ac_var in #(
33578      _ | IFS | as_nl) ;; #(
33579      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33580      *) { eval $ac_var=; unset $ac_var;} ;;
33581      esac ;;
33582    esac
33583  done
33584
33585  (set) 2>&1 |
33586    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33587    *${as_nl}ac_space=\ *)
33588      # `set' does not quote correctly, so add quotes: double-quote
33589      # substitution turns \\\\ into \\, and sed turns \\ into \.
33590      sed -n \
33591	"s/'/'\\\\''/g;
33592	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33593      ;; #(
33594    *)
33595      # `set' quotes correctly as required by POSIX, so do not add quotes.
33596      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33597      ;;
33598    esac |
33599    sort
33600) |
33601  sed '
33602     /^ac_cv_env_/b end
33603     t clear
33604     :clear
33605     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33606     t end
33607     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33608     :end' >>confcache
33609if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33610  if test -w "$cache_file"; then
33611    if test "x$cache_file" != "x/dev/null"; then
33612      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33613$as_echo "$as_me: updating cache $cache_file" >&6;}
33614      if test ! -f "$cache_file" || test -h "$cache_file"; then
33615	cat confcache >"$cache_file"
33616      else
33617        case $cache_file in #(
33618        */* | ?:*)
33619	  mv -f confcache "$cache_file"$$ &&
33620	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33621        *)
33622	  mv -f confcache "$cache_file" ;;
33623	esac
33624      fi
33625    fi
33626  else
33627    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33628$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33629  fi
33630fi
33631rm -f confcache
33632
33633test "x$prefix" = xNONE && prefix=$ac_default_prefix
33634# Let make expand exec_prefix.
33635test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33636
33637DEFS=-DHAVE_CONFIG_H
33638
33639ac_libobjs=
33640ac_ltlibobjs=
33641U=
33642for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33643  # 1. Remove the extension, and $U if already installed.
33644  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33645  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33646  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33647  #    will be set to the directory where LIBOBJS objects are built.
33648  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33649  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33650done
33651LIBOBJS=$ac_libobjs
33652
33653LTLIBOBJS=$ac_ltlibobjs
33654
33655
33656
33657: "${CONFIG_STATUS=./config.status}"
33658ac_write_fail=0
33659ac_clean_files_save=$ac_clean_files
33660ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33661{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33662$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33663as_write_fail=0
33664cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33665#! $SHELL
33666# Generated by $as_me.
33667# Run this file to recreate the current configuration.
33668# Compiler output produced by configure, useful for debugging
33669# configure, is in config.log if it exists.
33670
33671debug=false
33672ac_cs_recheck=false
33673ac_cs_silent=false
33674
33675SHELL=\${CONFIG_SHELL-$SHELL}
33676export SHELL
33677_ASEOF
33678cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33679## -------------------- ##
33680## M4sh Initialization. ##
33681## -------------------- ##
33682
33683# Be more Bourne compatible
33684DUALCASE=1; export DUALCASE # for MKS sh
33685if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33686  emulate sh
33687  NULLCMD=:
33688  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33689  # is contrary to our usage.  Disable this feature.
33690  alias -g '${1+"$@"}'='"$@"'
33691  setopt NO_GLOB_SUBST
33692else
33693  case `(set -o) 2>/dev/null` in #(
33694  *posix*) :
33695    set -o posix ;; #(
33696  *) :
33697     ;;
33698esac
33699fi
33700
33701
33702as_nl='
33703'
33704export as_nl
33705# Printing a long string crashes Solaris 7 /usr/bin/printf.
33706as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33707as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33708as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33709# Prefer a ksh shell builtin over an external printf program on Solaris,
33710# but without wasting forks for bash or zsh.
33711if test -z "$BASH_VERSION$ZSH_VERSION" \
33712    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33713  as_echo='print -r --'
33714  as_echo_n='print -rn --'
33715elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33716  as_echo='printf %s\n'
33717  as_echo_n='printf %s'
33718else
33719  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33720    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33721    as_echo_n='/usr/ucb/echo -n'
33722  else
33723    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33724    as_echo_n_body='eval
33725      arg=$1;
33726      case $arg in #(
33727      *"$as_nl"*)
33728	expr "X$arg" : "X\\(.*\\)$as_nl";
33729	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33730      esac;
33731      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33732    '
33733    export as_echo_n_body
33734    as_echo_n='sh -c $as_echo_n_body as_echo'
33735  fi
33736  export as_echo_body
33737  as_echo='sh -c $as_echo_body as_echo'
33738fi
33739
33740# The user is always right.
33741if test "${PATH_SEPARATOR+set}" != set; then
33742  PATH_SEPARATOR=:
33743  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33744    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33745      PATH_SEPARATOR=';'
33746  }
33747fi
33748
33749
33750# IFS
33751# We need space, tab and new line, in precisely that order.  Quoting is
33752# there to prevent editors from complaining about space-tab.
33753# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33754# splitting by setting IFS to empty value.)
33755IFS=" ""	$as_nl"
33756
33757# Find who we are.  Look in the path if we contain no directory separator.
33758as_myself=
33759case $0 in #((
33760  *[\\/]* ) as_myself=$0 ;;
33761  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33762for as_dir in $PATH
33763do
33764  IFS=$as_save_IFS
33765  test -z "$as_dir" && as_dir=.
33766    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33767  done
33768IFS=$as_save_IFS
33769
33770     ;;
33771esac
33772# We did not find ourselves, most probably we were run as `sh COMMAND'
33773# in which case we are not to be found in the path.
33774if test "x$as_myself" = x; then
33775  as_myself=$0
33776fi
33777if test ! -f "$as_myself"; then
33778  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33779  exit 1
33780fi
33781
33782# Unset variables that we do not need and which cause bugs (e.g. in
33783# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33784# suppresses any "Segmentation fault" message there.  '((' could
33785# trigger a bug in pdksh 5.2.14.
33786for as_var in BASH_ENV ENV MAIL MAILPATH
33787do eval test x\${$as_var+set} = xset \
33788  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33789done
33790PS1='$ '
33791PS2='> '
33792PS4='+ '
33793
33794# NLS nuisances.
33795LC_ALL=C
33796export LC_ALL
33797LANGUAGE=C
33798export LANGUAGE
33799
33800# CDPATH.
33801(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33802
33803
33804# as_fn_error STATUS ERROR [LINENO LOG_FD]
33805# ----------------------------------------
33806# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33807# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33808# script with STATUS, using 1 if that was 0.
33809as_fn_error ()
33810{
33811  as_status=$1; test $as_status -eq 0 && as_status=1
33812  if test "$4"; then
33813    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33814    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33815  fi
33816  $as_echo "$as_me: error: $2" >&2
33817  as_fn_exit $as_status
33818} # as_fn_error
33819
33820
33821# as_fn_set_status STATUS
33822# -----------------------
33823# Set $? to STATUS, without forking.
33824as_fn_set_status ()
33825{
33826  return $1
33827} # as_fn_set_status
33828
33829# as_fn_exit STATUS
33830# -----------------
33831# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33832as_fn_exit ()
33833{
33834  set +e
33835  as_fn_set_status $1
33836  exit $1
33837} # as_fn_exit
33838
33839# as_fn_unset VAR
33840# ---------------
33841# Portably unset VAR.
33842as_fn_unset ()
33843{
33844  { eval $1=; unset $1;}
33845}
33846as_unset=as_fn_unset
33847# as_fn_append VAR VALUE
33848# ----------------------
33849# Append the text in VALUE to the end of the definition contained in VAR. Take
33850# advantage of any shell optimizations that allow amortized linear growth over
33851# repeated appends, instead of the typical quadratic growth present in naive
33852# implementations.
33853if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33854  eval 'as_fn_append ()
33855  {
33856    eval $1+=\$2
33857  }'
33858else
33859  as_fn_append ()
33860  {
33861    eval $1=\$$1\$2
33862  }
33863fi # as_fn_append
33864
33865# as_fn_arith ARG...
33866# ------------------
33867# Perform arithmetic evaluation on the ARGs, and store the result in the
33868# global $as_val. Take advantage of shells that can avoid forks. The arguments
33869# must be portable across $(()) and expr.
33870if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33871  eval 'as_fn_arith ()
33872  {
33873    as_val=$(( $* ))
33874  }'
33875else
33876  as_fn_arith ()
33877  {
33878    as_val=`expr "$@" || test $? -eq 1`
33879  }
33880fi # as_fn_arith
33881
33882
33883if expr a : '\(a\)' >/dev/null 2>&1 &&
33884   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33885  as_expr=expr
33886else
33887  as_expr=false
33888fi
33889
33890if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33891  as_basename=basename
33892else
33893  as_basename=false
33894fi
33895
33896if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33897  as_dirname=dirname
33898else
33899  as_dirname=false
33900fi
33901
33902as_me=`$as_basename -- "$0" ||
33903$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33904	 X"$0" : 'X\(//\)$' \| \
33905	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33906$as_echo X/"$0" |
33907    sed '/^.*\/\([^/][^/]*\)\/*$/{
33908	    s//\1/
33909	    q
33910	  }
33911	  /^X\/\(\/\/\)$/{
33912	    s//\1/
33913	    q
33914	  }
33915	  /^X\/\(\/\).*/{
33916	    s//\1/
33917	    q
33918	  }
33919	  s/.*/./; q'`
33920
33921# Avoid depending upon Character Ranges.
33922as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33923as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33924as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33925as_cr_digits='0123456789'
33926as_cr_alnum=$as_cr_Letters$as_cr_digits
33927
33928ECHO_C= ECHO_N= ECHO_T=
33929case `echo -n x` in #(((((
33930-n*)
33931  case `echo 'xy\c'` in
33932  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33933  xy)  ECHO_C='\c';;
33934  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33935       ECHO_T='	';;
33936  esac;;
33937*)
33938  ECHO_N='-n';;
33939esac
33940
33941rm -f conf$$ conf$$.exe conf$$.file
33942if test -d conf$$.dir; then
33943  rm -f conf$$.dir/conf$$.file
33944else
33945  rm -f conf$$.dir
33946  mkdir conf$$.dir 2>/dev/null
33947fi
33948if (echo >conf$$.file) 2>/dev/null; then
33949  if ln -s conf$$.file conf$$ 2>/dev/null; then
33950    as_ln_s='ln -s'
33951    # ... but there are two gotchas:
33952    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33953    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33954    # In both cases, we have to default to `cp -pR'.
33955    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33956      as_ln_s='cp -pR'
33957  elif ln conf$$.file conf$$ 2>/dev/null; then
33958    as_ln_s=ln
33959  else
33960    as_ln_s='cp -pR'
33961  fi
33962else
33963  as_ln_s='cp -pR'
33964fi
33965rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33966rmdir conf$$.dir 2>/dev/null
33967
33968
33969# as_fn_mkdir_p
33970# -------------
33971# Create "$as_dir" as a directory, including parents if necessary.
33972as_fn_mkdir_p ()
33973{
33974
33975  case $as_dir in #(
33976  -*) as_dir=./$as_dir;;
33977  esac
33978  test -d "$as_dir" || eval $as_mkdir_p || {
33979    as_dirs=
33980    while :; do
33981      case $as_dir in #(
33982      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33983      *) as_qdir=$as_dir;;
33984      esac
33985      as_dirs="'$as_qdir' $as_dirs"
33986      as_dir=`$as_dirname -- "$as_dir" ||
33987$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33988	 X"$as_dir" : 'X\(//\)[^/]' \| \
33989	 X"$as_dir" : 'X\(//\)$' \| \
33990	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33991$as_echo X"$as_dir" |
33992    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33993	    s//\1/
33994	    q
33995	  }
33996	  /^X\(\/\/\)[^/].*/{
33997	    s//\1/
33998	    q
33999	  }
34000	  /^X\(\/\/\)$/{
34001	    s//\1/
34002	    q
34003	  }
34004	  /^X\(\/\).*/{
34005	    s//\1/
34006	    q
34007	  }
34008	  s/.*/./; q'`
34009      test -d "$as_dir" && break
34010    done
34011    test -z "$as_dirs" || eval "mkdir $as_dirs"
34012  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34013
34014
34015} # as_fn_mkdir_p
34016if mkdir -p . 2>/dev/null; then
34017  as_mkdir_p='mkdir -p "$as_dir"'
34018else
34019  test -d ./-p && rmdir ./-p
34020  as_mkdir_p=false
34021fi
34022
34023
34024# as_fn_executable_p FILE
34025# -----------------------
34026# Test if FILE is an executable regular file.
34027as_fn_executable_p ()
34028{
34029  test -f "$1" && test -x "$1"
34030} # as_fn_executable_p
34031as_test_x='test -x'
34032as_executable_p=as_fn_executable_p
34033
34034# Sed expression to map a string onto a valid CPP name.
34035as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34036
34037# Sed expression to map a string onto a valid variable name.
34038as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34039
34040
34041exec 6>&1
34042## ----------------------------------- ##
34043## Main body of $CONFIG_STATUS script. ##
34044## ----------------------------------- ##
34045_ASEOF
34046test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34047
34048cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34049# Save the log message, to keep $0 and so on meaningful, and to
34050# report actual input values of CONFIG_FILES etc. instead of their
34051# values after options handling.
34052ac_log="
34053This file was extended by OpenJDK $as_me jdk8, which was
34054generated by GNU Autoconf 2.69.  Invocation command line was
34055
34056  CONFIG_FILES    = $CONFIG_FILES
34057  CONFIG_HEADERS  = $CONFIG_HEADERS
34058  CONFIG_LINKS    = $CONFIG_LINKS
34059  CONFIG_COMMANDS = $CONFIG_COMMANDS
34060  $ $0 $@
34061
34062on `(hostname || uname -n) 2>/dev/null | sed 1q`
34063"
34064
34065_ACEOF
34066
34067case $ac_config_files in *"
34068"*) set x $ac_config_files; shift; ac_config_files=$*;;
34069esac
34070
34071case $ac_config_headers in *"
34072"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34073esac
34074
34075
34076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34077# Files that config.status was made for.
34078config_files="$ac_config_files"
34079config_headers="$ac_config_headers"
34080
34081_ACEOF
34082
34083cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34084ac_cs_usage="\
34085\`$as_me' instantiates files and other configuration actions
34086from templates according to the current configuration.  Unless the files
34087and actions are specified as TAGs, all are instantiated by default.
34088
34089Usage: $0 [OPTION]... [TAG]...
34090
34091  -h, --help       print this help, then exit
34092  -V, --version    print version number and configuration settings, then exit
34093      --config     print configuration, then exit
34094  -q, --quiet, --silent
34095                   do not print progress messages
34096  -d, --debug      don't remove temporary files
34097      --recheck    update $as_me by reconfiguring in the same conditions
34098      --file=FILE[:TEMPLATE]
34099                   instantiate the configuration file FILE
34100      --header=FILE[:TEMPLATE]
34101                   instantiate the configuration header FILE
34102
34103Configuration files:
34104$config_files
34105
34106Configuration headers:
34107$config_headers
34108
34109Report bugs to <build-dev@openjdk.java.net>.
34110OpenJDK home page: <http://openjdk.java.net>."
34111
34112_ACEOF
34113cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34114ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34115ac_cs_version="\\
34116OpenJDK config.status jdk8
34117configured by $0, generated by GNU Autoconf 2.69,
34118  with options \\"\$ac_cs_config\\"
34119
34120Copyright (C) 2012 Free Software Foundation, Inc.
34121This config.status script is free software; the Free Software Foundation
34122gives unlimited permission to copy, distribute and modify it."
34123
34124ac_pwd='$ac_pwd'
34125srcdir='$srcdir'
34126AWK='$AWK'
34127test -n "\$AWK" || AWK=awk
34128_ACEOF
34129
34130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34131# The default lists apply if the user does not specify any file.
34132ac_need_defaults=:
34133while test $# != 0
34134do
34135  case $1 in
34136  --*=?*)
34137    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34138    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34139    ac_shift=:
34140    ;;
34141  --*=)
34142    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34143    ac_optarg=
34144    ac_shift=:
34145    ;;
34146  *)
34147    ac_option=$1
34148    ac_optarg=$2
34149    ac_shift=shift
34150    ;;
34151  esac
34152
34153  case $ac_option in
34154  # Handling of the options.
34155  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34156    ac_cs_recheck=: ;;
34157  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34158    $as_echo "$ac_cs_version"; exit ;;
34159  --config | --confi | --conf | --con | --co | --c )
34160    $as_echo "$ac_cs_config"; exit ;;
34161  --debug | --debu | --deb | --de | --d | -d )
34162    debug=: ;;
34163  --file | --fil | --fi | --f )
34164    $ac_shift
34165    case $ac_optarg in
34166    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34167    '') as_fn_error $? "missing file argument" ;;
34168    esac
34169    as_fn_append CONFIG_FILES " '$ac_optarg'"
34170    ac_need_defaults=false;;
34171  --header | --heade | --head | --hea )
34172    $ac_shift
34173    case $ac_optarg in
34174    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34175    esac
34176    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34177    ac_need_defaults=false;;
34178  --he | --h)
34179    # Conflict between --help and --header
34180    as_fn_error $? "ambiguous option: \`$1'
34181Try \`$0 --help' for more information.";;
34182  --help | --hel | -h )
34183    $as_echo "$ac_cs_usage"; exit ;;
34184  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34185  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34186    ac_cs_silent=: ;;
34187
34188  # This is an error.
34189  -*) as_fn_error $? "unrecognized option: \`$1'
34190Try \`$0 --help' for more information." ;;
34191
34192  *) as_fn_append ac_config_targets " $1"
34193     ac_need_defaults=false ;;
34194
34195  esac
34196  shift
34197done
34198
34199ac_configure_extra_args=
34200
34201if $ac_cs_silent; then
34202  exec 6>/dev/null
34203  ac_configure_extra_args="$ac_configure_extra_args --silent"
34204fi
34205
34206_ACEOF
34207cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34208if \$ac_cs_recheck; then
34209  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34210  shift
34211  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34212  CONFIG_SHELL='$SHELL'
34213  export CONFIG_SHELL
34214  exec "\$@"
34215fi
34216
34217_ACEOF
34218cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34219exec 5>>config.log
34220{
34221  echo
34222  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34223## Running $as_me. ##
34224_ASBOX
34225  $as_echo "$ac_log"
34226} >&5
34227
34228_ACEOF
34229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34230_ACEOF
34231
34232cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34233
34234# Handling of arguments.
34235for ac_config_target in $ac_config_targets
34236do
34237  case $ac_config_target in
34238    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34239    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34240    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34241    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34242    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34243    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34244    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34245
34246  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34247  esac
34248done
34249
34250
34251# If the user did not use the arguments to specify the items to instantiate,
34252# then the envvar interface is used.  Set only those that are not.
34253# We use the long form for the default assignment because of an extremely
34254# bizarre bug on SunOS 4.1.3.
34255if $ac_need_defaults; then
34256  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34257  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34258fi
34259
34260# Have a temporary directory for convenience.  Make it in the build tree
34261# simply because there is no reason against having it here, and in addition,
34262# creating and moving files from /tmp can sometimes cause problems.
34263# Hook for its removal unless debugging.
34264# Note that there is a small window in which the directory will not be cleaned:
34265# after its creation but before its name has been assigned to `$tmp'.
34266$debug ||
34267{
34268  tmp= ac_tmp=
34269  trap 'exit_status=$?
34270  : "${ac_tmp:=$tmp}"
34271  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34272' 0
34273  trap 'as_fn_exit 1' 1 2 13 15
34274}
34275# Create a (secure) tmp directory for tmp files.
34276
34277{
34278  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34279  test -d "$tmp"
34280}  ||
34281{
34282  tmp=./conf$$-$RANDOM
34283  (umask 077 && mkdir "$tmp")
34284} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34285ac_tmp=$tmp
34286
34287# Set up the scripts for CONFIG_FILES section.
34288# No need to generate them if there are no CONFIG_FILES.
34289# This happens for instance with `./config.status config.h'.
34290if test -n "$CONFIG_FILES"; then
34291
34292
34293ac_cr=`echo X | tr X '\015'`
34294# On cygwin, bash can eat \r inside `` if the user requested igncr.
34295# But we know of no other shell where ac_cr would be empty at this
34296# point, so we can use a bashism as a fallback.
34297if test "x$ac_cr" = x; then
34298  eval ac_cr=\$\'\\r\'
34299fi
34300ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34301if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34302  ac_cs_awk_cr='\\r'
34303else
34304  ac_cs_awk_cr=$ac_cr
34305fi
34306
34307echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34308_ACEOF
34309
34310
34311{
34312  echo "cat >conf$$subs.awk <<_ACEOF" &&
34313  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34314  echo "_ACEOF"
34315} >conf$$subs.sh ||
34316  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34317ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34318ac_delim='%!_!# '
34319for ac_last_try in false false false false false :; do
34320  . ./conf$$subs.sh ||
34321    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34322
34323  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34324  if test $ac_delim_n = $ac_delim_num; then
34325    break
34326  elif $ac_last_try; then
34327    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34328  else
34329    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34330  fi
34331done
34332rm -f conf$$subs.sh
34333
34334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34335cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34336_ACEOF
34337sed -n '
34338h
34339s/^/S["/; s/!.*/"]=/
34340p
34341g
34342s/^[^!]*!//
34343:repl
34344t repl
34345s/'"$ac_delim"'$//
34346t delim
34347:nl
34348h
34349s/\(.\{148\}\)..*/\1/
34350t more1
34351s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34352p
34353n
34354b repl
34355:more1
34356s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34357p
34358g
34359s/.\{148\}//
34360t nl
34361:delim
34362h
34363s/\(.\{148\}\)..*/\1/
34364t more2
34365s/["\\]/\\&/g; s/^/"/; s/$/"/
34366p
34367b
34368:more2
34369s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34370p
34371g
34372s/.\{148\}//
34373t delim
34374' <conf$$subs.awk | sed '
34375/^[^""]/{
34376  N
34377  s/\n//
34378}
34379' >>$CONFIG_STATUS || ac_write_fail=1
34380rm -f conf$$subs.awk
34381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34382_ACAWK
34383cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34384  for (key in S) S_is_set[key] = 1
34385  FS = ""
34386
34387}
34388{
34389  line = $ 0
34390  nfields = split(line, field, "@")
34391  substed = 0
34392  len = length(field[1])
34393  for (i = 2; i < nfields; i++) {
34394    key = field[i]
34395    keylen = length(key)
34396    if (S_is_set[key]) {
34397      value = S[key]
34398      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34399      len += length(value) + length(field[++i])
34400      substed = 1
34401    } else
34402      len += 1 + keylen
34403  }
34404
34405  print line
34406}
34407
34408_ACAWK
34409_ACEOF
34410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34411if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34412  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34413else
34414  cat
34415fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34416  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34417_ACEOF
34418
34419# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34420# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34421# trailing colons and then remove the whole line if VPATH becomes empty
34422# (actually we leave an empty line to preserve line numbers).
34423if test "x$srcdir" = x.; then
34424  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34425h
34426s///
34427s/^/:/
34428s/[	 ]*$/:/
34429s/:\$(srcdir):/:/g
34430s/:\${srcdir}:/:/g
34431s/:@srcdir@:/:/g
34432s/^:*//
34433s/:*$//
34434x
34435s/\(=[	 ]*\).*/\1/
34436G
34437s/\n//
34438s/^[^=]*=[	 ]*$//
34439}'
34440fi
34441
34442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34443fi # test -n "$CONFIG_FILES"
34444
34445# Set up the scripts for CONFIG_HEADERS section.
34446# No need to generate them if there are no CONFIG_HEADERS.
34447# This happens for instance with `./config.status Makefile'.
34448if test -n "$CONFIG_HEADERS"; then
34449cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34450BEGIN {
34451_ACEOF
34452
34453# Transform confdefs.h into an awk script `defines.awk', embedded as
34454# here-document in config.status, that substitutes the proper values into
34455# config.h.in to produce config.h.
34456
34457# Create a delimiter string that does not exist in confdefs.h, to ease
34458# handling of long lines.
34459ac_delim='%!_!# '
34460for ac_last_try in false false :; do
34461  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34462  if test -z "$ac_tt"; then
34463    break
34464  elif $ac_last_try; then
34465    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34466  else
34467    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34468  fi
34469done
34470
34471# For the awk script, D is an array of macro values keyed by name,
34472# likewise P contains macro parameters if any.  Preserve backslash
34473# newline sequences.
34474
34475ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34476sed -n '
34477s/.\{148\}/&'"$ac_delim"'/g
34478t rset
34479:rset
34480s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34481t def
34482d
34483:def
34484s/\\$//
34485t bsnl
34486s/["\\]/\\&/g
34487s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34488D["\1"]=" \3"/p
34489s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34490d
34491:bsnl
34492s/["\\]/\\&/g
34493s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34494D["\1"]=" \3\\\\\\n"\\/p
34495t cont
34496s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34497t cont
34498d
34499:cont
34500n
34501s/.\{148\}/&'"$ac_delim"'/g
34502t clear
34503:clear
34504s/\\$//
34505t bsnlc
34506s/["\\]/\\&/g; s/^/"/; s/$/"/p
34507d
34508:bsnlc
34509s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34510b cont
34511' <confdefs.h | sed '
34512s/'"$ac_delim"'/"\\\
34513"/g' >>$CONFIG_STATUS || ac_write_fail=1
34514
34515cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34516  for (key in D) D_is_set[key] = 1
34517  FS = ""
34518}
34519/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34520  line = \$ 0
34521  split(line, arg, " ")
34522  if (arg[1] == "#") {
34523    defundef = arg[2]
34524    mac1 = arg[3]
34525  } else {
34526    defundef = substr(arg[1], 2)
34527    mac1 = arg[2]
34528  }
34529  split(mac1, mac2, "(") #)
34530  macro = mac2[1]
34531  prefix = substr(line, 1, index(line, defundef) - 1)
34532  if (D_is_set[macro]) {
34533    # Preserve the white space surrounding the "#".
34534    print prefix "define", macro P[macro] D[macro]
34535    next
34536  } else {
34537    # Replace #undef with comments.  This is necessary, for example,
34538    # in the case of _POSIX_SOURCE, which is predefined and required
34539    # on some systems where configure will not decide to define it.
34540    if (defundef == "undef") {
34541      print "/*", prefix defundef, macro, "*/"
34542      next
34543    }
34544  }
34545}
34546{ print }
34547_ACAWK
34548_ACEOF
34549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34550  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34551fi # test -n "$CONFIG_HEADERS"
34552
34553
34554eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34555shift
34556for ac_tag
34557do
34558  case $ac_tag in
34559  :[FHLC]) ac_mode=$ac_tag; continue;;
34560  esac
34561  case $ac_mode$ac_tag in
34562  :[FHL]*:*);;
34563  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34564  :[FH]-) ac_tag=-:-;;
34565  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34566  esac
34567  ac_save_IFS=$IFS
34568  IFS=:
34569  set x $ac_tag
34570  IFS=$ac_save_IFS
34571  shift
34572  ac_file=$1
34573  shift
34574
34575  case $ac_mode in
34576  :L) ac_source=$1;;
34577  :[FH])
34578    ac_file_inputs=
34579    for ac_f
34580    do
34581      case $ac_f in
34582      -) ac_f="$ac_tmp/stdin";;
34583      *) # Look for the file first in the build tree, then in the source tree
34584	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34585	 # because $ac_f cannot contain `:'.
34586	 test -f "$ac_f" ||
34587	   case $ac_f in
34588	   [\\/$]*) false;;
34589	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34590	   esac ||
34591	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34592      esac
34593      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34594      as_fn_append ac_file_inputs " '$ac_f'"
34595    done
34596
34597    # Let's still pretend it is `configure' which instantiates (i.e., don't
34598    # use $as_me), people would be surprised to read:
34599    #    /* config.h.  Generated by config.status.  */
34600    configure_input='Generated from '`
34601	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34602	`' by configure.'
34603    if test x"$ac_file" != x-; then
34604      configure_input="$ac_file.  $configure_input"
34605      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34606$as_echo "$as_me: creating $ac_file" >&6;}
34607    fi
34608    # Neutralize special characters interpreted by sed in replacement strings.
34609    case $configure_input in #(
34610    *\&* | *\|* | *\\* )
34611       ac_sed_conf_input=`$as_echo "$configure_input" |
34612       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34613    *) ac_sed_conf_input=$configure_input;;
34614    esac
34615
34616    case $ac_tag in
34617    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34618      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34619    esac
34620    ;;
34621  esac
34622
34623  ac_dir=`$as_dirname -- "$ac_file" ||
34624$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34625	 X"$ac_file" : 'X\(//\)[^/]' \| \
34626	 X"$ac_file" : 'X\(//\)$' \| \
34627	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34628$as_echo X"$ac_file" |
34629    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34630	    s//\1/
34631	    q
34632	  }
34633	  /^X\(\/\/\)[^/].*/{
34634	    s//\1/
34635	    q
34636	  }
34637	  /^X\(\/\/\)$/{
34638	    s//\1/
34639	    q
34640	  }
34641	  /^X\(\/\).*/{
34642	    s//\1/
34643	    q
34644	  }
34645	  s/.*/./; q'`
34646  as_dir="$ac_dir"; as_fn_mkdir_p
34647  ac_builddir=.
34648
34649case "$ac_dir" in
34650.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34651*)
34652  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34653  # A ".." for each directory in $ac_dir_suffix.
34654  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34655  case $ac_top_builddir_sub in
34656  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34657  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34658  esac ;;
34659esac
34660ac_abs_top_builddir=$ac_pwd
34661ac_abs_builddir=$ac_pwd$ac_dir_suffix
34662# for backward compatibility:
34663ac_top_builddir=$ac_top_build_prefix
34664
34665case $srcdir in
34666  .)  # We are building in place.
34667    ac_srcdir=.
34668    ac_top_srcdir=$ac_top_builddir_sub
34669    ac_abs_top_srcdir=$ac_pwd ;;
34670  [\\/]* | ?:[\\/]* )  # Absolute name.
34671    ac_srcdir=$srcdir$ac_dir_suffix;
34672    ac_top_srcdir=$srcdir
34673    ac_abs_top_srcdir=$srcdir ;;
34674  *) # Relative name.
34675    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34676    ac_top_srcdir=$ac_top_build_prefix$srcdir
34677    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34678esac
34679ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34680
34681
34682  case $ac_mode in
34683  :F)
34684  #
34685  # CONFIG_FILE
34686  #
34687
34688_ACEOF
34689
34690cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34691# If the template does not know about datarootdir, expand it.
34692# FIXME: This hack should be removed a few years after 2.60.
34693ac_datarootdir_hack=; ac_datarootdir_seen=
34694ac_sed_dataroot='
34695/datarootdir/ {
34696  p
34697  q
34698}
34699/@datadir@/p
34700/@docdir@/p
34701/@infodir@/p
34702/@localedir@/p
34703/@mandir@/p'
34704case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34705*datarootdir*) ac_datarootdir_seen=yes;;
34706*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34707  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34708$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34709_ACEOF
34710cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34711  ac_datarootdir_hack='
34712  s&@datadir@&$datadir&g
34713  s&@docdir@&$docdir&g
34714  s&@infodir@&$infodir&g
34715  s&@localedir@&$localedir&g
34716  s&@mandir@&$mandir&g
34717  s&\\\${datarootdir}&$datarootdir&g' ;;
34718esac
34719_ACEOF
34720
34721# Neutralize VPATH when `$srcdir' = `.'.
34722# Shell code in configure.ac might set extrasub.
34723# FIXME: do we really want to maintain this feature?
34724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34725ac_sed_extra="$ac_vpsub
34726$extrasub
34727_ACEOF
34728cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34729:t
34730/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34731s|@configure_input@|$ac_sed_conf_input|;t t
34732s&@top_builddir@&$ac_top_builddir_sub&;t t
34733s&@top_build_prefix@&$ac_top_build_prefix&;t t
34734s&@srcdir@&$ac_srcdir&;t t
34735s&@abs_srcdir@&$ac_abs_srcdir&;t t
34736s&@top_srcdir@&$ac_top_srcdir&;t t
34737s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34738s&@builddir@&$ac_builddir&;t t
34739s&@abs_builddir@&$ac_abs_builddir&;t t
34740s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34741$ac_datarootdir_hack
34742"
34743eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34744  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34745
34746test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34747  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34748  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34749      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34750  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34751which seems to be undefined.  Please make sure it is defined" >&5
34752$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34753which seems to be undefined.  Please make sure it is defined" >&2;}
34754
34755  rm -f "$ac_tmp/stdin"
34756  case $ac_file in
34757  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34758  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34759  esac \
34760  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34761 ;;
34762  :H)
34763  #
34764  # CONFIG_HEADER
34765  #
34766  if test x"$ac_file" != x-; then
34767    {
34768      $as_echo "/* $configure_input  */" \
34769      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34770    } >"$ac_tmp/config.h" \
34771      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34772    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34773      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34774$as_echo "$as_me: $ac_file is unchanged" >&6;}
34775    else
34776      rm -f "$ac_file"
34777      mv "$ac_tmp/config.h" "$ac_file" \
34778	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34779    fi
34780  else
34781    $as_echo "/* $configure_input  */" \
34782      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34783      || as_fn_error $? "could not create -" "$LINENO" 5
34784  fi
34785 ;;
34786
34787
34788  esac
34789
34790done # for ac_tag
34791
34792
34793as_fn_exit 0
34794_ACEOF
34795ac_clean_files=$ac_clean_files_save
34796
34797test $ac_write_fail = 0 ||
34798  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34799
34800
34801# configure is writing to config.log, and then calls config.status.
34802# config.status does its own redirection, appending to config.log.
34803# Unfortunately, on DOS this fails, as config.log is still kept open
34804# by configure, so config.status won't be able to write to it; its
34805# output is simply discarded.  So we exec the FD to /dev/null,
34806# effectively closing config.log, so it can be properly (re)opened and
34807# appended to by config.status.  When coming back to configure, we
34808# need to make the FD available again.
34809if test "$no_create" != yes; then
34810  ac_cs_success=:
34811  ac_config_status_args=
34812  test "$silent" = yes &&
34813    ac_config_status_args="$ac_config_status_args --quiet"
34814  exec 5>/dev/null
34815  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34816  exec 5>>config.log
34817  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34818  # would make configure fail if this is the last instruction.
34819  $ac_cs_success || as_fn_exit 1
34820fi
34821if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34822  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34823$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34824fi
34825
34826
34827# Try to move the config.log file to the output directory.
34828if test -e ./config.log; then
34829  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34830fi
34831
34832# Make the compare script executable
34833$CHMOD +x $OUTPUT_ROOT/compare.sh
34834
34835# Finally output some useful information to the user
34836
34837  # Finally output some useful information to the user
34838
34839  if test "x$CCACHE_FOUND" != x; then
34840    if  test "x$HAS_GOOD_CCACHE" = x; then
34841      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34842      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34843    else
34844      CCACHE_STATUS="installed and in use"
34845    fi
34846  else
34847    if test "x$GCC" = xyes; then
34848      CCACHE_STATUS="not installed (consider installing)"
34849      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34850    else
34851      CCACHE_STATUS="not available for your system"
34852    fi
34853  fi
34854
34855  printf "\n"
34856  printf "====================================================\n"
34857  printf "A new configuration has been successfully created in\n"
34858  printf "$OUTPUT_ROOT\n"
34859  if test "x$CONFIGURE_COMMAND_LINE" != x; then
34860    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34861  else
34862    printf "using default settings.\n"
34863  fi
34864
34865  printf "\n"
34866  printf "Configuration summary:\n"
34867  printf "* Debug level:    $DEBUG_LEVEL\n"
34868  printf "* JDK variant:    $JDK_VARIANT\n"
34869  printf "* JVM variants:   $with_jvm_variants\n"
34870  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34871
34872  printf "\n"
34873  printf "Tools summary:\n"
34874  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34875    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34876  fi
34877  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34878  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34879  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34880
34881  printf "\n"
34882  printf "Build performance summary:\n"
34883  printf "* Cores to use:   $JOBS\n"
34884  printf "* Memory limit:   $MEMORY_SIZE MB\n"
34885  printf "* ccache status:  $CCACHE_STATUS\n"
34886  printf "\n"
34887
34888  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34889    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34890    printf "$CCACHE_HELP_MSG\n"
34891
34892  # Print a helpful message on how to acquire the necessary build dependency.
34893  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34894  MISSING_DEPENDENCY=ccache
34895
34896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34897    cygwin_help $MISSING_DEPENDENCY
34898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34899    msys_help $MISSING_DEPENDENCY
34900  else
34901    PKGHANDLER_COMMAND=
34902
34903    case $PKGHANDLER in
34904      apt-get)
34905        apt_help     $MISSING_DEPENDENCY ;;
34906      yum)
34907        yum_help     $MISSING_DEPENDENCY ;;
34908      port)
34909        port_help    $MISSING_DEPENDENCY ;;
34910      pkgutil)
34911        pkgutil_help $MISSING_DEPENDENCY ;;
34912      pkgadd)
34913        pkgadd_help  $MISSING_DEPENDENCY ;;
34914      * )
34915        break ;;
34916    esac
34917
34918    if test "x$PKGHANDLER_COMMAND" != x; then
34919      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34920    fi
34921  fi
34922
34923    printf "$HELP_MSG\n"
34924    printf "\n"
34925  fi
34926
34927  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34928    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34929    printf "will result in longer build times.\n"
34930    printf "\n"
34931  fi
34932
34933  if test "x$FOUND_ALT_VARIABLES" != "x"; then
34934    printf "WARNING: You have old-style ALT_ environment variables set.\n"
34935    printf "These are not respected, and will be ignored. It is recommended\n"
34936    printf "that you clean your environment. The following variables are set:\n"
34937    printf "$FOUND_ALT_VARIABLES\n"
34938    printf "\n"
34939  fi
34940
34941  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34942    printf "WARNING: Your build output directory is not on a local disk.\n"
34943    printf "This will severely degrade build performance!\n"
34944    printf "It is recommended that you create an output directory on a local disk,\n"
34945    printf "and run the configure script again from that directory.\n"
34946    printf "\n"
34947  fi
34948
34949  if test "x$IS_RECONFIGURE" = "xyes"; then
34950    printf "WARNING: The result of this configuration has overridden an older\n"
34951    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34952    printf "proper build. Failure to do so might result in strange build problems.\n"
34953    printf "\n"
34954  fi
34955
34956