generated-configure.sh revision 837:174a54ce39c4
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
760ac_ct_PROPER_COMPILER_CC
761PROPER_COMPILER_CC
762POTENTIAL_CC
763TOOLS_DIR_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782NASHORN_TOPDIR
783HOTSPOT_TOPDIR
784JAXWS_TOPDIR
785JAXP_TOPDIR
786CORBA_TOPDIR
787LANGTOOLS_TOPDIR
788BOOT_JDK_JVMARGS
789JAVAC_FLAGS
790BOOT_JDK_SOURCETARGET
791BOOT_JDK
792BOOT_TOOLSJAR
793BOOT_RTJAR
794JAVA_CHECK
795JAVAC_CHECK
796COOKED_BUILD_NUMBER
797JDK_VERSION
798COPYRIGHT_YEAR
799MACOSX_BUNDLE_ID_BASE
800MACOSX_BUNDLE_NAME_BASE
801COMPANY_NAME
802JDK_RC_PLATFORM_NAME
803PRODUCT_SUFFIX
804PRODUCT_NAME
805LAUNCHER_NAME
806MILESTONE
807JDK_BUILD_NUMBER
808JDK_UPDATE_VERSION
809JDK_MICRO_VERSION
810JDK_MINOR_VERSION
811JDK_MAJOR_VERSION
812USER_RELEASE_SUFFIX
813COMPRESS_JARS
814UNLIMITED_CRYPTO
815CACERTS_FILE
816TEST_IN_BUILD
817BUILD_HEADLESS
818SUPPORT_HEADFUL
819SUPPORT_HEADLESS
820BDEPS_FTP
821BDEPS_UNZIP
822OS_VERSION_MICRO
823OS_VERSION_MINOR
824OS_VERSION_MAJOR
825PKG_CONFIG
826CODESIGN
827XATTR
828IS_GNU_TIME
829TIME
830STAT
831HG
832READELF
833OTOOL
834LDD
835ZIP
836UNZIP
837FIND_DELETE
838MAKE
839CHECK_TOOLSDIR_MAKE
840CHECK_TOOLSDIR_GMAKE
841CHECK_MAKE
842CHECK_GMAKE
843PKGHANDLER
844OUTPUT_ROOT
845CONF_NAME
846SPEC
847BUILD_VARIANT_RELEASE
848DEBUG_CLASSFILES
849FASTDEBUG
850VARIANT
851DEBUG_LEVEL
852MACOSX_UNIVERSAL
853INCLUDE_SA
854JVM_VARIANT_ZEROSHARK
855JVM_VARIANT_ZERO
856JVM_VARIANT_KERNEL
857JVM_VARIANT_MINIMAL1
858JVM_VARIANT_CLIENT
859JVM_VARIANT_SERVER
860JVM_VARIANTS
861JDK_VARIANT
862SET_OPENJDK
863BUILD_LOG_WRAPPER
864BUILD_LOG_PREVIOUS
865BUILD_LOG
866SYS_ROOT
867PATH_SEP
868SRC_ROOT
869ZERO_ARCHDEF
870DEFINE_CROSS_COMPILE_ARCH
871LP64
872OPENJDK_TARGET_OS_API_DIR
873OPENJDK_TARGET_CPU_JLI_CFLAGS
874OPENJDK_TARGET_CPU_OSARCH
875OPENJDK_TARGET_CPU_ISADIR
876OPENJDK_TARGET_CPU_LIBDIR
877OPENJDK_TARGET_CPU_LEGACY_LIB
878OPENJDK_TARGET_CPU_LEGACY
879REQUIRED_OS_VERSION
880REQUIRED_OS_NAME
881COMPILE_TYPE
882OPENJDK_TARGET_CPU_ENDIAN
883OPENJDK_TARGET_CPU_BITS
884OPENJDK_TARGET_CPU_ARCH
885OPENJDK_TARGET_CPU
886OPENJDK_TARGET_OS_API
887OPENJDK_TARGET_OS
888OPENJDK_BUILD_CPU_ENDIAN
889OPENJDK_BUILD_CPU_BITS
890OPENJDK_BUILD_CPU_ARCH
891OPENJDK_BUILD_CPU
892OPENJDK_BUILD_OS_API
893OPENJDK_BUILD_OS
894OPENJDK_BUILD_AUTOCONF_NAME
895OPENJDK_TARGET_AUTOCONF_NAME
896target_os
897target_vendor
898target_cpu
899target
900host_os
901host_vendor
902host_cpu
903host
904build_os
905build_vendor
906build_cpu
907build
908SETFILE
909DF
910READLINK
911CYGPATH
912NAWK
913SED
914FGREP
915EGREP
916GREP
917AWK
918XARGS
919WHICH
920WC
921UNIQ
922UNAME
923TR
924TOUCH
925TEE
926TAR
927TAIL
928SORT
929SH
930RM
931PRINTF
932MV
933MKTEMP
934MKDIR
935LS
936LN
937HEAD
938FIND
939FILE
940EXPR
941ECHO
942DIRNAME
943DIFF
944DATE
945CUT
946CPIO
947CP
948COMM
949CMP
950CHMOD
951CAT
952BASH
953BASENAME
954DATE_WHEN_CONFIGURED
955CONFIGURE_COMMAND_LINE
956CUSTOM_MAKE_DIR
957target_alias
958host_alias
959build_alias
960LIBS
961ECHO_T
962ECHO_N
963ECHO_C
964DEFS
965mandir
966localedir
967libdir
968psdir
969pdfdir
970dvidir
971htmldir
972infodir
973docdir
974oldincludedir
975includedir
976localstatedir
977sharedstatedir
978sysconfdir
979datadir
980datarootdir
981libexecdir
982sbindir
983bindir
984program_transform_name
985prefix
986exec_prefix
987PACKAGE_URL
988PACKAGE_BUGREPORT
989PACKAGE_STRING
990PACKAGE_VERSION
991PACKAGE_TARNAME
992PACKAGE_NAME
993PATH_SEPARATOR
994SHELL'
995ac_subst_files=''
996ac_user_opts='
997enable_option_checking
998with_custom_make_dir
999with_target_bits
1000with_sys_root
1001with_tools_dir
1002with_devkit
1003enable_openjdk_only
1004with_jdk_variant
1005with_jvm_variants
1006enable_debug
1007with_debug_level
1008with_conf_name
1009with_builddeps_conf
1010with_builddeps_server
1011with_builddeps_dir
1012with_builddeps_group
1013enable_headful
1014enable_hotspot_test_in_build
1015with_cacerts_file
1016enable_unlimited_crypto
1017with_milestone
1018with_update_version
1019with_user_release_suffix
1020with_build_number
1021with_boot_jdk
1022with_boot_jdk_jvmargs
1023with_add_source_root
1024with_override_source_root
1025with_adds_and_overrides
1026with_override_langtools
1027with_override_corba
1028with_override_jaxp
1029with_override_jaxws
1030with_override_hotspot
1031with_override_nashorn
1032with_override_jdk
1033with_import_hotspot
1034with_msvcr_dll
1035with_dxsdk
1036with_dxsdk_lib
1037with_dxsdk_include
1038with_jtreg
1039with_extra_cflags
1040with_extra_cxxflags
1041with_extra_ldflags
1042enable_debug_symbols
1043enable_zip_debug_info
1044enable_macosx_runtime_support
1045with_x
1046with_cups
1047with_cups_include
1048with_freetype
1049with_alsa
1050with_alsa_include
1051with_alsa_lib
1052with_giflib
1053with_zlib
1054with_stdc__lib
1055with_num_cores
1056with_memory_size
1057with_jobs
1058with_sjavac_server_java
1059enable_sjavac
1060enable_precompiled_headers
1061enable_ccache
1062with_ccache_dir
1063'
1064      ac_precious_vars='build_alias
1065host_alias
1066target_alias
1067PKG_CONFIG
1068CC
1069CFLAGS
1070LDFLAGS
1071LIBS
1072CPPFLAGS
1073CXX
1074CXXFLAGS
1075CCC
1076OBJC
1077OBJCFLAGS
1078CPP
1079CXXCPP
1080XMKMF
1081FREETYPE2_CFLAGS
1082FREETYPE2_LIBS
1083ALSA_CFLAGS
1084ALSA_LIBS
1085LIBFFI_CFLAGS
1086LIBFFI_LIBS'
1087
1088
1089# Initialize some variables set by options.
1090ac_init_help=
1091ac_init_version=false
1092ac_unrecognized_opts=
1093ac_unrecognized_sep=
1094# The variables have the same names as the options, with
1095# dashes changed to underlines.
1096cache_file=/dev/null
1097exec_prefix=NONE
1098no_create=
1099no_recursion=
1100prefix=NONE
1101program_prefix=NONE
1102program_suffix=NONE
1103program_transform_name=s,x,x,
1104silent=
1105site=
1106srcdir=
1107verbose=
1108x_includes=NONE
1109x_libraries=NONE
1110
1111# Installation directory options.
1112# These are left unexpanded so users can "make install exec_prefix=/foo"
1113# and all the variables that are supposed to be based on exec_prefix
1114# by default will actually change.
1115# Use braces instead of parens because sh, perl, etc. also accept them.
1116# (The list follows the same order as the GNU Coding Standards.)
1117bindir='${exec_prefix}/bin'
1118sbindir='${exec_prefix}/sbin'
1119libexecdir='${exec_prefix}/libexec'
1120datarootdir='${prefix}/share'
1121datadir='${datarootdir}'
1122sysconfdir='${prefix}/etc'
1123sharedstatedir='${prefix}/com'
1124localstatedir='${prefix}/var'
1125includedir='${prefix}/include'
1126oldincludedir='/usr/include'
1127docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1128infodir='${datarootdir}/info'
1129htmldir='${docdir}'
1130dvidir='${docdir}'
1131pdfdir='${docdir}'
1132psdir='${docdir}'
1133libdir='${exec_prefix}/lib'
1134localedir='${datarootdir}/locale'
1135mandir='${datarootdir}/man'
1136
1137ac_prev=
1138ac_dashdash=
1139for ac_option
1140do
1141  # If the previous option needs an argument, assign it.
1142  if test -n "$ac_prev"; then
1143    eval $ac_prev=\$ac_option
1144    ac_prev=
1145    continue
1146  fi
1147
1148  case $ac_option in
1149  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1150  *=)   ac_optarg= ;;
1151  *)    ac_optarg=yes ;;
1152  esac
1153
1154  # Accept the important Cygnus configure options, so we can diagnose typos.
1155
1156  case $ac_dashdash$ac_option in
1157  --)
1158    ac_dashdash=yes ;;
1159
1160  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1161    ac_prev=bindir ;;
1162  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1163    bindir=$ac_optarg ;;
1164
1165  -build | --build | --buil | --bui | --bu)
1166    ac_prev=build_alias ;;
1167  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1168    build_alias=$ac_optarg ;;
1169
1170  -cache-file | --cache-file | --cache-fil | --cache-fi \
1171  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1172    ac_prev=cache_file ;;
1173  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1174  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1175    cache_file=$ac_optarg ;;
1176
1177  --config-cache | -C)
1178    cache_file=config.cache ;;
1179
1180  -datadir | --datadir | --datadi | --datad)
1181    ac_prev=datadir ;;
1182  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1183    datadir=$ac_optarg ;;
1184
1185  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1186  | --dataroo | --dataro | --datar)
1187    ac_prev=datarootdir ;;
1188  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1189  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1190    datarootdir=$ac_optarg ;;
1191
1192  -disable-* | --disable-*)
1193    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1194    # Reject names that are not valid shell variable names.
1195    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196      as_fn_error $? "invalid feature name: $ac_useropt"
1197    ac_useropt_orig=$ac_useropt
1198    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199    case $ac_user_opts in
1200      *"
1201"enable_$ac_useropt"
1202"*) ;;
1203      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1204	 ac_unrecognized_sep=', ';;
1205    esac
1206    eval enable_$ac_useropt=no ;;
1207
1208  -docdir | --docdir | --docdi | --doc | --do)
1209    ac_prev=docdir ;;
1210  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1211    docdir=$ac_optarg ;;
1212
1213  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1214    ac_prev=dvidir ;;
1215  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1216    dvidir=$ac_optarg ;;
1217
1218  -enable-* | --enable-*)
1219    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1220    # Reject names that are not valid shell variable names.
1221    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222      as_fn_error $? "invalid feature name: $ac_useropt"
1223    ac_useropt_orig=$ac_useropt
1224    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225    case $ac_user_opts in
1226      *"
1227"enable_$ac_useropt"
1228"*) ;;
1229      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1230	 ac_unrecognized_sep=', ';;
1231    esac
1232    eval enable_$ac_useropt=\$ac_optarg ;;
1233
1234  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1235  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1236  | --exec | --exe | --ex)
1237    ac_prev=exec_prefix ;;
1238  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1239  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1240  | --exec=* | --exe=* | --ex=*)
1241    exec_prefix=$ac_optarg ;;
1242
1243  -gas | --gas | --ga | --g)
1244    # Obsolete; use --with-gas.
1245    with_gas=yes ;;
1246
1247  -help | --help | --hel | --he | -h)
1248    ac_init_help=long ;;
1249  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1250    ac_init_help=recursive ;;
1251  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1252    ac_init_help=short ;;
1253
1254  -host | --host | --hos | --ho)
1255    ac_prev=host_alias ;;
1256  -host=* | --host=* | --hos=* | --ho=*)
1257    host_alias=$ac_optarg ;;
1258
1259  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1260    ac_prev=htmldir ;;
1261  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1262  | --ht=*)
1263    htmldir=$ac_optarg ;;
1264
1265  -includedir | --includedir | --includedi | --included | --include \
1266  | --includ | --inclu | --incl | --inc)
1267    ac_prev=includedir ;;
1268  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1269  | --includ=* | --inclu=* | --incl=* | --inc=*)
1270    includedir=$ac_optarg ;;
1271
1272  -infodir | --infodir | --infodi | --infod | --info | --inf)
1273    ac_prev=infodir ;;
1274  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1275    infodir=$ac_optarg ;;
1276
1277  -libdir | --libdir | --libdi | --libd)
1278    ac_prev=libdir ;;
1279  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1280    libdir=$ac_optarg ;;
1281
1282  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1283  | --libexe | --libex | --libe)
1284    ac_prev=libexecdir ;;
1285  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1286  | --libexe=* | --libex=* | --libe=*)
1287    libexecdir=$ac_optarg ;;
1288
1289  -localedir | --localedir | --localedi | --localed | --locale)
1290    ac_prev=localedir ;;
1291  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1292    localedir=$ac_optarg ;;
1293
1294  -localstatedir | --localstatedir | --localstatedi | --localstated \
1295  | --localstate | --localstat | --localsta | --localst | --locals)
1296    ac_prev=localstatedir ;;
1297  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1298  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1299    localstatedir=$ac_optarg ;;
1300
1301  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1302    ac_prev=mandir ;;
1303  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1304    mandir=$ac_optarg ;;
1305
1306  -nfp | --nfp | --nf)
1307    # Obsolete; use --without-fp.
1308    with_fp=no ;;
1309
1310  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1311  | --no-cr | --no-c | -n)
1312    no_create=yes ;;
1313
1314  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1315  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1316    no_recursion=yes ;;
1317
1318  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1319  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1320  | --oldin | --oldi | --old | --ol | --o)
1321    ac_prev=oldincludedir ;;
1322  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1323  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1324  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1325    oldincludedir=$ac_optarg ;;
1326
1327  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1328    ac_prev=prefix ;;
1329  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1330    prefix=$ac_optarg ;;
1331
1332  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1333  | --program-pre | --program-pr | --program-p)
1334    ac_prev=program_prefix ;;
1335  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1336  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1337    program_prefix=$ac_optarg ;;
1338
1339  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1340  | --program-suf | --program-su | --program-s)
1341    ac_prev=program_suffix ;;
1342  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1343  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1344    program_suffix=$ac_optarg ;;
1345
1346  -program-transform-name | --program-transform-name \
1347  | --program-transform-nam | --program-transform-na \
1348  | --program-transform-n | --program-transform- \
1349  | --program-transform | --program-transfor \
1350  | --program-transfo | --program-transf \
1351  | --program-trans | --program-tran \
1352  | --progr-tra | --program-tr | --program-t)
1353    ac_prev=program_transform_name ;;
1354  -program-transform-name=* | --program-transform-name=* \
1355  | --program-transform-nam=* | --program-transform-na=* \
1356  | --program-transform-n=* | --program-transform-=* \
1357  | --program-transform=* | --program-transfor=* \
1358  | --program-transfo=* | --program-transf=* \
1359  | --program-trans=* | --program-tran=* \
1360  | --progr-tra=* | --program-tr=* | --program-t=*)
1361    program_transform_name=$ac_optarg ;;
1362
1363  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1364    ac_prev=pdfdir ;;
1365  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1366    pdfdir=$ac_optarg ;;
1367
1368  -psdir | --psdir | --psdi | --psd | --ps)
1369    ac_prev=psdir ;;
1370  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1371    psdir=$ac_optarg ;;
1372
1373  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1374  | -silent | --silent | --silen | --sile | --sil)
1375    silent=yes ;;
1376
1377  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1378    ac_prev=sbindir ;;
1379  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1380  | --sbi=* | --sb=*)
1381    sbindir=$ac_optarg ;;
1382
1383  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1384  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1385  | --sharedst | --shareds | --shared | --share | --shar \
1386  | --sha | --sh)
1387    ac_prev=sharedstatedir ;;
1388  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1389  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1390  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1391  | --sha=* | --sh=*)
1392    sharedstatedir=$ac_optarg ;;
1393
1394  -site | --site | --sit)
1395    ac_prev=site ;;
1396  -site=* | --site=* | --sit=*)
1397    site=$ac_optarg ;;
1398
1399  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1400    ac_prev=srcdir ;;
1401  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1402    srcdir=$ac_optarg ;;
1403
1404  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1405  | --syscon | --sysco | --sysc | --sys | --sy)
1406    ac_prev=sysconfdir ;;
1407  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1408  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1409    sysconfdir=$ac_optarg ;;
1410
1411  -target | --target | --targe | --targ | --tar | --ta | --t)
1412    ac_prev=target_alias ;;
1413  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1414    target_alias=$ac_optarg ;;
1415
1416  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1417    verbose=yes ;;
1418
1419  -version | --version | --versio | --versi | --vers | -V)
1420    ac_init_version=: ;;
1421
1422  -with-* | --with-*)
1423    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1424    # Reject names that are not valid shell variable names.
1425    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1426      as_fn_error $? "invalid package name: $ac_useropt"
1427    ac_useropt_orig=$ac_useropt
1428    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1429    case $ac_user_opts in
1430      *"
1431"with_$ac_useropt"
1432"*) ;;
1433      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1434	 ac_unrecognized_sep=', ';;
1435    esac
1436    eval with_$ac_useropt=\$ac_optarg ;;
1437
1438  -without-* | --without-*)
1439    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1440    # Reject names that are not valid shell variable names.
1441    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1442      as_fn_error $? "invalid package name: $ac_useropt"
1443    ac_useropt_orig=$ac_useropt
1444    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1445    case $ac_user_opts in
1446      *"
1447"with_$ac_useropt"
1448"*) ;;
1449      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1450	 ac_unrecognized_sep=', ';;
1451    esac
1452    eval with_$ac_useropt=no ;;
1453
1454  --x)
1455    # Obsolete; use --with-x.
1456    with_x=yes ;;
1457
1458  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1459  | --x-incl | --x-inc | --x-in | --x-i)
1460    ac_prev=x_includes ;;
1461  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1462  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1463    x_includes=$ac_optarg ;;
1464
1465  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1466  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1467    ac_prev=x_libraries ;;
1468  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1469  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1470    x_libraries=$ac_optarg ;;
1471
1472  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1473Try \`$0 --help' for more information"
1474    ;;
1475
1476  *=*)
1477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1478    # Reject names that are not valid shell variable names.
1479    case $ac_envvar in #(
1480      '' | [0-9]* | *[!_$as_cr_alnum]* )
1481      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1482    esac
1483    eval $ac_envvar=\$ac_optarg
1484    export $ac_envvar ;;
1485
1486  *)
1487    # FIXME: should be removed in autoconf 3.0.
1488    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1490      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1491    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1492    ;;
1493
1494  esac
1495done
1496
1497if test -n "$ac_prev"; then
1498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1499  as_fn_error $? "missing argument to $ac_option"
1500fi
1501
1502if test -n "$ac_unrecognized_opts"; then
1503  case $enable_option_checking in
1504    no) ;;
1505    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1506    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1507  esac
1508fi
1509
1510# Check all directory arguments for consistency.
1511for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1512		datadir sysconfdir sharedstatedir localstatedir includedir \
1513		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1514		libdir localedir mandir
1515do
1516  eval ac_val=\$$ac_var
1517  # Remove trailing slashes.
1518  case $ac_val in
1519    */ )
1520      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1521      eval $ac_var=\$ac_val;;
1522  esac
1523  # Be sure to have absolute directory names.
1524  case $ac_val in
1525    [\\/$]* | ?:[\\/]* )  continue;;
1526    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1527  esac
1528  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1529done
1530
1531# There might be people who depend on the old broken behavior: `$host'
1532# used to hold the argument of --host etc.
1533# FIXME: To remove some day.
1534build=$build_alias
1535host=$host_alias
1536target=$target_alias
1537
1538# FIXME: To remove some day.
1539if test "x$host_alias" != x; then
1540  if test "x$build_alias" = x; then
1541    cross_compiling=maybe
1542  elif test "x$build_alias" != "x$host_alias"; then
1543    cross_compiling=yes
1544  fi
1545fi
1546
1547ac_tool_prefix=
1548test -n "$host_alias" && ac_tool_prefix=$host_alias-
1549
1550test "$silent" = yes && exec 6>/dev/null
1551
1552
1553ac_pwd=`pwd` && test -n "$ac_pwd" &&
1554ac_ls_di=`ls -di .` &&
1555ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1556  as_fn_error $? "working directory cannot be determined"
1557test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1558  as_fn_error $? "pwd does not report name of working directory"
1559
1560
1561# Find the source files, if location was not specified.
1562if test -z "$srcdir"; then
1563  ac_srcdir_defaulted=yes
1564  # Try the directory containing this script, then the parent directory.
1565  ac_confdir=`$as_dirname -- "$as_myself" ||
1566$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1567	 X"$as_myself" : 'X\(//\)[^/]' \| \
1568	 X"$as_myself" : 'X\(//\)$' \| \
1569	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1570$as_echo X"$as_myself" |
1571    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1572	    s//\1/
1573	    q
1574	  }
1575	  /^X\(\/\/\)[^/].*/{
1576	    s//\1/
1577	    q
1578	  }
1579	  /^X\(\/\/\)$/{
1580	    s//\1/
1581	    q
1582	  }
1583	  /^X\(\/\).*/{
1584	    s//\1/
1585	    q
1586	  }
1587	  s/.*/./; q'`
1588  srcdir=$ac_confdir
1589  if test ! -r "$srcdir/$ac_unique_file"; then
1590    srcdir=..
1591  fi
1592else
1593  ac_srcdir_defaulted=no
1594fi
1595if test ! -r "$srcdir/$ac_unique_file"; then
1596  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1597  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1598fi
1599ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1600ac_abs_confdir=`(
1601	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1602	pwd)`
1603# When building in place, set srcdir=.
1604if test "$ac_abs_confdir" = "$ac_pwd"; then
1605  srcdir=.
1606fi
1607# Remove unnecessary trailing slashes from srcdir.
1608# Double slashes in file names in object file debugging info
1609# mess up M-x gdb in Emacs.
1610case $srcdir in
1611*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1612esac
1613for ac_var in $ac_precious_vars; do
1614  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1615  eval ac_env_${ac_var}_value=\$${ac_var}
1616  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1617  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1618done
1619
1620#
1621# Report the --help message.
1622#
1623if test "$ac_init_help" = "long"; then
1624  # Omit some internal or obsolete options to make the list less imposing.
1625  # This message is too long to be a string in the A/UX 3.1 sh.
1626  cat <<_ACEOF
1627\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1628
1629Usage: $0 [OPTION]... [VAR=VALUE]...
1630
1631To assign environment variables (e.g., CC, CFLAGS...), specify them as
1632VAR=VALUE.  See below for descriptions of some of the useful variables.
1633
1634Defaults for the options are specified in brackets.
1635
1636Configuration:
1637  -h, --help              display this help and exit
1638      --help=short        display options specific to this package
1639      --help=recursive    display the short help of all the included packages
1640  -V, --version           display version information and exit
1641  -q, --quiet, --silent   do not print \`checking ...' messages
1642      --cache-file=FILE   cache test results in FILE [disabled]
1643  -C, --config-cache      alias for \`--cache-file=config.cache'
1644  -n, --no-create         do not create output files
1645      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1646
1647Installation directories:
1648  --prefix=PREFIX         install architecture-independent files in PREFIX
1649                          [$ac_default_prefix]
1650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1651                          [PREFIX]
1652
1653By default, \`make install' will install all the files in
1654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1656for instance \`--prefix=\$HOME'.
1657
1658For better control, use the options below.
1659
1660Fine tuning of the installation directories:
1661  --bindir=DIR            user executables [EPREFIX/bin]
1662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1663  --libexecdir=DIR        program executables [EPREFIX/libexec]
1664  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1665  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1666  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1667  --libdir=DIR            object code libraries [EPREFIX/lib]
1668  --includedir=DIR        C header files [PREFIX/include]
1669  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1670  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1671  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1672  --infodir=DIR           info documentation [DATAROOTDIR/info]
1673  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1674  --mandir=DIR            man documentation [DATAROOTDIR/man]
1675  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1676  --htmldir=DIR           html documentation [DOCDIR]
1677  --dvidir=DIR            dvi documentation [DOCDIR]
1678  --pdfdir=DIR            pdf documentation [DOCDIR]
1679  --psdir=DIR             ps documentation [DOCDIR]
1680_ACEOF
1681
1682  cat <<\_ACEOF
1683
1684X features:
1685  --x-includes=DIR    X include files are in DIR
1686  --x-libraries=DIR   X library files are in DIR
1687
1688System types:
1689  --build=BUILD     configure for building on BUILD [guessed]
1690  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1691  --target=TARGET   configure for building compilers for TARGET [HOST]
1692_ACEOF
1693fi
1694
1695if test -n "$ac_init_help"; then
1696  case $ac_init_help in
1697     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1698   esac
1699  cat <<\_ACEOF
1700
1701Optional Features:
1702  --disable-option-checking  ignore unrecognized --enable/--with options
1703  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1704  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1705  --enable-openjdk-only   suppress building custom source even if present
1706                          [disabled]
1707  --enable-debug          set the debug level to fastdebug (shorthand for
1708                          --with-debug-level=fastdebug) [disabled]
1709  --disable-headful       disable building headful support (graphical UI
1710                          support) [enabled]
1711  --enable-hotspot-test-in-build
1712                          run the Queens test after Hotspot build [disabled]
1713  --enable-unlimited-crypto
1714                          Enable unlimited crypto policy [disabled]
1715  --disable-debug-symbols disable generation of debug symbols [enabled]
1716  --disable-zip-debug-info
1717                          disable zipping of debug-info files [enabled]
1718  --disable-macosx-runtime-support
1719                          disable the use of MacOSX Java runtime support
1720                          framework [enabled]
1721  --enable-sjavac         use sjavac to do fast incremental compiles
1722                          [disabled]
1723  --disable-precompiled-headers
1724                          disable using precompiled headers when compiling C++
1725                          [enabled]
1726  --disable-ccache        disable using ccache to speed up recompilations
1727                          [enabled]
1728
1729Optional Packages:
1730  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1731  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1732  --with-custom-make-dir  use this directory for custom build/make files
1733  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1734                          support it), e.g. --with-target-bits=32 [guessed]
1735  --with-sys-root         pass this sys-root to the compilers and tools (for
1736                          cross-compiling)
1737  --with-tools-dir        search this directory for compilers and tools (for
1738                          cross-compiling)
1739  --with-devkit           use this directory as base for tools-dir and
1740                          sys-root (for cross-compiling)
1741  --with-jdk-variant      JDK variant to build (normal) [normal]
1742  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1743                          client, minimal1, kernel, zero, zeroshark) [server]
1744  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1745                          [release]
1746  --with-conf-name        use this as the name of the configuration [generated
1747                          from important configuration options]
1748  --with-builddeps-conf   use this configuration file for the builddeps
1749  --with-builddeps-server download and use build dependencies from this server
1750                          url
1751  --with-builddeps-dir    store downloaded build dependencies here
1752                          [/localhome/builddeps]
1753  --with-builddeps-group  chgrp the downloaded build dependencies to this
1754                          group
1755  --with-cacerts-file     specify alternative cacerts file
1756  --with-milestone        Set milestone value for build [internal]
1757  --with-update-version   Set update version value for build [b00]
1758  --with-user-release-suffix
1759                          Add a custom string to the version string if build
1760                          number isn't set.[username_builddateb00]
1761  --with-build-number     Set build number value for build [b00]
1762  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1763  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1764                          invocations of the Boot JDK, overriding the default
1765                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1766                          -enableassertions"
1767  --with-add-source-root  for each and every source directory, look in this
1768                          additional source root for the same directory; if it
1769                          exists and have files in it, include it in the build
1770  --with-override-source-root
1771                          for each and every source directory, look in this
1772                          override source root for the same directory; if it
1773                          exists, use that directory instead and ignore the
1774                          directory in the original source root
1775  --with-adds-and-overrides
1776                          use the subdirs 'adds' and 'overrides' in the
1777                          specified directory as add-source-root and
1778                          override-source-root
1779  --with-override-langtools
1780                          use this langtools dir for the build
1781  --with-override-corba   use this corba dir for the build
1782  --with-override-jaxp    use this jaxp dir for the build
1783  --with-override-jaxws   use this jaxws dir for the build
1784  --with-override-hotspot use this hotspot dir for the build
1785  --with-override-nashorn use this nashorn dir for the build
1786  --with-override-jdk     use this jdk dir for the build
1787  --with-import-hotspot   import hotspot binaries from this jdk image or
1788                          hotspot build dist dir instead of building from
1789                          source
1790  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1791                          only) [probed]
1792  --with-dxsdk            Deprecated. Option is kept for backwards
1793                          compatibility and is ignored
1794  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1795                          compatibility and is ignored
1796  --with-dxsdk-include    Deprecated. Option is kept for backwards
1797                          compatibility and is ignored
1798  --with-jtreg            Regression Test Harness [probed]
1799  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1800  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1801  --with-extra-ldflags    extra flags to be used when linking jdk
1802  --with-x                use the X Window System
1803  --with-cups             specify prefix directory for the cups package
1804                          (expecting the headers under PATH/include)
1805  --with-cups-include     specify directory for the cups include files
1806  --with-freetype         specify prefix directory for the freetype2 package
1807                          (expecting the libraries under PATH/lib and the
1808                          headers under PATH/include)
1809  --with-alsa             specify prefix directory for the alsa package
1810                          (expecting the libraries under PATH/lib and the
1811                          headers under PATH/include)
1812  --with-alsa-include     specify directory for the alsa include files
1813  --with-alsa-lib         specify directory for the alsa library
1814  --with-giflib           use giflib from build system or OpenJDK source
1815                          (system, bundled) [bundled]
1816  --with-zlib             use zlib from build system or OpenJDK source
1817                          (system, bundled) [bundled]
1818  --with-stdc++lib=<static>,<dynamic>,<default>
1819                          force linking of the C++ runtime on Linux to either
1820                          static or dynamic, default is static with dynamic as
1821                          fallback
1822  --with-num-cores        number of cores in the build system, e.g.
1823                          --with-num-cores=8 [probed]
1824  --with-memory-size      memory (in MB) available in the build system, e.g.
1825                          --with-memory-size=1024 [probed]
1826  --with-jobs             number of parallel jobs to let make run [calculated
1827                          based on cores and memory]
1828  --with-sjavac-server-java
1829                          use this java binary for running the sjavac
1830                          background server [Boot JDK java]
1831  --with-ccache-dir       where to store ccache files [~/.ccache]
1832
1833Some influential environment variables:
1834  PKG_CONFIG  path to pkg-config utility
1835  CC          C compiler command
1836  CFLAGS      C compiler flags
1837  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1838              nonstandard directory <lib dir>
1839  LIBS        libraries to pass to the linker, e.g. -l<library>
1840  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1841              you have headers in a nonstandard directory <include dir>
1842  CXX         C++ compiler command
1843  CXXFLAGS    C++ compiler flags
1844  OBJC        Objective C compiler command
1845  OBJCFLAGS   Objective C compiler flags
1846  CPP         C preprocessor
1847  CXXCPP      C++ preprocessor
1848  XMKMF       Path to xmkmf, Makefile generator for X Window System
1849  FREETYPE2_CFLAGS
1850              C compiler flags for FREETYPE2, overriding pkg-config
1851  FREETYPE2_LIBS
1852              linker flags for FREETYPE2, overriding pkg-config
1853  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1854  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1855  LIBFFI_CFLAGS
1856              C compiler flags for LIBFFI, overriding pkg-config
1857  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1858
1859Use these variables to override the choices made by `configure' or to help
1860it to find libraries and programs with nonstandard names/locations.
1861
1862Report bugs to <build-dev@openjdk.java.net>.
1863OpenJDK home page: <http://openjdk.java.net>.
1864_ACEOF
1865ac_status=$?
1866fi
1867
1868if test "$ac_init_help" = "recursive"; then
1869  # If there are subdirs, report their specific --help.
1870  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1871    test -d "$ac_dir" ||
1872      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1873      continue
1874    ac_builddir=.
1875
1876case "$ac_dir" in
1877.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1878*)
1879  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1880  # A ".." for each directory in $ac_dir_suffix.
1881  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1882  case $ac_top_builddir_sub in
1883  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1885  esac ;;
1886esac
1887ac_abs_top_builddir=$ac_pwd
1888ac_abs_builddir=$ac_pwd$ac_dir_suffix
1889# for backward compatibility:
1890ac_top_builddir=$ac_top_build_prefix
1891
1892case $srcdir in
1893  .)  # We are building in place.
1894    ac_srcdir=.
1895    ac_top_srcdir=$ac_top_builddir_sub
1896    ac_abs_top_srcdir=$ac_pwd ;;
1897  [\\/]* | ?:[\\/]* )  # Absolute name.
1898    ac_srcdir=$srcdir$ac_dir_suffix;
1899    ac_top_srcdir=$srcdir
1900    ac_abs_top_srcdir=$srcdir ;;
1901  *) # Relative name.
1902    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1903    ac_top_srcdir=$ac_top_build_prefix$srcdir
1904    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1905esac
1906ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1907
1908    cd "$ac_dir" || { ac_status=$?; continue; }
1909    # Check for guested configure.
1910    if test -f "$ac_srcdir/configure.gnu"; then
1911      echo &&
1912      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1913    elif test -f "$ac_srcdir/configure"; then
1914      echo &&
1915      $SHELL "$ac_srcdir/configure" --help=recursive
1916    else
1917      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1918    fi || ac_status=$?
1919    cd "$ac_pwd" || { ac_status=$?; break; }
1920  done
1921fi
1922
1923test -n "$ac_init_help" && exit $ac_status
1924if $ac_init_version; then
1925  cat <<\_ACEOF
1926OpenJDK configure jdk8
1927generated by GNU Autoconf 2.69
1928
1929Copyright (C) 2012 Free Software Foundation, Inc.
1930This configure script is free software; the Free Software Foundation
1931gives unlimited permission to copy, distribute and modify it.
1932_ACEOF
1933  exit
1934fi
1935
1936## ------------------------ ##
1937## Autoconf initialization. ##
1938## ------------------------ ##
1939
1940# ac_fn_c_try_compile LINENO
1941# --------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_c_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_c_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_c_try_compile
1977
1978# ac_fn_cxx_try_compile LINENO
1979# ----------------------------
1980# Try to compile conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_cxx_try_compile ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  rm -f conftest.$ac_objext
1985  if { { ac_try="$ac_compile"
1986case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_compile") 2>conftest.err
1993  ac_status=$?
1994  if test -s conftest.err; then
1995    grep -v '^ *+' conftest.err >conftest.er1
1996    cat conftest.er1 >&5
1997    mv -f conftest.er1 conftest.err
1998  fi
1999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000  test $ac_status = 0; } && {
2001	 test -z "$ac_cxx_werror_flag" ||
2002	 test ! -s conftest.err
2003       } && test -s conftest.$ac_objext; then :
2004  ac_retval=0
2005else
2006  $as_echo "$as_me: failed program was:" >&5
2007sed 's/^/| /' conftest.$ac_ext >&5
2008
2009	ac_retval=1
2010fi
2011  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012  as_fn_set_status $ac_retval
2013
2014} # ac_fn_cxx_try_compile
2015
2016# ac_fn_objc_try_compile LINENO
2017# -----------------------------
2018# Try to compile conftest.$ac_ext, and return whether this succeeded.
2019ac_fn_objc_try_compile ()
2020{
2021  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022  rm -f conftest.$ac_objext
2023  if { { ac_try="$ac_compile"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_compile") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } && {
2039	 test -z "$ac_objc_werror_flag" ||
2040	 test ! -s conftest.err
2041       } && test -s conftest.$ac_objext; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047	ac_retval=1
2048fi
2049  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_objc_try_compile
2053
2054# ac_fn_c_try_cpp LINENO
2055# ----------------------
2056# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2057ac_fn_c_try_cpp ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if { { ac_try="$ac_cpp conftest.$ac_ext"
2061case "(($ac_try" in
2062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063  *) ac_try_echo=$ac_try;;
2064esac
2065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066$as_echo "$ac_try_echo"; } >&5
2067  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2068  ac_status=$?
2069  if test -s conftest.err; then
2070    grep -v '^ *+' conftest.err >conftest.er1
2071    cat conftest.er1 >&5
2072    mv -f conftest.er1 conftest.err
2073  fi
2074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075  test $ac_status = 0; } > conftest.i && {
2076	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2077	 test ! -s conftest.err
2078       }; then :
2079  ac_retval=0
2080else
2081  $as_echo "$as_me: failed program was:" >&5
2082sed 's/^/| /' conftest.$ac_ext >&5
2083
2084    ac_retval=1
2085fi
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087  as_fn_set_status $ac_retval
2088
2089} # ac_fn_c_try_cpp
2090
2091# ac_fn_cxx_try_cpp LINENO
2092# ------------------------
2093# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2094ac_fn_cxx_try_cpp ()
2095{
2096  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097  if { { ac_try="$ac_cpp conftest.$ac_ext"
2098case "(($ac_try" in
2099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2100  *) ac_try_echo=$ac_try;;
2101esac
2102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2103$as_echo "$ac_try_echo"; } >&5
2104  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2105  ac_status=$?
2106  if test -s conftest.err; then
2107    grep -v '^ *+' conftest.err >conftest.er1
2108    cat conftest.er1 >&5
2109    mv -f conftest.er1 conftest.err
2110  fi
2111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2112  test $ac_status = 0; } > conftest.i && {
2113	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2114	 test ! -s conftest.err
2115       }; then :
2116  ac_retval=0
2117else
2118  $as_echo "$as_me: failed program was:" >&5
2119sed 's/^/| /' conftest.$ac_ext >&5
2120
2121    ac_retval=1
2122fi
2123  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2124  as_fn_set_status $ac_retval
2125
2126} # ac_fn_cxx_try_cpp
2127
2128# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2129# ---------------------------------------------------------
2130# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2131# the include files in INCLUDES and setting the cache variable VAR
2132# accordingly.
2133ac_fn_cxx_check_header_mongrel ()
2134{
2135  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136  if eval \${$3+:} false; then :
2137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2138$as_echo_n "checking for $2... " >&6; }
2139if eval \${$3+:} false; then :
2140  $as_echo_n "(cached) " >&6
2141fi
2142eval ac_res=\$$3
2143	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2144$as_echo "$ac_res" >&6; }
2145else
2146  # Is the header compilable?
2147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2148$as_echo_n "checking $2 usability... " >&6; }
2149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h.  */
2151$4
2152#include <$2>
2153_ACEOF
2154if ac_fn_cxx_try_compile "$LINENO"; then :
2155  ac_header_compiler=yes
2156else
2157  ac_header_compiler=no
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2161$as_echo "$ac_header_compiler" >&6; }
2162
2163# Is the header present?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2165$as_echo_n "checking $2 presence... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168#include <$2>
2169_ACEOF
2170if ac_fn_cxx_try_cpp "$LINENO"; then :
2171  ac_header_preproc=yes
2172else
2173  ac_header_preproc=no
2174fi
2175rm -f conftest.err conftest.i conftest.$ac_ext
2176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2177$as_echo "$ac_header_preproc" >&6; }
2178
2179# So?  What about this header?
2180case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2181  yes:no: )
2182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2183$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2185$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2186    ;;
2187  no:yes:* )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2189$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2191$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2193$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2195$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2197$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2198( $as_echo "## ----------------------------------------- ##
2199## Report this to build-dev@openjdk.java.net ##
2200## ----------------------------------------- ##"
2201     ) | sed "s/^/$as_me: WARNING:     /" >&2
2202    ;;
2203esac
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval \${$3+:} false; then :
2207  $as_echo_n "(cached) " >&6
2208else
2209  eval "$3=\$ac_header_compiler"
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216
2217} # ac_fn_cxx_check_header_mongrel
2218
2219# ac_fn_cxx_try_run LINENO
2220# ------------------------
2221# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2222# that executables *can* be run.
2223ac_fn_cxx_try_run ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if { { ac_try="$ac_link"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_link") 2>&5
2234  ac_status=$?
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2237  { { case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_try") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; }; }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: program exited with status $ac_status" >&5
2250       $as_echo "$as_me: failed program was:" >&5
2251sed 's/^/| /' conftest.$ac_ext >&5
2252
2253       ac_retval=$ac_status
2254fi
2255  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_cxx_try_run
2260
2261# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2262# ---------------------------------------------------------
2263# Tests whether HEADER exists and can be compiled using the include files in
2264# INCLUDES, setting the cache variable VAR accordingly.
2265ac_fn_cxx_check_header_compile ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2269$as_echo_n "checking for $2... " >&6; }
2270if eval \${$3+:} false; then :
2271  $as_echo_n "(cached) " >&6
2272else
2273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h.  */
2275$4
2276#include <$2>
2277_ACEOF
2278if ac_fn_cxx_try_compile "$LINENO"; then :
2279  eval "$3=yes"
2280else
2281  eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_cxx_check_header_compile
2291
2292# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2293# ----------------------------------------------
2294# Tries to find the compile-time value of EXPR in a program that includes
2295# INCLUDES, setting VAR accordingly. Returns whether the value could be
2296# computed
2297ac_fn_cxx_compute_int ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if test "$cross_compiling" = yes; then
2301    # Depending upon the size, compute the lo and hi bounds.
2302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) >= 0)];
2309test_array [0] = 0;
2310return test_array [0];
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_lo=0 ac_mid=0
2318  while :; do
2319    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid; break
2335else
2336  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2337			if test $ac_lo -le $ac_mid; then
2338			  ac_lo= ac_hi=
2339			  break
2340			fi
2341			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344  done
2345else
2346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h.  */
2348$4
2349int
2350main ()
2351{
2352static int test_array [1 - 2 * !(($2) < 0)];
2353test_array [0] = 0;
2354return test_array [0];
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_hi=-1 ac_mid=-1
2362  while :; do
2363    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_lo=$ac_mid; break
2379else
2380  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2381			if test $ac_mid -le $ac_hi; then
2382			  ac_lo= ac_hi=
2383			  break
2384			fi
2385			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388  done
2389else
2390  ac_lo= ac_hi=
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395# Binary search between lo and hi bounds.
2396while test "x$ac_lo" != "x$ac_hi"; do
2397  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401int
2402main ()
2403{
2404static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2405test_array [0] = 0;
2406return test_array [0];
2407
2408  ;
2409  return 0;
2410}
2411_ACEOF
2412if ac_fn_cxx_try_compile "$LINENO"; then :
2413  ac_hi=$ac_mid
2414else
2415  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419case $ac_lo in #((
2420?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2421'') ac_retval=1 ;;
2422esac
2423  else
2424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h.  */
2426$4
2427static long int longval () { return $2; }
2428static unsigned long int ulongval () { return $2; }
2429#include <stdio.h>
2430#include <stdlib.h>
2431int
2432main ()
2433{
2434
2435  FILE *f = fopen ("conftest.val", "w");
2436  if (! f)
2437    return 1;
2438  if (($2) < 0)
2439    {
2440      long int i = longval ();
2441      if (i != ($2))
2442	return 1;
2443      fprintf (f, "%ld", i);
2444    }
2445  else
2446    {
2447      unsigned long int i = ulongval ();
2448      if (i != ($2))
2449	return 1;
2450      fprintf (f, "%lu", i);
2451    }
2452  /* Do not output a trailing newline, as this causes \r\n confusion
2453     on some platforms.  */
2454  return ferror (f) || fclose (f) != 0;
2455
2456  ;
2457  return 0;
2458}
2459_ACEOF
2460if ac_fn_cxx_try_run "$LINENO"; then :
2461  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2462else
2463  ac_retval=1
2464fi
2465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2466  conftest.$ac_objext conftest.beam conftest.$ac_ext
2467rm -f conftest.val
2468
2469  fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_compute_int
2474
2475# ac_fn_cxx_try_link LINENO
2476# -------------------------
2477# Try to link conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_cxx_try_link ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  rm -f conftest.$ac_objext conftest$ac_exeext
2482  if { { ac_try="$ac_link"
2483case "(($ac_try" in
2484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2485  *) ac_try_echo=$ac_try;;
2486esac
2487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2488$as_echo "$ac_try_echo"; } >&5
2489  (eval "$ac_link") 2>conftest.err
2490  ac_status=$?
2491  if test -s conftest.err; then
2492    grep -v '^ *+' conftest.err >conftest.er1
2493    cat conftest.er1 >&5
2494    mv -f conftest.er1 conftest.err
2495  fi
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && {
2498	 test -z "$ac_cxx_werror_flag" ||
2499	 test ! -s conftest.err
2500       } && test -s conftest$ac_exeext && {
2501	 test "$cross_compiling" = yes ||
2502	 test -x conftest$ac_exeext
2503       }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: failed program was:" >&5
2507sed 's/^/| /' conftest.$ac_ext >&5
2508
2509	ac_retval=1
2510fi
2511  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2512  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2513  # interfere with the next link command; also delete a directory that is
2514  # left behind by Apple's compiler.  We do this before executing the actions.
2515  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_cxx_try_link
2520
2521# ac_fn_cxx_check_func LINENO FUNC VAR
2522# ------------------------------------
2523# Tests whether FUNC exists, setting the cache variable VAR accordingly
2524ac_fn_cxx_check_func ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2535   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2536#define $2 innocuous_$2
2537
2538/* System header to define __stub macros and hopefully few prototypes,
2539    which can conflict with char $2 (); below.
2540    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2541    <limits.h> exists even on freestanding compilers.  */
2542
2543#ifdef __STDC__
2544# include <limits.h>
2545#else
2546# include <assert.h>
2547#endif
2548
2549#undef $2
2550
2551/* Override any GCC internal prototype to avoid an error.
2552   Use char because int might match the return type of a GCC
2553   builtin and then its argument prototype would still apply.  */
2554#ifdef __cplusplus
2555extern "C"
2556#endif
2557char $2 ();
2558/* The GNU C library defines this for functions which it implements
2559    to always fail with ENOSYS.  Some functions are actually named
2560    something starting with __ and the normal name is an alias.  */
2561#if defined __stub_$2 || defined __stub___$2
2562choke me
2563#endif
2564
2565int
2566main ()
2567{
2568return $2 ();
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_link "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext \
2579    conftest$ac_exeext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_func
2587
2588# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2589# -------------------------------------------------------
2590# Tests whether HEADER exists and can be compiled using the include files in
2591# INCLUDES, setting the cache variable VAR accordingly.
2592ac_fn_c_check_header_compile ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2596$as_echo_n "checking for $2... " >&6; }
2597if eval \${$3+:} false; then :
2598  $as_echo_n "(cached) " >&6
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603#include <$2>
2604_ACEOF
2605if ac_fn_c_try_compile "$LINENO"; then :
2606  eval "$3=yes"
2607else
2608  eval "$3=no"
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2616
2617} # ac_fn_c_check_header_compile
2618cat >config.log <<_ACEOF
2619This file contains any messages produced by compilers while
2620running configure, to aid debugging if configure makes a mistake.
2621
2622It was created by OpenJDK $as_me jdk8, which was
2623generated by GNU Autoconf 2.69.  Invocation command line was
2624
2625  $ $0 $@
2626
2627_ACEOF
2628exec 5>>config.log
2629{
2630cat <<_ASUNAME
2631## --------- ##
2632## Platform. ##
2633## --------- ##
2634
2635hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2636uname -m = `(uname -m) 2>/dev/null || echo unknown`
2637uname -r = `(uname -r) 2>/dev/null || echo unknown`
2638uname -s = `(uname -s) 2>/dev/null || echo unknown`
2639uname -v = `(uname -v) 2>/dev/null || echo unknown`
2640
2641/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2642/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2643
2644/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2645/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2646/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2647/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2648/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2649/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2650/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2651
2652_ASUNAME
2653
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657  IFS=$as_save_IFS
2658  test -z "$as_dir" && as_dir=.
2659    $as_echo "PATH: $as_dir"
2660  done
2661IFS=$as_save_IFS
2662
2663} >&5
2664
2665cat >&5 <<_ACEOF
2666
2667
2668## ----------- ##
2669## Core tests. ##
2670## ----------- ##
2671
2672_ACEOF
2673
2674
2675# Keep a trace of the command line.
2676# Strip out --no-create and --no-recursion so they do not pile up.
2677# Strip out --silent because we don't want to record it for future runs.
2678# Also quote any args containing shell meta-characters.
2679# Make two passes to allow for proper duplicate-argument suppression.
2680ac_configure_args=
2681ac_configure_args0=
2682ac_configure_args1=
2683ac_must_keep_next=false
2684for ac_pass in 1 2
2685do
2686  for ac_arg
2687  do
2688    case $ac_arg in
2689    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2690    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2691    | -silent | --silent | --silen | --sile | --sil)
2692      continue ;;
2693    *\'*)
2694      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2695    esac
2696    case $ac_pass in
2697    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2698    2)
2699      as_fn_append ac_configure_args1 " '$ac_arg'"
2700      if test $ac_must_keep_next = true; then
2701	ac_must_keep_next=false # Got value, back to normal.
2702      else
2703	case $ac_arg in
2704	  *=* | --config-cache | -C | -disable-* | --disable-* \
2705	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2706	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2707	  | -with-* | --with-* | -without-* | --without-* | --x)
2708	    case "$ac_configure_args0 " in
2709	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2710	    esac
2711	    ;;
2712	  -* ) ac_must_keep_next=true ;;
2713	esac
2714      fi
2715      as_fn_append ac_configure_args " '$ac_arg'"
2716      ;;
2717    esac
2718  done
2719done
2720{ ac_configure_args0=; unset ac_configure_args0;}
2721{ ac_configure_args1=; unset ac_configure_args1;}
2722
2723# When interrupted or exit'd, cleanup temporary files, and complete
2724# config.log.  We remove comments because anyway the quotes in there
2725# would cause problems or look ugly.
2726# WARNING: Use '\'' to represent an apostrophe within the trap.
2727# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2728trap 'exit_status=$?
2729  # Save into config.log some information that might help in debugging.
2730  {
2731    echo
2732
2733    $as_echo "## ---------------- ##
2734## Cache variables. ##
2735## ---------------- ##"
2736    echo
2737    # The following way of writing the cache mishandles newlines in values,
2738(
2739  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2740    eval ac_val=\$$ac_var
2741    case $ac_val in #(
2742    *${as_nl}*)
2743      case $ac_var in #(
2744      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2745$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2746      esac
2747      case $ac_var in #(
2748      _ | IFS | as_nl) ;; #(
2749      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2750      *) { eval $ac_var=; unset $ac_var;} ;;
2751      esac ;;
2752    esac
2753  done
2754  (set) 2>&1 |
2755    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2756    *${as_nl}ac_space=\ *)
2757      sed -n \
2758	"s/'\''/'\''\\\\'\'''\''/g;
2759	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2760      ;; #(
2761    *)
2762      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2763      ;;
2764    esac |
2765    sort
2766)
2767    echo
2768
2769    $as_echo "## ----------------- ##
2770## Output variables. ##
2771## ----------------- ##"
2772    echo
2773    for ac_var in $ac_subst_vars
2774    do
2775      eval ac_val=\$$ac_var
2776      case $ac_val in
2777      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778      esac
2779      $as_echo "$ac_var='\''$ac_val'\''"
2780    done | sort
2781    echo
2782
2783    if test -n "$ac_subst_files"; then
2784      $as_echo "## ------------------- ##
2785## File substitutions. ##
2786## ------------------- ##"
2787      echo
2788      for ac_var in $ac_subst_files
2789      do
2790	eval ac_val=\$$ac_var
2791	case $ac_val in
2792	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2793	esac
2794	$as_echo "$ac_var='\''$ac_val'\''"
2795      done | sort
2796      echo
2797    fi
2798
2799    if test -s confdefs.h; then
2800      $as_echo "## ----------- ##
2801## confdefs.h. ##
2802## ----------- ##"
2803      echo
2804      cat confdefs.h
2805      echo
2806    fi
2807    test "$ac_signal" != 0 &&
2808      $as_echo "$as_me: caught signal $ac_signal"
2809    $as_echo "$as_me: exit $exit_status"
2810  } >&5
2811  rm -f core *.core core.conftest.* &&
2812    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2813    exit $exit_status
2814' 0
2815for ac_signal in 1 2 13 15; do
2816  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2817done
2818ac_signal=0
2819
2820# confdefs.h avoids OS command line length limits that DEFS can exceed.
2821rm -f -r conftest* confdefs.h
2822
2823$as_echo "/* confdefs.h */" > confdefs.h
2824
2825# Predefined preprocessor variables.
2826
2827cat >>confdefs.h <<_ACEOF
2828#define PACKAGE_NAME "$PACKAGE_NAME"
2829_ACEOF
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2833_ACEOF
2834
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_VERSION "$PACKAGE_VERSION"
2837_ACEOF
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_STRING "$PACKAGE_STRING"
2841_ACEOF
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_URL "$PACKAGE_URL"
2849_ACEOF
2850
2851
2852# Let the site file select an alternate cache file if it wants to.
2853# Prefer an explicitly selected file to automatically selected ones.
2854ac_site_file1=NONE
2855ac_site_file2=NONE
2856if test -n "$CONFIG_SITE"; then
2857  # We do not want a PATH search for config.site.
2858  case $CONFIG_SITE in #((
2859    -*)  ac_site_file1=./$CONFIG_SITE;;
2860    */*) ac_site_file1=$CONFIG_SITE;;
2861    *)   ac_site_file1=./$CONFIG_SITE;;
2862  esac
2863elif test "x$prefix" != xNONE; then
2864  ac_site_file1=$prefix/share/config.site
2865  ac_site_file2=$prefix/etc/config.site
2866else
2867  ac_site_file1=$ac_default_prefix/share/config.site
2868  ac_site_file2=$ac_default_prefix/etc/config.site
2869fi
2870for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2871do
2872  test "x$ac_site_file" = xNONE && continue
2873  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2874    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2875$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2876    sed 's/^/| /' "$ac_site_file" >&5
2877    . "$ac_site_file" \
2878      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880as_fn_error $? "failed to load site script $ac_site_file
2881See \`config.log' for more details" "$LINENO" 5; }
2882  fi
2883done
2884
2885if test -r "$cache_file"; then
2886  # Some versions of bash will fail to source /dev/null (special files
2887  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2888  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2889    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2890$as_echo "$as_me: loading cache $cache_file" >&6;}
2891    case $cache_file in
2892      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2893      *)                      . "./$cache_file";;
2894    esac
2895  fi
2896else
2897  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2898$as_echo "$as_me: creating cache $cache_file" >&6;}
2899  >$cache_file
2900fi
2901
2902# Check that the precious variables saved in the cache have kept the same
2903# value.
2904ac_cache_corrupted=false
2905for ac_var in $ac_precious_vars; do
2906  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2907  eval ac_new_set=\$ac_env_${ac_var}_set
2908  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2909  eval ac_new_val=\$ac_env_${ac_var}_value
2910  case $ac_old_set,$ac_new_set in
2911    set,)
2912      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2914      ac_cache_corrupted=: ;;
2915    ,set)
2916      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2917$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2918      ac_cache_corrupted=: ;;
2919    ,);;
2920    *)
2921      if test "x$ac_old_val" != "x$ac_new_val"; then
2922	# differences in whitespace do not lead to failure.
2923	ac_old_val_w=`echo x $ac_old_val`
2924	ac_new_val_w=`echo x $ac_new_val`
2925	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2926	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2927$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2928	  ac_cache_corrupted=:
2929	else
2930	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2931$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2932	  eval $ac_var=\$ac_old_val
2933	fi
2934	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2935$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2936	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2937$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2938      fi;;
2939  esac
2940  # Pass precious variables to config.status.
2941  if test "$ac_new_set" = set; then
2942    case $ac_new_val in
2943    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2944    *) ac_arg=$ac_var=$ac_new_val ;;
2945    esac
2946    case " $ac_configure_args " in
2947      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2948      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2949    esac
2950  fi
2951done
2952if $ac_cache_corrupted; then
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2956$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2957  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2958fi
2959## -------------------- ##
2960## Main body of script. ##
2961## -------------------- ##
2962
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
2968
2969
2970
2971ac_aux_dir=
2972for ac_dir in build-aux "$srcdir"/build-aux; do
2973  if test -f "$ac_dir/install-sh"; then
2974    ac_aux_dir=$ac_dir
2975    ac_install_sh="$ac_aux_dir/install-sh -c"
2976    break
2977  elif test -f "$ac_dir/install.sh"; then
2978    ac_aux_dir=$ac_dir
2979    ac_install_sh="$ac_aux_dir/install.sh -c"
2980    break
2981  elif test -f "$ac_dir/shtool"; then
2982    ac_aux_dir=$ac_dir
2983    ac_install_sh="$ac_aux_dir/shtool install -c"
2984    break
2985  fi
2986done
2987if test -z "$ac_aux_dir"; then
2988  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2989fi
2990
2991# These three variables are undocumented and unsupported,
2992# and are intended to be withdrawn in a future Autoconf release.
2993# They can cause serious problems if a builder's source tree is in a directory
2994# whose full name contains unusual characters.
2995ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2996ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2997ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2998
2999
3000# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3001
3002#
3003# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3004# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3005#
3006# This code is free software; you can redistribute it and/or modify it
3007# under the terms of the GNU General Public License version 2 only, as
3008# published by the Free Software Foundation.  Oracle designates this
3009# particular file as subject to the "Classpath" exception as provided
3010# by Oracle in the LICENSE file that accompanied this code.
3011#
3012# This code is distributed in the hope that it will be useful, but WITHOUT
3013# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3014# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3015# version 2 for more details (a copy is included in the LICENSE file that
3016# accompanied this code).
3017#
3018# You should have received a copy of the GNU General Public License version
3019# 2 along with this work; if not, write to the Free Software Foundation,
3020# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3021#
3022# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3023# or visit www.oracle.com if you need additional information or have any
3024# questions.
3025#
3026
3027#
3028# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3029#
3030# This program is free software; you can redistribute it and/or modify
3031# it under the terms of the GNU General Public License as published by
3032# the Free Software Foundation; either version 2 of the License, or
3033# (at your option) any later version.
3034#
3035# This program is distributed in the hope that it will be useful, but
3036# WITHOUT ANY WARRANTY; without even the implied warranty of
3037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3038# General Public License for more details.
3039#
3040# You should have received a copy of the GNU General Public License
3041# along with this program; if not, write to the Free Software
3042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3043#
3044# As a special exception to the GNU General Public License, if you
3045# distribute this file as part of a program that contains a
3046# configuration script generated by Autoconf, you may include it under
3047# the same distribution terms that you use for the rest of that program.
3048
3049# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3050# ----------------------------------
3051# PKG_PROG_PKG_CONFIG
3052
3053# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3054#
3055# Check to see whether a particular set of modules exists.  Similar
3056# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3057#
3058#
3059# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3060# this or PKG_CHECK_MODULES is called, or make sure to call
3061# PKG_CHECK_EXISTS manually
3062# --------------------------------------------------------------
3063
3064
3065
3066# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3067# ---------------------------------------------
3068# _PKG_CONFIG
3069
3070# _PKG_SHORT_ERRORS_SUPPORTED
3071# -----------------------------
3072# _PKG_SHORT_ERRORS_SUPPORTED
3073
3074
3075# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3076# [ACTION-IF-NOT-FOUND])
3077#
3078#
3079# Note that if there is a possibility the first call to
3080# PKG_CHECK_MODULES might not happen, you should be sure to include an
3081# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3082#
3083#
3084# --------------------------------------------------------------
3085# PKG_CHECK_MODULES
3086
3087
3088# Include these first...
3089#
3090# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3092#
3093# This code is free software; you can redistribute it and/or modify it
3094# under the terms of the GNU General Public License version 2 only, as
3095# published by the Free Software Foundation.  Oracle designates this
3096# particular file as subject to the "Classpath" exception as provided
3097# by Oracle in the LICENSE file that accompanied this code.
3098#
3099# This code is distributed in the hope that it will be useful, but WITHOUT
3100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3102# version 2 for more details (a copy is included in the LICENSE file that
3103# accompanied this code).
3104#
3105# You should have received a copy of the GNU General Public License version
3106# 2 along with this work; if not, write to the Free Software Foundation,
3107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3108#
3109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3110# or visit www.oracle.com if you need additional information or have any
3111# questions.
3112#
3113
3114# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3115# If so, then append $1 to $2 \
3116# Also set JVM_ARG_OK to true/false depending on outcome.
3117
3118
3119# Appends a string to a path variable, only adding the : when needed.
3120
3121
3122# This will make sure the given variable points to a full and proper
3123# path. This means:
3124# 1) There will be no spaces in the path. On posix platforms,
3125#    spaces in the path will result in an error. On Windows,
3126#    the path will be rewritten using short-style to be space-free.
3127# 2) The path will be absolute, and it will be in unix-style (on
3128#     cygwin).
3129# $1: The name of the variable to fix
3130
3131
3132# This will make sure the given variable points to a executable
3133# with a full and proper path. This means:
3134# 1) There will be no spaces in the path. On posix platforms,
3135#    spaces in the path will result in an error. On Windows,
3136#    the path will be rewritten using short-style to be space-free.
3137# 2) The path will be absolute, and it will be in unix-style (on
3138#     cygwin).
3139# Any arguments given to the executable is preserved.
3140# If the input variable does not have a directory specification, then
3141# it need to be in the PATH.
3142# $1: The name of the variable to fix
3143
3144
3145
3146
3147# Register a --with argument but mark it as deprecated
3148# $1: The name of the with argument to deprecate, not including --with-
3149
3150
3151
3152
3153# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3154# $1: variable to check
3155# $2: executable name to print in warning (optional)
3156
3157
3158# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3159# Arguments as AC_PATH_PROG:
3160# $1: variable to set
3161# $2: executable name to look for
3162
3163
3164# Setup the most fundamental tools that relies on not much else to set up,
3165# but is used by much of the early bootstrap code.
3166
3167
3168# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3169
3170
3171
3172
3173
3174
3175
3176#%%% Simple tools %%%
3177
3178# Check if we have found a usable version of make
3179# $1: the path to a potential make binary (or empty)
3180# $2: the description on how we found this
3181
3182
3183# Goes looking for a usable version of GNU make.
3184
3185
3186
3187
3188
3189
3190# Check if build directory is on local disk. If not possible to determine,
3191# we prefer to claim it's local.
3192# Argument 1: directory to test
3193# Argument 2: what to do if it is on local disk
3194# Argument 3: what to do otherwise (remote disk or failure)
3195
3196
3197# Check that source files have basic read permissions set. This might
3198# not be the case in cygwin in certain conditions.
3199
3200
3201
3202
3203#
3204# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3205# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3206#
3207# This code is free software; you can redistribute it and/or modify it
3208# under the terms of the GNU General Public License version 2 only, as
3209# published by the Free Software Foundation.  Oracle designates this
3210# particular file as subject to the "Classpath" exception as provided
3211# by Oracle in the LICENSE file that accompanied this code.
3212#
3213# This code is distributed in the hope that it will be useful, but WITHOUT
3214# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3215# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3216# version 2 for more details (a copy is included in the LICENSE file that
3217# accompanied this code).
3218#
3219# You should have received a copy of the GNU General Public License version
3220# 2 along with this work; if not, write to the Free Software Foundation,
3221# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3222#
3223# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3224# or visit www.oracle.com if you need additional information or have any
3225# questions.
3226#
3227
3228
3229
3230
3231
3232# Helper function which possibly converts a path using DOS-style short mode.
3233# If so, the updated path is stored in $new_path.
3234# $1: The path to check
3235
3236
3237# Helper function which possibly converts a path using DOS-style short mode.
3238# If so, the updated path is stored in $new_path.
3239# $1: The path to check
3240
3241
3242# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3243# and could probably be heavily simplified. However, all changes in this
3244# area tend to need lot of testing in different scenarios, and in lack of
3245# proper unit testing, cleaning this up has not been deemed worth the effort
3246# at the moment.
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3257
3258
3259
3260
3261#
3262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296# ... then the rest
3297#
3298# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3299# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3300#
3301# This code is free software; you can redistribute it and/or modify it
3302# under the terms of the GNU General Public License version 2 only, as
3303# published by the Free Software Foundation.  Oracle designates this
3304# particular file as subject to the "Classpath" exception as provided
3305# by Oracle in the LICENSE file that accompanied this code.
3306#
3307# This code is distributed in the hope that it will be useful, but WITHOUT
3308# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3309# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3310# version 2 for more details (a copy is included in the LICENSE file that
3311# accompanied this code).
3312#
3313# You should have received a copy of the GNU General Public License version
3314# 2 along with this work; if not, write to the Free Software Foundation,
3315# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3316#
3317# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3318# or visit www.oracle.com if you need additional information or have any
3319# questions.
3320#
3321
3322# Execute the check given as argument, and verify the result
3323# If the Boot JDK was previously found, do nothing
3324# $1 A command line (typically autoconf macro) to execute
3325
3326
3327# Test: Is bootjdk explicitely set by command line arguments?
3328
3329
3330# Test: Is bootjdk available from builddeps?
3331
3332
3333# Test: Is $JAVA_HOME set?
3334
3335
3336# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3337
3338
3339# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3340
3341
3342# Look for a jdk in the given path. If there are multiple, try to select the newest.
3343# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3344# $1 = Path to directory containing jdk installations.
3345# $2 = String to append to the found JDK directory to get the proper JDK home
3346
3347
3348# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3349# environmental variable as base for where to look.
3350# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3351
3352
3353# Test: Is there a JDK installed in default, well-known locations?
3354
3355
3356# Check that a command-line tool in the Boot JDK is correct
3357# $1 = name of variable to assign
3358# $2 = name of binary
3359
3360
3361###############################################################################
3362#
3363# We need a Boot JDK to bootstrap the build.
3364#
3365
3366
3367
3368
3369
3370#
3371# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3373#
3374# This code is free software; you can redistribute it and/or modify it
3375# under the terms of the GNU General Public License version 2 only, as
3376# published by the Free Software Foundation.  Oracle designates this
3377# particular file as subject to the "Classpath" exception as provided
3378# by Oracle in the LICENSE file that accompanied this code.
3379#
3380# This code is distributed in the hope that it will be useful, but WITHOUT
3381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3383# version 2 for more details (a copy is included in the LICENSE file that
3384# accompanied this code).
3385#
3386# You should have received a copy of the GNU General Public License version
3387# 2 along with this work; if not, write to the Free Software Foundation,
3388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3389#
3390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3391# or visit www.oracle.com if you need additional information or have any
3392# questions.
3393#
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414#
3415# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3416# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3417#
3418# This code is free software; you can redistribute it and/or modify it
3419# under the terms of the GNU General Public License version 2 only, as
3420# published by the Free Software Foundation.  Oracle designates this
3421# particular file as subject to the "Classpath" exception as provided
3422# by Oracle in the LICENSE file that accompanied this code.
3423#
3424# This code is distributed in the hope that it will be useful, but WITHOUT
3425# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3426# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3427# version 2 for more details (a copy is included in the LICENSE file that
3428# accompanied this code).
3429#
3430# You should have received a copy of the GNU General Public License version
3431# 2 along with this work; if not, write to the Free Software Foundation,
3432# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3433#
3434# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3435# or visit www.oracle.com if you need additional information or have any
3436# questions.
3437#
3438
3439
3440
3441
3442
3443cygwin_help() {
3444  case $1 in
3445    unzip)
3446      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3447    zip)
3448      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3449    make)
3450      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3451    * )
3452      break ;;
3453  esac
3454}
3455
3456apt_help() {
3457  case $1 in
3458    devkit)
3459      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3460    openjdk)
3461      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3462    alsa)
3463      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3464    cups)
3465      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3466    freetype2)
3467      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3468    pulse)
3469      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3470    x11)
3471      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3472    ccache)
3473      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3474    * )
3475      break ;;
3476  esac
3477}
3478
3479yum_help() {
3480  case $1 in
3481    devkit)
3482      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3483    openjdk)
3484      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3485    alsa)
3486      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3487    cups)
3488      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3489    freetype2)
3490      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3491    pulse)
3492      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3493    x11)
3494      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3495    ccache)
3496      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3497    * )
3498      break ;;
3499  esac
3500}
3501
3502port_help() {
3503  PKGHANDLER_COMMAND=""
3504}
3505
3506pkgutil_help() {
3507  PKGHANDLER_COMMAND=""
3508}
3509
3510pkgadd_help() {
3511  PKGHANDLER_COMMAND=""
3512}
3513
3514
3515
3516#
3517# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3518# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3519#
3520# This code is free software; you can redistribute it and/or modify it
3521# under the terms of the GNU General Public License version 2 only, as
3522# published by the Free Software Foundation.  Oracle designates this
3523# particular file as subject to the "Classpath" exception as provided
3524# by Oracle in the LICENSE file that accompanied this code.
3525#
3526# This code is distributed in the hope that it will be useful, but WITHOUT
3527# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3528# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3529# version 2 for more details (a copy is included in the LICENSE file that
3530# accompanied this code).
3531#
3532# You should have received a copy of the GNU General Public License version
3533# 2 along with this work; if not, write to the Free Software Foundation,
3534# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3535#
3536# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3537# or visit www.oracle.com if you need additional information or have any
3538# questions.
3539#
3540
3541
3542
3543
3544
3545
3546
3547
3548###############################################################################
3549#
3550# Should we build only OpenJDK even if closed sources are present?
3551#
3552
3553
3554
3555
3556###############################################################################
3557#
3558# Setup version numbers
3559#
3560
3561
3562
3563
3564
3565
3566# Support for customization of the build process. Some build files
3567# will include counterparts from this location, if they exist. This allows
3568# for a degree of customization of the build targets and the rules/recipes
3569# to create them
3570
3571# Check whether --with-custom-make-dir was given.
3572if test "${with_custom_make_dir+set}" = set; then :
3573  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3574fi
3575
3576
3577
3578#
3579# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581#
3582# This code is free software; you can redistribute it and/or modify it
3583# under the terms of the GNU General Public License version 2 only, as
3584# published by the Free Software Foundation.  Oracle designates this
3585# particular file as subject to the "Classpath" exception as provided
3586# by Oracle in the LICENSE file that accompanied this code.
3587#
3588# This code is distributed in the hope that it will be useful, but WITHOUT
3589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591# version 2 for more details (a copy is included in the LICENSE file that
3592# accompanied this code).
3593#
3594# You should have received a copy of the GNU General Public License version
3595# 2 along with this work; if not, write to the Free Software Foundation,
3596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597#
3598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599# or visit www.oracle.com if you need additional information or have any
3600# questions.
3601#
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617#
3618# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3619# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3620#
3621# This code is free software; you can redistribute it and/or modify it
3622# under the terms of the GNU General Public License version 2 only, as
3623# published by the Free Software Foundation.  Oracle designates this
3624# particular file as subject to the "Classpath" exception as provided
3625# by Oracle in the LICENSE file that accompanied this code.
3626#
3627# This code is distributed in the hope that it will be useful, but WITHOUT
3628# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3629# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3630# version 2 for more details (a copy is included in the LICENSE file that
3631# accompanied this code).
3632#
3633# You should have received a copy of the GNU General Public License version
3634# 2 along with this work; if not, write to the Free Software Foundation,
3635# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3636#
3637# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3638# or visit www.oracle.com if you need additional information or have any
3639# questions.
3640#
3641
3642# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3643# Converts autoconf style CPU name to OpenJDK style, into
3644# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3645
3646
3647# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3648# Converts autoconf style OS name to OpenJDK style, into
3649# VAR_OS and VAR_OS_API.
3650
3651
3652# Expects $host_os $host_cpu $build_os and $build_cpu
3653# and $with_target_bits to have been setup!
3654#
3655# Translate the standard triplet(quadruplet) definition
3656# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3657# OPENJDK_BUILD_OS, etc.
3658
3659
3660# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3661# accordingly. Must be done after setting up build and target system, but before
3662# doing anything else with these values.
3663
3664
3665# Setup the legacy variables, for controlling the old makefiles.
3666#
3667
3668
3669
3670
3671#%%% Build and target systems %%%
3672
3673
3674
3675
3676# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3677# Add -mX to various FLAGS variables.
3678
3679
3680
3681
3682
3683
3684#
3685# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3686# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3687#
3688# This code is free software; you can redistribute it and/or modify it
3689# under the terms of the GNU General Public License version 2 only, as
3690# published by the Free Software Foundation.  Oracle designates this
3691# particular file as subject to the "Classpath" exception as provided
3692# by Oracle in the LICENSE file that accompanied this code.
3693#
3694# This code is distributed in the hope that it will be useful, but WITHOUT
3695# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3696# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3697# version 2 for more details (a copy is included in the LICENSE file that
3698# accompanied this code).
3699#
3700# You should have received a copy of the GNU General Public License version
3701# 2 along with this work; if not, write to the Free Software Foundation,
3702# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3703#
3704# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3705# or visit www.oracle.com if you need additional information or have any
3706# questions.
3707#
3708
3709
3710
3711
3712
3713
3714
3715
3716#
3717# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3718# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3719#
3720# This code is free software; you can redistribute it and/or modify it
3721# under the terms of the GNU General Public License version 2 only, as
3722# published by the Free Software Foundation.  Oracle designates this
3723# particular file as subject to the "Classpath" exception as provided
3724# by Oracle in the LICENSE file that accompanied this code.
3725#
3726# This code is distributed in the hope that it will be useful, but WITHOUT
3727# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3728# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3729# version 2 for more details (a copy is included in the LICENSE file that
3730# accompanied this code).
3731#
3732# You should have received a copy of the GNU General Public License version
3733# 2 along with this work; if not, write to the Free Software Foundation,
3734# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3735#
3736# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3737# or visit www.oracle.com if you need additional information or have any
3738# questions.
3739#
3740
3741# $1 = compiler to test (CC or CXX)
3742# $2 = human readable name of compiler (C or C++)
3743
3744
3745
3746
3747
3748# $1 = compiler to test (CC or CXX)
3749# $2 = human readable name of compiler (C or C++)
3750# $3 = list of compiler names to search for
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3765#                                   [RUN-IF-FALSE])
3766# ------------------------------------------------------------
3767# Check that the c and c++ compilers support an argument
3768
3769
3770
3771
3772# Setup the JTREG paths
3773
3774
3775#
3776# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3778#
3779# This code is free software; you can redistribute it and/or modify it
3780# under the terms of the GNU General Public License version 2 only, as
3781# published by the Free Software Foundation.  Oracle designates this
3782# particular file as subject to the "Classpath" exception as provided
3783# by Oracle in the LICENSE file that accompanied this code.
3784#
3785# This code is distributed in the hope that it will be useful, but WITHOUT
3786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3788# version 2 for more details (a copy is included in the LICENSE file that
3789# accompanied this code).
3790#
3791# You should have received a copy of the GNU General Public License version
3792# 2 along with this work; if not, write to the Free Software Foundation,
3793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3794#
3795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3796# or visit www.oracle.com if you need additional information or have any
3797# questions.
3798#
3799
3800
3801
3802
3803
3804
3805
3806# Check if the VS env variables were setup prior to running configure.
3807# If not, then find vcvarsall.bat and run it automatically, and integrate
3808# the set env variables into the spec file.
3809
3810
3811
3812
3813
3814
3815# This line needs to be here, verbatim, after all includes and the dummy hook
3816# definitions. It is replaced with custom functionality when building
3817# custom sources.
3818#CUSTOM_AUTOCONF_INCLUDE
3819
3820# Do not change or remove the following line, it is needed for consistency checks:
3821DATE_WHEN_GENERATED=1381407169
3822
3823###############################################################################
3824#
3825# Initialization / Boot-strapping
3826#
3827# The bootstrapping process needs to solve the "chicken or the egg" problem,
3828# thus it jumps back and forth, each time gaining something needed later on.
3829#
3830###############################################################################
3831
3832# Basic initialization that must happen first of all
3833
3834  # Save the original command line. This is passed to us by the wrapper configure script.
3835
3836  DATE_WHEN_CONFIGURED=`LANG=C date`
3837
3838  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3839$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3840  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3841$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3842
3843
3844
3845  # Start with tools that do not need have cross compilation support
3846  # and can be expected to be found in the default PATH. These tools are
3847  # used by configure. Nor are these tools expected to be found in the
3848  # devkit from the builddeps server either, since they are
3849  # needed to download the devkit.
3850
3851  # First are all the simple required tools.
3852
3853  for ac_prog in basename
3854do
3855  # Extract the first word of "$ac_prog", so it can be a program name with args.
3856set dummy $ac_prog; ac_word=$2
3857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3858$as_echo_n "checking for $ac_word... " >&6; }
3859if ${ac_cv_path_BASENAME+:} false; then :
3860  $as_echo_n "(cached) " >&6
3861else
3862  case $BASENAME in
3863  [\\/]* | ?:[\\/]*)
3864  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3865  ;;
3866  *)
3867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868for as_dir in $PATH
3869do
3870  IFS=$as_save_IFS
3871  test -z "$as_dir" && as_dir=.
3872    for ac_exec_ext in '' $ac_executable_extensions; do
3873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3876    break 2
3877  fi
3878done
3879  done
3880IFS=$as_save_IFS
3881
3882  ;;
3883esac
3884fi
3885BASENAME=$ac_cv_path_BASENAME
3886if test -n "$BASENAME"; then
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3888$as_echo "$BASENAME" >&6; }
3889else
3890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3891$as_echo "no" >&6; }
3892fi
3893
3894
3895  test -n "$BASENAME" && break
3896done
3897
3898
3899  if test "x$BASENAME" = x; then
3900    if test "xbasename" = x; then
3901      PROG_NAME=basename
3902    else
3903      PROG_NAME=basename
3904    fi
3905    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3906$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3907    as_fn_error $? "Cannot continue" "$LINENO" 5
3908  fi
3909
3910
3911
3912  for ac_prog in bash
3913do
3914  # Extract the first word of "$ac_prog", so it can be a program name with args.
3915set dummy $ac_prog; ac_word=$2
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3917$as_echo_n "checking for $ac_word... " >&6; }
3918if ${ac_cv_path_BASH+:} false; then :
3919  $as_echo_n "(cached) " >&6
3920else
3921  case $BASH in
3922  [\\/]* | ?:[\\/]*)
3923  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3924  ;;
3925  *)
3926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH
3928do
3929  IFS=$as_save_IFS
3930  test -z "$as_dir" && as_dir=.
3931    for ac_exec_ext in '' $ac_executable_extensions; do
3932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935    break 2
3936  fi
3937done
3938  done
3939IFS=$as_save_IFS
3940
3941  ;;
3942esac
3943fi
3944BASH=$ac_cv_path_BASH
3945if test -n "$BASH"; then
3946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3947$as_echo "$BASH" >&6; }
3948else
3949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950$as_echo "no" >&6; }
3951fi
3952
3953
3954  test -n "$BASH" && break
3955done
3956
3957
3958  if test "x$BASH" = x; then
3959    if test "xbash" = x; then
3960      PROG_NAME=bash
3961    else
3962      PROG_NAME=bash
3963    fi
3964    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3966    as_fn_error $? "Cannot continue" "$LINENO" 5
3967  fi
3968
3969
3970
3971  for ac_prog in cat
3972do
3973  # Extract the first word of "$ac_prog", so it can be a program name with args.
3974set dummy $ac_prog; ac_word=$2
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3976$as_echo_n "checking for $ac_word... " >&6; }
3977if ${ac_cv_path_CAT+:} false; then :
3978  $as_echo_n "(cached) " >&6
3979else
3980  case $CAT in
3981  [\\/]* | ?:[\\/]*)
3982  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3983  ;;
3984  *)
3985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986for as_dir in $PATH
3987do
3988  IFS=$as_save_IFS
3989  test -z "$as_dir" && as_dir=.
3990    for ac_exec_ext in '' $ac_executable_extensions; do
3991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3992    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994    break 2
3995  fi
3996done
3997  done
3998IFS=$as_save_IFS
3999
4000  ;;
4001esac
4002fi
4003CAT=$ac_cv_path_CAT
4004if test -n "$CAT"; then
4005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4006$as_echo "$CAT" >&6; }
4007else
4008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010fi
4011
4012
4013  test -n "$CAT" && break
4014done
4015
4016
4017  if test "x$CAT" = x; then
4018    if test "xcat" = x; then
4019      PROG_NAME=cat
4020    else
4021      PROG_NAME=cat
4022    fi
4023    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4025    as_fn_error $? "Cannot continue" "$LINENO" 5
4026  fi
4027
4028
4029
4030  for ac_prog in chmod
4031do
4032  # Extract the first word of "$ac_prog", so it can be a program name with args.
4033set dummy $ac_prog; ac_word=$2
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4035$as_echo_n "checking for $ac_word... " >&6; }
4036if ${ac_cv_path_CHMOD+:} false; then :
4037  $as_echo_n "(cached) " >&6
4038else
4039  case $CHMOD in
4040  [\\/]* | ?:[\\/]*)
4041  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4042  ;;
4043  *)
4044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4045for as_dir in $PATH
4046do
4047  IFS=$as_save_IFS
4048  test -z "$as_dir" && as_dir=.
4049    for ac_exec_ext in '' $ac_executable_extensions; do
4050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4051    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4053    break 2
4054  fi
4055done
4056  done
4057IFS=$as_save_IFS
4058
4059  ;;
4060esac
4061fi
4062CHMOD=$ac_cv_path_CHMOD
4063if test -n "$CHMOD"; then
4064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4065$as_echo "$CHMOD" >&6; }
4066else
4067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068$as_echo "no" >&6; }
4069fi
4070
4071
4072  test -n "$CHMOD" && break
4073done
4074
4075
4076  if test "x$CHMOD" = x; then
4077    if test "xchmod" = x; then
4078      PROG_NAME=chmod
4079    else
4080      PROG_NAME=chmod
4081    fi
4082    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4083$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4084    as_fn_error $? "Cannot continue" "$LINENO" 5
4085  fi
4086
4087
4088
4089  for ac_prog in cmp
4090do
4091  # Extract the first word of "$ac_prog", so it can be a program name with args.
4092set dummy $ac_prog; ac_word=$2
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4094$as_echo_n "checking for $ac_word... " >&6; }
4095if ${ac_cv_path_CMP+:} false; then :
4096  $as_echo_n "(cached) " >&6
4097else
4098  case $CMP in
4099  [\\/]* | ?:[\\/]*)
4100  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4101  ;;
4102  *)
4103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in $PATH
4105do
4106  IFS=$as_save_IFS
4107  test -z "$as_dir" && as_dir=.
4108    for ac_exec_ext in '' $ac_executable_extensions; do
4109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4110    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4112    break 2
4113  fi
4114done
4115  done
4116IFS=$as_save_IFS
4117
4118  ;;
4119esac
4120fi
4121CMP=$ac_cv_path_CMP
4122if test -n "$CMP"; then
4123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4124$as_echo "$CMP" >&6; }
4125else
4126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
4128fi
4129
4130
4131  test -n "$CMP" && break
4132done
4133
4134
4135  if test "x$CMP" = x; then
4136    if test "xcmp" = x; then
4137      PROG_NAME=cmp
4138    else
4139      PROG_NAME=cmp
4140    fi
4141    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4142$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4143    as_fn_error $? "Cannot continue" "$LINENO" 5
4144  fi
4145
4146
4147
4148  for ac_prog in comm
4149do
4150  # Extract the first word of "$ac_prog", so it can be a program name with args.
4151set dummy $ac_prog; ac_word=$2
4152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153$as_echo_n "checking for $ac_word... " >&6; }
4154if ${ac_cv_path_COMM+:} false; then :
4155  $as_echo_n "(cached) " >&6
4156else
4157  case $COMM in
4158  [\\/]* | ?:[\\/]*)
4159  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4160  ;;
4161  *)
4162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165  IFS=$as_save_IFS
4166  test -z "$as_dir" && as_dir=.
4167    for ac_exec_ext in '' $ac_executable_extensions; do
4168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171    break 2
4172  fi
4173done
4174  done
4175IFS=$as_save_IFS
4176
4177  ;;
4178esac
4179fi
4180COMM=$ac_cv_path_COMM
4181if test -n "$COMM"; then
4182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4183$as_echo "$COMM" >&6; }
4184else
4185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4186$as_echo "no" >&6; }
4187fi
4188
4189
4190  test -n "$COMM" && break
4191done
4192
4193
4194  if test "x$COMM" = x; then
4195    if test "xcomm" = x; then
4196      PROG_NAME=comm
4197    else
4198      PROG_NAME=comm
4199    fi
4200    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4201$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4202    as_fn_error $? "Cannot continue" "$LINENO" 5
4203  fi
4204
4205
4206
4207  for ac_prog in cp
4208do
4209  # Extract the first word of "$ac_prog", so it can be a program name with args.
4210set dummy $ac_prog; ac_word=$2
4211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212$as_echo_n "checking for $ac_word... " >&6; }
4213if ${ac_cv_path_CP+:} false; then :
4214  $as_echo_n "(cached) " >&6
4215else
4216  case $CP in
4217  [\\/]* | ?:[\\/]*)
4218  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4219  ;;
4220  *)
4221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH
4223do
4224  IFS=$as_save_IFS
4225  test -z "$as_dir" && as_dir=.
4226    for ac_exec_ext in '' $ac_executable_extensions; do
4227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4228    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4230    break 2
4231  fi
4232done
4233  done
4234IFS=$as_save_IFS
4235
4236  ;;
4237esac
4238fi
4239CP=$ac_cv_path_CP
4240if test -n "$CP"; then
4241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4242$as_echo "$CP" >&6; }
4243else
4244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245$as_echo "no" >&6; }
4246fi
4247
4248
4249  test -n "$CP" && break
4250done
4251
4252
4253  if test "x$CP" = x; then
4254    if test "xcp" = x; then
4255      PROG_NAME=cp
4256    else
4257      PROG_NAME=cp
4258    fi
4259    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4260$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4261    as_fn_error $? "Cannot continue" "$LINENO" 5
4262  fi
4263
4264
4265
4266  for ac_prog in cpio
4267do
4268  # Extract the first word of "$ac_prog", so it can be a program name with args.
4269set dummy $ac_prog; ac_word=$2
4270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4271$as_echo_n "checking for $ac_word... " >&6; }
4272if ${ac_cv_path_CPIO+:} false; then :
4273  $as_echo_n "(cached) " >&6
4274else
4275  case $CPIO in
4276  [\\/]* | ?:[\\/]*)
4277  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4278  ;;
4279  *)
4280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281for as_dir in $PATH
4282do
4283  IFS=$as_save_IFS
4284  test -z "$as_dir" && as_dir=.
4285    for ac_exec_ext in '' $ac_executable_extensions; do
4286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4289    break 2
4290  fi
4291done
4292  done
4293IFS=$as_save_IFS
4294
4295  ;;
4296esac
4297fi
4298CPIO=$ac_cv_path_CPIO
4299if test -n "$CPIO"; then
4300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4301$as_echo "$CPIO" >&6; }
4302else
4303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4304$as_echo "no" >&6; }
4305fi
4306
4307
4308  test -n "$CPIO" && break
4309done
4310
4311
4312  if test "x$CPIO" = x; then
4313    if test "xcpio" = x; then
4314      PROG_NAME=cpio
4315    else
4316      PROG_NAME=cpio
4317    fi
4318    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4319$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4320    as_fn_error $? "Cannot continue" "$LINENO" 5
4321  fi
4322
4323
4324
4325  for ac_prog in cut
4326do
4327  # Extract the first word of "$ac_prog", so it can be a program name with args.
4328set dummy $ac_prog; ac_word=$2
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330$as_echo_n "checking for $ac_word... " >&6; }
4331if ${ac_cv_path_CUT+:} false; then :
4332  $as_echo_n "(cached) " >&6
4333else
4334  case $CUT in
4335  [\\/]* | ?:[\\/]*)
4336  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4337  ;;
4338  *)
4339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340for as_dir in $PATH
4341do
4342  IFS=$as_save_IFS
4343  test -z "$as_dir" && as_dir=.
4344    for ac_exec_ext in '' $ac_executable_extensions; do
4345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4346    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348    break 2
4349  fi
4350done
4351  done
4352IFS=$as_save_IFS
4353
4354  ;;
4355esac
4356fi
4357CUT=$ac_cv_path_CUT
4358if test -n "$CUT"; then
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4360$as_echo "$CUT" >&6; }
4361else
4362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363$as_echo "no" >&6; }
4364fi
4365
4366
4367  test -n "$CUT" && break
4368done
4369
4370
4371  if test "x$CUT" = x; then
4372    if test "xcut" = x; then
4373      PROG_NAME=cut
4374    else
4375      PROG_NAME=cut
4376    fi
4377    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4378$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4379    as_fn_error $? "Cannot continue" "$LINENO" 5
4380  fi
4381
4382
4383
4384  for ac_prog in date
4385do
4386  # Extract the first word of "$ac_prog", so it can be a program name with args.
4387set dummy $ac_prog; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
4390if ${ac_cv_path_DATE+:} false; then :
4391  $as_echo_n "(cached) " >&6
4392else
4393  case $DATE in
4394  [\\/]* | ?:[\\/]*)
4395  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4396  ;;
4397  *)
4398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in $PATH
4400do
4401  IFS=$as_save_IFS
4402  test -z "$as_dir" && as_dir=.
4403    for ac_exec_ext in '' $ac_executable_extensions; do
4404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407    break 2
4408  fi
4409done
4410  done
4411IFS=$as_save_IFS
4412
4413  ;;
4414esac
4415fi
4416DATE=$ac_cv_path_DATE
4417if test -n "$DATE"; then
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4419$as_echo "$DATE" >&6; }
4420else
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
4423fi
4424
4425
4426  test -n "$DATE" && break
4427done
4428
4429
4430  if test "x$DATE" = x; then
4431    if test "xdate" = x; then
4432      PROG_NAME=date
4433    else
4434      PROG_NAME=date
4435    fi
4436    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4437$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4438    as_fn_error $? "Cannot continue" "$LINENO" 5
4439  fi
4440
4441
4442
4443  for ac_prog in gdiff diff
4444do
4445  # Extract the first word of "$ac_prog", so it can be a program name with args.
4446set dummy $ac_prog; ac_word=$2
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448$as_echo_n "checking for $ac_word... " >&6; }
4449if ${ac_cv_path_DIFF+:} false; then :
4450  $as_echo_n "(cached) " >&6
4451else
4452  case $DIFF in
4453  [\\/]* | ?:[\\/]*)
4454  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4455  ;;
4456  *)
4457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in $PATH
4459do
4460  IFS=$as_save_IFS
4461  test -z "$as_dir" && as_dir=.
4462    for ac_exec_ext in '' $ac_executable_extensions; do
4463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4464    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4466    break 2
4467  fi
4468done
4469  done
4470IFS=$as_save_IFS
4471
4472  ;;
4473esac
4474fi
4475DIFF=$ac_cv_path_DIFF
4476if test -n "$DIFF"; then
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4478$as_echo "$DIFF" >&6; }
4479else
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481$as_echo "no" >&6; }
4482fi
4483
4484
4485  test -n "$DIFF" && break
4486done
4487
4488
4489  if test "x$DIFF" = x; then
4490    if test "xgdiff diff" = x; then
4491      PROG_NAME=diff
4492    else
4493      PROG_NAME=gdiff diff
4494    fi
4495    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4496$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4497    as_fn_error $? "Cannot continue" "$LINENO" 5
4498  fi
4499
4500
4501
4502  for ac_prog in dirname
4503do
4504  # Extract the first word of "$ac_prog", so it can be a program name with args.
4505set dummy $ac_prog; ac_word=$2
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507$as_echo_n "checking for $ac_word... " >&6; }
4508if ${ac_cv_path_DIRNAME+:} false; then :
4509  $as_echo_n "(cached) " >&6
4510else
4511  case $DIRNAME in
4512  [\\/]* | ?:[\\/]*)
4513  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4514  ;;
4515  *)
4516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH
4518do
4519  IFS=$as_save_IFS
4520  test -z "$as_dir" && as_dir=.
4521    for ac_exec_ext in '' $ac_executable_extensions; do
4522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525    break 2
4526  fi
4527done
4528  done
4529IFS=$as_save_IFS
4530
4531  ;;
4532esac
4533fi
4534DIRNAME=$ac_cv_path_DIRNAME
4535if test -n "$DIRNAME"; then
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4537$as_echo "$DIRNAME" >&6; }
4538else
4539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
4541fi
4542
4543
4544  test -n "$DIRNAME" && break
4545done
4546
4547
4548  if test "x$DIRNAME" = x; then
4549    if test "xdirname" = x; then
4550      PROG_NAME=dirname
4551    else
4552      PROG_NAME=dirname
4553    fi
4554    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4555$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4556    as_fn_error $? "Cannot continue" "$LINENO" 5
4557  fi
4558
4559
4560
4561  for ac_prog in echo
4562do
4563  # Extract the first word of "$ac_prog", so it can be a program name with args.
4564set dummy $ac_prog; ac_word=$2
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4566$as_echo_n "checking for $ac_word... " >&6; }
4567if ${ac_cv_path_ECHO+:} false; then :
4568  $as_echo_n "(cached) " >&6
4569else
4570  case $ECHO in
4571  [\\/]* | ?:[\\/]*)
4572  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4573  ;;
4574  *)
4575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576for as_dir in $PATH
4577do
4578  IFS=$as_save_IFS
4579  test -z "$as_dir" && as_dir=.
4580    for ac_exec_ext in '' $ac_executable_extensions; do
4581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4584    break 2
4585  fi
4586done
4587  done
4588IFS=$as_save_IFS
4589
4590  ;;
4591esac
4592fi
4593ECHO=$ac_cv_path_ECHO
4594if test -n "$ECHO"; then
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4596$as_echo "$ECHO" >&6; }
4597else
4598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599$as_echo "no" >&6; }
4600fi
4601
4602
4603  test -n "$ECHO" && break
4604done
4605
4606
4607  if test "x$ECHO" = x; then
4608    if test "xecho" = x; then
4609      PROG_NAME=echo
4610    else
4611      PROG_NAME=echo
4612    fi
4613    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4614$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4615    as_fn_error $? "Cannot continue" "$LINENO" 5
4616  fi
4617
4618
4619
4620  for ac_prog in expr
4621do
4622  # Extract the first word of "$ac_prog", so it can be a program name with args.
4623set dummy $ac_prog; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_EXPR+:} false; then :
4627  $as_echo_n "(cached) " >&6
4628else
4629  case $EXPR in
4630  [\\/]* | ?:[\\/]*)
4631  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4632  ;;
4633  *)
4634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in $PATH
4636do
4637  IFS=$as_save_IFS
4638  test -z "$as_dir" && as_dir=.
4639    for ac_exec_ext in '' $ac_executable_extensions; do
4640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643    break 2
4644  fi
4645done
4646  done
4647IFS=$as_save_IFS
4648
4649  ;;
4650esac
4651fi
4652EXPR=$ac_cv_path_EXPR
4653if test -n "$EXPR"; then
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4655$as_echo "$EXPR" >&6; }
4656else
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661
4662  test -n "$EXPR" && break
4663done
4664
4665
4666  if test "x$EXPR" = x; then
4667    if test "xexpr" = x; then
4668      PROG_NAME=expr
4669    else
4670      PROG_NAME=expr
4671    fi
4672    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4673$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4674    as_fn_error $? "Cannot continue" "$LINENO" 5
4675  fi
4676
4677
4678
4679  for ac_prog in file
4680do
4681  # Extract the first word of "$ac_prog", so it can be a program name with args.
4682set dummy $ac_prog; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_FILE+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  case $FILE in
4689  [\\/]* | ?:[\\/]*)
4690  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4691  ;;
4692  *)
4693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in $PATH
4695do
4696  IFS=$as_save_IFS
4697  test -z "$as_dir" && as_dir=.
4698    for ac_exec_ext in '' $ac_executable_extensions; do
4699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702    break 2
4703  fi
4704done
4705  done
4706IFS=$as_save_IFS
4707
4708  ;;
4709esac
4710fi
4711FILE=$ac_cv_path_FILE
4712if test -n "$FILE"; then
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4714$as_echo "$FILE" >&6; }
4715else
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721  test -n "$FILE" && break
4722done
4723
4724
4725  if test "x$FILE" = x; then
4726    if test "xfile" = x; then
4727      PROG_NAME=file
4728    else
4729      PROG_NAME=file
4730    fi
4731    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4732$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4733    as_fn_error $? "Cannot continue" "$LINENO" 5
4734  fi
4735
4736
4737
4738  for ac_prog in find
4739do
4740  # Extract the first word of "$ac_prog", so it can be a program name with args.
4741set dummy $ac_prog; ac_word=$2
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
4744if ${ac_cv_path_FIND+:} false; then :
4745  $as_echo_n "(cached) " >&6
4746else
4747  case $FIND in
4748  [\\/]* | ?:[\\/]*)
4749  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4750  ;;
4751  *)
4752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753for as_dir in $PATH
4754do
4755  IFS=$as_save_IFS
4756  test -z "$as_dir" && as_dir=.
4757    for ac_exec_ext in '' $ac_executable_extensions; do
4758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4759    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4761    break 2
4762  fi
4763done
4764  done
4765IFS=$as_save_IFS
4766
4767  ;;
4768esac
4769fi
4770FIND=$ac_cv_path_FIND
4771if test -n "$FIND"; then
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4773$as_echo "$FIND" >&6; }
4774else
4775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
4777fi
4778
4779
4780  test -n "$FIND" && break
4781done
4782
4783
4784  if test "x$FIND" = x; then
4785    if test "xfind" = x; then
4786      PROG_NAME=find
4787    else
4788      PROG_NAME=find
4789    fi
4790    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4791$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4792    as_fn_error $? "Cannot continue" "$LINENO" 5
4793  fi
4794
4795
4796
4797  for ac_prog in head
4798do
4799  # Extract the first word of "$ac_prog", so it can be a program name with args.
4800set dummy $ac_prog; ac_word=$2
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
4803if ${ac_cv_path_HEAD+:} false; then :
4804  $as_echo_n "(cached) " >&6
4805else
4806  case $HEAD in
4807  [\\/]* | ?:[\\/]*)
4808  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4809  ;;
4810  *)
4811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812for as_dir in $PATH
4813do
4814  IFS=$as_save_IFS
4815  test -z "$as_dir" && as_dir=.
4816    for ac_exec_ext in '' $ac_executable_extensions; do
4817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820    break 2
4821  fi
4822done
4823  done
4824IFS=$as_save_IFS
4825
4826  ;;
4827esac
4828fi
4829HEAD=$ac_cv_path_HEAD
4830if test -n "$HEAD"; then
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4832$as_echo "$HEAD" >&6; }
4833else
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839  test -n "$HEAD" && break
4840done
4841
4842
4843  if test "x$HEAD" = x; then
4844    if test "xhead" = x; then
4845      PROG_NAME=head
4846    else
4847      PROG_NAME=head
4848    fi
4849    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4850$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4851    as_fn_error $? "Cannot continue" "$LINENO" 5
4852  fi
4853
4854
4855
4856  for ac_prog in ln
4857do
4858  # Extract the first word of "$ac_prog", so it can be a program name with args.
4859set dummy $ac_prog; ac_word=$2
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861$as_echo_n "checking for $ac_word... " >&6; }
4862if ${ac_cv_path_LN+:} false; then :
4863  $as_echo_n "(cached) " >&6
4864else
4865  case $LN in
4866  [\\/]* | ?:[\\/]*)
4867  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4868  ;;
4869  *)
4870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871for as_dir in $PATH
4872do
4873  IFS=$as_save_IFS
4874  test -z "$as_dir" && as_dir=.
4875    for ac_exec_ext in '' $ac_executable_extensions; do
4876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4877    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879    break 2
4880  fi
4881done
4882  done
4883IFS=$as_save_IFS
4884
4885  ;;
4886esac
4887fi
4888LN=$ac_cv_path_LN
4889if test -n "$LN"; then
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4891$as_echo "$LN" >&6; }
4892else
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894$as_echo "no" >&6; }
4895fi
4896
4897
4898  test -n "$LN" && break
4899done
4900
4901
4902  if test "x$LN" = x; then
4903    if test "xln" = x; then
4904      PROG_NAME=ln
4905    else
4906      PROG_NAME=ln
4907    fi
4908    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4909$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4910    as_fn_error $? "Cannot continue" "$LINENO" 5
4911  fi
4912
4913
4914
4915  for ac_prog in ls
4916do
4917  # Extract the first word of "$ac_prog", so it can be a program name with args.
4918set dummy $ac_prog; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_LS+:} false; then :
4922  $as_echo_n "(cached) " >&6
4923else
4924  case $LS in
4925  [\\/]* | ?:[\\/]*)
4926  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4927  ;;
4928  *)
4929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in $PATH
4931do
4932  IFS=$as_save_IFS
4933  test -z "$as_dir" && as_dir=.
4934    for ac_exec_ext in '' $ac_executable_extensions; do
4935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938    break 2
4939  fi
4940done
4941  done
4942IFS=$as_save_IFS
4943
4944  ;;
4945esac
4946fi
4947LS=$ac_cv_path_LS
4948if test -n "$LS"; then
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4950$as_echo "$LS" >&6; }
4951else
4952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957  test -n "$LS" && break
4958done
4959
4960
4961  if test "x$LS" = x; then
4962    if test "xls" = x; then
4963      PROG_NAME=ls
4964    else
4965      PROG_NAME=ls
4966    fi
4967    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4968$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4969    as_fn_error $? "Cannot continue" "$LINENO" 5
4970  fi
4971
4972
4973
4974  for ac_prog in mkdir
4975do
4976  # Extract the first word of "$ac_prog", so it can be a program name with args.
4977set dummy $ac_prog; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_MKDIR+:} false; then :
4981  $as_echo_n "(cached) " >&6
4982else
4983  case $MKDIR in
4984  [\\/]* | ?:[\\/]*)
4985  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4986  ;;
4987  *)
4988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH
4990do
4991  IFS=$as_save_IFS
4992  test -z "$as_dir" && as_dir=.
4993    for ac_exec_ext in '' $ac_executable_extensions; do
4994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997    break 2
4998  fi
4999done
5000  done
5001IFS=$as_save_IFS
5002
5003  ;;
5004esac
5005fi
5006MKDIR=$ac_cv_path_MKDIR
5007if test -n "$MKDIR"; then
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5009$as_echo "$MKDIR" >&6; }
5010else
5011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016  test -n "$MKDIR" && break
5017done
5018
5019
5020  if test "x$MKDIR" = x; then
5021    if test "xmkdir" = x; then
5022      PROG_NAME=mkdir
5023    else
5024      PROG_NAME=mkdir
5025    fi
5026    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5027$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5028    as_fn_error $? "Cannot continue" "$LINENO" 5
5029  fi
5030
5031
5032
5033  for ac_prog in mktemp
5034do
5035  # Extract the first word of "$ac_prog", so it can be a program name with args.
5036set dummy $ac_prog; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_MKTEMP+:} false; then :
5040  $as_echo_n "(cached) " >&6
5041else
5042  case $MKTEMP in
5043  [\\/]* | ?:[\\/]*)
5044  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5045  ;;
5046  *)
5047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in $PATH
5049do
5050  IFS=$as_save_IFS
5051  test -z "$as_dir" && as_dir=.
5052    for ac_exec_ext in '' $ac_executable_extensions; do
5053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056    break 2
5057  fi
5058done
5059  done
5060IFS=$as_save_IFS
5061
5062  ;;
5063esac
5064fi
5065MKTEMP=$ac_cv_path_MKTEMP
5066if test -n "$MKTEMP"; then
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5068$as_echo "$MKTEMP" >&6; }
5069else
5070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074
5075  test -n "$MKTEMP" && break
5076done
5077
5078
5079  if test "x$MKTEMP" = x; then
5080    if test "xmktemp" = x; then
5081      PROG_NAME=mktemp
5082    else
5083      PROG_NAME=mktemp
5084    fi
5085    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5086$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5087    as_fn_error $? "Cannot continue" "$LINENO" 5
5088  fi
5089
5090
5091
5092  for ac_prog in mv
5093do
5094  # Extract the first word of "$ac_prog", so it can be a program name with args.
5095set dummy $ac_prog; ac_word=$2
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097$as_echo_n "checking for $ac_word... " >&6; }
5098if ${ac_cv_path_MV+:} false; then :
5099  $as_echo_n "(cached) " >&6
5100else
5101  case $MV in
5102  [\\/]* | ?:[\\/]*)
5103  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5104  ;;
5105  *)
5106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109  IFS=$as_save_IFS
5110  test -z "$as_dir" && as_dir=.
5111    for ac_exec_ext in '' $ac_executable_extensions; do
5112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115    break 2
5116  fi
5117done
5118  done
5119IFS=$as_save_IFS
5120
5121  ;;
5122esac
5123fi
5124MV=$ac_cv_path_MV
5125if test -n "$MV"; then
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5127$as_echo "$MV" >&6; }
5128else
5129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133
5134  test -n "$MV" && break
5135done
5136
5137
5138  if test "x$MV" = x; then
5139    if test "xmv" = x; then
5140      PROG_NAME=mv
5141    else
5142      PROG_NAME=mv
5143    fi
5144    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5145$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5146    as_fn_error $? "Cannot continue" "$LINENO" 5
5147  fi
5148
5149
5150
5151  for ac_prog in printf
5152do
5153  # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_PRINTF+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $PRINTF in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183PRINTF=$ac_cv_path_PRINTF
5184if test -n "$PRINTF"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5186$as_echo "$PRINTF" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193  test -n "$PRINTF" && break
5194done
5195
5196
5197  if test "x$PRINTF" = x; then
5198    if test "xprintf" = x; then
5199      PROG_NAME=printf
5200    else
5201      PROG_NAME=printf
5202    fi
5203    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5204$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5205    as_fn_error $? "Cannot continue" "$LINENO" 5
5206  fi
5207
5208
5209
5210  for ac_prog in rm
5211do
5212  # Extract the first word of "$ac_prog", so it can be a program name with args.
5213set dummy $ac_prog; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if ${ac_cv_path_RM+:} false; then :
5217  $as_echo_n "(cached) " >&6
5218else
5219  case $RM in
5220  [\\/]* | ?:[\\/]*)
5221  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5222  ;;
5223  *)
5224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227  IFS=$as_save_IFS
5228  test -z "$as_dir" && as_dir=.
5229    for ac_exec_ext in '' $ac_executable_extensions; do
5230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233    break 2
5234  fi
5235done
5236  done
5237IFS=$as_save_IFS
5238
5239  ;;
5240esac
5241fi
5242RM=$ac_cv_path_RM
5243if test -n "$RM"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5245$as_echo "$RM" >&6; }
5246else
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248$as_echo "no" >&6; }
5249fi
5250
5251
5252  test -n "$RM" && break
5253done
5254
5255
5256  if test "x$RM" = x; then
5257    if test "xrm" = x; then
5258      PROG_NAME=rm
5259    else
5260      PROG_NAME=rm
5261    fi
5262    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5263$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5264    as_fn_error $? "Cannot continue" "$LINENO" 5
5265  fi
5266
5267
5268
5269  for ac_prog in sh
5270do
5271  # Extract the first word of "$ac_prog", so it can be a program name with args.
5272set dummy $ac_prog; ac_word=$2
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274$as_echo_n "checking for $ac_word... " >&6; }
5275if ${ac_cv_path_SH+:} false; then :
5276  $as_echo_n "(cached) " >&6
5277else
5278  case $SH in
5279  [\\/]* | ?:[\\/]*)
5280  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5281  ;;
5282  *)
5283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286  IFS=$as_save_IFS
5287  test -z "$as_dir" && as_dir=.
5288    for ac_exec_ext in '' $ac_executable_extensions; do
5289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292    break 2
5293  fi
5294done
5295  done
5296IFS=$as_save_IFS
5297
5298  ;;
5299esac
5300fi
5301SH=$ac_cv_path_SH
5302if test -n "$SH"; then
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5304$as_echo "$SH" >&6; }
5305else
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
5308fi
5309
5310
5311  test -n "$SH" && break
5312done
5313
5314
5315  if test "x$SH" = x; then
5316    if test "xsh" = x; then
5317      PROG_NAME=sh
5318    else
5319      PROG_NAME=sh
5320    fi
5321    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5322$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5323    as_fn_error $? "Cannot continue" "$LINENO" 5
5324  fi
5325
5326
5327
5328  for ac_prog in sort
5329do
5330  # Extract the first word of "$ac_prog", so it can be a program name with args.
5331set dummy $ac_prog; ac_word=$2
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333$as_echo_n "checking for $ac_word... " >&6; }
5334if ${ac_cv_path_SORT+:} false; then :
5335  $as_echo_n "(cached) " >&6
5336else
5337  case $SORT in
5338  [\\/]* | ?:[\\/]*)
5339  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5340  ;;
5341  *)
5342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357  ;;
5358esac
5359fi
5360SORT=$ac_cv_path_SORT
5361if test -n "$SORT"; then
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5363$as_echo "$SORT" >&6; }
5364else
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369
5370  test -n "$SORT" && break
5371done
5372
5373
5374  if test "x$SORT" = x; then
5375    if test "xsort" = x; then
5376      PROG_NAME=sort
5377    else
5378      PROG_NAME=sort
5379    fi
5380    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5381$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5382    as_fn_error $? "Cannot continue" "$LINENO" 5
5383  fi
5384
5385
5386
5387  for ac_prog in tail
5388do
5389  # Extract the first word of "$ac_prog", so it can be a program name with args.
5390set dummy $ac_prog; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_TAIL+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $TAIL in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419TAIL=$ac_cv_path_TAIL
5420if test -n "$TAIL"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5422$as_echo "$TAIL" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429  test -n "$TAIL" && break
5430done
5431
5432
5433  if test "x$TAIL" = x; then
5434    if test "xtail" = x; then
5435      PROG_NAME=tail
5436    else
5437      PROG_NAME=tail
5438    fi
5439    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5440$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5441    as_fn_error $? "Cannot continue" "$LINENO" 5
5442  fi
5443
5444
5445
5446  for ac_prog in tar
5447do
5448  # Extract the first word of "$ac_prog", so it can be a program name with args.
5449set dummy $ac_prog; ac_word=$2
5450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5451$as_echo_n "checking for $ac_word... " >&6; }
5452if ${ac_cv_path_TAR+:} false; then :
5453  $as_echo_n "(cached) " >&6
5454else
5455  case $TAR in
5456  [\\/]* | ?:[\\/]*)
5457  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5458  ;;
5459  *)
5460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5461for as_dir in $PATH
5462do
5463  IFS=$as_save_IFS
5464  test -z "$as_dir" && as_dir=.
5465    for ac_exec_ext in '' $ac_executable_extensions; do
5466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5467    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5469    break 2
5470  fi
5471done
5472  done
5473IFS=$as_save_IFS
5474
5475  ;;
5476esac
5477fi
5478TAR=$ac_cv_path_TAR
5479if test -n "$TAR"; then
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5481$as_echo "$TAR" >&6; }
5482else
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484$as_echo "no" >&6; }
5485fi
5486
5487
5488  test -n "$TAR" && break
5489done
5490
5491
5492  if test "x$TAR" = x; then
5493    if test "xtar" = x; then
5494      PROG_NAME=tar
5495    else
5496      PROG_NAME=tar
5497    fi
5498    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5499$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5500    as_fn_error $? "Cannot continue" "$LINENO" 5
5501  fi
5502
5503
5504
5505  for ac_prog in tee
5506do
5507  # Extract the first word of "$ac_prog", so it can be a program name with args.
5508set dummy $ac_prog; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_TEE+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $TEE in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537TEE=$ac_cv_path_TEE
5538if test -n "$TEE"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5540$as_echo "$TEE" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547  test -n "$TEE" && break
5548done
5549
5550
5551  if test "x$TEE" = x; then
5552    if test "xtee" = x; then
5553      PROG_NAME=tee
5554    else
5555      PROG_NAME=tee
5556    fi
5557    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5558$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5559    as_fn_error $? "Cannot continue" "$LINENO" 5
5560  fi
5561
5562
5563
5564  for ac_prog in touch
5565do
5566  # Extract the first word of "$ac_prog", so it can be a program name with args.
5567set dummy $ac_prog; ac_word=$2
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569$as_echo_n "checking for $ac_word... " >&6; }
5570if ${ac_cv_path_TOUCH+:} false; then :
5571  $as_echo_n "(cached) " >&6
5572else
5573  case $TOUCH in
5574  [\\/]* | ?:[\\/]*)
5575  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5576  ;;
5577  *)
5578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579for as_dir in $PATH
5580do
5581  IFS=$as_save_IFS
5582  test -z "$as_dir" && as_dir=.
5583    for ac_exec_ext in '' $ac_executable_extensions; do
5584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587    break 2
5588  fi
5589done
5590  done
5591IFS=$as_save_IFS
5592
5593  ;;
5594esac
5595fi
5596TOUCH=$ac_cv_path_TOUCH
5597if test -n "$TOUCH"; then
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5599$as_echo "$TOUCH" >&6; }
5600else
5601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602$as_echo "no" >&6; }
5603fi
5604
5605
5606  test -n "$TOUCH" && break
5607done
5608
5609
5610  if test "x$TOUCH" = x; then
5611    if test "xtouch" = x; then
5612      PROG_NAME=touch
5613    else
5614      PROG_NAME=touch
5615    fi
5616    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5617$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5618    as_fn_error $? "Cannot continue" "$LINENO" 5
5619  fi
5620
5621
5622
5623  for ac_prog in tr
5624do
5625  # Extract the first word of "$ac_prog", so it can be a program name with args.
5626set dummy $ac_prog; ac_word=$2
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628$as_echo_n "checking for $ac_word... " >&6; }
5629if ${ac_cv_path_TR+:} false; then :
5630  $as_echo_n "(cached) " >&6
5631else
5632  case $TR in
5633  [\\/]* | ?:[\\/]*)
5634  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5635  ;;
5636  *)
5637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638for as_dir in $PATH
5639do
5640  IFS=$as_save_IFS
5641  test -z "$as_dir" && as_dir=.
5642    for ac_exec_ext in '' $ac_executable_extensions; do
5643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5644    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646    break 2
5647  fi
5648done
5649  done
5650IFS=$as_save_IFS
5651
5652  ;;
5653esac
5654fi
5655TR=$ac_cv_path_TR
5656if test -n "$TR"; then
5657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5658$as_echo "$TR" >&6; }
5659else
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661$as_echo "no" >&6; }
5662fi
5663
5664
5665  test -n "$TR" && break
5666done
5667
5668
5669  if test "x$TR" = x; then
5670    if test "xtr" = x; then
5671      PROG_NAME=tr
5672    else
5673      PROG_NAME=tr
5674    fi
5675    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5676$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5677    as_fn_error $? "Cannot continue" "$LINENO" 5
5678  fi
5679
5680
5681
5682  for ac_prog in uname
5683do
5684  # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_path_UNAME+:} false; then :
5689  $as_echo_n "(cached) " >&6
5690else
5691  case $UNAME in
5692  [\\/]* | ?:[\\/]*)
5693  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5694  ;;
5695  *)
5696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699  IFS=$as_save_IFS
5700  test -z "$as_dir" && as_dir=.
5701    for ac_exec_ext in '' $ac_executable_extensions; do
5702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705    break 2
5706  fi
5707done
5708  done
5709IFS=$as_save_IFS
5710
5711  ;;
5712esac
5713fi
5714UNAME=$ac_cv_path_UNAME
5715if test -n "$UNAME"; then
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5717$as_echo "$UNAME" >&6; }
5718else
5719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
5721fi
5722
5723
5724  test -n "$UNAME" && break
5725done
5726
5727
5728  if test "x$UNAME" = x; then
5729    if test "xuname" = x; then
5730      PROG_NAME=uname
5731    else
5732      PROG_NAME=uname
5733    fi
5734    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5735$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5736    as_fn_error $? "Cannot continue" "$LINENO" 5
5737  fi
5738
5739
5740
5741  for ac_prog in uniq
5742do
5743  # Extract the first word of "$ac_prog", so it can be a program name with args.
5744set dummy $ac_prog; ac_word=$2
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746$as_echo_n "checking for $ac_word... " >&6; }
5747if ${ac_cv_path_UNIQ+:} false; then :
5748  $as_echo_n "(cached) " >&6
5749else
5750  case $UNIQ in
5751  [\\/]* | ?:[\\/]*)
5752  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5753  ;;
5754  *)
5755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758  IFS=$as_save_IFS
5759  test -z "$as_dir" && as_dir=.
5760    for ac_exec_ext in '' $ac_executable_extensions; do
5761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764    break 2
5765  fi
5766done
5767  done
5768IFS=$as_save_IFS
5769
5770  ;;
5771esac
5772fi
5773UNIQ=$ac_cv_path_UNIQ
5774if test -n "$UNIQ"; then
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5776$as_echo "$UNIQ" >&6; }
5777else
5778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779$as_echo "no" >&6; }
5780fi
5781
5782
5783  test -n "$UNIQ" && break
5784done
5785
5786
5787  if test "x$UNIQ" = x; then
5788    if test "xuniq" = x; then
5789      PROG_NAME=uniq
5790    else
5791      PROG_NAME=uniq
5792    fi
5793    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5794$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5795    as_fn_error $? "Cannot continue" "$LINENO" 5
5796  fi
5797
5798
5799
5800  for ac_prog in wc
5801do
5802  # Extract the first word of "$ac_prog", so it can be a program name with args.
5803set dummy $ac_prog; ac_word=$2
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805$as_echo_n "checking for $ac_word... " >&6; }
5806if ${ac_cv_path_WC+:} false; then :
5807  $as_echo_n "(cached) " >&6
5808else
5809  case $WC in
5810  [\\/]* | ?:[\\/]*)
5811  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5812  ;;
5813  *)
5814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815for as_dir in $PATH
5816do
5817  IFS=$as_save_IFS
5818  test -z "$as_dir" && as_dir=.
5819    for ac_exec_ext in '' $ac_executable_extensions; do
5820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5821    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5823    break 2
5824  fi
5825done
5826  done
5827IFS=$as_save_IFS
5828
5829  ;;
5830esac
5831fi
5832WC=$ac_cv_path_WC
5833if test -n "$WC"; then
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5835$as_echo "$WC" >&6; }
5836else
5837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838$as_echo "no" >&6; }
5839fi
5840
5841
5842  test -n "$WC" && break
5843done
5844
5845
5846  if test "x$WC" = x; then
5847    if test "xwc" = x; then
5848      PROG_NAME=wc
5849    else
5850      PROG_NAME=wc
5851    fi
5852    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5853$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5854    as_fn_error $? "Cannot continue" "$LINENO" 5
5855  fi
5856
5857
5858
5859  for ac_prog in which
5860do
5861  # Extract the first word of "$ac_prog", so it can be a program name with args.
5862set dummy $ac_prog; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_WHICH+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $WHICH in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891WHICH=$ac_cv_path_WHICH
5892if test -n "$WHICH"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5894$as_echo "$WHICH" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901  test -n "$WHICH" && break
5902done
5903
5904
5905  if test "x$WHICH" = x; then
5906    if test "xwhich" = x; then
5907      PROG_NAME=which
5908    else
5909      PROG_NAME=which
5910    fi
5911    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5912$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5913    as_fn_error $? "Cannot continue" "$LINENO" 5
5914  fi
5915
5916
5917
5918  for ac_prog in xargs
5919do
5920  # Extract the first word of "$ac_prog", so it can be a program name with args.
5921set dummy $ac_prog; ac_word=$2
5922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923$as_echo_n "checking for $ac_word... " >&6; }
5924if ${ac_cv_path_XARGS+:} false; then :
5925  $as_echo_n "(cached) " >&6
5926else
5927  case $XARGS in
5928  [\\/]* | ?:[\\/]*)
5929  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5930  ;;
5931  *)
5932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933for as_dir in $PATH
5934do
5935  IFS=$as_save_IFS
5936  test -z "$as_dir" && as_dir=.
5937    for ac_exec_ext in '' $ac_executable_extensions; do
5938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5939    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941    break 2
5942  fi
5943done
5944  done
5945IFS=$as_save_IFS
5946
5947  ;;
5948esac
5949fi
5950XARGS=$ac_cv_path_XARGS
5951if test -n "$XARGS"; then
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5953$as_echo "$XARGS" >&6; }
5954else
5955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956$as_echo "no" >&6; }
5957fi
5958
5959
5960  test -n "$XARGS" && break
5961done
5962
5963
5964  if test "x$XARGS" = x; then
5965    if test "xxargs" = x; then
5966      PROG_NAME=xargs
5967    else
5968      PROG_NAME=xargs
5969    fi
5970    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5971$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5972    as_fn_error $? "Cannot continue" "$LINENO" 5
5973  fi
5974
5975
5976
5977  # Then required tools that require some special treatment.
5978  for ac_prog in gawk mawk nawk awk
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_prog_AWK+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  if test -n "$AWK"; then
5988  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_prog_AWK="$ac_prog"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005fi
6006fi
6007AWK=$ac_cv_prog_AWK
6008if test -n "$AWK"; then
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6010$as_echo "$AWK" >&6; }
6011else
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017  test -n "$AWK" && break
6018done
6019
6020
6021  if test "x$AWK" = x; then
6022    if test "x" = x; then
6023      PROG_NAME=awk
6024    else
6025      PROG_NAME=
6026    fi
6027    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6029    as_fn_error $? "Cannot continue" "$LINENO" 5
6030  fi
6031
6032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6033$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6034if ${ac_cv_path_GREP+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  if test -z "$GREP"; then
6038  ac_path_GREP_found=false
6039  # Loop through the user's path and test for each of PROGNAME-LIST
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_prog in grep ggrep; do
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6048      as_fn_executable_p "$ac_path_GREP" || continue
6049# Check for GNU ac_path_GREP and select it if it is found.
6050  # Check for GNU $ac_path_GREP
6051case `"$ac_path_GREP" --version 2>&1` in
6052*GNU*)
6053  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6054*)
6055  ac_count=0
6056  $as_echo_n 0123456789 >"conftest.in"
6057  while :
6058  do
6059    cat "conftest.in" "conftest.in" >"conftest.tmp"
6060    mv "conftest.tmp" "conftest.in"
6061    cp "conftest.in" "conftest.nl"
6062    $as_echo 'GREP' >> "conftest.nl"
6063    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6064    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6065    as_fn_arith $ac_count + 1 && ac_count=$as_val
6066    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6067      # Best one so far, save it but keep looking for a better one
6068      ac_cv_path_GREP="$ac_path_GREP"
6069      ac_path_GREP_max=$ac_count
6070    fi
6071    # 10*(2^10) chars as input seems more than enough
6072    test $ac_count -gt 10 && break
6073  done
6074  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6075esac
6076
6077      $ac_path_GREP_found && break 3
6078    done
6079  done
6080  done
6081IFS=$as_save_IFS
6082  if test -z "$ac_cv_path_GREP"; then
6083    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6084  fi
6085else
6086  ac_cv_path_GREP=$GREP
6087fi
6088
6089fi
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6091$as_echo "$ac_cv_path_GREP" >&6; }
6092 GREP="$ac_cv_path_GREP"
6093
6094
6095
6096  if test "x$GREP" = x; then
6097    if test "x" = x; then
6098      PROG_NAME=grep
6099    else
6100      PROG_NAME=
6101    fi
6102    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6103$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6104    as_fn_error $? "Cannot continue" "$LINENO" 5
6105  fi
6106
6107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6108$as_echo_n "checking for egrep... " >&6; }
6109if ${ac_cv_path_EGREP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6113   then ac_cv_path_EGREP="$GREP -E"
6114   else
6115     if test -z "$EGREP"; then
6116  ac_path_EGREP_found=false
6117  # Loop through the user's path and test for each of PROGNAME-LIST
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_prog in egrep; do
6124    for ac_exec_ext in '' $ac_executable_extensions; do
6125      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6126      as_fn_executable_p "$ac_path_EGREP" || continue
6127# Check for GNU ac_path_EGREP and select it if it is found.
6128  # Check for GNU $ac_path_EGREP
6129case `"$ac_path_EGREP" --version 2>&1` in
6130*GNU*)
6131  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6132*)
6133  ac_count=0
6134  $as_echo_n 0123456789 >"conftest.in"
6135  while :
6136  do
6137    cat "conftest.in" "conftest.in" >"conftest.tmp"
6138    mv "conftest.tmp" "conftest.in"
6139    cp "conftest.in" "conftest.nl"
6140    $as_echo 'EGREP' >> "conftest.nl"
6141    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6142    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6143    as_fn_arith $ac_count + 1 && ac_count=$as_val
6144    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6145      # Best one so far, save it but keep looking for a better one
6146      ac_cv_path_EGREP="$ac_path_EGREP"
6147      ac_path_EGREP_max=$ac_count
6148    fi
6149    # 10*(2^10) chars as input seems more than enough
6150    test $ac_count -gt 10 && break
6151  done
6152  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6153esac
6154
6155      $ac_path_EGREP_found && break 3
6156    done
6157  done
6158  done
6159IFS=$as_save_IFS
6160  if test -z "$ac_cv_path_EGREP"; then
6161    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6162  fi
6163else
6164  ac_cv_path_EGREP=$EGREP
6165fi
6166
6167   fi
6168fi
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6170$as_echo "$ac_cv_path_EGREP" >&6; }
6171 EGREP="$ac_cv_path_EGREP"
6172
6173
6174
6175  if test "x$EGREP" = x; then
6176    if test "x" = x; then
6177      PROG_NAME=egrep
6178    else
6179      PROG_NAME=
6180    fi
6181    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6182$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6183    as_fn_error $? "Cannot continue" "$LINENO" 5
6184  fi
6185
6186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6187$as_echo_n "checking for fgrep... " >&6; }
6188if ${ac_cv_path_FGREP+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6192   then ac_cv_path_FGREP="$GREP -F"
6193   else
6194     if test -z "$FGREP"; then
6195  ac_path_FGREP_found=false
6196  # Loop through the user's path and test for each of PROGNAME-LIST
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_prog in fgrep; do
6203    for ac_exec_ext in '' $ac_executable_extensions; do
6204      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6205      as_fn_executable_p "$ac_path_FGREP" || continue
6206# Check for GNU ac_path_FGREP and select it if it is found.
6207  # Check for GNU $ac_path_FGREP
6208case `"$ac_path_FGREP" --version 2>&1` in
6209*GNU*)
6210  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6211*)
6212  ac_count=0
6213  $as_echo_n 0123456789 >"conftest.in"
6214  while :
6215  do
6216    cat "conftest.in" "conftest.in" >"conftest.tmp"
6217    mv "conftest.tmp" "conftest.in"
6218    cp "conftest.in" "conftest.nl"
6219    $as_echo 'FGREP' >> "conftest.nl"
6220    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6221    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6222    as_fn_arith $ac_count + 1 && ac_count=$as_val
6223    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6224      # Best one so far, save it but keep looking for a better one
6225      ac_cv_path_FGREP="$ac_path_FGREP"
6226      ac_path_FGREP_max=$ac_count
6227    fi
6228    # 10*(2^10) chars as input seems more than enough
6229    test $ac_count -gt 10 && break
6230  done
6231  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6232esac
6233
6234      $ac_path_FGREP_found && break 3
6235    done
6236  done
6237  done
6238IFS=$as_save_IFS
6239  if test -z "$ac_cv_path_FGREP"; then
6240    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6241  fi
6242else
6243  ac_cv_path_FGREP=$FGREP
6244fi
6245
6246   fi
6247fi
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6249$as_echo "$ac_cv_path_FGREP" >&6; }
6250 FGREP="$ac_cv_path_FGREP"
6251
6252
6253
6254  if test "x$FGREP" = x; then
6255    if test "x" = x; then
6256      PROG_NAME=fgrep
6257    else
6258      PROG_NAME=
6259    fi
6260    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6262    as_fn_error $? "Cannot continue" "$LINENO" 5
6263  fi
6264
6265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6266$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6267if ${ac_cv_path_SED+:} false; then :
6268  $as_echo_n "(cached) " >&6
6269else
6270            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6271     for ac_i in 1 2 3 4 5 6 7; do
6272       ac_script="$ac_script$as_nl$ac_script"
6273     done
6274     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6275     { ac_script=; unset ac_script;}
6276     if test -z "$SED"; then
6277  ac_path_SED_found=false
6278  # Loop through the user's path and test for each of PROGNAME-LIST
6279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282  IFS=$as_save_IFS
6283  test -z "$as_dir" && as_dir=.
6284    for ac_prog in sed gsed; do
6285    for ac_exec_ext in '' $ac_executable_extensions; do
6286      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6287      as_fn_executable_p "$ac_path_SED" || continue
6288# Check for GNU ac_path_SED and select it if it is found.
6289  # Check for GNU $ac_path_SED
6290case `"$ac_path_SED" --version 2>&1` in
6291*GNU*)
6292  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6293*)
6294  ac_count=0
6295  $as_echo_n 0123456789 >"conftest.in"
6296  while :
6297  do
6298    cat "conftest.in" "conftest.in" >"conftest.tmp"
6299    mv "conftest.tmp" "conftest.in"
6300    cp "conftest.in" "conftest.nl"
6301    $as_echo '' >> "conftest.nl"
6302    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6303    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6304    as_fn_arith $ac_count + 1 && ac_count=$as_val
6305    if test $ac_count -gt ${ac_path_SED_max-0}; then
6306      # Best one so far, save it but keep looking for a better one
6307      ac_cv_path_SED="$ac_path_SED"
6308      ac_path_SED_max=$ac_count
6309    fi
6310    # 10*(2^10) chars as input seems more than enough
6311    test $ac_count -gt 10 && break
6312  done
6313  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6314esac
6315
6316      $ac_path_SED_found && break 3
6317    done
6318  done
6319  done
6320IFS=$as_save_IFS
6321  if test -z "$ac_cv_path_SED"; then
6322    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6323  fi
6324else
6325  ac_cv_path_SED=$SED
6326fi
6327
6328fi
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6330$as_echo "$ac_cv_path_SED" >&6; }
6331 SED="$ac_cv_path_SED"
6332  rm -f conftest.sed
6333
6334
6335  if test "x$SED" = x; then
6336    if test "x" = x; then
6337      PROG_NAME=sed
6338    else
6339      PROG_NAME=
6340    fi
6341    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6343    as_fn_error $? "Cannot continue" "$LINENO" 5
6344  fi
6345
6346
6347  for ac_prog in nawk gawk awk
6348do
6349  # Extract the first word of "$ac_prog", so it can be a program name with args.
6350set dummy $ac_prog; ac_word=$2
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352$as_echo_n "checking for $ac_word... " >&6; }
6353if ${ac_cv_path_NAWK+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356  case $NAWK in
6357  [\\/]* | ?:[\\/]*)
6358  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6359  ;;
6360  *)
6361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364  IFS=$as_save_IFS
6365  test -z "$as_dir" && as_dir=.
6366    for ac_exec_ext in '' $ac_executable_extensions; do
6367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6368    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6370    break 2
6371  fi
6372done
6373  done
6374IFS=$as_save_IFS
6375
6376  ;;
6377esac
6378fi
6379NAWK=$ac_cv_path_NAWK
6380if test -n "$NAWK"; then
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6382$as_echo "$NAWK" >&6; }
6383else
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
6388
6389  test -n "$NAWK" && break
6390done
6391
6392
6393  if test "x$NAWK" = x; then
6394    if test "x" = x; then
6395      PROG_NAME=nawk
6396    else
6397      PROG_NAME=
6398    fi
6399    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6400$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6401    as_fn_error $? "Cannot continue" "$LINENO" 5
6402  fi
6403
6404
6405  # Always force rm.
6406  RM="$RM -f"
6407
6408  # pwd behaves differently on various platforms and some don't support the -L flag.
6409  # Always use the bash builtin pwd to get uniform behavior.
6410  THEPWDCMD=pwd
6411
6412  # These are not required on all platforms
6413  # Extract the first word of "cygpath", so it can be a program name with args.
6414set dummy cygpath; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if ${ac_cv_path_CYGPATH+:} false; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $CYGPATH in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6432    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443CYGPATH=$ac_cv_path_CYGPATH
6444if test -n "$CYGPATH"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6446$as_echo "$CYGPATH" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453  # Extract the first word of "readlink", so it can be a program name with args.
6454set dummy readlink; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if ${ac_cv_path_READLINK+:} false; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $READLINK in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6472    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483READLINK=$ac_cv_path_READLINK
6484if test -n "$READLINK"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6486$as_echo "$READLINK" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493  # Extract the first word of "df", so it can be a program name with args.
6494set dummy df; ac_word=$2
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496$as_echo_n "checking for $ac_word... " >&6; }
6497if ${ac_cv_path_DF+:} false; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500  case $DF in
6501  [\\/]* | ?:[\\/]*)
6502  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6503  ;;
6504  *)
6505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510    for ac_exec_ext in '' $ac_executable_extensions; do
6511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6512    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514    break 2
6515  fi
6516done
6517  done
6518IFS=$as_save_IFS
6519
6520  ;;
6521esac
6522fi
6523DF=$ac_cv_path_DF
6524if test -n "$DF"; then
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6526$as_echo "$DF" >&6; }
6527else
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532
6533  # Extract the first word of "SetFile", so it can be a program name with args.
6534set dummy SetFile; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_SETFILE+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $SETFILE in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563SETFILE=$ac_cv_path_SETFILE
6564if test -n "$SETFILE"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6566$as_echo "$SETFILE" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573
6574
6575# Now we can determine OpenJDK build and target platforms. This is required to
6576# have early on.
6577# Make sure we can run config.sub.
6578$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6579  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6580
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6582$as_echo_n "checking build system type... " >&6; }
6583if ${ac_cv_build+:} false; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  ac_build_alias=$build_alias
6587test "x$ac_build_alias" = x &&
6588  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6589test "x$ac_build_alias" = x &&
6590  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6591ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6592  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6596$as_echo "$ac_cv_build" >&6; }
6597case $ac_cv_build in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6600esac
6601build=$ac_cv_build
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_build
6604shift
6605build_cpu=$1
6606build_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610build_os=$*
6611IFS=$ac_save_IFS
6612case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6613
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6616$as_echo_n "checking host system type... " >&6; }
6617if ${ac_cv_host+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test "x$host_alias" = x; then
6621  ac_cv_host=$ac_cv_build
6622else
6623  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6625fi
6626
6627fi
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6629$as_echo "$ac_cv_host" >&6; }
6630case $ac_cv_host in
6631*-*-*) ;;
6632*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6633esac
6634host=$ac_cv_host
6635ac_save_IFS=$IFS; IFS='-'
6636set x $ac_cv_host
6637shift
6638host_cpu=$1
6639host_vendor=$2
6640shift; shift
6641# Remember, the first character of IFS is used to create $*,
6642# except with old shells:
6643host_os=$*
6644IFS=$ac_save_IFS
6645case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6646
6647
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6649$as_echo_n "checking target system type... " >&6; }
6650if ${ac_cv_target+:} false; then :
6651  $as_echo_n "(cached) " >&6
6652else
6653  if test "x$target_alias" = x; then
6654  ac_cv_target=$ac_cv_host
6655else
6656  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6657    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6658fi
6659
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6662$as_echo "$ac_cv_target" >&6; }
6663case $ac_cv_target in
6664*-*-*) ;;
6665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6666esac
6667target=$ac_cv_target
6668ac_save_IFS=$IFS; IFS='-'
6669set x $ac_cv_target
6670shift
6671target_cpu=$1
6672target_vendor=$2
6673shift; shift
6674# Remember, the first character of IFS is used to create $*,
6675# except with old shells:
6676target_os=$*
6677IFS=$ac_save_IFS
6678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6679
6680
6681# The aliases save the names the user supplied, while $host etc.
6682# will get canonicalized.
6683test -n "$target_alias" &&
6684  test "$program_prefix$program_suffix$program_transform_name" = \
6685    NONENONEs,x,x, &&
6686  program_prefix=${target_alias}-
6687
6688  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6689  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6690  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6691  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6692  # to use the configure naming style.
6693
6694
6695
6696
6697
6698  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6699  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6700  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6701  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6702  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6703  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6704
6705
6706
6707  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6708
6709  case "$build_os" in
6710    *linux*)
6711      VAR_OS=linux
6712      VAR_OS_API=posix
6713      VAR_OS_ENV=linux
6714      ;;
6715    *solaris*)
6716      VAR_OS=solaris
6717      VAR_OS_API=posix
6718      VAR_OS_ENV=solaris
6719      ;;
6720    *darwin*)
6721      VAR_OS=macosx
6722      VAR_OS_API=posix
6723      VAR_OS_ENV=macosx
6724      ;;
6725    *bsd*)
6726      VAR_OS=bsd
6727      VAR_OS_API=posix
6728      VAR_OS_ENV=bsd
6729      ;;
6730    *cygwin*)
6731      VAR_OS=windows
6732      VAR_OS_API=winapi
6733      VAR_OS_ENV=windows.cygwin
6734      ;;
6735    *mingw*)
6736      VAR_OS=windows
6737      VAR_OS_API=winapi
6738      VAR_OS_ENV=windows.msys
6739      ;;
6740    *)
6741      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6742      ;;
6743  esac
6744
6745
6746  # First argument is the cpu name from the trip/quad
6747  case "$build_cpu" in
6748    x86_64)
6749      VAR_CPU=x86_64
6750      VAR_CPU_ARCH=x86
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=little
6753      ;;
6754    i?86)
6755      VAR_CPU=x86
6756      VAR_CPU_ARCH=x86
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=little
6759      ;;
6760    arm*)
6761      VAR_CPU=arm
6762      VAR_CPU_ARCH=arm
6763      VAR_CPU_BITS=32
6764      VAR_CPU_ENDIAN=little
6765      ;;
6766    powerpc)
6767      VAR_CPU=ppc
6768      VAR_CPU_ARCH=ppc
6769      VAR_CPU_BITS=32
6770      VAR_CPU_ENDIAN=big
6771      ;;
6772    powerpc64)
6773      VAR_CPU=ppc64
6774      VAR_CPU_ARCH=ppc
6775      VAR_CPU_BITS=64
6776      VAR_CPU_ENDIAN=big
6777      ;;
6778    s390)
6779      VAR_CPU=s390
6780      VAR_CPU_ARCH=s390
6781      VAR_CPU_BITS=32
6782      VAR_CPU_ENDIAN=big
6783      ;;
6784    s390x)
6785      VAR_CPU=s390x
6786      VAR_CPU_ARCH=s390
6787      VAR_CPU_BITS=64
6788      VAR_CPU_ENDIAN=big
6789      ;;
6790    sparc)
6791      VAR_CPU=sparc
6792      VAR_CPU_ARCH=sparc
6793      VAR_CPU_BITS=32
6794      VAR_CPU_ENDIAN=big
6795      ;;
6796    sparcv9)
6797      VAR_CPU=sparcv9
6798      VAR_CPU_ARCH=sparc
6799      VAR_CPU_BITS=64
6800      VAR_CPU_ENDIAN=big
6801      ;;
6802    *)
6803      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6804      ;;
6805  esac
6806
6807  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6808  OPENJDK_BUILD_OS="$VAR_OS"
6809  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6810  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6811  OPENJDK_BUILD_CPU="$VAR_CPU"
6812  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6813  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6814  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6815
6816
6817
6818
6819
6820
6821
6822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6823$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6825$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6826
6827  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6828
6829  case "$host_os" in
6830    *linux*)
6831      VAR_OS=linux
6832      VAR_OS_API=posix
6833      VAR_OS_ENV=linux
6834      ;;
6835    *solaris*)
6836      VAR_OS=solaris
6837      VAR_OS_API=posix
6838      VAR_OS_ENV=solaris
6839      ;;
6840    *darwin*)
6841      VAR_OS=macosx
6842      VAR_OS_API=posix
6843      VAR_OS_ENV=macosx
6844      ;;
6845    *bsd*)
6846      VAR_OS=bsd
6847      VAR_OS_API=posix
6848      VAR_OS_ENV=bsd
6849      ;;
6850    *cygwin*)
6851      VAR_OS=windows
6852      VAR_OS_API=winapi
6853      VAR_OS_ENV=windows.cygwin
6854      ;;
6855    *mingw*)
6856      VAR_OS=windows
6857      VAR_OS_API=winapi
6858      VAR_OS_ENV=windows.msys
6859      ;;
6860    *)
6861      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6862      ;;
6863  esac
6864
6865
6866  # First argument is the cpu name from the trip/quad
6867  case "$host_cpu" in
6868    x86_64)
6869      VAR_CPU=x86_64
6870      VAR_CPU_ARCH=x86
6871      VAR_CPU_BITS=64
6872      VAR_CPU_ENDIAN=little
6873      ;;
6874    i?86)
6875      VAR_CPU=x86
6876      VAR_CPU_ARCH=x86
6877      VAR_CPU_BITS=32
6878      VAR_CPU_ENDIAN=little
6879      ;;
6880    arm*)
6881      VAR_CPU=arm
6882      VAR_CPU_ARCH=arm
6883      VAR_CPU_BITS=32
6884      VAR_CPU_ENDIAN=little
6885      ;;
6886    powerpc)
6887      VAR_CPU=ppc
6888      VAR_CPU_ARCH=ppc
6889      VAR_CPU_BITS=32
6890      VAR_CPU_ENDIAN=big
6891      ;;
6892    powerpc64)
6893      VAR_CPU=ppc64
6894      VAR_CPU_ARCH=ppc
6895      VAR_CPU_BITS=64
6896      VAR_CPU_ENDIAN=big
6897      ;;
6898    s390)
6899      VAR_CPU=s390
6900      VAR_CPU_ARCH=s390
6901      VAR_CPU_BITS=32
6902      VAR_CPU_ENDIAN=big
6903      ;;
6904    s390x)
6905      VAR_CPU=s390x
6906      VAR_CPU_ARCH=s390
6907      VAR_CPU_BITS=64
6908      VAR_CPU_ENDIAN=big
6909      ;;
6910    sparc)
6911      VAR_CPU=sparc
6912      VAR_CPU_ARCH=sparc
6913      VAR_CPU_BITS=32
6914      VAR_CPU_ENDIAN=big
6915      ;;
6916    sparcv9)
6917      VAR_CPU=sparcv9
6918      VAR_CPU_ARCH=sparc
6919      VAR_CPU_BITS=64
6920      VAR_CPU_ENDIAN=big
6921      ;;
6922    *)
6923      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6924      ;;
6925  esac
6926
6927  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6928  OPENJDK_TARGET_OS="$VAR_OS"
6929  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6930  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6931  OPENJDK_TARGET_CPU="$VAR_CPU"
6932  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6933  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6934  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6935
6936
6937
6938
6939
6940
6941
6942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6943$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6945$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6946
6947
6948
6949# Check whether --with-target-bits was given.
6950if test "${with_target_bits+set}" = set; then :
6951  withval=$with_target_bits;
6952fi
6953
6954
6955  # We have three types of compiles:
6956  # native  == normal compilation, target system == build system
6957  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6958  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6959  #
6960  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6961    # We're doing a proper cross-compilation
6962    COMPILE_TYPE="cross"
6963  else
6964    COMPILE_TYPE="native"
6965  fi
6966
6967  if test "x$with_target_bits" != x; then
6968    if test "x$COMPILE_TYPE" = "xcross"; then
6969      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6970    fi
6971
6972    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6973      # A reduced build is requested
6974      COMPILE_TYPE="reduced"
6975      OPENJDK_TARGET_CPU_BITS=32
6976      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6977        OPENJDK_TARGET_CPU=x86
6978      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6979        OPENJDK_TARGET_CPU=sparc
6980      else
6981        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6982      fi
6983    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6984      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
6985    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6986      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6987$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6988    else
6989      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6990    fi
6991  fi
6992
6993
6994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6995$as_echo_n "checking compilation type... " >&6; }
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6997$as_echo "$COMPILE_TYPE" >&6; }
6998
6999
7000  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7001    REQUIRED_OS_NAME=SunOS
7002    REQUIRED_OS_VERSION=5.10
7003  fi
7004  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7005    REQUIRED_OS_NAME=Linux
7006    REQUIRED_OS_VERSION=2.6
7007  fi
7008  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7009    REQUIRED_OS_NAME=Windows
7010    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7011      REQUIRED_OS_VERSION=5.2
7012    else
7013      REQUIRED_OS_VERSION=5.1
7014    fi
7015  fi
7016  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7017    REQUIRED_OS_NAME=Darwin
7018    REQUIRED_OS_VERSION=11.2
7019  fi
7020
7021
7022
7023
7024
7025  # Also store the legacy naming of the cpu.
7026  # Ie i586 and amd64 instead of x86 and x86_64
7027  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7028  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7029    OPENJDK_TARGET_CPU_LEGACY="i586"
7030  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7031    # On all platforms except MacOSX replace x86_64 with amd64.
7032    OPENJDK_TARGET_CPU_LEGACY="amd64"
7033  fi
7034
7035
7036  # And the second legacy naming of the cpu.
7037  # Ie i386 and amd64 instead of x86 and x86_64.
7038  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7039  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7040    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7041  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7042    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7043  fi
7044
7045
7046  # This is the name of the cpu (but using i386 and amd64 instead of
7047  # x86 and x86_64, respectively), preceeded by a /, to be used when
7048  # locating libraries. On macosx, it's empty, though.
7049  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7050  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051    OPENJDK_TARGET_CPU_LIBDIR=""
7052  fi
7053
7054
7055  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7056  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7057  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7058  OPENJDK_TARGET_CPU_ISADIR=""
7059  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7060    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7061      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7062    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7063      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7064    fi
7065  fi
7066
7067
7068  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7069  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7070  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7071    # On linux only, we replace x86 with i386.
7072    OPENJDK_TARGET_CPU_OSARCH="i386"
7073  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7074    # On all platforms except macosx, we replace x86_64 with amd64.
7075    OPENJDK_TARGET_CPU_OSARCH="amd64"
7076  fi
7077
7078
7079  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7080  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7081    OPENJDK_TARGET_CPU_JLI="i386"
7082  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7083    # On all platforms except macosx, we replace x86_64 with amd64.
7084    OPENJDK_TARGET_CPU_JLI="amd64"
7085  fi
7086  # Now setup the -D flags for building libjli.
7087  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7088  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7089    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7090      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7091    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7092      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7093    fi
7094  fi
7095
7096
7097  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7098  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7099    OPENJDK_TARGET_OS_API_DIR="solaris"
7100  fi
7101  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7102    OPENJDK_TARGET_OS_API_DIR="windows"
7103  fi
7104
7105
7106  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7107    A_LP64="LP64:="
7108    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7109    # unpack200.exe
7110    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7111      ADD_LP64="-D_LP64=1"
7112    fi
7113  fi
7114  LP64=$A_LP64
7115
7116
7117  if test "x$COMPILE_TYPE" = "xcross"; then
7118    # FIXME: ... or should this include reduced builds..?
7119    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7120  else
7121    DEFINE_CROSS_COMPILE_ARCH=""
7122  fi
7123
7124
7125  # ZERO_ARCHDEF is used to enable architecture-specific code
7126  case "${OPENJDK_TARGET_CPU}" in
7127    ppc*)    ZERO_ARCHDEF=PPC   ;;
7128    s390*)   ZERO_ARCHDEF=S390  ;;
7129    sparc*)  ZERO_ARCHDEF=SPARC ;;
7130    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7131    x86)     ZERO_ARCHDEF=IA32  ;;
7132    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7133  esac
7134
7135
7136
7137
7138# Continue setting up basic stuff. Most remaining code require fundamental tools.
7139
7140  # Locate the directory of this script.
7141  SCRIPT="$0"
7142  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7143
7144  # Where is the source? It is located two levels above the configure script.
7145  CURDIR="$PWD"
7146  cd "$AUTOCONF_DIR/../.."
7147  SRC_ROOT="`$THEPWDCMD -L`"
7148
7149  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7150    PATH_SEP=";"
7151
7152  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7153  if test $SRC_ROOT_LENGTH -gt 100; then
7154    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7155  fi
7156
7157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7159$as_echo_n "checking cygwin release... " >&6; }
7160    CYGWIN_VERSION=`$UNAME -r`
7161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7162$as_echo "$CYGWIN_VERSION" >&6; }
7163    WINDOWS_ENV_VENDOR='cygwin'
7164    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7165
7166    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7167    if test "x$CYGWIN_VERSION_OK" = x; then
7168      { $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
7169$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;}
7170      as_fn_error $? "Cannot continue" "$LINENO" 5
7171    fi
7172    if test "x$CYGPATH" = x; then
7173      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7174    fi
7175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7176$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7177    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7178    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7179    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7180    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7182$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7183    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7184    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7185    if test "x$test_cygdrive_prefix" = x; then
7186      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7187    fi
7188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7190$as_echo_n "checking msys release... " >&6; }
7191    MSYS_VERSION=`$UNAME -r`
7192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7193$as_echo "$MSYS_VERSION" >&6; }
7194
7195    WINDOWS_ENV_VENDOR='msys'
7196    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7197
7198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7199$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7200    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7201    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7202
7203  windows_path="$MSYS_ROOT_PATH"
7204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7205    unix_path=`$CYGPATH -u "$windows_path"`
7206    MSYS_ROOT_PATH="$unix_path"
7207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7209    MSYS_ROOT_PATH="$unix_path"
7210  fi
7211
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7213$as_echo "$MSYS_ROOT_PATH" >&6; }
7214    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7215  else
7216    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7217  fi
7218
7219  # Test if windows or unix (cygwin/msys) find is first in path.
7220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7221$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7222  FIND_BINARY_OUTPUT=`find --version 2>&1`
7223  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7225$as_echo "unix style" >&6; }
7226  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7228$as_echo "Windows" >&6; }
7229    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7230$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7231    { $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
7232$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7233    as_fn_error $? "Cannot continue" "$LINENO" 5
7234  else
7235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7236$as_echo "unknown" >&6; }
7237    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7238$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7239  fi
7240
7241  else
7242    PATH_SEP=":"
7243  fi
7244
7245
7246
7247  cd "$CURDIR"
7248
7249
7250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7251
7252  # Input might be given as Windows format, start by converting to
7253  # unix format.
7254  path="$SRC_ROOT"
7255  new_path=`$CYGPATH -u "$path"`
7256
7257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7260  # "foo.exe" is OK but "foo" is an error.
7261  #
7262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7263  # It is also a way to make sure we got the proper file name for the real test later on.
7264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7265  if test "x$test_shortpath" = x; then
7266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7267$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7268    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7269  fi
7270
7271  # Call helper function which possibly converts this using DOS-style short mode.
7272  # If so, the updated path is stored in $new_path.
7273
7274  input_path="$new_path"
7275  # Check if we need to convert this using DOS-style short mode. If the path
7276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7277  # take no chances and rewrite it.
7278  # Note: m4 eats our [], so we need to use [ and ] instead.
7279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7280  if test "x$has_forbidden_chars" != x; then
7281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7285      # Going to short mode and back again did indeed matter. Since short mode is
7286      # case insensitive, let's make it lowercase to improve readability.
7287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7288      # Now convert it back to Unix-stile (cygpath)
7289      input_path=`$CYGPATH -u "$shortmode_path"`
7290      new_path="$input_path"
7291    fi
7292  fi
7293
7294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7295  if test "x$test_cygdrive_prefix" = x; then
7296    # As a simple fix, exclude /usr/bin since it's not a real path.
7297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7299      # a path prefixed by /cygdrive for fixpath to work.
7300      new_path="$CYGWIN_ROOT_PATH$input_path"
7301    fi
7302  fi
7303
7304
7305  if test "x$path" != "x$new_path"; then
7306    SRC_ROOT="$new_path"
7307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7308$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7309  fi
7310
7311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7312
7313  path="$SRC_ROOT"
7314  has_colon=`$ECHO $path | $GREP ^.:`
7315  new_path="$path"
7316  if test "x$has_colon" = x; then
7317    # Not in mixed or Windows style, start by that.
7318    new_path=`cmd //c echo $path`
7319  fi
7320
7321
7322  input_path="$new_path"
7323  # Check if we need to convert this using DOS-style short mode. If the path
7324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7325  # take no chances and rewrite it.
7326  # Note: m4 eats our [], so we need to use [ and ] instead.
7327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7328  if test "x$has_forbidden_chars" != x; then
7329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7331  fi
7332
7333
7334  windows_path="$new_path"
7335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7336    unix_path=`$CYGPATH -u "$windows_path"`
7337    new_path="$unix_path"
7338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7340    new_path="$unix_path"
7341  fi
7342
7343  if test "x$path" != "x$new_path"; then
7344    SRC_ROOT="$new_path"
7345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7346$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7347  fi
7348
7349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7351
7352  else
7353    # We're on a posix platform. Hooray! :)
7354    path="$SRC_ROOT"
7355    has_space=`$ECHO "$path" | $GREP " "`
7356    if test "x$has_space" != x; then
7357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7358$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7359      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7360    fi
7361
7362    # Use eval to expand a potential ~
7363    eval path="$path"
7364    if test ! -f "$path" && test ! -d "$path"; then
7365      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7366    fi
7367
7368    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7369  fi
7370
7371
7372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7373
7374  # Input might be given as Windows format, start by converting to
7375  # unix format.
7376  path="$CURDIR"
7377  new_path=`$CYGPATH -u "$path"`
7378
7379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7382  # "foo.exe" is OK but "foo" is an error.
7383  #
7384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7385  # It is also a way to make sure we got the proper file name for the real test later on.
7386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7387  if test "x$test_shortpath" = x; then
7388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7389$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7390    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7391  fi
7392
7393  # Call helper function which possibly converts this using DOS-style short mode.
7394  # If so, the updated path is stored in $new_path.
7395
7396  input_path="$new_path"
7397  # Check if we need to convert this using DOS-style short mode. If the path
7398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7399  # take no chances and rewrite it.
7400  # Note: m4 eats our [], so we need to use [ and ] instead.
7401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7402  if test "x$has_forbidden_chars" != x; then
7403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7407      # Going to short mode and back again did indeed matter. Since short mode is
7408      # case insensitive, let's make it lowercase to improve readability.
7409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7410      # Now convert it back to Unix-stile (cygpath)
7411      input_path=`$CYGPATH -u "$shortmode_path"`
7412      new_path="$input_path"
7413    fi
7414  fi
7415
7416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7417  if test "x$test_cygdrive_prefix" = x; then
7418    # As a simple fix, exclude /usr/bin since it's not a real path.
7419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7421      # a path prefixed by /cygdrive for fixpath to work.
7422      new_path="$CYGWIN_ROOT_PATH$input_path"
7423    fi
7424  fi
7425
7426
7427  if test "x$path" != "x$new_path"; then
7428    CURDIR="$new_path"
7429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7430$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7431  fi
7432
7433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7434
7435  path="$CURDIR"
7436  has_colon=`$ECHO $path | $GREP ^.:`
7437  new_path="$path"
7438  if test "x$has_colon" = x; then
7439    # Not in mixed or Windows style, start by that.
7440    new_path=`cmd //c echo $path`
7441  fi
7442
7443
7444  input_path="$new_path"
7445  # Check if we need to convert this using DOS-style short mode. If the path
7446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7447  # take no chances and rewrite it.
7448  # Note: m4 eats our [], so we need to use [ and ] instead.
7449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7450  if test "x$has_forbidden_chars" != x; then
7451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7453  fi
7454
7455
7456  windows_path="$new_path"
7457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7458    unix_path=`$CYGPATH -u "$windows_path"`
7459    new_path="$unix_path"
7460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7462    new_path="$unix_path"
7463  fi
7464
7465  if test "x$path" != "x$new_path"; then
7466    CURDIR="$new_path"
7467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7468$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7469  fi
7470
7471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7473
7474  else
7475    # We're on a posix platform. Hooray! :)
7476    path="$CURDIR"
7477    has_space=`$ECHO "$path" | $GREP " "`
7478    if test "x$has_space" != x; then
7479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7480$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7481      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7482    fi
7483
7484    # Use eval to expand a potential ~
7485    eval path="$path"
7486    if test ! -f "$path" && test ! -d "$path"; then
7487      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7488    fi
7489
7490    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7491  fi
7492
7493
7494  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7495    # Add extra search paths on solaris for utilities like ar and as etc...
7496    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7497  fi
7498
7499  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7500  # is not correct.
7501
7502# Check whether --with-sys-root was given.
7503if test "${with_sys_root+set}" = set; then :
7504  withval=$with_sys_root;
7505fi
7506
7507
7508  if test "x$with_sys_root" != x; then
7509    SYS_ROOT=$with_sys_root
7510  else
7511    SYS_ROOT=/
7512  fi
7513
7514
7515
7516# Check whether --with-tools-dir was given.
7517if test "${with_tools_dir+set}" = set; then :
7518  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7519
7520fi
7521
7522
7523
7524# Check whether --with-devkit was given.
7525if test "${with_devkit+set}" = set; then :
7526  withval=$with_devkit;
7527        if test "x$with_sys_root" != x; then
7528          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7529        fi
7530
7531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7532
7533  # Input might be given as Windows format, start by converting to
7534  # unix format.
7535  path="$with_devkit"
7536  new_path=`$CYGPATH -u "$path"`
7537
7538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7541  # "foo.exe" is OK but "foo" is an error.
7542  #
7543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7544  # It is also a way to make sure we got the proper file name for the real test later on.
7545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7546  if test "x$test_shortpath" = x; then
7547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7548$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7549    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7550  fi
7551
7552  # Call helper function which possibly converts this using DOS-style short mode.
7553  # If so, the updated path is stored in $new_path.
7554
7555  input_path="$new_path"
7556  # Check if we need to convert this using DOS-style short mode. If the path
7557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7558  # take no chances and rewrite it.
7559  # Note: m4 eats our [], so we need to use [ and ] instead.
7560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7561  if test "x$has_forbidden_chars" != x; then
7562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7566      # Going to short mode and back again did indeed matter. Since short mode is
7567      # case insensitive, let's make it lowercase to improve readability.
7568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7569      # Now convert it back to Unix-stile (cygpath)
7570      input_path=`$CYGPATH -u "$shortmode_path"`
7571      new_path="$input_path"
7572    fi
7573  fi
7574
7575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7576  if test "x$test_cygdrive_prefix" = x; then
7577    # As a simple fix, exclude /usr/bin since it's not a real path.
7578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7580      # a path prefixed by /cygdrive for fixpath to work.
7581      new_path="$CYGWIN_ROOT_PATH$input_path"
7582    fi
7583  fi
7584
7585
7586  if test "x$path" != "x$new_path"; then
7587    with_devkit="$new_path"
7588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7589$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7590  fi
7591
7592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7593
7594  path="$with_devkit"
7595  has_colon=`$ECHO $path | $GREP ^.:`
7596  new_path="$path"
7597  if test "x$has_colon" = x; then
7598    # Not in mixed or Windows style, start by that.
7599    new_path=`cmd //c echo $path`
7600  fi
7601
7602
7603  input_path="$new_path"
7604  # Check if we need to convert this using DOS-style short mode. If the path
7605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7606  # take no chances and rewrite it.
7607  # Note: m4 eats our [], so we need to use [ and ] instead.
7608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7609  if test "x$has_forbidden_chars" != x; then
7610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7612  fi
7613
7614
7615  windows_path="$new_path"
7616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7617    unix_path=`$CYGPATH -u "$windows_path"`
7618    new_path="$unix_path"
7619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7621    new_path="$unix_path"
7622  fi
7623
7624  if test "x$path" != "x$new_path"; then
7625    with_devkit="$new_path"
7626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7627$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7628  fi
7629
7630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7632
7633  else
7634    # We're on a posix platform. Hooray! :)
7635    path="$with_devkit"
7636    has_space=`$ECHO "$path" | $GREP " "`
7637    if test "x$has_space" != x; then
7638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7639$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7640      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7641    fi
7642
7643    # Use eval to expand a potential ~
7644    eval path="$path"
7645    if test ! -f "$path" && test ! -d "$path"; then
7646      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7647    fi
7648
7649    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7650  fi
7651
7652
7653  if test "x$TOOLS_DIR" = x; then
7654    TOOLS_DIR="$with_devkit/bin"
7655  else
7656    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7657  fi
7658
7659        if test -d "$with_devkit/$host_alias/libc"; then
7660          SYS_ROOT=$with_devkit/$host_alias/libc
7661        elif test -d "$with_devkit/$host/sys-root"; then
7662          SYS_ROOT=$with_devkit/$host/sys-root
7663        fi
7664
7665fi
7666
7667
7668
7669  # Setup default logging of stdout and stderr to build.log in the output root.
7670  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7671  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7672  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7673
7674
7675
7676
7677
7678# Check if it's a pure open build or if custom sources are to be used.
7679
7680  # Check whether --enable-openjdk-only was given.
7681if test "${enable_openjdk_only+set}" = set; then :
7682  enableval=$enable_openjdk_only;
7683else
7684  enable_openjdk_only="no"
7685fi
7686
7687
7688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7689$as_echo_n "checking for presence of closed sources... " >&6; }
7690  if test -d "$SRC_ROOT/jdk/src/closed"; then
7691    CLOSED_SOURCE_PRESENT=yes
7692  else
7693    CLOSED_SOURCE_PRESENT=no
7694  fi
7695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7696$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7697
7698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7699$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7700  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7702$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7703
7704  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7705    OPENJDK=true
7706    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7707      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7708$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7709    fi
7710  else
7711    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7712      OPENJDK=true
7713    else
7714      OPENJDK=false
7715    fi
7716  fi
7717
7718  if test "x$OPENJDK" = "xtrue"; then
7719    SET_OPENJDK="OPENJDK=true"
7720  fi
7721
7722
7723
7724
7725# These are needed to be able to create a configuration name (and thus the output directory)
7726
7727  ###############################################################################
7728  #
7729  # Check which variant of the JDK that we want to build.
7730  # Currently we have:
7731  #    normal:   standard edition
7732  # but the custom make system may add other variants
7733  #
7734  # Effectively the JDK variant gives a name to a specific set of
7735  # modules to compile into the JDK. In the future, these modules
7736  # might even be Jigsaw modules.
7737  #
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7739$as_echo_n "checking which variant of the JDK to build... " >&6; }
7740
7741# Check whether --with-jdk-variant was given.
7742if test "${with_jdk_variant+set}" = set; then :
7743  withval=$with_jdk_variant;
7744fi
7745
7746
7747  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7748    JDK_VARIANT="normal"
7749  else
7750    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7751  fi
7752
7753
7754
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7756$as_echo "$JDK_VARIANT" >&6; }
7757
7758
7759
7760  ###############################################################################
7761  #
7762  # Check which variants of the JVM that we want to build.
7763  # Currently we have:
7764  #    server: normal interpreter and a tiered C1/C2 compiler
7765  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7766  #    minimal1: reduced form of client with optional VM services and features stripped out
7767  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7768  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7769  #    zero: no machine code interpreter, no compiler
7770  #    zeroshark: zero interpreter and shark/llvm compiler backend
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7772$as_echo_n "checking which variants of the JVM to build... " >&6; }
7773
7774# Check whether --with-jvm-variants was given.
7775if test "${with_jvm_variants+set}" = set; then :
7776  withval=$with_jvm_variants;
7777fi
7778
7779
7780  if test "x$with_jvm_variants" = x; then
7781    with_jvm_variants="server"
7782  fi
7783
7784  JVM_VARIANTS=",$with_jvm_variants,"
7785  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7786
7787  if test "x$TEST_VARIANTS" != "x,"; then
7788    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7789  fi
7790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7791$as_echo "$with_jvm_variants" >&6; }
7792
7793  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7794  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7795  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7796  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7797  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7798  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7799
7800  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7801    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7802      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7803    fi
7804  fi
7805  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7806    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7807      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7808    fi
7809  fi
7810  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7811    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7812      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7813    fi
7814  fi
7815
7816  # Replace the commas with AND for use in the build directory name.
7817  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7818  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/'`
7819  if test "x$COUNT_VARIANTS" != "x,1"; then
7820    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7821  else
7822    BUILDING_MULTIPLE_JVM_VARIANTS=no
7823  fi
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833  INCLUDE_SA=true
7834  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7835    INCLUDE_SA=false
7836  fi
7837  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7838    INCLUDE_SA=false
7839  fi
7840
7841
7842  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7843    MACOSX_UNIVERSAL="true"
7844  fi
7845
7846
7847
7848
7849  ###############################################################################
7850  #
7851  # Set the debug level
7852  #    release: no debug information, all optimizations, no asserts.
7853  #    fastdebug: debug information (-g), all optimizations, all asserts
7854  #    slowdebug: debug information (-g), no optimizations, all asserts
7855  #
7856  DEBUG_LEVEL="release"
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7858$as_echo_n "checking which debug level to use... " >&6; }
7859  # Check whether --enable-debug was given.
7860if test "${enable_debug+set}" = set; then :
7861  enableval=$enable_debug;
7862        ENABLE_DEBUG="${enableval}"
7863        DEBUG_LEVEL="fastdebug"
7864
7865else
7866  ENABLE_DEBUG="no"
7867fi
7868
7869
7870
7871# Check whether --with-debug-level was given.
7872if test "${with_debug_level+set}" = set; then :
7873  withval=$with_debug_level;
7874        DEBUG_LEVEL="${withval}"
7875        if test "x$ENABLE_DEBUG" = xyes; then
7876          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7877        fi
7878
7879fi
7880
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7882$as_echo "$DEBUG_LEVEL" >&6; }
7883
7884  if test "x$DEBUG_LEVEL" != xrelease && \
7885      test "x$DEBUG_LEVEL" != xfastdebug && \
7886      test "x$DEBUG_LEVEL" != xslowdebug; then
7887    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7888  fi
7889
7890
7891  ###############################################################################
7892  #
7893  # Setup legacy vars/targets and new vars to deal with different debug levels.
7894  #
7895
7896  case $DEBUG_LEVEL in
7897    release )
7898      VARIANT="OPT"
7899      FASTDEBUG="false"
7900      DEBUG_CLASSFILES="false"
7901      BUILD_VARIANT_RELEASE=""
7902      HOTSPOT_DEBUG_LEVEL="product"
7903      HOTSPOT_EXPORT="product"
7904      ;;
7905    fastdebug )
7906      VARIANT="DBG"
7907      FASTDEBUG="true"
7908      DEBUG_CLASSFILES="true"
7909      BUILD_VARIANT_RELEASE="-fastdebug"
7910      HOTSPOT_DEBUG_LEVEL="fastdebug"
7911      HOTSPOT_EXPORT="fastdebug"
7912      ;;
7913    slowdebug )
7914      VARIANT="DBG"
7915      FASTDEBUG="false"
7916      DEBUG_CLASSFILES="true"
7917      BUILD_VARIANT_RELEASE="-debug"
7918      HOTSPOT_DEBUG_LEVEL="jvmg"
7919      HOTSPOT_EXPORT="debug"
7920      ;;
7921  esac
7922
7923  #####
7924  # Generate the legacy makefile targets for hotspot.
7925  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7926  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7927  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7928  # But until then ...
7929  HOTSPOT_TARGET=""
7930
7931  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7932    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7933  fi
7934
7935  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7936    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7937  fi
7938
7939  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7940    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7941  fi
7942
7943  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7944    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7945  fi
7946
7947  if test "x$JVM_VARIANT_ZERO" = xtrue; then
7948    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7949  fi
7950
7951  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7952    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7953  fi
7954
7955  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7956
7957  # On Macosx universal binaries are produced, but they only contain
7958  # 64 bit intel. This invalidates control of which jvms are built
7959  # from configure, but only server is valid anyway. Fix this
7960  # when hotspot makefiles are rewritten.
7961  if test "x$MACOSX_UNIVERSAL" = xtrue; then
7962    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7963  fi
7964
7965  #####
7966
7967
7968
7969
7970
7971
7972
7973
7974# With basic setup done, call the custom early hook.
7975
7976
7977# To properly create a configuration name, we need to have the OpenJDK target
7978# and options (variants and debug level) parsed.
7979
7980
7981
7982# Check whether --with-conf-name was given.
7983if test "${with_conf_name+set}" = set; then :
7984  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7985fi
7986
7987
7988  # Test from where we are running configure, in or outside of src root.
7989  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7990      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7991      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7992    # We are running configure from the src root.
7993    # Create a default ./build/target-variant-debuglevel output root.
7994    if test "x${CONF_NAME}" = x; then
7995      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7996    fi
7997    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7998    $MKDIR -p "$OUTPUT_ROOT"
7999    if test ! -d "$OUTPUT_ROOT"; then
8000      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8001    fi
8002  else
8003    # We are running configure from outside of the src dir.
8004    # Then use the current directory as output dir!
8005    # If configuration is situated in normal build directory, just use the build
8006    # directory name as configuration name, otherwise use the complete path.
8007    if test "x${CONF_NAME}" = x; then
8008      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8009    fi
8010    OUTPUT_ROOT="$CURDIR"
8011
8012    # WARNING: This might be a bad thing to do. You need to be sure you want to
8013    # have a configuration in this directory. Do some sanity checks!
8014
8015    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8016      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8017      # other files
8018      files_present=`$LS $OUTPUT_ROOT`
8019      # Configure has already touched config.log and confdefs.h in the current dir when this check
8020      # is performed.
8021      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8022      | $TR -d '\n'`
8023      if test "x$filtered_files" != x; then
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8025$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8027$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8029$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8030        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8031$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8032        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8033$as_echo "$as_me: seriously mess up just about everything." >&6;}
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8035$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8037$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8038        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8039      fi
8040    fi
8041  fi
8042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8043$as_echo_n "checking what configuration name to use... " >&6; }
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8045$as_echo "$CONF_NAME" >&6; }
8046
8047
8048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8049
8050  # Input might be given as Windows format, start by converting to
8051  # unix format.
8052  path="$OUTPUT_ROOT"
8053  new_path=`$CYGPATH -u "$path"`
8054
8055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8058  # "foo.exe" is OK but "foo" is an error.
8059  #
8060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8061  # It is also a way to make sure we got the proper file name for the real test later on.
8062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8063  if test "x$test_shortpath" = x; then
8064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8065$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8066    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8067  fi
8068
8069  # Call helper function which possibly converts this using DOS-style short mode.
8070  # If so, the updated path is stored in $new_path.
8071
8072  input_path="$new_path"
8073  # Check if we need to convert this using DOS-style short mode. If the path
8074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8075  # take no chances and rewrite it.
8076  # Note: m4 eats our [], so we need to use [ and ] instead.
8077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8078  if test "x$has_forbidden_chars" != x; then
8079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8083      # Going to short mode and back again did indeed matter. Since short mode is
8084      # case insensitive, let's make it lowercase to improve readability.
8085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8086      # Now convert it back to Unix-stile (cygpath)
8087      input_path=`$CYGPATH -u "$shortmode_path"`
8088      new_path="$input_path"
8089    fi
8090  fi
8091
8092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8093  if test "x$test_cygdrive_prefix" = x; then
8094    # As a simple fix, exclude /usr/bin since it's not a real path.
8095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8097      # a path prefixed by /cygdrive for fixpath to work.
8098      new_path="$CYGWIN_ROOT_PATH$input_path"
8099    fi
8100  fi
8101
8102
8103  if test "x$path" != "x$new_path"; then
8104    OUTPUT_ROOT="$new_path"
8105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8106$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8107  fi
8108
8109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8110
8111  path="$OUTPUT_ROOT"
8112  has_colon=`$ECHO $path | $GREP ^.:`
8113  new_path="$path"
8114  if test "x$has_colon" = x; then
8115    # Not in mixed or Windows style, start by that.
8116    new_path=`cmd //c echo $path`
8117  fi
8118
8119
8120  input_path="$new_path"
8121  # Check if we need to convert this using DOS-style short mode. If the path
8122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8123  # take no chances and rewrite it.
8124  # Note: m4 eats our [], so we need to use [ and ] instead.
8125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8126  if test "x$has_forbidden_chars" != x; then
8127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8129  fi
8130
8131
8132  windows_path="$new_path"
8133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8134    unix_path=`$CYGPATH -u "$windows_path"`
8135    new_path="$unix_path"
8136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8138    new_path="$unix_path"
8139  fi
8140
8141  if test "x$path" != "x$new_path"; then
8142    OUTPUT_ROOT="$new_path"
8143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8144$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8145  fi
8146
8147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8149
8150  else
8151    # We're on a posix platform. Hooray! :)
8152    path="$OUTPUT_ROOT"
8153    has_space=`$ECHO "$path" | $GREP " "`
8154    if test "x$has_space" != x; then
8155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8156$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8157      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8158    fi
8159
8160    # Use eval to expand a potential ~
8161    eval path="$path"
8162    if test ! -f "$path" && test ! -d "$path"; then
8163      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8164    fi
8165
8166    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8167  fi
8168
8169
8170  SPEC=$OUTPUT_ROOT/spec.gmk
8171
8172  CONF_NAME=$CONF_NAME
8173
8174  OUTPUT_ROOT=$OUTPUT_ROOT
8175
8176
8177  # Most of the probed defines are put into config.h
8178  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8179
8180  # The spec.gmk file contains all variables for the make system.
8181  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8182
8183  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8184  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8185
8186  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8187  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8188
8189  # The compare.sh is used to compare the build output to other builds.
8190  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8191
8192  # Spec.sh is currently used by compare-objects.sh
8193  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8194
8195  # The generated Makefile knows where the spec.gmk is and where the source is.
8196  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8197  # which will look for generated configurations
8198  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8199
8200
8201  # Save the arguments given to us
8202  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8203
8204
8205# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8206
8207  for ac_prog in apt-get yum port pkgutil pkgadd
8208do
8209  # Extract the first word of "$ac_prog", so it can be a program name with args.
8210set dummy $ac_prog; ac_word=$2
8211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212$as_echo_n "checking for $ac_word... " >&6; }
8213if ${ac_cv_prog_PKGHANDLER+:} false; then :
8214  $as_echo_n "(cached) " >&6
8215else
8216  if test -n "$PKGHANDLER"; then
8217  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8218else
8219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8220for as_dir in $PATH
8221do
8222  IFS=$as_save_IFS
8223  test -z "$as_dir" && as_dir=.
8224    for ac_exec_ext in '' $ac_executable_extensions; do
8225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8226    ac_cv_prog_PKGHANDLER="$ac_prog"
8227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8228    break 2
8229  fi
8230done
8231  done
8232IFS=$as_save_IFS
8233
8234fi
8235fi
8236PKGHANDLER=$ac_cv_prog_PKGHANDLER
8237if test -n "$PKGHANDLER"; then
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8239$as_echo "$PKGHANDLER" >&6; }
8240else
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8242$as_echo "no" >&6; }
8243fi
8244
8245
8246  test -n "$PKGHANDLER" && break
8247done
8248
8249
8250
8251# Setup tools that requires more complex handling, or that is not needed by the configure script.
8252
8253
8254  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8255  if test "x$MAKE" != x; then
8256    # User has supplied a make, test it.
8257    if test ! -f "$MAKE"; then
8258      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8259    fi
8260
8261  MAKE_CANDIDATE=""$MAKE""
8262  DESCRIPTION="user supplied MAKE=$MAKE"
8263  if test "x$MAKE_CANDIDATE" != x; then
8264    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8265$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8266    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8267    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8268    if test "x$IS_GNU_MAKE" = x; then
8269      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8270$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8271    else
8272      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8273      if test "x$IS_MODERN_MAKE" = x; then
8274        { $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
8275$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;}
8276      else
8277        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8278          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8279            MAKE_EXPECTED_ENV='cygwin'
8280          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8281            MAKE_EXPECTED_ENV='msys'
8282          else
8283            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8284          fi
8285          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8286          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8287        else
8288          # Not relevant for non-Windows
8289          IS_MAKE_CORRECT_ENV=true
8290        fi
8291        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8292          { $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
8293$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;}
8294        else
8295          FOUND_MAKE=$MAKE_CANDIDATE
8296
8297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8298
8299  # First separate the path from the arguments. This will split at the first
8300  # space.
8301  complete="$FOUND_MAKE"
8302  path="${complete%% *}"
8303  tmp="$complete EOL"
8304  arguments="${tmp#* }"
8305
8306  # Input might be given as Windows format, start by converting to
8307  # unix format.
8308  new_path=`$CYGPATH -u "$path"`
8309
8310  # Now try to locate executable using which
8311  new_path=`$WHICH "$new_path" 2> /dev/null`
8312  # bat and cmd files are not always considered executable in cygwin causing which
8313  # to not find them
8314  if test "x$new_path" = x \
8315      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8316      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8317    new_path=`$CYGPATH -u "$path"`
8318  fi
8319  if test "x$new_path" = x; then
8320    # Oops. Which didn't find the executable.
8321    # The splitting of arguments from the executable at a space might have been incorrect,
8322    # since paths with space are more likely in Windows. Give it another try with the whole
8323    # argument.
8324    path="$complete"
8325    arguments="EOL"
8326    new_path=`$CYGPATH -u "$path"`
8327    new_path=`$WHICH "$new_path" 2> /dev/null`
8328    # bat and cmd files are not always considered executable in cygwin causing which
8329    # to not find them
8330    if test "x$new_path" = x \
8331        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8332        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8333      new_path=`$CYGPATH -u "$path"`
8334    fi
8335    if test "x$new_path" = x; then
8336      # It's still not found. Now this is an unrecoverable error.
8337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8338$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8339      has_space=`$ECHO "$complete" | $GREP " "`
8340      if test "x$has_space" != x; then
8341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8343      fi
8344      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8345    fi
8346  fi
8347
8348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8351  # "foo.exe" is OK but "foo" is an error.
8352  #
8353  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8354  # It is also a way to make sure we got the proper file name for the real test later on.
8355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8356  if test "x$test_shortpath" = x; then
8357    # Short path failed, file does not exist as specified.
8358    # Try adding .exe or .cmd
8359    if test -f "${new_path}.exe"; then
8360      input_to_shortpath="${new_path}.exe"
8361    elif test -f "${new_path}.cmd"; then
8362      input_to_shortpath="${new_path}.cmd"
8363    else
8364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8368      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8369    fi
8370  else
8371    input_to_shortpath="$new_path"
8372  fi
8373
8374  # Call helper function which possibly converts this using DOS-style short mode.
8375  # If so, the updated path is stored in $new_path.
8376  new_path="$input_to_shortpath"
8377
8378  input_path="$input_to_shortpath"
8379  # Check if we need to convert this using DOS-style short mode. If the path
8380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8381  # take no chances and rewrite it.
8382  # Note: m4 eats our [], so we need to use [ and ] instead.
8383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8384  if test "x$has_forbidden_chars" != x; then
8385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8389      # Going to short mode and back again did indeed matter. Since short mode is
8390      # case insensitive, let's make it lowercase to improve readability.
8391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8392      # Now convert it back to Unix-stile (cygpath)
8393      input_path=`$CYGPATH -u "$shortmode_path"`
8394      new_path="$input_path"
8395    fi
8396  fi
8397
8398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8399  if test "x$test_cygdrive_prefix" = x; then
8400    # As a simple fix, exclude /usr/bin since it's not a real path.
8401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8403      # a path prefixed by /cygdrive for fixpath to work.
8404      new_path="$CYGWIN_ROOT_PATH$input_path"
8405    fi
8406  fi
8407
8408  # remove trailing .exe if any
8409  new_path="${new_path/%.exe/}"
8410
8411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8412
8413  # First separate the path from the arguments. This will split at the first
8414  # space.
8415  complete="$FOUND_MAKE"
8416  path="${complete%% *}"
8417  tmp="$complete EOL"
8418  arguments="${tmp#* }"
8419
8420  # Input might be given as Windows format, start by converting to
8421  # unix format.
8422  new_path="$path"
8423
8424  windows_path="$new_path"
8425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8426    unix_path=`$CYGPATH -u "$windows_path"`
8427    new_path="$unix_path"
8428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8430    new_path="$unix_path"
8431  fi
8432
8433
8434  # Now try to locate executable using which
8435  new_path=`$WHICH "$new_path" 2> /dev/null`
8436
8437  if test "x$new_path" = x; then
8438    # Oops. Which didn't find the executable.
8439    # The splitting of arguments from the executable at a space might have been incorrect,
8440    # since paths with space are more likely in Windows. Give it another try with the whole
8441    # argument.
8442    path="$complete"
8443    arguments="EOL"
8444    new_path="$path"
8445
8446  windows_path="$new_path"
8447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8448    unix_path=`$CYGPATH -u "$windows_path"`
8449    new_path="$unix_path"
8450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8452    new_path="$unix_path"
8453  fi
8454
8455
8456    new_path=`$WHICH "$new_path" 2> /dev/null`
8457
8458    if test "x$new_path" = x; then
8459      # It's still not found. Now this is an unrecoverable error.
8460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8461$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8462      has_space=`$ECHO "$complete" | $GREP " "`
8463      if test "x$has_space" != x; then
8464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8466      fi
8467      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8468    fi
8469  fi
8470
8471  # Now new_path has a complete unix path to the binary
8472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8473    # Keep paths in /bin as-is, but remove trailing .exe if any
8474    new_path="${new_path/%.exe/}"
8475    # Do not save /bin paths to all_fixpath_prefixes!
8476  else
8477    # Not in mixed or Windows style, start by that.
8478    new_path=`cmd //c echo $new_path`
8479
8480  input_path="$new_path"
8481  # Check if we need to convert this using DOS-style short mode. If the path
8482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8483  # take no chances and rewrite it.
8484  # Note: m4 eats our [], so we need to use [ and ] instead.
8485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8486  if test "x$has_forbidden_chars" != x; then
8487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8489  fi
8490
8491    # Output is in $new_path
8492
8493  windows_path="$new_path"
8494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8495    unix_path=`$CYGPATH -u "$windows_path"`
8496    new_path="$unix_path"
8497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8499    new_path="$unix_path"
8500  fi
8501
8502    # remove trailing .exe if any
8503    new_path="${new_path/%.exe/}"
8504
8505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8507  fi
8508
8509  else
8510    # We're on a posix platform. Hooray! :)
8511    # First separate the path from the arguments. This will split at the first
8512    # space.
8513    complete="$FOUND_MAKE"
8514    path="${complete%% *}"
8515    tmp="$complete EOL"
8516    arguments="${tmp#* }"
8517
8518    # Cannot rely on the command "which" here since it doesn't always work.
8519    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8520    if test -z "$is_absolute_path"; then
8521      # Path to executable is not absolute. Find it.
8522      IFS_save="$IFS"
8523      IFS=:
8524      for p in $PATH; do
8525        if test -f "$p/$path" && test -x "$p/$path"; then
8526          new_path="$p/$path"
8527          break
8528        fi
8529      done
8530      IFS="$IFS_save"
8531    else
8532      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8533$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8534      new_path="$path"
8535    fi
8536
8537    if test "x$new_path" = x; then
8538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8539$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8540      has_space=`$ECHO "$complete" | $GREP " "`
8541      if test "x$has_space" != x; then
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8544      fi
8545      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8546    fi
8547  fi
8548
8549  # Now join together the path and the arguments once again
8550  if test "x$arguments" != xEOL; then
8551    new_complete="$new_path ${arguments% *}"
8552  else
8553    new_complete="$new_path"
8554  fi
8555
8556  if test "x$complete" != "x$new_complete"; then
8557    FOUND_MAKE="$new_complete"
8558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8559$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8560  fi
8561
8562        fi
8563      fi
8564    fi
8565  fi
8566
8567    if test "x$FOUND_MAKE" = x; then
8568      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8569    fi
8570  else
8571    # Try our hardest to locate a correct version of GNU make
8572    for ac_prog in gmake
8573do
8574  # Extract the first word of "$ac_prog", so it can be a program name with args.
8575set dummy $ac_prog; ac_word=$2
8576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8577$as_echo_n "checking for $ac_word... " >&6; }
8578if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8579  $as_echo_n "(cached) " >&6
8580else
8581  case $CHECK_GMAKE in
8582  [\\/]* | ?:[\\/]*)
8583  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8584  ;;
8585  *)
8586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8587for as_dir in $PATH
8588do
8589  IFS=$as_save_IFS
8590  test -z "$as_dir" && as_dir=.
8591    for ac_exec_ext in '' $ac_executable_extensions; do
8592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8593    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8595    break 2
8596  fi
8597done
8598  done
8599IFS=$as_save_IFS
8600
8601  ;;
8602esac
8603fi
8604CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8605if test -n "$CHECK_GMAKE"; then
8606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8607$as_echo "$CHECK_GMAKE" >&6; }
8608else
8609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8610$as_echo "no" >&6; }
8611fi
8612
8613
8614  test -n "$CHECK_GMAKE" && break
8615done
8616
8617
8618  MAKE_CANDIDATE=""$CHECK_GMAKE""
8619  DESCRIPTION="gmake in PATH"
8620  if test "x$MAKE_CANDIDATE" != x; then
8621    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8622$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8623    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8624    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8625    if test "x$IS_GNU_MAKE" = x; then
8626      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8627$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8628    else
8629      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8630      if test "x$IS_MODERN_MAKE" = x; then
8631        { $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
8632$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;}
8633      else
8634        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8635          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8636            MAKE_EXPECTED_ENV='cygwin'
8637          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8638            MAKE_EXPECTED_ENV='msys'
8639          else
8640            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8641          fi
8642          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8643          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8644        else
8645          # Not relevant for non-Windows
8646          IS_MAKE_CORRECT_ENV=true
8647        fi
8648        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8649          { $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
8650$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;}
8651        else
8652          FOUND_MAKE=$MAKE_CANDIDATE
8653
8654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8655
8656  # First separate the path from the arguments. This will split at the first
8657  # space.
8658  complete="$FOUND_MAKE"
8659  path="${complete%% *}"
8660  tmp="$complete EOL"
8661  arguments="${tmp#* }"
8662
8663  # Input might be given as Windows format, start by converting to
8664  # unix format.
8665  new_path=`$CYGPATH -u "$path"`
8666
8667  # Now try to locate executable using which
8668  new_path=`$WHICH "$new_path" 2> /dev/null`
8669  # bat and cmd files are not always considered executable in cygwin causing which
8670  # to not find them
8671  if test "x$new_path" = x \
8672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8674    new_path=`$CYGPATH -u "$path"`
8675  fi
8676  if test "x$new_path" = x; then
8677    # Oops. Which didn't find the executable.
8678    # The splitting of arguments from the executable at a space might have been incorrect,
8679    # since paths with space are more likely in Windows. Give it another try with the whole
8680    # argument.
8681    path="$complete"
8682    arguments="EOL"
8683    new_path=`$CYGPATH -u "$path"`
8684    new_path=`$WHICH "$new_path" 2> /dev/null`
8685    # bat and cmd files are not always considered executable in cygwin causing which
8686    # to not find them
8687    if test "x$new_path" = x \
8688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8690      new_path=`$CYGPATH -u "$path"`
8691    fi
8692    if test "x$new_path" = x; then
8693      # It's still not found. Now this is an unrecoverable error.
8694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8696      has_space=`$ECHO "$complete" | $GREP " "`
8697      if test "x$has_space" != x; then
8698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8700      fi
8701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8702    fi
8703  fi
8704
8705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8708  # "foo.exe" is OK but "foo" is an error.
8709  #
8710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8711  # It is also a way to make sure we got the proper file name for the real test later on.
8712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8713  if test "x$test_shortpath" = x; then
8714    # Short path failed, file does not exist as specified.
8715    # Try adding .exe or .cmd
8716    if test -f "${new_path}.exe"; then
8717      input_to_shortpath="${new_path}.exe"
8718    elif test -f "${new_path}.cmd"; then
8719      input_to_shortpath="${new_path}.cmd"
8720    else
8721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8726    fi
8727  else
8728    input_to_shortpath="$new_path"
8729  fi
8730
8731  # Call helper function which possibly converts this using DOS-style short mode.
8732  # If so, the updated path is stored in $new_path.
8733  new_path="$input_to_shortpath"
8734
8735  input_path="$input_to_shortpath"
8736  # Check if we need to convert this using DOS-style short mode. If the path
8737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8738  # take no chances and rewrite it.
8739  # Note: m4 eats our [], so we need to use [ and ] instead.
8740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8741  if test "x$has_forbidden_chars" != x; then
8742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8746      # Going to short mode and back again did indeed matter. Since short mode is
8747      # case insensitive, let's make it lowercase to improve readability.
8748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8749      # Now convert it back to Unix-stile (cygpath)
8750      input_path=`$CYGPATH -u "$shortmode_path"`
8751      new_path="$input_path"
8752    fi
8753  fi
8754
8755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8756  if test "x$test_cygdrive_prefix" = x; then
8757    # As a simple fix, exclude /usr/bin since it's not a real path.
8758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8760      # a path prefixed by /cygdrive for fixpath to work.
8761      new_path="$CYGWIN_ROOT_PATH$input_path"
8762    fi
8763  fi
8764
8765  # remove trailing .exe if any
8766  new_path="${new_path/%.exe/}"
8767
8768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8769
8770  # First separate the path from the arguments. This will split at the first
8771  # space.
8772  complete="$FOUND_MAKE"
8773  path="${complete%% *}"
8774  tmp="$complete EOL"
8775  arguments="${tmp#* }"
8776
8777  # Input might be given as Windows format, start by converting to
8778  # unix format.
8779  new_path="$path"
8780
8781  windows_path="$new_path"
8782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8783    unix_path=`$CYGPATH -u "$windows_path"`
8784    new_path="$unix_path"
8785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8787    new_path="$unix_path"
8788  fi
8789
8790
8791  # Now try to locate executable using which
8792  new_path=`$WHICH "$new_path" 2> /dev/null`
8793
8794  if test "x$new_path" = x; then
8795    # Oops. Which didn't find the executable.
8796    # The splitting of arguments from the executable at a space might have been incorrect,
8797    # since paths with space are more likely in Windows. Give it another try with the whole
8798    # argument.
8799    path="$complete"
8800    arguments="EOL"
8801    new_path="$path"
8802
8803  windows_path="$new_path"
8804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8805    unix_path=`$CYGPATH -u "$windows_path"`
8806    new_path="$unix_path"
8807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8809    new_path="$unix_path"
8810  fi
8811
8812
8813    new_path=`$WHICH "$new_path" 2> /dev/null`
8814
8815    if test "x$new_path" = x; then
8816      # It's still not found. Now this is an unrecoverable error.
8817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8818$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8819      has_space=`$ECHO "$complete" | $GREP " "`
8820      if test "x$has_space" != x; then
8821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8823      fi
8824      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8825    fi
8826  fi
8827
8828  # Now new_path has a complete unix path to the binary
8829  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8830    # Keep paths in /bin as-is, but remove trailing .exe if any
8831    new_path="${new_path/%.exe/}"
8832    # Do not save /bin paths to all_fixpath_prefixes!
8833  else
8834    # Not in mixed or Windows style, start by that.
8835    new_path=`cmd //c echo $new_path`
8836
8837  input_path="$new_path"
8838  # Check if we need to convert this using DOS-style short mode. If the path
8839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8840  # take no chances and rewrite it.
8841  # Note: m4 eats our [], so we need to use [ and ] instead.
8842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8843  if test "x$has_forbidden_chars" != x; then
8844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8846  fi
8847
8848    # Output is in $new_path
8849
8850  windows_path="$new_path"
8851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8852    unix_path=`$CYGPATH -u "$windows_path"`
8853    new_path="$unix_path"
8854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8856    new_path="$unix_path"
8857  fi
8858
8859    # remove trailing .exe if any
8860    new_path="${new_path/%.exe/}"
8861
8862    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8863    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8864  fi
8865
8866  else
8867    # We're on a posix platform. Hooray! :)
8868    # First separate the path from the arguments. This will split at the first
8869    # space.
8870    complete="$FOUND_MAKE"
8871    path="${complete%% *}"
8872    tmp="$complete EOL"
8873    arguments="${tmp#* }"
8874
8875    # Cannot rely on the command "which" here since it doesn't always work.
8876    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8877    if test -z "$is_absolute_path"; then
8878      # Path to executable is not absolute. Find it.
8879      IFS_save="$IFS"
8880      IFS=:
8881      for p in $PATH; do
8882        if test -f "$p/$path" && test -x "$p/$path"; then
8883          new_path="$p/$path"
8884          break
8885        fi
8886      done
8887      IFS="$IFS_save"
8888    else
8889      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8890$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8891      new_path="$path"
8892    fi
8893
8894    if test "x$new_path" = x; then
8895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8896$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8897      has_space=`$ECHO "$complete" | $GREP " "`
8898      if test "x$has_space" != x; then
8899        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8900$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8901      fi
8902      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8903    fi
8904  fi
8905
8906  # Now join together the path and the arguments once again
8907  if test "x$arguments" != xEOL; then
8908    new_complete="$new_path ${arguments% *}"
8909  else
8910    new_complete="$new_path"
8911  fi
8912
8913  if test "x$complete" != "x$new_complete"; then
8914    FOUND_MAKE="$new_complete"
8915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8916$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8917  fi
8918
8919        fi
8920      fi
8921    fi
8922  fi
8923
8924
8925    if test "x$FOUND_MAKE" = x; then
8926      for ac_prog in make
8927do
8928  # Extract the first word of "$ac_prog", so it can be a program name with args.
8929set dummy $ac_prog; ac_word=$2
8930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8931$as_echo_n "checking for $ac_word... " >&6; }
8932if ${ac_cv_path_CHECK_MAKE+:} false; then :
8933  $as_echo_n "(cached) " >&6
8934else
8935  case $CHECK_MAKE in
8936  [\\/]* | ?:[\\/]*)
8937  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8938  ;;
8939  *)
8940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8941for as_dir in $PATH
8942do
8943  IFS=$as_save_IFS
8944  test -z "$as_dir" && as_dir=.
8945    for ac_exec_ext in '' $ac_executable_extensions; do
8946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8947    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8949    break 2
8950  fi
8951done
8952  done
8953IFS=$as_save_IFS
8954
8955  ;;
8956esac
8957fi
8958CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8959if test -n "$CHECK_MAKE"; then
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8961$as_echo "$CHECK_MAKE" >&6; }
8962else
8963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8964$as_echo "no" >&6; }
8965fi
8966
8967
8968  test -n "$CHECK_MAKE" && break
8969done
8970
8971
8972  MAKE_CANDIDATE=""$CHECK_MAKE""
8973  DESCRIPTION="make in PATH"
8974  if test "x$MAKE_CANDIDATE" != x; then
8975    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8976$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8977    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8978    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8979    if test "x$IS_GNU_MAKE" = x; then
8980      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8981$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8982    else
8983      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8984      if test "x$IS_MODERN_MAKE" = x; then
8985        { $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
8986$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;}
8987      else
8988        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8989          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8990            MAKE_EXPECTED_ENV='cygwin'
8991          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8992            MAKE_EXPECTED_ENV='msys'
8993          else
8994            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8995          fi
8996          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8997          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8998        else
8999          # Not relevant for non-Windows
9000          IS_MAKE_CORRECT_ENV=true
9001        fi
9002        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9003          { $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
9004$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;}
9005        else
9006          FOUND_MAKE=$MAKE_CANDIDATE
9007
9008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9009
9010  # First separate the path from the arguments. This will split at the first
9011  # space.
9012  complete="$FOUND_MAKE"
9013  path="${complete%% *}"
9014  tmp="$complete EOL"
9015  arguments="${tmp#* }"
9016
9017  # Input might be given as Windows format, start by converting to
9018  # unix format.
9019  new_path=`$CYGPATH -u "$path"`
9020
9021  # Now try to locate executable using which
9022  new_path=`$WHICH "$new_path" 2> /dev/null`
9023  # bat and cmd files are not always considered executable in cygwin causing which
9024  # to not find them
9025  if test "x$new_path" = x \
9026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9028    new_path=`$CYGPATH -u "$path"`
9029  fi
9030  if test "x$new_path" = x; then
9031    # Oops. Which didn't find the executable.
9032    # The splitting of arguments from the executable at a space might have been incorrect,
9033    # since paths with space are more likely in Windows. Give it another try with the whole
9034    # argument.
9035    path="$complete"
9036    arguments="EOL"
9037    new_path=`$CYGPATH -u "$path"`
9038    new_path=`$WHICH "$new_path" 2> /dev/null`
9039    # bat and cmd files are not always considered executable in cygwin causing which
9040    # to not find them
9041    if test "x$new_path" = x \
9042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9044      new_path=`$CYGPATH -u "$path"`
9045    fi
9046    if test "x$new_path" = x; then
9047      # It's still not found. Now this is an unrecoverable error.
9048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9049$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9050      has_space=`$ECHO "$complete" | $GREP " "`
9051      if test "x$has_space" != x; then
9052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9054      fi
9055      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9056    fi
9057  fi
9058
9059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9062  # "foo.exe" is OK but "foo" is an error.
9063  #
9064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9065  # It is also a way to make sure we got the proper file name for the real test later on.
9066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9067  if test "x$test_shortpath" = x; then
9068    # Short path failed, file does not exist as specified.
9069    # Try adding .exe or .cmd
9070    if test -f "${new_path}.exe"; then
9071      input_to_shortpath="${new_path}.exe"
9072    elif test -f "${new_path}.cmd"; then
9073      input_to_shortpath="${new_path}.cmd"
9074    else
9075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9076$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9079      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9080    fi
9081  else
9082    input_to_shortpath="$new_path"
9083  fi
9084
9085  # Call helper function which possibly converts this using DOS-style short mode.
9086  # If so, the updated path is stored in $new_path.
9087  new_path="$input_to_shortpath"
9088
9089  input_path="$input_to_shortpath"
9090  # Check if we need to convert this using DOS-style short mode. If the path
9091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9092  # take no chances and rewrite it.
9093  # Note: m4 eats our [], so we need to use [ and ] instead.
9094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9095  if test "x$has_forbidden_chars" != x; then
9096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9100      # Going to short mode and back again did indeed matter. Since short mode is
9101      # case insensitive, let's make it lowercase to improve readability.
9102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9103      # Now convert it back to Unix-stile (cygpath)
9104      input_path=`$CYGPATH -u "$shortmode_path"`
9105      new_path="$input_path"
9106    fi
9107  fi
9108
9109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9110  if test "x$test_cygdrive_prefix" = x; then
9111    # As a simple fix, exclude /usr/bin since it's not a real path.
9112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9114      # a path prefixed by /cygdrive for fixpath to work.
9115      new_path="$CYGWIN_ROOT_PATH$input_path"
9116    fi
9117  fi
9118
9119  # remove trailing .exe if any
9120  new_path="${new_path/%.exe/}"
9121
9122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9123
9124  # First separate the path from the arguments. This will split at the first
9125  # space.
9126  complete="$FOUND_MAKE"
9127  path="${complete%% *}"
9128  tmp="$complete EOL"
9129  arguments="${tmp#* }"
9130
9131  # Input might be given as Windows format, start by converting to
9132  # unix format.
9133  new_path="$path"
9134
9135  windows_path="$new_path"
9136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9137    unix_path=`$CYGPATH -u "$windows_path"`
9138    new_path="$unix_path"
9139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9141    new_path="$unix_path"
9142  fi
9143
9144
9145  # Now try to locate executable using which
9146  new_path=`$WHICH "$new_path" 2> /dev/null`
9147
9148  if test "x$new_path" = x; then
9149    # Oops. Which didn't find the executable.
9150    # The splitting of arguments from the executable at a space might have been incorrect,
9151    # since paths with space are more likely in Windows. Give it another try with the whole
9152    # argument.
9153    path="$complete"
9154    arguments="EOL"
9155    new_path="$path"
9156
9157  windows_path="$new_path"
9158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9159    unix_path=`$CYGPATH -u "$windows_path"`
9160    new_path="$unix_path"
9161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9163    new_path="$unix_path"
9164  fi
9165
9166
9167    new_path=`$WHICH "$new_path" 2> /dev/null`
9168
9169    if test "x$new_path" = x; then
9170      # It's still not found. Now this is an unrecoverable error.
9171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9172$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9173      has_space=`$ECHO "$complete" | $GREP " "`
9174      if test "x$has_space" != x; then
9175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9177      fi
9178      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9179    fi
9180  fi
9181
9182  # Now new_path has a complete unix path to the binary
9183  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9184    # Keep paths in /bin as-is, but remove trailing .exe if any
9185    new_path="${new_path/%.exe/}"
9186    # Do not save /bin paths to all_fixpath_prefixes!
9187  else
9188    # Not in mixed or Windows style, start by that.
9189    new_path=`cmd //c echo $new_path`
9190
9191  input_path="$new_path"
9192  # Check if we need to convert this using DOS-style short mode. If the path
9193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9194  # take no chances and rewrite it.
9195  # Note: m4 eats our [], so we need to use [ and ] instead.
9196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9197  if test "x$has_forbidden_chars" != x; then
9198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9200  fi
9201
9202    # Output is in $new_path
9203
9204  windows_path="$new_path"
9205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9206    unix_path=`$CYGPATH -u "$windows_path"`
9207    new_path="$unix_path"
9208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9210    new_path="$unix_path"
9211  fi
9212
9213    # remove trailing .exe if any
9214    new_path="${new_path/%.exe/}"
9215
9216    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9217    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9218  fi
9219
9220  else
9221    # We're on a posix platform. Hooray! :)
9222    # First separate the path from the arguments. This will split at the first
9223    # space.
9224    complete="$FOUND_MAKE"
9225    path="${complete%% *}"
9226    tmp="$complete EOL"
9227    arguments="${tmp#* }"
9228
9229    # Cannot rely on the command "which" here since it doesn't always work.
9230    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9231    if test -z "$is_absolute_path"; then
9232      # Path to executable is not absolute. Find it.
9233      IFS_save="$IFS"
9234      IFS=:
9235      for p in $PATH; do
9236        if test -f "$p/$path" && test -x "$p/$path"; then
9237          new_path="$p/$path"
9238          break
9239        fi
9240      done
9241      IFS="$IFS_save"
9242    else
9243      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9244$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9245      new_path="$path"
9246    fi
9247
9248    if test "x$new_path" = x; then
9249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9251      has_space=`$ECHO "$complete" | $GREP " "`
9252      if test "x$has_space" != x; then
9253        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9255      fi
9256      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9257    fi
9258  fi
9259
9260  # Now join together the path and the arguments once again
9261  if test "x$arguments" != xEOL; then
9262    new_complete="$new_path ${arguments% *}"
9263  else
9264    new_complete="$new_path"
9265  fi
9266
9267  if test "x$complete" != "x$new_complete"; then
9268    FOUND_MAKE="$new_complete"
9269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9270$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9271  fi
9272
9273        fi
9274      fi
9275    fi
9276  fi
9277
9278    fi
9279
9280    if test "x$FOUND_MAKE" = x; then
9281      if test "x$TOOLS_DIR" != x; then
9282        # We have a tools-dir, check that as well before giving up.
9283        OLD_PATH=$PATH
9284        PATH=$TOOLS_DIR:$PATH
9285        for ac_prog in gmake
9286do
9287  # Extract the first word of "$ac_prog", so it can be a program name with args.
9288set dummy $ac_prog; ac_word=$2
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9290$as_echo_n "checking for $ac_word... " >&6; }
9291if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9292  $as_echo_n "(cached) " >&6
9293else
9294  case $CHECK_TOOLSDIR_GMAKE in
9295  [\\/]* | ?:[\\/]*)
9296  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9297  ;;
9298  *)
9299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9300for as_dir in $PATH
9301do
9302  IFS=$as_save_IFS
9303  test -z "$as_dir" && as_dir=.
9304    for ac_exec_ext in '' $ac_executable_extensions; do
9305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9306    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9308    break 2
9309  fi
9310done
9311  done
9312IFS=$as_save_IFS
9313
9314  ;;
9315esac
9316fi
9317CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9318if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9320$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9321else
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323$as_echo "no" >&6; }
9324fi
9325
9326
9327  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9328done
9329
9330
9331  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9332  DESCRIPTION="gmake in tools-dir"
9333  if test "x$MAKE_CANDIDATE" != x; then
9334    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9335$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9336    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9337    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9338    if test "x$IS_GNU_MAKE" = x; then
9339      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9340$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9341    else
9342      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9343      if test "x$IS_MODERN_MAKE" = x; then
9344        { $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
9345$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;}
9346      else
9347        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9348          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9349            MAKE_EXPECTED_ENV='cygwin'
9350          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9351            MAKE_EXPECTED_ENV='msys'
9352          else
9353            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9354          fi
9355          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9356          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9357        else
9358          # Not relevant for non-Windows
9359          IS_MAKE_CORRECT_ENV=true
9360        fi
9361        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9362          { $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
9363$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;}
9364        else
9365          FOUND_MAKE=$MAKE_CANDIDATE
9366
9367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9368
9369  # First separate the path from the arguments. This will split at the first
9370  # space.
9371  complete="$FOUND_MAKE"
9372  path="${complete%% *}"
9373  tmp="$complete EOL"
9374  arguments="${tmp#* }"
9375
9376  # Input might be given as Windows format, start by converting to
9377  # unix format.
9378  new_path=`$CYGPATH -u "$path"`
9379
9380  # Now try to locate executable using which
9381  new_path=`$WHICH "$new_path" 2> /dev/null`
9382  # bat and cmd files are not always considered executable in cygwin causing which
9383  # to not find them
9384  if test "x$new_path" = x \
9385      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9386      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9387    new_path=`$CYGPATH -u "$path"`
9388  fi
9389  if test "x$new_path" = x; then
9390    # Oops. Which didn't find the executable.
9391    # The splitting of arguments from the executable at a space might have been incorrect,
9392    # since paths with space are more likely in Windows. Give it another try with the whole
9393    # argument.
9394    path="$complete"
9395    arguments="EOL"
9396    new_path=`$CYGPATH -u "$path"`
9397    new_path=`$WHICH "$new_path" 2> /dev/null`
9398    # bat and cmd files are not always considered executable in cygwin causing which
9399    # to not find them
9400    if test "x$new_path" = x \
9401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9403      new_path=`$CYGPATH -u "$path"`
9404    fi
9405    if test "x$new_path" = x; then
9406      # It's still not found. Now this is an unrecoverable error.
9407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9408$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9409      has_space=`$ECHO "$complete" | $GREP " "`
9410      if test "x$has_space" != x; then
9411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9413      fi
9414      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9415    fi
9416  fi
9417
9418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9421  # "foo.exe" is OK but "foo" is an error.
9422  #
9423  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9424  # It is also a way to make sure we got the proper file name for the real test later on.
9425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9426  if test "x$test_shortpath" = x; then
9427    # Short path failed, file does not exist as specified.
9428    # Try adding .exe or .cmd
9429    if test -f "${new_path}.exe"; then
9430      input_to_shortpath="${new_path}.exe"
9431    elif test -f "${new_path}.cmd"; then
9432      input_to_shortpath="${new_path}.cmd"
9433    else
9434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9438      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9439    fi
9440  else
9441    input_to_shortpath="$new_path"
9442  fi
9443
9444  # Call helper function which possibly converts this using DOS-style short mode.
9445  # If so, the updated path is stored in $new_path.
9446  new_path="$input_to_shortpath"
9447
9448  input_path="$input_to_shortpath"
9449  # Check if we need to convert this using DOS-style short mode. If the path
9450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9451  # take no chances and rewrite it.
9452  # Note: m4 eats our [], so we need to use [ and ] instead.
9453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9454  if test "x$has_forbidden_chars" != x; then
9455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9459      # Going to short mode and back again did indeed matter. Since short mode is
9460      # case insensitive, let's make it lowercase to improve readability.
9461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9462      # Now convert it back to Unix-stile (cygpath)
9463      input_path=`$CYGPATH -u "$shortmode_path"`
9464      new_path="$input_path"
9465    fi
9466  fi
9467
9468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9469  if test "x$test_cygdrive_prefix" = x; then
9470    # As a simple fix, exclude /usr/bin since it's not a real path.
9471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9473      # a path prefixed by /cygdrive for fixpath to work.
9474      new_path="$CYGWIN_ROOT_PATH$input_path"
9475    fi
9476  fi
9477
9478  # remove trailing .exe if any
9479  new_path="${new_path/%.exe/}"
9480
9481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9482
9483  # First separate the path from the arguments. This will split at the first
9484  # space.
9485  complete="$FOUND_MAKE"
9486  path="${complete%% *}"
9487  tmp="$complete EOL"
9488  arguments="${tmp#* }"
9489
9490  # Input might be given as Windows format, start by converting to
9491  # unix format.
9492  new_path="$path"
9493
9494  windows_path="$new_path"
9495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9496    unix_path=`$CYGPATH -u "$windows_path"`
9497    new_path="$unix_path"
9498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9500    new_path="$unix_path"
9501  fi
9502
9503
9504  # Now try to locate executable using which
9505  new_path=`$WHICH "$new_path" 2> /dev/null`
9506
9507  if test "x$new_path" = x; then
9508    # Oops. Which didn't find the executable.
9509    # The splitting of arguments from the executable at a space might have been incorrect,
9510    # since paths with space are more likely in Windows. Give it another try with the whole
9511    # argument.
9512    path="$complete"
9513    arguments="EOL"
9514    new_path="$path"
9515
9516  windows_path="$new_path"
9517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9518    unix_path=`$CYGPATH -u "$windows_path"`
9519    new_path="$unix_path"
9520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9522    new_path="$unix_path"
9523  fi
9524
9525
9526    new_path=`$WHICH "$new_path" 2> /dev/null`
9527
9528    if test "x$new_path" = x; then
9529      # It's still not found. Now this is an unrecoverable error.
9530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9531$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9532      has_space=`$ECHO "$complete" | $GREP " "`
9533      if test "x$has_space" != x; then
9534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9536      fi
9537      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9538    fi
9539  fi
9540
9541  # Now new_path has a complete unix path to the binary
9542  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9543    # Keep paths in /bin as-is, but remove trailing .exe if any
9544    new_path="${new_path/%.exe/}"
9545    # Do not save /bin paths to all_fixpath_prefixes!
9546  else
9547    # Not in mixed or Windows style, start by that.
9548    new_path=`cmd //c echo $new_path`
9549
9550  input_path="$new_path"
9551  # Check if we need to convert this using DOS-style short mode. If the path
9552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9553  # take no chances and rewrite it.
9554  # Note: m4 eats our [], so we need to use [ and ] instead.
9555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9556  if test "x$has_forbidden_chars" != x; then
9557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9559  fi
9560
9561    # Output is in $new_path
9562
9563  windows_path="$new_path"
9564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9565    unix_path=`$CYGPATH -u "$windows_path"`
9566    new_path="$unix_path"
9567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9569    new_path="$unix_path"
9570  fi
9571
9572    # remove trailing .exe if any
9573    new_path="${new_path/%.exe/}"
9574
9575    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9576    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9577  fi
9578
9579  else
9580    # We're on a posix platform. Hooray! :)
9581    # First separate the path from the arguments. This will split at the first
9582    # space.
9583    complete="$FOUND_MAKE"
9584    path="${complete%% *}"
9585    tmp="$complete EOL"
9586    arguments="${tmp#* }"
9587
9588    # Cannot rely on the command "which" here since it doesn't always work.
9589    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9590    if test -z "$is_absolute_path"; then
9591      # Path to executable is not absolute. Find it.
9592      IFS_save="$IFS"
9593      IFS=:
9594      for p in $PATH; do
9595        if test -f "$p/$path" && test -x "$p/$path"; then
9596          new_path="$p/$path"
9597          break
9598        fi
9599      done
9600      IFS="$IFS_save"
9601    else
9602      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9603$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9604      new_path="$path"
9605    fi
9606
9607    if test "x$new_path" = x; then
9608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9610      has_space=`$ECHO "$complete" | $GREP " "`
9611      if test "x$has_space" != x; then
9612        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9614      fi
9615      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9616    fi
9617  fi
9618
9619  # Now join together the path and the arguments once again
9620  if test "x$arguments" != xEOL; then
9621    new_complete="$new_path ${arguments% *}"
9622  else
9623    new_complete="$new_path"
9624  fi
9625
9626  if test "x$complete" != "x$new_complete"; then
9627    FOUND_MAKE="$new_complete"
9628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9629$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9630  fi
9631
9632        fi
9633      fi
9634    fi
9635  fi
9636
9637        if test "x$FOUND_MAKE" = x; then
9638          for ac_prog in make
9639do
9640  # Extract the first word of "$ac_prog", so it can be a program name with args.
9641set dummy $ac_prog; ac_word=$2
9642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9643$as_echo_n "checking for $ac_word... " >&6; }
9644if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9645  $as_echo_n "(cached) " >&6
9646else
9647  case $CHECK_TOOLSDIR_MAKE in
9648  [\\/]* | ?:[\\/]*)
9649  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9650  ;;
9651  *)
9652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9653for as_dir in $PATH
9654do
9655  IFS=$as_save_IFS
9656  test -z "$as_dir" && as_dir=.
9657    for ac_exec_ext in '' $ac_executable_extensions; do
9658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9659    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9661    break 2
9662  fi
9663done
9664  done
9665IFS=$as_save_IFS
9666
9667  ;;
9668esac
9669fi
9670CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9671if test -n "$CHECK_TOOLSDIR_MAKE"; then
9672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9673$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9674else
9675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676$as_echo "no" >&6; }
9677fi
9678
9679
9680  test -n "$CHECK_TOOLSDIR_MAKE" && break
9681done
9682
9683
9684  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9685  DESCRIPTION="make in tools-dir"
9686  if test "x$MAKE_CANDIDATE" != x; then
9687    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9688$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9689    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9690    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9691    if test "x$IS_GNU_MAKE" = x; then
9692      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9693$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9694    else
9695      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9696      if test "x$IS_MODERN_MAKE" = x; then
9697        { $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
9698$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;}
9699      else
9700        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9701          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9702            MAKE_EXPECTED_ENV='cygwin'
9703          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9704            MAKE_EXPECTED_ENV='msys'
9705          else
9706            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9707          fi
9708          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9709          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9710        else
9711          # Not relevant for non-Windows
9712          IS_MAKE_CORRECT_ENV=true
9713        fi
9714        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9715          { $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
9716$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;}
9717        else
9718          FOUND_MAKE=$MAKE_CANDIDATE
9719
9720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9721
9722  # First separate the path from the arguments. This will split at the first
9723  # space.
9724  complete="$FOUND_MAKE"
9725  path="${complete%% *}"
9726  tmp="$complete EOL"
9727  arguments="${tmp#* }"
9728
9729  # Input might be given as Windows format, start by converting to
9730  # unix format.
9731  new_path=`$CYGPATH -u "$path"`
9732
9733  # Now try to locate executable using which
9734  new_path=`$WHICH "$new_path" 2> /dev/null`
9735  # bat and cmd files are not always considered executable in cygwin causing which
9736  # to not find them
9737  if test "x$new_path" = x \
9738      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9739      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9740    new_path=`$CYGPATH -u "$path"`
9741  fi
9742  if test "x$new_path" = x; then
9743    # Oops. Which didn't find the executable.
9744    # The splitting of arguments from the executable at a space might have been incorrect,
9745    # since paths with space are more likely in Windows. Give it another try with the whole
9746    # argument.
9747    path="$complete"
9748    arguments="EOL"
9749    new_path=`$CYGPATH -u "$path"`
9750    new_path=`$WHICH "$new_path" 2> /dev/null`
9751    # bat and cmd files are not always considered executable in cygwin causing which
9752    # to not find them
9753    if test "x$new_path" = x \
9754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9756      new_path=`$CYGPATH -u "$path"`
9757    fi
9758    if test "x$new_path" = x; then
9759      # It's still not found. Now this is an unrecoverable error.
9760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9761$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9762      has_space=`$ECHO "$complete" | $GREP " "`
9763      if test "x$has_space" != x; then
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9766      fi
9767      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9768    fi
9769  fi
9770
9771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9774  # "foo.exe" is OK but "foo" is an error.
9775  #
9776  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9777  # It is also a way to make sure we got the proper file name for the real test later on.
9778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9779  if test "x$test_shortpath" = x; then
9780    # Short path failed, file does not exist as specified.
9781    # Try adding .exe or .cmd
9782    if test -f "${new_path}.exe"; then
9783      input_to_shortpath="${new_path}.exe"
9784    elif test -f "${new_path}.cmd"; then
9785      input_to_shortpath="${new_path}.cmd"
9786    else
9787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9788$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9789      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9790$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9791      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9792    fi
9793  else
9794    input_to_shortpath="$new_path"
9795  fi
9796
9797  # Call helper function which possibly converts this using DOS-style short mode.
9798  # If so, the updated path is stored in $new_path.
9799  new_path="$input_to_shortpath"
9800
9801  input_path="$input_to_shortpath"
9802  # Check if we need to convert this using DOS-style short mode. If the path
9803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9804  # take no chances and rewrite it.
9805  # Note: m4 eats our [], so we need to use [ and ] instead.
9806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9807  if test "x$has_forbidden_chars" != x; then
9808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9812      # Going to short mode and back again did indeed matter. Since short mode is
9813      # case insensitive, let's make it lowercase to improve readability.
9814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9815      # Now convert it back to Unix-stile (cygpath)
9816      input_path=`$CYGPATH -u "$shortmode_path"`
9817      new_path="$input_path"
9818    fi
9819  fi
9820
9821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9822  if test "x$test_cygdrive_prefix" = x; then
9823    # As a simple fix, exclude /usr/bin since it's not a real path.
9824    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9826      # a path prefixed by /cygdrive for fixpath to work.
9827      new_path="$CYGWIN_ROOT_PATH$input_path"
9828    fi
9829  fi
9830
9831  # remove trailing .exe if any
9832  new_path="${new_path/%.exe/}"
9833
9834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9835
9836  # First separate the path from the arguments. This will split at the first
9837  # space.
9838  complete="$FOUND_MAKE"
9839  path="${complete%% *}"
9840  tmp="$complete EOL"
9841  arguments="${tmp#* }"
9842
9843  # Input might be given as Windows format, start by converting to
9844  # unix format.
9845  new_path="$path"
9846
9847  windows_path="$new_path"
9848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9849    unix_path=`$CYGPATH -u "$windows_path"`
9850    new_path="$unix_path"
9851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9853    new_path="$unix_path"
9854  fi
9855
9856
9857  # Now try to locate executable using which
9858  new_path=`$WHICH "$new_path" 2> /dev/null`
9859
9860  if test "x$new_path" = x; then
9861    # Oops. Which didn't find the executable.
9862    # The splitting of arguments from the executable at a space might have been incorrect,
9863    # since paths with space are more likely in Windows. Give it another try with the whole
9864    # argument.
9865    path="$complete"
9866    arguments="EOL"
9867    new_path="$path"
9868
9869  windows_path="$new_path"
9870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9871    unix_path=`$CYGPATH -u "$windows_path"`
9872    new_path="$unix_path"
9873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9875    new_path="$unix_path"
9876  fi
9877
9878
9879    new_path=`$WHICH "$new_path" 2> /dev/null`
9880
9881    if test "x$new_path" = x; then
9882      # It's still not found. Now this is an unrecoverable error.
9883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9885      has_space=`$ECHO "$complete" | $GREP " "`
9886      if test "x$has_space" != x; then
9887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9889      fi
9890      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9891    fi
9892  fi
9893
9894  # Now new_path has a complete unix path to the binary
9895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9896    # Keep paths in /bin as-is, but remove trailing .exe if any
9897    new_path="${new_path/%.exe/}"
9898    # Do not save /bin paths to all_fixpath_prefixes!
9899  else
9900    # Not in mixed or Windows style, start by that.
9901    new_path=`cmd //c echo $new_path`
9902
9903  input_path="$new_path"
9904  # Check if we need to convert this using DOS-style short mode. If the path
9905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9906  # take no chances and rewrite it.
9907  # Note: m4 eats our [], so we need to use [ and ] instead.
9908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9909  if test "x$has_forbidden_chars" != x; then
9910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9912  fi
9913
9914    # Output is in $new_path
9915
9916  windows_path="$new_path"
9917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9918    unix_path=`$CYGPATH -u "$windows_path"`
9919    new_path="$unix_path"
9920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9922    new_path="$unix_path"
9923  fi
9924
9925    # remove trailing .exe if any
9926    new_path="${new_path/%.exe/}"
9927
9928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9930  fi
9931
9932  else
9933    # We're on a posix platform. Hooray! :)
9934    # First separate the path from the arguments. This will split at the first
9935    # space.
9936    complete="$FOUND_MAKE"
9937    path="${complete%% *}"
9938    tmp="$complete EOL"
9939    arguments="${tmp#* }"
9940
9941    # Cannot rely on the command "which" here since it doesn't always work.
9942    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9943    if test -z "$is_absolute_path"; then
9944      # Path to executable is not absolute. Find it.
9945      IFS_save="$IFS"
9946      IFS=:
9947      for p in $PATH; do
9948        if test -f "$p/$path" && test -x "$p/$path"; then
9949          new_path="$p/$path"
9950          break
9951        fi
9952      done
9953      IFS="$IFS_save"
9954    else
9955      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9956$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9957      new_path="$path"
9958    fi
9959
9960    if test "x$new_path" = x; then
9961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9962$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9963      has_space=`$ECHO "$complete" | $GREP " "`
9964      if test "x$has_space" != x; then
9965        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9967      fi
9968      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9969    fi
9970  fi
9971
9972  # Now join together the path and the arguments once again
9973  if test "x$arguments" != xEOL; then
9974    new_complete="$new_path ${arguments% *}"
9975  else
9976    new_complete="$new_path"
9977  fi
9978
9979  if test "x$complete" != "x$new_complete"; then
9980    FOUND_MAKE="$new_complete"
9981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9982$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9983  fi
9984
9985        fi
9986      fi
9987    fi
9988  fi
9989
9990        fi
9991        PATH=$OLD_PATH
9992      fi
9993    fi
9994
9995    if test "x$FOUND_MAKE" = x; then
9996      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
9997    fi
9998  fi
9999
10000  MAKE=$FOUND_MAKE
10001
10002  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10003$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10004
10005
10006
10007  # Test if find supports -delete
10008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10009$as_echo_n "checking if find supports -delete... " >&6; }
10010  FIND_DELETE="-delete"
10011
10012  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10013
10014  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10015
10016  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10017  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10018    # No, it does not.
10019    rm $DELETEDIR/TestIfFindSupportsDelete
10020    FIND_DELETE="-exec rm \{\} \+"
10021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10022$as_echo "no" >&6; }
10023  else
10024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10025$as_echo "yes" >&6; }
10026  fi
10027  rmdir $DELETEDIR
10028
10029
10030
10031  # These tools might not be installed by default,
10032  # need hint on how to install them.
10033
10034  for ac_prog in unzip
10035do
10036  # Extract the first word of "$ac_prog", so it can be a program name with args.
10037set dummy $ac_prog; ac_word=$2
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10039$as_echo_n "checking for $ac_word... " >&6; }
10040if ${ac_cv_path_UNZIP+:} false; then :
10041  $as_echo_n "(cached) " >&6
10042else
10043  case $UNZIP in
10044  [\\/]* | ?:[\\/]*)
10045  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10046  ;;
10047  *)
10048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10049for as_dir in $PATH
10050do
10051  IFS=$as_save_IFS
10052  test -z "$as_dir" && as_dir=.
10053    for ac_exec_ext in '' $ac_executable_extensions; do
10054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10055    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10057    break 2
10058  fi
10059done
10060  done
10061IFS=$as_save_IFS
10062
10063  ;;
10064esac
10065fi
10066UNZIP=$ac_cv_path_UNZIP
10067if test -n "$UNZIP"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10069$as_echo "$UNZIP" >&6; }
10070else
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076  test -n "$UNZIP" && break
10077done
10078
10079
10080  if test "x$UNZIP" = x; then
10081    if test "xunzip" = x; then
10082      PROG_NAME=unzip
10083    else
10084      PROG_NAME=unzip
10085    fi
10086    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10087$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10088    as_fn_error $? "Cannot continue" "$LINENO" 5
10089  fi
10090
10091
10092
10093  for ac_prog in zip
10094do
10095  # Extract the first word of "$ac_prog", so it can be a program name with args.
10096set dummy $ac_prog; ac_word=$2
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10098$as_echo_n "checking for $ac_word... " >&6; }
10099if ${ac_cv_path_ZIP+:} false; then :
10100  $as_echo_n "(cached) " >&6
10101else
10102  case $ZIP in
10103  [\\/]* | ?:[\\/]*)
10104  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10105  ;;
10106  *)
10107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10108for as_dir in $PATH
10109do
10110  IFS=$as_save_IFS
10111  test -z "$as_dir" && as_dir=.
10112    for ac_exec_ext in '' $ac_executable_extensions; do
10113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10114    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10116    break 2
10117  fi
10118done
10119  done
10120IFS=$as_save_IFS
10121
10122  ;;
10123esac
10124fi
10125ZIP=$ac_cv_path_ZIP
10126if test -n "$ZIP"; then
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10128$as_echo "$ZIP" >&6; }
10129else
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
10132fi
10133
10134
10135  test -n "$ZIP" && break
10136done
10137
10138
10139  if test "x$ZIP" = x; then
10140    if test "xzip" = x; then
10141      PROG_NAME=zip
10142    else
10143      PROG_NAME=zip
10144    fi
10145    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10147    as_fn_error $? "Cannot continue" "$LINENO" 5
10148  fi
10149
10150
10151
10152  # Non-required basic tools
10153
10154  # Extract the first word of "ldd", so it can be a program name with args.
10155set dummy ldd; ac_word=$2
10156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10157$as_echo_n "checking for $ac_word... " >&6; }
10158if ${ac_cv_path_LDD+:} false; then :
10159  $as_echo_n "(cached) " >&6
10160else
10161  case $LDD in
10162  [\\/]* | ?:[\\/]*)
10163  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10164  ;;
10165  *)
10166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10167for as_dir in $PATH
10168do
10169  IFS=$as_save_IFS
10170  test -z "$as_dir" && as_dir=.
10171    for ac_exec_ext in '' $ac_executable_extensions; do
10172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10173    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10175    break 2
10176  fi
10177done
10178  done
10179IFS=$as_save_IFS
10180
10181  ;;
10182esac
10183fi
10184LDD=$ac_cv_path_LDD
10185if test -n "$LDD"; then
10186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10187$as_echo "$LDD" >&6; }
10188else
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10190$as_echo "no" >&6; }
10191fi
10192
10193
10194  if test "x$LDD" = "x"; then
10195    # List shared lib dependencies is used for
10196    # debug output and checking for forbidden dependencies.
10197    # We can build without it.
10198    LDD="true"
10199  fi
10200  # Extract the first word of "otool", so it can be a program name with args.
10201set dummy otool; ac_word=$2
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203$as_echo_n "checking for $ac_word... " >&6; }
10204if ${ac_cv_path_OTOOL+:} false; then :
10205  $as_echo_n "(cached) " >&6
10206else
10207  case $OTOOL in
10208  [\\/]* | ?:[\\/]*)
10209  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10210  ;;
10211  *)
10212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213for as_dir in $PATH
10214do
10215  IFS=$as_save_IFS
10216  test -z "$as_dir" && as_dir=.
10217    for ac_exec_ext in '' $ac_executable_extensions; do
10218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221    break 2
10222  fi
10223done
10224  done
10225IFS=$as_save_IFS
10226
10227  ;;
10228esac
10229fi
10230OTOOL=$ac_cv_path_OTOOL
10231if test -n "$OTOOL"; then
10232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10233$as_echo "$OTOOL" >&6; }
10234else
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
10237fi
10238
10239
10240  if test "x$OTOOL" = "x"; then
10241    OTOOL="true"
10242  fi
10243  for ac_prog in readelf greadelf
10244do
10245  # Extract the first word of "$ac_prog", so it can be a program name with args.
10246set dummy $ac_prog; ac_word=$2
10247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10248$as_echo_n "checking for $ac_word... " >&6; }
10249if ${ac_cv_path_READELF+:} false; then :
10250  $as_echo_n "(cached) " >&6
10251else
10252  case $READELF in
10253  [\\/]* | ?:[\\/]*)
10254  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10255  ;;
10256  *)
10257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10258for as_dir in $PATH
10259do
10260  IFS=$as_save_IFS
10261  test -z "$as_dir" && as_dir=.
10262    for ac_exec_ext in '' $ac_executable_extensions; do
10263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10264    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10266    break 2
10267  fi
10268done
10269  done
10270IFS=$as_save_IFS
10271
10272  ;;
10273esac
10274fi
10275READELF=$ac_cv_path_READELF
10276if test -n "$READELF"; then
10277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10278$as_echo "$READELF" >&6; }
10279else
10280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10281$as_echo "no" >&6; }
10282fi
10283
10284
10285  test -n "$READELF" && break
10286done
10287
10288  # Extract the first word of "hg", so it can be a program name with args.
10289set dummy hg; ac_word=$2
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291$as_echo_n "checking for $ac_word... " >&6; }
10292if ${ac_cv_path_HG+:} false; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  case $HG in
10296  [\\/]* | ?:[\\/]*)
10297  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10298  ;;
10299  *)
10300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301for as_dir in $PATH
10302do
10303  IFS=$as_save_IFS
10304  test -z "$as_dir" && as_dir=.
10305    for ac_exec_ext in '' $ac_executable_extensions; do
10306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10307    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309    break 2
10310  fi
10311done
10312  done
10313IFS=$as_save_IFS
10314
10315  ;;
10316esac
10317fi
10318HG=$ac_cv_path_HG
10319if test -n "$HG"; then
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10321$as_echo "$HG" >&6; }
10322else
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325fi
10326
10327
10328  # Extract the first word of "stat", so it can be a program name with args.
10329set dummy stat; ac_word=$2
10330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10331$as_echo_n "checking for $ac_word... " >&6; }
10332if ${ac_cv_path_STAT+:} false; then :
10333  $as_echo_n "(cached) " >&6
10334else
10335  case $STAT in
10336  [\\/]* | ?:[\\/]*)
10337  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10338  ;;
10339  *)
10340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10341for as_dir in $PATH
10342do
10343  IFS=$as_save_IFS
10344  test -z "$as_dir" && as_dir=.
10345    for ac_exec_ext in '' $ac_executable_extensions; do
10346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10347    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10349    break 2
10350  fi
10351done
10352  done
10353IFS=$as_save_IFS
10354
10355  ;;
10356esac
10357fi
10358STAT=$ac_cv_path_STAT
10359if test -n "$STAT"; then
10360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10361$as_echo "$STAT" >&6; }
10362else
10363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10364$as_echo "no" >&6; }
10365fi
10366
10367
10368  # Extract the first word of "time", so it can be a program name with args.
10369set dummy time; ac_word=$2
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10371$as_echo_n "checking for $ac_word... " >&6; }
10372if ${ac_cv_path_TIME+:} false; then :
10373  $as_echo_n "(cached) " >&6
10374else
10375  case $TIME in
10376  [\\/]* | ?:[\\/]*)
10377  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10378  ;;
10379  *)
10380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10381for as_dir in $PATH
10382do
10383  IFS=$as_save_IFS
10384  test -z "$as_dir" && as_dir=.
10385    for ac_exec_ext in '' $ac_executable_extensions; do
10386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10387    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10389    break 2
10390  fi
10391done
10392  done
10393IFS=$as_save_IFS
10394
10395  ;;
10396esac
10397fi
10398TIME=$ac_cv_path_TIME
10399if test -n "$TIME"; then
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10401$as_echo "$TIME" >&6; }
10402else
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
10405fi
10406
10407
10408  # Check if it's GNU time
10409  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10410  if test "x$IS_GNU_TIME" != x; then
10411    IS_GNU_TIME=yes
10412  else
10413    IS_GNU_TIME=no
10414  fi
10415
10416
10417  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10418
10419  for ac_prog in comm
10420do
10421  # Extract the first word of "$ac_prog", so it can be a program name with args.
10422set dummy $ac_prog; ac_word=$2
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10424$as_echo_n "checking for $ac_word... " >&6; }
10425if ${ac_cv_path_COMM+:} false; then :
10426  $as_echo_n "(cached) " >&6
10427else
10428  case $COMM in
10429  [\\/]* | ?:[\\/]*)
10430  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10431  ;;
10432  *)
10433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10434for as_dir in $PATH
10435do
10436  IFS=$as_save_IFS
10437  test -z "$as_dir" && as_dir=.
10438    for ac_exec_ext in '' $ac_executable_extensions; do
10439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10440    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10442    break 2
10443  fi
10444done
10445  done
10446IFS=$as_save_IFS
10447
10448  ;;
10449esac
10450fi
10451COMM=$ac_cv_path_COMM
10452if test -n "$COMM"; then
10453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10454$as_echo "$COMM" >&6; }
10455else
10456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10457$as_echo "no" >&6; }
10458fi
10459
10460
10461  test -n "$COMM" && break
10462done
10463
10464
10465  if test "x$COMM" = x; then
10466    if test "xcomm" = x; then
10467      PROG_NAME=comm
10468    else
10469      PROG_NAME=comm
10470    fi
10471    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10472$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10473    as_fn_error $? "Cannot continue" "$LINENO" 5
10474  fi
10475
10476
10477  fi
10478
10479  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10480
10481  for ac_prog in xattr
10482do
10483  # Extract the first word of "$ac_prog", so it can be a program name with args.
10484set dummy $ac_prog; ac_word=$2
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10486$as_echo_n "checking for $ac_word... " >&6; }
10487if ${ac_cv_path_XATTR+:} false; then :
10488  $as_echo_n "(cached) " >&6
10489else
10490  case $XATTR in
10491  [\\/]* | ?:[\\/]*)
10492  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10493  ;;
10494  *)
10495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10496for as_dir in $PATH
10497do
10498  IFS=$as_save_IFS
10499  test -z "$as_dir" && as_dir=.
10500    for ac_exec_ext in '' $ac_executable_extensions; do
10501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10502    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10504    break 2
10505  fi
10506done
10507  done
10508IFS=$as_save_IFS
10509
10510  ;;
10511esac
10512fi
10513XATTR=$ac_cv_path_XATTR
10514if test -n "$XATTR"; then
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10516$as_echo "$XATTR" >&6; }
10517else
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519$as_echo "no" >&6; }
10520fi
10521
10522
10523  test -n "$XATTR" && break
10524done
10525
10526
10527  if test "x$XATTR" = x; then
10528    if test "xxattr" = x; then
10529      PROG_NAME=xattr
10530    else
10531      PROG_NAME=xattr
10532    fi
10533    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10534$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10535    as_fn_error $? "Cannot continue" "$LINENO" 5
10536  fi
10537
10538
10539    # Extract the first word of "codesign", so it can be a program name with args.
10540set dummy codesign; ac_word=$2
10541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10542$as_echo_n "checking for $ac_word... " >&6; }
10543if ${ac_cv_path_CODESIGN+:} false; then :
10544  $as_echo_n "(cached) " >&6
10545else
10546  case $CODESIGN in
10547  [\\/]* | ?:[\\/]*)
10548  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10549  ;;
10550  *)
10551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10552for as_dir in $PATH
10553do
10554  IFS=$as_save_IFS
10555  test -z "$as_dir" && as_dir=.
10556    for ac_exec_ext in '' $ac_executable_extensions; do
10557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10558    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10560    break 2
10561  fi
10562done
10563  done
10564IFS=$as_save_IFS
10565
10566  ;;
10567esac
10568fi
10569CODESIGN=$ac_cv_path_CODESIGN
10570if test -n "$CODESIGN"; then
10571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10572$as_echo "$CODESIGN" >&6; }
10573else
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10575$as_echo "no" >&6; }
10576fi
10577
10578
10579    if test "x$CODESIGN" != "x"; then
10580      # Verify that the openjdk_codesign certificate is present
10581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10582$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10583      rm -f codesign-testfile
10584      touch codesign-testfile
10585      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10586      rm -f codesign-testfile
10587      if test "x$CODESIGN" = x; then
10588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10589$as_echo "no" >&6; }
10590      else
10591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10592$as_echo "yes" >&6; }
10593      fi
10594    fi
10595  fi
10596
10597
10598# Check if pkg-config is available.
10599
10600
10601if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10602	if test -n "$ac_tool_prefix"; then
10603  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10604set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_PKG_CONFIG+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $PKG_CONFIG in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10634if test -n "$PKG_CONFIG"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10636$as_echo "$PKG_CONFIG" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643fi
10644if test -z "$ac_cv_path_PKG_CONFIG"; then
10645  ac_pt_PKG_CONFIG=$PKG_CONFIG
10646  # Extract the first word of "pkg-config", so it can be a program name with args.
10647set dummy pkg-config; ac_word=$2
10648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10649$as_echo_n "checking for $ac_word... " >&6; }
10650if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10651  $as_echo_n "(cached) " >&6
10652else
10653  case $ac_pt_PKG_CONFIG in
10654  [\\/]* | ?:[\\/]*)
10655  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10656  ;;
10657  *)
10658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10659for as_dir in $PATH
10660do
10661  IFS=$as_save_IFS
10662  test -z "$as_dir" && as_dir=.
10663    for ac_exec_ext in '' $ac_executable_extensions; do
10664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10665    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10667    break 2
10668  fi
10669done
10670  done
10671IFS=$as_save_IFS
10672
10673  ;;
10674esac
10675fi
10676ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10677if test -n "$ac_pt_PKG_CONFIG"; then
10678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10679$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10680else
10681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682$as_echo "no" >&6; }
10683fi
10684
10685  if test "x$ac_pt_PKG_CONFIG" = x; then
10686    PKG_CONFIG=""
10687  else
10688    case $cross_compiling:$ac_tool_warned in
10689yes:)
10690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10692ac_tool_warned=yes ;;
10693esac
10694    PKG_CONFIG=$ac_pt_PKG_CONFIG
10695  fi
10696else
10697  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10698fi
10699
10700fi
10701if test -n "$PKG_CONFIG"; then
10702	_pkg_min_version=0.9.0
10703	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10704$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10705	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10706		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10707$as_echo "yes" >&6; }
10708	else
10709		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
10711		PKG_CONFIG=""
10712	fi
10713
10714fi
10715
10716# After basic tools have been setup, we can check build os specific details.
10717
10718  ###############################################################################
10719
10720  # Note that this is the build platform OS version!
10721
10722  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10723  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10724  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10725  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10726
10727
10728
10729
10730
10731# Setup builddeps, for automatic downloading of tools we need.
10732# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10733# boot-jdk setup, but we need to have basic tools setup first.
10734
10735
10736# Check whether --with-builddeps-conf was given.
10737if test "${with_builddeps_conf+set}" = set; then :
10738  withval=$with_builddeps_conf;
10739fi
10740
10741
10742
10743# Check whether --with-builddeps-server was given.
10744if test "${with_builddeps_server+set}" = set; then :
10745  withval=$with_builddeps_server;
10746fi
10747
10748
10749
10750# Check whether --with-builddeps-dir was given.
10751if test "${with_builddeps_dir+set}" = set; then :
10752  withval=$with_builddeps_dir;
10753else
10754  with_builddeps_dir=/localhome/builddeps
10755fi
10756
10757
10758
10759# Check whether --with-builddeps-group was given.
10760if test "${with_builddeps_group+set}" = set; then :
10761  withval=$with_builddeps_group;
10762fi
10763
10764
10765
10766
10767  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10768    if test "x$with_builddeps_conf" != x; then
10769      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10770$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10771      builddepsfile=$with_builddeps_conf
10772      if test -s $builddepsfile; then
10773        . $builddepsfile
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10775$as_echo "loaded!" >&6; }
10776      else
10777        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10778      fi
10779    else
10780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10781$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10782      builddepsfile=`mktemp`
10783      touch $builddepsfile
10784      # Put all found confs into a single file.
10785      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10786      # Source the file to acquire the variables
10787      if test -s $builddepsfile; then
10788        . $builddepsfile
10789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10790$as_echo "found at least one!" >&6; }
10791      else
10792        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10793      fi
10794    fi
10795    # Create build and target names that use _ instead of "-" and ".".
10796    # This is necessary to use them in variable names.
10797    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10798    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10799    # Extract rewrite information for build and target
10800    eval rewritten_build=\${REWRITE_${build_var}}
10801    if test "x$rewritten_build" = x; then
10802      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10803      echo Build stays the same $rewritten_build
10804    else
10805      echo Rewriting build for builddeps into $rewritten_build
10806    fi
10807    eval rewritten_target=\${REWRITE_${target_var}}
10808    if test "x$rewritten_target" = x; then
10809      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10810      echo Target stays the same $rewritten_target
10811    else
10812      echo Rewriting target for builddeps into $rewritten_target
10813    fi
10814    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10815    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10816  fi
10817  for ac_prog in 7z unzip
10818do
10819  # Extract the first word of "$ac_prog", so it can be a program name with args.
10820set dummy $ac_prog; ac_word=$2
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10822$as_echo_n "checking for $ac_word... " >&6; }
10823if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10824  $as_echo_n "(cached) " >&6
10825else
10826  if test -n "$BDEPS_UNZIP"; then
10827  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10828else
10829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844fi
10845fi
10846BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10847if test -n "$BDEPS_UNZIP"; then
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10849$as_echo "$BDEPS_UNZIP" >&6; }
10850else
10851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10852$as_echo "no" >&6; }
10853fi
10854
10855
10856  test -n "$BDEPS_UNZIP" && break
10857done
10858
10859  if test "x$BDEPS_UNZIP" = x7z; then
10860    BDEPS_UNZIP="7z x"
10861  fi
10862
10863  for ac_prog in wget lftp ftp
10864do
10865  # Extract the first word of "$ac_prog", so it can be a program name with args.
10866set dummy $ac_prog; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  if test -n "$BDEPS_FTP"; then
10873  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10874else
10875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10876for as_dir in $PATH
10877do
10878  IFS=$as_save_IFS
10879  test -z "$as_dir" && as_dir=.
10880    for ac_exec_ext in '' $ac_executable_extensions; do
10881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10882    ac_cv_prog_BDEPS_FTP="$ac_prog"
10883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10884    break 2
10885  fi
10886done
10887  done
10888IFS=$as_save_IFS
10889
10890fi
10891fi
10892BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10893if test -n "$BDEPS_FTP"; then
10894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10895$as_echo "$BDEPS_FTP" >&6; }
10896else
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898$as_echo "no" >&6; }
10899fi
10900
10901
10902  test -n "$BDEPS_FTP" && break
10903done
10904
10905
10906
10907###############################################################################
10908#
10909# Determine OpenJDK variants, options and version numbers.
10910#
10911###############################################################################
10912
10913# We need build & target for this.
10914
10915
10916  ###############################################################################
10917  #
10918  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10919  # We always build headless support.
10920  #
10921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10922$as_echo_n "checking headful support... " >&6; }
10923  # Check whether --enable-headful was given.
10924if test "${enable_headful+set}" = set; then :
10925  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10926else
10927  SUPPORT_HEADFUL=yes
10928fi
10929
10930
10931  SUPPORT_HEADLESS=yes
10932  BUILD_HEADLESS="BUILD_HEADLESS:=true"
10933
10934  if test "x$SUPPORT_HEADFUL" = xyes; then
10935    # We are building both headful and headless.
10936    headful_msg="include support for both headful and headless"
10937  fi
10938
10939  if test "x$SUPPORT_HEADFUL" = xno; then
10940    # Thus we are building headless only.
10941    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10942    headful_msg="headless only"
10943  fi
10944
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10946$as_echo "$headful_msg" >&6; }
10947
10948
10949
10950
10951
10952  # Control wether Hotspot runs Queens test after build.
10953  # Check whether --enable-hotspot-test-in-build was given.
10954if test "${enable_hotspot_test_in_build+set}" = set; then :
10955  enableval=$enable_hotspot_test_in_build;
10956else
10957  enable_hotspot_test_in_build=no
10958fi
10959
10960  if test "x$enable_hotspot_test_in_build" = "xyes"; then
10961    TEST_IN_BUILD=true
10962  else
10963    TEST_IN_BUILD=false
10964  fi
10965
10966
10967  ###############################################################################
10968  #
10969  # Choose cacerts source file
10970  #
10971
10972# Check whether --with-cacerts-file was given.
10973if test "${with_cacerts_file+set}" = set; then :
10974  withval=$with_cacerts_file;
10975fi
10976
10977  if test "x$with_cacerts_file" != x; then
10978    CACERTS_FILE=$with_cacerts_file
10979  else
10980    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10981  fi
10982
10983
10984  ###############################################################################
10985  #
10986  # Enable or disable unlimited crypto
10987  #
10988  # Check whether --enable-unlimited-crypto was given.
10989if test "${enable_unlimited_crypto+set}" = set; then :
10990  enableval=$enable_unlimited_crypto;
10991else
10992  enable_unlimited_crypto=no
10993fi
10994
10995  if test "x$enable_unlimited_crypto" = "xyes"; then
10996    UNLIMITED_CRYPTO=true
10997  else
10998    UNLIMITED_CRYPTO=false
10999  fi
11000
11001
11002  ###############################################################################
11003  #
11004  # Enable or disable the elliptic curve crypto implementation
11005  #
11006
11007
11008  ###############################################################################
11009  #
11010  # Compress jars
11011  #
11012  COMPRESS_JARS=false
11013
11014
11015
11016
11017  # Source the version numbers
11018  . $AUTOCONF_DIR/version-numbers
11019
11020  # Get the settings from parameters
11021
11022# Check whether --with-milestone was given.
11023if test "${with_milestone+set}" = set; then :
11024  withval=$with_milestone;
11025fi
11026
11027  if test "x$with_milestone" = xyes; then
11028    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11029  elif test "x$with_milestone" != x; then
11030    MILESTONE="$with_milestone"
11031  fi
11032  if test "x$MILESTONE" = x; then
11033    MILESTONE=internal
11034  fi
11035
11036
11037# Check whether --with-update-version was given.
11038if test "${with_update_version+set}" = set; then :
11039  withval=$with_update_version;
11040fi
11041
11042  if test "x$with_update_version" = xyes; then
11043    as_fn_error $? "Update version must have a value" "$LINENO" 5
11044  elif test "x$with_update_version" != x; then
11045    JDK_UPDATE_VERSION="$with_update_version"
11046  fi
11047
11048
11049# Check whether --with-user-release-suffix was given.
11050if test "${with_user_release_suffix+set}" = set; then :
11051  withval=$with_user_release_suffix;
11052fi
11053
11054  if test "x$with_user_release_suffix" = xyes; then
11055    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11056  elif test "x$with_user_release_suffix" != x; then
11057    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11058  fi
11059
11060
11061# Check whether --with-build-number was given.
11062if test "${with_build_number+set}" = set; then :
11063  withval=$with_build_number;
11064fi
11065
11066  if test "x$with_build_number" = xyes; then
11067    as_fn_error $? "Build number must have a value" "$LINENO" 5
11068  elif test "x$with_build_number" != x; then
11069    JDK_BUILD_NUMBER="$with_build_number"
11070  fi
11071  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11072  if test "x$JDK_BUILD_NUMBER" = x; then
11073    JDK_BUILD_NUMBER=b00
11074    if test "x$USER_RELEASE_SUFFIX" = x; then
11075      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11076      # Avoid [:alnum:] since it depends on the locale.
11077      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11078      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11079    fi
11080  fi
11081
11082  # Now set the JDK version, milestone, build number etc.
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098  COPYRIGHT_YEAR=`date +'%Y'`
11099
11100
11101  if test "x$JDK_UPDATE_VERSION" != x; then
11102    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11103  else
11104    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11105  fi
11106
11107
11108  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11109
11110
11111
11112###############################################################################
11113#
11114# Setup BootJDK, used to bootstrap the build.
11115#
11116###############################################################################
11117
11118
11119  BOOT_JDK_FOUND=no
11120
11121# Check whether --with-boot-jdk was given.
11122if test "${with_boot_jdk+set}" = set; then :
11123  withval=$with_boot_jdk;
11124fi
11125
11126
11127  # We look for the Boot JDK through various means, going from more certain to
11128  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11129  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11130  # must check if this is indeed valid; otherwise we'll continue looking.
11131
11132  # Test: Is bootjdk explicitely set by command line arguments?
11133
11134  if test "x$BOOT_JDK_FOUND" = xno; then
11135    # Now execute the test
11136
11137  if test "x$with_boot_jdk" != x; then
11138    BOOT_JDK=$with_boot_jdk
11139    BOOT_JDK_FOUND=maybe
11140    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11141$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11142  fi
11143
11144
11145    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11146    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11147      # Do we have a bin/java?
11148      if test ! -x "$BOOT_JDK/bin/java"; then
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11151        BOOT_JDK_FOUND=no
11152      else
11153        # Do we have a bin/javac?
11154        if test ! -x "$BOOT_JDK/bin/javac"; then
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11157          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11158$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11159          BOOT_JDK_FOUND=no
11160        else
11161          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11162          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11165            BOOT_JDK_FOUND=no
11166          else
11167            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11168            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11169
11170            # Extra M4 quote needed to protect [] in grep expression.
11171            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11172            if test "x$FOUND_VERSION_78" = x; then
11173              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11175              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11176$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11177              BOOT_JDK_FOUND=no
11178            else
11179              # We're done! :-)
11180              BOOT_JDK_FOUND=yes
11181
11182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11183
11184  # Input might be given as Windows format, start by converting to
11185  # unix format.
11186  path="$BOOT_JDK"
11187  new_path=`$CYGPATH -u "$path"`
11188
11189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11192  # "foo.exe" is OK but "foo" is an error.
11193  #
11194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11195  # It is also a way to make sure we got the proper file name for the real test later on.
11196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11197  if test "x$test_shortpath" = x; then
11198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11201  fi
11202
11203  # Call helper function which possibly converts this using DOS-style short mode.
11204  # If so, the updated path is stored in $new_path.
11205
11206  input_path="$new_path"
11207  # Check if we need to convert this using DOS-style short mode. If the path
11208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11209  # take no chances and rewrite it.
11210  # Note: m4 eats our [], so we need to use [ and ] instead.
11211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11212  if test "x$has_forbidden_chars" != x; then
11213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11217      # Going to short mode and back again did indeed matter. Since short mode is
11218      # case insensitive, let's make it lowercase to improve readability.
11219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11220      # Now convert it back to Unix-stile (cygpath)
11221      input_path=`$CYGPATH -u "$shortmode_path"`
11222      new_path="$input_path"
11223    fi
11224  fi
11225
11226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11227  if test "x$test_cygdrive_prefix" = x; then
11228    # As a simple fix, exclude /usr/bin since it's not a real path.
11229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11231      # a path prefixed by /cygdrive for fixpath to work.
11232      new_path="$CYGWIN_ROOT_PATH$input_path"
11233    fi
11234  fi
11235
11236
11237  if test "x$path" != "x$new_path"; then
11238    BOOT_JDK="$new_path"
11239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11241  fi
11242
11243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11244
11245  path="$BOOT_JDK"
11246  has_colon=`$ECHO $path | $GREP ^.:`
11247  new_path="$path"
11248  if test "x$has_colon" = x; then
11249    # Not in mixed or Windows style, start by that.
11250    new_path=`cmd //c echo $path`
11251  fi
11252
11253
11254  input_path="$new_path"
11255  # Check if we need to convert this using DOS-style short mode. If the path
11256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11257  # take no chances and rewrite it.
11258  # Note: m4 eats our [], so we need to use [ and ] instead.
11259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11260  if test "x$has_forbidden_chars" != x; then
11261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11263  fi
11264
11265
11266  windows_path="$new_path"
11267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11268    unix_path=`$CYGPATH -u "$windows_path"`
11269    new_path="$unix_path"
11270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11272    new_path="$unix_path"
11273  fi
11274
11275  if test "x$path" != "x$new_path"; then
11276    BOOT_JDK="$new_path"
11277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11279  fi
11280
11281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11283
11284  else
11285    # We're on a posix platform. Hooray! :)
11286    path="$BOOT_JDK"
11287    has_space=`$ECHO "$path" | $GREP " "`
11288    if test "x$has_space" != x; then
11289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11291      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11292    fi
11293
11294    # Use eval to expand a potential ~
11295    eval path="$path"
11296    if test ! -f "$path" && test ! -d "$path"; then
11297      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11298    fi
11299
11300    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11301  fi
11302
11303              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11304$as_echo_n "checking for Boot JDK... " >&6; }
11305              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11306$as_echo "$BOOT_JDK" >&6; }
11307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11308$as_echo_n "checking Boot JDK version... " >&6; }
11309              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11311$as_echo "$BOOT_JDK_VERSION" >&6; }
11312            fi # end check jdk version
11313          fi # end check rt.jar
11314        fi # end check javac
11315      fi # end check java
11316    fi # end check boot jdk found
11317  fi
11318
11319  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11320    # Having specified an argument which is incorrect will produce an instant failure;
11321    # we should not go on looking
11322    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11323  fi
11324
11325  # Test: Is bootjdk available from builddeps?
11326
11327  if test "x$BOOT_JDK_FOUND" = xno; then
11328    # Now execute the test
11329
11330
11331
11332  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11333    # Source the builddeps file again, to make sure it uses the latest variables!
11334    . $builddepsfile
11335    # Look for a target and build machine specific resource!
11336    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11337    if test "x$resource" = x; then
11338      # Ok, lets instead look for a target specific resource
11339      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11340    fi
11341    if test "x$resource" = x; then
11342      # Ok, lets instead look for a build specific resource
11343      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11344    fi
11345    if test "x$resource" = x; then
11346      # Ok, lets instead look for a generic resource
11347      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11348      resource=${builddep_bootjdk}
11349    fi
11350    if test "x$resource" != x; then
11351      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11352$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11353      # If the resource in the builddeps.conf file is an existing directory,
11354      # for example /java/linux/cups
11355      if test -d ${resource}; then
11356        depdir=${resource}
11357      else
11358
11359  # bootjdk is for example mymodule
11360  # $resource is for example libs/general/libmymod_1_2_3.zip
11361  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11362  # $with_builddeps_dir is for example /localhome/builddeps
11363  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11364  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11365  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11366  filename=`basename $resource`
11367  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11368  filebase=${filename%%.*}
11369  extension=${filename#*.}
11370  installdir=$with_builddeps_dir/$filebase
11371  if test ! -f $installdir/$filename.unpacked; then
11372    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11373$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11374    if test ! -d $installdir; then
11375      mkdir -p $installdir
11376    fi
11377    if test ! -d $installdir; then
11378      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11379    fi
11380    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11381    touch $tmpfile
11382    if test ! -f $tmpfile; then
11383      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11384    fi
11385
11386  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11387  # $tmpfile is the local file name for the downloaded file.
11388  VALID_TOOL=no
11389  if test "x$BDEPS_FTP" = xwget; then
11390    VALID_TOOL=yes
11391    wget -O $tmpfile $with_builddeps_server/$resource
11392  fi
11393  if test "x$BDEPS_FTP" = xlftp; then
11394    VALID_TOOL=yes
11395    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11396  fi
11397  if test "x$BDEPS_FTP" = xftp; then
11398    VALID_TOOL=yes
11399    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11400    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11401    FTPUSERPWD=${FTPSERVER%%@*}
11402    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11403      FTPUSER=${userpwd%%:*}
11404      FTPPWD=${userpwd#*@}
11405      FTPSERVER=${FTPSERVER#*@}
11406    else
11407      FTPUSER=ftp
11408      FTPPWD=ftp
11409    fi
11410    # the "pass" command does not work on some
11411    # ftp clients (read ftp.exe) but if it works,
11412    # passive mode is better!
11413    ( \
11414        echo "user $FTPUSER $FTPPWD"        ; \
11415        echo "pass"                         ; \
11416        echo "bin"                          ; \
11417        echo "get $FTPPATH $tmpfile"              ; \
11418    ) | ftp -in $FTPSERVER
11419  fi
11420  if test "x$VALID_TOOL" != xyes; then
11421    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11422  fi
11423
11424    mv $tmpfile $installdir/$filename
11425    if test ! -s $installdir/$filename; then
11426      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11427    fi
11428    case "$extension" in
11429      zip)  echo "Unzipping $installdir/$filename..."
11430        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11431        ;;
11432      tar.gz) echo "Untaring $installdir/$filename..."
11433        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11434        ;;
11435      tgz) echo "Untaring $installdir/$filename..."
11436        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11437        ;;
11438      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11439        ;;
11440    esac
11441  fi
11442  if test -f $installdir/$filename.unpacked; then
11443    depdir=$installdir
11444  fi
11445
11446      fi
11447      # Source the builddeps file again, because in the previous command, the depdir
11448      # was updated to point at the current build dependency install directory.
11449      . $builddepsfile
11450      # Now extract variables from the builddeps.conf files.
11451      theroot=${builddep_bootjdk_ROOT}
11452      thecflags=${builddep_bootjdk_CFLAGS}
11453      thelibs=${builddep_bootjdk_LIBS}
11454      if test "x$depdir" = x; then
11455        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11456      fi
11457      BOOT_JDK=$depdir
11458      if test "x$theroot" != x; then
11459        BOOT_JDK="$theroot"
11460      fi
11461      if test "x$thecflags" != x; then
11462        BOOT_JDK_CFLAGS="$thecflags"
11463      fi
11464      if test "x$thelibs" != x; then
11465        BOOT_JDK_LIBS="$thelibs"
11466      fi
11467      BOOT_JDK_FOUND=maybe
11468      else BOOT_JDK_FOUND=no
11469
11470    fi
11471    else BOOT_JDK_FOUND=no
11472
11473  fi
11474
11475
11476
11477    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11478    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11479      # Do we have a bin/java?
11480      if test ! -x "$BOOT_JDK/bin/java"; then
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11483        BOOT_JDK_FOUND=no
11484      else
11485        # Do we have a bin/javac?
11486        if test ! -x "$BOOT_JDK/bin/javac"; then
11487          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11489          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11490$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11491          BOOT_JDK_FOUND=no
11492        else
11493          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11494          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11495            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11497            BOOT_JDK_FOUND=no
11498          else
11499            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11501
11502            # Extra M4 quote needed to protect [] in grep expression.
11503            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11504            if test "x$FOUND_VERSION_78" = x; then
11505              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11507              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11508$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11509              BOOT_JDK_FOUND=no
11510            else
11511              # We're done! :-)
11512              BOOT_JDK_FOUND=yes
11513
11514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11515
11516  # Input might be given as Windows format, start by converting to
11517  # unix format.
11518  path="$BOOT_JDK"
11519  new_path=`$CYGPATH -u "$path"`
11520
11521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11524  # "foo.exe" is OK but "foo" is an error.
11525  #
11526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11527  # It is also a way to make sure we got the proper file name for the real test later on.
11528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11529  if test "x$test_shortpath" = x; then
11530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11532    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11533  fi
11534
11535  # Call helper function which possibly converts this using DOS-style short mode.
11536  # If so, the updated path is stored in $new_path.
11537
11538  input_path="$new_path"
11539  # Check if we need to convert this using DOS-style short mode. If the path
11540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11541  # take no chances and rewrite it.
11542  # Note: m4 eats our [], so we need to use [ and ] instead.
11543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11544  if test "x$has_forbidden_chars" != x; then
11545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11549      # Going to short mode and back again did indeed matter. Since short mode is
11550      # case insensitive, let's make it lowercase to improve readability.
11551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11552      # Now convert it back to Unix-stile (cygpath)
11553      input_path=`$CYGPATH -u "$shortmode_path"`
11554      new_path="$input_path"
11555    fi
11556  fi
11557
11558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11559  if test "x$test_cygdrive_prefix" = x; then
11560    # As a simple fix, exclude /usr/bin since it's not a real path.
11561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11563      # a path prefixed by /cygdrive for fixpath to work.
11564      new_path="$CYGWIN_ROOT_PATH$input_path"
11565    fi
11566  fi
11567
11568
11569  if test "x$path" != "x$new_path"; then
11570    BOOT_JDK="$new_path"
11571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11573  fi
11574
11575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11576
11577  path="$BOOT_JDK"
11578  has_colon=`$ECHO $path | $GREP ^.:`
11579  new_path="$path"
11580  if test "x$has_colon" = x; then
11581    # Not in mixed or Windows style, start by that.
11582    new_path=`cmd //c echo $path`
11583  fi
11584
11585
11586  input_path="$new_path"
11587  # Check if we need to convert this using DOS-style short mode. If the path
11588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11589  # take no chances and rewrite it.
11590  # Note: m4 eats our [], so we need to use [ and ] instead.
11591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11592  if test "x$has_forbidden_chars" != x; then
11593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11595  fi
11596
11597
11598  windows_path="$new_path"
11599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11600    unix_path=`$CYGPATH -u "$windows_path"`
11601    new_path="$unix_path"
11602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11604    new_path="$unix_path"
11605  fi
11606
11607  if test "x$path" != "x$new_path"; then
11608    BOOT_JDK="$new_path"
11609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11611  fi
11612
11613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11615
11616  else
11617    # We're on a posix platform. Hooray! :)
11618    path="$BOOT_JDK"
11619    has_space=`$ECHO "$path" | $GREP " "`
11620    if test "x$has_space" != x; then
11621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11624    fi
11625
11626    # Use eval to expand a potential ~
11627    eval path="$path"
11628    if test ! -f "$path" && test ! -d "$path"; then
11629      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11630    fi
11631
11632    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11633  fi
11634
11635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11636$as_echo_n "checking for Boot JDK... " >&6; }
11637              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11638$as_echo "$BOOT_JDK" >&6; }
11639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11640$as_echo_n "checking Boot JDK version... " >&6; }
11641              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11643$as_echo "$BOOT_JDK_VERSION" >&6; }
11644            fi # end check jdk version
11645          fi # end check rt.jar
11646        fi # end check javac
11647      fi # end check java
11648    fi # end check boot jdk found
11649  fi
11650
11651
11652  # Test: Is $JAVA_HOME set?
11653
11654  if test "x$BOOT_JDK_FOUND" = xno; then
11655    # Now execute the test
11656
11657  if test "x$JAVA_HOME" != x; then
11658    JAVA_HOME_PROCESSED="$JAVA_HOME"
11659
11660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11661
11662  # Input might be given as Windows format, start by converting to
11663  # unix format.
11664  path="$JAVA_HOME_PROCESSED"
11665  new_path=`$CYGPATH -u "$path"`
11666
11667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11670  # "foo.exe" is OK but "foo" is an error.
11671  #
11672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11673  # It is also a way to make sure we got the proper file name for the real test later on.
11674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11675  if test "x$test_shortpath" = x; then
11676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11677$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11678    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11679  fi
11680
11681  # Call helper function which possibly converts this using DOS-style short mode.
11682  # If so, the updated path is stored in $new_path.
11683
11684  input_path="$new_path"
11685  # Check if we need to convert this using DOS-style short mode. If the path
11686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11687  # take no chances and rewrite it.
11688  # Note: m4 eats our [], so we need to use [ and ] instead.
11689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11690  if test "x$has_forbidden_chars" != x; then
11691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11695      # Going to short mode and back again did indeed matter. Since short mode is
11696      # case insensitive, let's make it lowercase to improve readability.
11697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11698      # Now convert it back to Unix-stile (cygpath)
11699      input_path=`$CYGPATH -u "$shortmode_path"`
11700      new_path="$input_path"
11701    fi
11702  fi
11703
11704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11705  if test "x$test_cygdrive_prefix" = x; then
11706    # As a simple fix, exclude /usr/bin since it's not a real path.
11707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11709      # a path prefixed by /cygdrive for fixpath to work.
11710      new_path="$CYGWIN_ROOT_PATH$input_path"
11711    fi
11712  fi
11713
11714
11715  if test "x$path" != "x$new_path"; then
11716    JAVA_HOME_PROCESSED="$new_path"
11717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11718$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11719  fi
11720
11721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11722
11723  path="$JAVA_HOME_PROCESSED"
11724  has_colon=`$ECHO $path | $GREP ^.:`
11725  new_path="$path"
11726  if test "x$has_colon" = x; then
11727    # Not in mixed or Windows style, start by that.
11728    new_path=`cmd //c echo $path`
11729  fi
11730
11731
11732  input_path="$new_path"
11733  # Check if we need to convert this using DOS-style short mode. If the path
11734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11735  # take no chances and rewrite it.
11736  # Note: m4 eats our [], so we need to use [ and ] instead.
11737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11738  if test "x$has_forbidden_chars" != x; then
11739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11741  fi
11742
11743
11744  windows_path="$new_path"
11745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11746    unix_path=`$CYGPATH -u "$windows_path"`
11747    new_path="$unix_path"
11748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11750    new_path="$unix_path"
11751  fi
11752
11753  if test "x$path" != "x$new_path"; then
11754    JAVA_HOME_PROCESSED="$new_path"
11755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11756$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11757  fi
11758
11759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11761
11762  else
11763    # We're on a posix platform. Hooray! :)
11764    path="$JAVA_HOME_PROCESSED"
11765    has_space=`$ECHO "$path" | $GREP " "`
11766    if test "x$has_space" != x; then
11767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11768$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11770    fi
11771
11772    # Use eval to expand a potential ~
11773    eval path="$path"
11774    if test ! -f "$path" && test ! -d "$path"; then
11775      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11776    fi
11777
11778    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11779  fi
11780
11781    if test ! -d "$JAVA_HOME_PROCESSED"; then
11782      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11783$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11784    else
11785      # Aha, the user has set a JAVA_HOME
11786      # let us use that as the Boot JDK.
11787      BOOT_JDK="$JAVA_HOME_PROCESSED"
11788      BOOT_JDK_FOUND=maybe
11789      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11790$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11791    fi
11792  fi
11793
11794
11795    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11796    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11797      # Do we have a bin/java?
11798      if test ! -x "$BOOT_JDK/bin/java"; then
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11801        BOOT_JDK_FOUND=no
11802      else
11803        # Do we have a bin/javac?
11804        if test ! -x "$BOOT_JDK/bin/javac"; then
11805          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11807          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11808$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11809          BOOT_JDK_FOUND=no
11810        else
11811          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11812          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11813            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11815            BOOT_JDK_FOUND=no
11816          else
11817            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11818            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11819
11820            # Extra M4 quote needed to protect [] in grep expression.
11821            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11822            if test "x$FOUND_VERSION_78" = x; then
11823              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11825              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11826$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11827              BOOT_JDK_FOUND=no
11828            else
11829              # We're done! :-)
11830              BOOT_JDK_FOUND=yes
11831
11832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11833
11834  # Input might be given as Windows format, start by converting to
11835  # unix format.
11836  path="$BOOT_JDK"
11837  new_path=`$CYGPATH -u "$path"`
11838
11839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11842  # "foo.exe" is OK but "foo" is an error.
11843  #
11844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11845  # It is also a way to make sure we got the proper file name for the real test later on.
11846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11847  if test "x$test_shortpath" = x; then
11848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11851  fi
11852
11853  # Call helper function which possibly converts this using DOS-style short mode.
11854  # If so, the updated path is stored in $new_path.
11855
11856  input_path="$new_path"
11857  # Check if we need to convert this using DOS-style short mode. If the path
11858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11859  # take no chances and rewrite it.
11860  # Note: m4 eats our [], so we need to use [ and ] instead.
11861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11862  if test "x$has_forbidden_chars" != x; then
11863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11867      # Going to short mode and back again did indeed matter. Since short mode is
11868      # case insensitive, let's make it lowercase to improve readability.
11869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11870      # Now convert it back to Unix-stile (cygpath)
11871      input_path=`$CYGPATH -u "$shortmode_path"`
11872      new_path="$input_path"
11873    fi
11874  fi
11875
11876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11877  if test "x$test_cygdrive_prefix" = x; then
11878    # As a simple fix, exclude /usr/bin since it's not a real path.
11879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11881      # a path prefixed by /cygdrive for fixpath to work.
11882      new_path="$CYGWIN_ROOT_PATH$input_path"
11883    fi
11884  fi
11885
11886
11887  if test "x$path" != "x$new_path"; then
11888    BOOT_JDK="$new_path"
11889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11891  fi
11892
11893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11894
11895  path="$BOOT_JDK"
11896  has_colon=`$ECHO $path | $GREP ^.:`
11897  new_path="$path"
11898  if test "x$has_colon" = x; then
11899    # Not in mixed or Windows style, start by that.
11900    new_path=`cmd //c echo $path`
11901  fi
11902
11903
11904  input_path="$new_path"
11905  # Check if we need to convert this using DOS-style short mode. If the path
11906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11907  # take no chances and rewrite it.
11908  # Note: m4 eats our [], so we need to use [ and ] instead.
11909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11910  if test "x$has_forbidden_chars" != x; then
11911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11913  fi
11914
11915
11916  windows_path="$new_path"
11917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11918    unix_path=`$CYGPATH -u "$windows_path"`
11919    new_path="$unix_path"
11920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11922    new_path="$unix_path"
11923  fi
11924
11925  if test "x$path" != "x$new_path"; then
11926    BOOT_JDK="$new_path"
11927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11929  fi
11930
11931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11933
11934  else
11935    # We're on a posix platform. Hooray! :)
11936    path="$BOOT_JDK"
11937    has_space=`$ECHO "$path" | $GREP " "`
11938    if test "x$has_space" != x; then
11939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11941      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11942    fi
11943
11944    # Use eval to expand a potential ~
11945    eval path="$path"
11946    if test ! -f "$path" && test ! -d "$path"; then
11947      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11948    fi
11949
11950    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11951  fi
11952
11953              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11954$as_echo_n "checking for Boot JDK... " >&6; }
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11956$as_echo "$BOOT_JDK" >&6; }
11957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11958$as_echo_n "checking Boot JDK version... " >&6; }
11959              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11961$as_echo "$BOOT_JDK_VERSION" >&6; }
11962            fi # end check jdk version
11963          fi # end check rt.jar
11964        fi # end check javac
11965      fi # end check java
11966    fi # end check boot jdk found
11967  fi
11968
11969
11970  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11971
11972  if test "x$BOOT_JDK_FOUND" = xno; then
11973    # Now execute the test
11974
11975  if test -x /usr/libexec/java_home; then
11976    BOOT_JDK=`/usr/libexec/java_home`
11977    BOOT_JDK_FOUND=maybe
11978    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11979$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11980  fi
11981
11982
11983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11985      # Do we have a bin/java?
11986      if test ! -x "$BOOT_JDK/bin/java"; then
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11989        BOOT_JDK_FOUND=no
11990      else
11991        # Do we have a bin/javac?
11992        if test ! -x "$BOOT_JDK/bin/javac"; then
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11997          BOOT_JDK_FOUND=no
11998        else
11999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12003            BOOT_JDK_FOUND=no
12004          else
12005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12007
12008            # Extra M4 quote needed to protect [] in grep expression.
12009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12010            if test "x$FOUND_VERSION_78" = x; then
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12015              BOOT_JDK_FOUND=no
12016            else
12017              # We're done! :-)
12018              BOOT_JDK_FOUND=yes
12019
12020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12021
12022  # Input might be given as Windows format, start by converting to
12023  # unix format.
12024  path="$BOOT_JDK"
12025  new_path=`$CYGPATH -u "$path"`
12026
12027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12030  # "foo.exe" is OK but "foo" is an error.
12031  #
12032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12033  # It is also a way to make sure we got the proper file name for the real test later on.
12034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12035  if test "x$test_shortpath" = x; then
12036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12039  fi
12040
12041  # Call helper function which possibly converts this using DOS-style short mode.
12042  # If so, the updated path is stored in $new_path.
12043
12044  input_path="$new_path"
12045  # Check if we need to convert this using DOS-style short mode. If the path
12046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12047  # take no chances and rewrite it.
12048  # Note: m4 eats our [], so we need to use [ and ] instead.
12049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12050  if test "x$has_forbidden_chars" != x; then
12051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12055      # Going to short mode and back again did indeed matter. Since short mode is
12056      # case insensitive, let's make it lowercase to improve readability.
12057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12058      # Now convert it back to Unix-stile (cygpath)
12059      input_path=`$CYGPATH -u "$shortmode_path"`
12060      new_path="$input_path"
12061    fi
12062  fi
12063
12064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12065  if test "x$test_cygdrive_prefix" = x; then
12066    # As a simple fix, exclude /usr/bin since it's not a real path.
12067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12069      # a path prefixed by /cygdrive for fixpath to work.
12070      new_path="$CYGWIN_ROOT_PATH$input_path"
12071    fi
12072  fi
12073
12074
12075  if test "x$path" != "x$new_path"; then
12076    BOOT_JDK="$new_path"
12077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12079  fi
12080
12081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12082
12083  path="$BOOT_JDK"
12084  has_colon=`$ECHO $path | $GREP ^.:`
12085  new_path="$path"
12086  if test "x$has_colon" = x; then
12087    # Not in mixed or Windows style, start by that.
12088    new_path=`cmd //c echo $path`
12089  fi
12090
12091
12092  input_path="$new_path"
12093  # Check if we need to convert this using DOS-style short mode. If the path
12094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12095  # take no chances and rewrite it.
12096  # Note: m4 eats our [], so we need to use [ and ] instead.
12097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12098  if test "x$has_forbidden_chars" != x; then
12099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12101  fi
12102
12103
12104  windows_path="$new_path"
12105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12106    unix_path=`$CYGPATH -u "$windows_path"`
12107    new_path="$unix_path"
12108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12110    new_path="$unix_path"
12111  fi
12112
12113  if test "x$path" != "x$new_path"; then
12114    BOOT_JDK="$new_path"
12115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12117  fi
12118
12119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12121
12122  else
12123    # We're on a posix platform. Hooray! :)
12124    path="$BOOT_JDK"
12125    has_space=`$ECHO "$path" | $GREP " "`
12126    if test "x$has_space" != x; then
12127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12129      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12130    fi
12131
12132    # Use eval to expand a potential ~
12133    eval path="$path"
12134    if test ! -f "$path" && test ! -d "$path"; then
12135      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12136    fi
12137
12138    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12139  fi
12140
12141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12142$as_echo_n "checking for Boot JDK... " >&6; }
12143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12144$as_echo "$BOOT_JDK" >&6; }
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12146$as_echo_n "checking Boot JDK version... " >&6; }
12147              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12148              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12149$as_echo "$BOOT_JDK_VERSION" >&6; }
12150            fi # end check jdk version
12151          fi # end check rt.jar
12152        fi # end check javac
12153      fi # end check java
12154    fi # end check boot jdk found
12155  fi
12156
12157
12158  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12159
12160  if test "x$BOOT_JDK_FOUND" = xno; then
12161    # Now execute the test
12162
12163  # Extract the first word of "javac", so it can be a program name with args.
12164set dummy javac; ac_word=$2
12165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12166$as_echo_n "checking for $ac_word... " >&6; }
12167if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12168  $as_echo_n "(cached) " >&6
12169else
12170  case $JAVAC_CHECK in
12171  [\\/]* | ?:[\\/]*)
12172  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12173  ;;
12174  *)
12175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12176for as_dir in $PATH
12177do
12178  IFS=$as_save_IFS
12179  test -z "$as_dir" && as_dir=.
12180    for ac_exec_ext in '' $ac_executable_extensions; do
12181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12182    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12184    break 2
12185  fi
12186done
12187  done
12188IFS=$as_save_IFS
12189
12190  ;;
12191esac
12192fi
12193JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12194if test -n "$JAVAC_CHECK"; then
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12196$as_echo "$JAVAC_CHECK" >&6; }
12197else
12198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12199$as_echo "no" >&6; }
12200fi
12201
12202
12203  # Extract the first word of "java", so it can be a program name with args.
12204set dummy java; ac_word=$2
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12206$as_echo_n "checking for $ac_word... " >&6; }
12207if ${ac_cv_path_JAVA_CHECK+:} false; then :
12208  $as_echo_n "(cached) " >&6
12209else
12210  case $JAVA_CHECK in
12211  [\\/]* | ?:[\\/]*)
12212  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12213  ;;
12214  *)
12215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12216for as_dir in $PATH
12217do
12218  IFS=$as_save_IFS
12219  test -z "$as_dir" && as_dir=.
12220    for ac_exec_ext in '' $ac_executable_extensions; do
12221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12222    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12224    break 2
12225  fi
12226done
12227  done
12228IFS=$as_save_IFS
12229
12230  ;;
12231esac
12232fi
12233JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12234if test -n "$JAVA_CHECK"; then
12235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12236$as_echo "$JAVA_CHECK" >&6; }
12237else
12238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12239$as_echo "no" >&6; }
12240fi
12241
12242
12243  BINARY="$JAVAC_CHECK"
12244  if test "x$JAVAC_CHECK" = x; then
12245    BINARY="$JAVA_CHECK"
12246  fi
12247  if test "x$BINARY" != x; then
12248    # So there is a java(c) binary, it might be part of a JDK.
12249    # Lets find the JDK/JRE directory by following symbolic links.
12250    # Linux/GNU systems often have links from /usr/bin/java to
12251    # /etc/alternatives/java to the real JDK binary.
12252
12253  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12254    # Follow a chain of symbolic links. Use readlink
12255    # where it exists, else fall back to horribly
12256    # complicated shell code.
12257    if test "x$READLINK_TESTED" != yes; then
12258      # On MacOSX there is a readlink tool with a different
12259      # purpose than the GNU readlink tool. Check the found readlink.
12260      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12261      if test "x$ISGNU" = x; then
12262        # A readlink that we do not know how to use.
12263        # Are there other non-GNU readlinks out there?
12264        READLINK_TESTED=yes
12265        READLINK=
12266      fi
12267    fi
12268
12269    if test "x$READLINK" != x; then
12270      BINARY=`$READLINK -f $BINARY`
12271    else
12272      # Save the current directory for restoring afterwards
12273      STARTDIR=$PWD
12274      COUNTER=0
12275      sym_link_dir=`$DIRNAME $BINARY`
12276      sym_link_file=`$BASENAME $BINARY`
12277      cd $sym_link_dir
12278      # Use -P flag to resolve symlinks in directories.
12279      cd `$THEPWDCMD -P`
12280      sym_link_dir=`$THEPWDCMD -P`
12281      # Resolve file symlinks
12282      while test $COUNTER -lt 20; do
12283        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12284        if test "x$ISLINK" == x; then
12285          # This is not a symbolic link! We are done!
12286          break
12287        fi
12288        # Again resolve directory symlinks since the target of the just found
12289        # link could be in a different directory
12290        cd `$DIRNAME $ISLINK`
12291        sym_link_dir=`$THEPWDCMD -P`
12292        sym_link_file=`$BASENAME $ISLINK`
12293        let COUNTER=COUNTER+1
12294      done
12295      cd $STARTDIR
12296      BINARY=$sym_link_dir/$sym_link_file
12297    fi
12298  fi
12299
12300    BOOT_JDK=`dirname "$BINARY"`
12301    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12302    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12303      # Looks like we found ourselves an JDK
12304      BOOT_JDK_FOUND=maybe
12305      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12306$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12307    fi
12308  fi
12309
12310
12311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12313      # Do we have a bin/java?
12314      if test ! -x "$BOOT_JDK/bin/java"; then
12315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12317        BOOT_JDK_FOUND=no
12318      else
12319        # Do we have a bin/javac?
12320        if test ! -x "$BOOT_JDK/bin/javac"; then
12321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12325          BOOT_JDK_FOUND=no
12326        else
12327          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12328          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12331            BOOT_JDK_FOUND=no
12332          else
12333            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12335
12336            # Extra M4 quote needed to protect [] in grep expression.
12337            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12338            if test "x$FOUND_VERSION_78" = x; then
12339              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12341              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12342$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12343              BOOT_JDK_FOUND=no
12344            else
12345              # We're done! :-)
12346              BOOT_JDK_FOUND=yes
12347
12348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12349
12350  # Input might be given as Windows format, start by converting to
12351  # unix format.
12352  path="$BOOT_JDK"
12353  new_path=`$CYGPATH -u "$path"`
12354
12355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12358  # "foo.exe" is OK but "foo" is an error.
12359  #
12360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12361  # It is also a way to make sure we got the proper file name for the real test later on.
12362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12363  if test "x$test_shortpath" = x; then
12364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12367  fi
12368
12369  # Call helper function which possibly converts this using DOS-style short mode.
12370  # If so, the updated path is stored in $new_path.
12371
12372  input_path="$new_path"
12373  # Check if we need to convert this using DOS-style short mode. If the path
12374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12375  # take no chances and rewrite it.
12376  # Note: m4 eats our [], so we need to use [ and ] instead.
12377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12378  if test "x$has_forbidden_chars" != x; then
12379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12383      # Going to short mode and back again did indeed matter. Since short mode is
12384      # case insensitive, let's make it lowercase to improve readability.
12385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12386      # Now convert it back to Unix-stile (cygpath)
12387      input_path=`$CYGPATH -u "$shortmode_path"`
12388      new_path="$input_path"
12389    fi
12390  fi
12391
12392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12393  if test "x$test_cygdrive_prefix" = x; then
12394    # As a simple fix, exclude /usr/bin since it's not a real path.
12395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12397      # a path prefixed by /cygdrive for fixpath to work.
12398      new_path="$CYGWIN_ROOT_PATH$input_path"
12399    fi
12400  fi
12401
12402
12403  if test "x$path" != "x$new_path"; then
12404    BOOT_JDK="$new_path"
12405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12407  fi
12408
12409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12410
12411  path="$BOOT_JDK"
12412  has_colon=`$ECHO $path | $GREP ^.:`
12413  new_path="$path"
12414  if test "x$has_colon" = x; then
12415    # Not in mixed or Windows style, start by that.
12416    new_path=`cmd //c echo $path`
12417  fi
12418
12419
12420  input_path="$new_path"
12421  # Check if we need to convert this using DOS-style short mode. If the path
12422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12423  # take no chances and rewrite it.
12424  # Note: m4 eats our [], so we need to use [ and ] instead.
12425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12426  if test "x$has_forbidden_chars" != x; then
12427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12429  fi
12430
12431
12432  windows_path="$new_path"
12433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12434    unix_path=`$CYGPATH -u "$windows_path"`
12435    new_path="$unix_path"
12436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12438    new_path="$unix_path"
12439  fi
12440
12441  if test "x$path" != "x$new_path"; then
12442    BOOT_JDK="$new_path"
12443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12445  fi
12446
12447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12449
12450  else
12451    # We're on a posix platform. Hooray! :)
12452    path="$BOOT_JDK"
12453    has_space=`$ECHO "$path" | $GREP " "`
12454    if test "x$has_space" != x; then
12455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12458    fi
12459
12460    # Use eval to expand a potential ~
12461    eval path="$path"
12462    if test ! -f "$path" && test ! -d "$path"; then
12463      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12464    fi
12465
12466    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12467  fi
12468
12469              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12470$as_echo_n "checking for Boot JDK... " >&6; }
12471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12472$as_echo "$BOOT_JDK" >&6; }
12473              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12474$as_echo_n "checking Boot JDK version... " >&6; }
12475              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12476              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12477$as_echo "$BOOT_JDK_VERSION" >&6; }
12478            fi # end check jdk version
12479          fi # end check rt.jar
12480        fi # end check javac
12481      fi # end check java
12482    fi # end check boot jdk found
12483  fi
12484
12485
12486  # Test: Is there a JDK installed in default, well-known locations?
12487
12488  if test "x$BOOT_JDK_FOUND" = xno; then
12489    # Now execute the test
12490
12491  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12492
12493  if test "x$BOOT_JDK_FOUND" = xno; then
12494    # Now execute the test
12495
12496  if test "x$ProgramW6432" != x; then
12497    VIRTUAL_DIR="$ProgramW6432/Java"
12498
12499  windows_path="$VIRTUAL_DIR"
12500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12501    unix_path=`$CYGPATH -u "$windows_path"`
12502    VIRTUAL_DIR="$unix_path"
12503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12505    VIRTUAL_DIR="$unix_path"
12506  fi
12507
12508
12509  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12510  BOOT_JDK_SUFFIX=""
12511  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12512  if test "x$ALL_JDKS_FOUND" != x; then
12513    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12514
12515  if test "x$BOOT_JDK_FOUND" = xno; then
12516    # Now execute the test
12517
12518        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12519        if test -d "$BOOT_JDK"; then
12520          BOOT_JDK_FOUND=maybe
12521          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12522$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12523        fi
12524
12525
12526    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12527    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12528      # Do we have a bin/java?
12529      if test ! -x "$BOOT_JDK/bin/java"; then
12530        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12532        BOOT_JDK_FOUND=no
12533      else
12534        # Do we have a bin/javac?
12535        if test ! -x "$BOOT_JDK/bin/javac"; then
12536          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12539$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12540          BOOT_JDK_FOUND=no
12541        else
12542          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12543          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12544            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12546            BOOT_JDK_FOUND=no
12547          else
12548            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12549            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12550
12551            # Extra M4 quote needed to protect [] in grep expression.
12552            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12553            if test "x$FOUND_VERSION_78" = x; then
12554              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12557$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12558              BOOT_JDK_FOUND=no
12559            else
12560              # We're done! :-)
12561              BOOT_JDK_FOUND=yes
12562
12563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12564
12565  # Input might be given as Windows format, start by converting to
12566  # unix format.
12567  path="$BOOT_JDK"
12568  new_path=`$CYGPATH -u "$path"`
12569
12570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12573  # "foo.exe" is OK but "foo" is an error.
12574  #
12575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12576  # It is also a way to make sure we got the proper file name for the real test later on.
12577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12578  if test "x$test_shortpath" = x; then
12579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12580$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12581    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12582  fi
12583
12584  # Call helper function which possibly converts this using DOS-style short mode.
12585  # If so, the updated path is stored in $new_path.
12586
12587  input_path="$new_path"
12588  # Check if we need to convert this using DOS-style short mode. If the path
12589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12590  # take no chances and rewrite it.
12591  # Note: m4 eats our [], so we need to use [ and ] instead.
12592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12593  if test "x$has_forbidden_chars" != x; then
12594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12598      # Going to short mode and back again did indeed matter. Since short mode is
12599      # case insensitive, let's make it lowercase to improve readability.
12600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12601      # Now convert it back to Unix-stile (cygpath)
12602      input_path=`$CYGPATH -u "$shortmode_path"`
12603      new_path="$input_path"
12604    fi
12605  fi
12606
12607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12608  if test "x$test_cygdrive_prefix" = x; then
12609    # As a simple fix, exclude /usr/bin since it's not a real path.
12610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12612      # a path prefixed by /cygdrive for fixpath to work.
12613      new_path="$CYGWIN_ROOT_PATH$input_path"
12614    fi
12615  fi
12616
12617
12618  if test "x$path" != "x$new_path"; then
12619    BOOT_JDK="$new_path"
12620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12622  fi
12623
12624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12625
12626  path="$BOOT_JDK"
12627  has_colon=`$ECHO $path | $GREP ^.:`
12628  new_path="$path"
12629  if test "x$has_colon" = x; then
12630    # Not in mixed or Windows style, start by that.
12631    new_path=`cmd //c echo $path`
12632  fi
12633
12634
12635  input_path="$new_path"
12636  # Check if we need to convert this using DOS-style short mode. If the path
12637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12638  # take no chances and rewrite it.
12639  # Note: m4 eats our [], so we need to use [ and ] instead.
12640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12641  if test "x$has_forbidden_chars" != x; then
12642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12644  fi
12645
12646
12647  windows_path="$new_path"
12648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12649    unix_path=`$CYGPATH -u "$windows_path"`
12650    new_path="$unix_path"
12651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12653    new_path="$unix_path"
12654  fi
12655
12656  if test "x$path" != "x$new_path"; then
12657    BOOT_JDK="$new_path"
12658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12660  fi
12661
12662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12664
12665  else
12666    # We're on a posix platform. Hooray! :)
12667    path="$BOOT_JDK"
12668    has_space=`$ECHO "$path" | $GREP " "`
12669    if test "x$has_space" != x; then
12670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12672      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12673    fi
12674
12675    # Use eval to expand a potential ~
12676    eval path="$path"
12677    if test ! -f "$path" && test ! -d "$path"; then
12678      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12679    fi
12680
12681    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12682  fi
12683
12684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12685$as_echo_n "checking for Boot JDK... " >&6; }
12686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12687$as_echo "$BOOT_JDK" >&6; }
12688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12689$as_echo_n "checking Boot JDK version... " >&6; }
12690              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12692$as_echo "$BOOT_JDK_VERSION" >&6; }
12693            fi # end check jdk version
12694          fi # end check rt.jar
12695        fi # end check javac
12696      fi # end check java
12697    fi # end check boot jdk found
12698  fi
12699
12700    done
12701  fi
12702
12703  fi
12704
12705
12706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12708      # Do we have a bin/java?
12709      if test ! -x "$BOOT_JDK/bin/java"; then
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12712        BOOT_JDK_FOUND=no
12713      else
12714        # Do we have a bin/javac?
12715        if test ! -x "$BOOT_JDK/bin/javac"; then
12716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12720          BOOT_JDK_FOUND=no
12721        else
12722          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12723          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12726            BOOT_JDK_FOUND=no
12727          else
12728            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12730
12731            # Extra M4 quote needed to protect [] in grep expression.
12732            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12733            if test "x$FOUND_VERSION_78" = x; then
12734              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12736              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12737$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12738              BOOT_JDK_FOUND=no
12739            else
12740              # We're done! :-)
12741              BOOT_JDK_FOUND=yes
12742
12743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12744
12745  # Input might be given as Windows format, start by converting to
12746  # unix format.
12747  path="$BOOT_JDK"
12748  new_path=`$CYGPATH -u "$path"`
12749
12750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12753  # "foo.exe" is OK but "foo" is an error.
12754  #
12755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12756  # It is also a way to make sure we got the proper file name for the real test later on.
12757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12758  if test "x$test_shortpath" = x; then
12759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12762  fi
12763
12764  # Call helper function which possibly converts this using DOS-style short mode.
12765  # If so, the updated path is stored in $new_path.
12766
12767  input_path="$new_path"
12768  # Check if we need to convert this using DOS-style short mode. If the path
12769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12770  # take no chances and rewrite it.
12771  # Note: m4 eats our [], so we need to use [ and ] instead.
12772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12773  if test "x$has_forbidden_chars" != x; then
12774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12778      # Going to short mode and back again did indeed matter. Since short mode is
12779      # case insensitive, let's make it lowercase to improve readability.
12780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12781      # Now convert it back to Unix-stile (cygpath)
12782      input_path=`$CYGPATH -u "$shortmode_path"`
12783      new_path="$input_path"
12784    fi
12785  fi
12786
12787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12788  if test "x$test_cygdrive_prefix" = x; then
12789    # As a simple fix, exclude /usr/bin since it's not a real path.
12790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12792      # a path prefixed by /cygdrive for fixpath to work.
12793      new_path="$CYGWIN_ROOT_PATH$input_path"
12794    fi
12795  fi
12796
12797
12798  if test "x$path" != "x$new_path"; then
12799    BOOT_JDK="$new_path"
12800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12802  fi
12803
12804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12805
12806  path="$BOOT_JDK"
12807  has_colon=`$ECHO $path | $GREP ^.:`
12808  new_path="$path"
12809  if test "x$has_colon" = x; then
12810    # Not in mixed or Windows style, start by that.
12811    new_path=`cmd //c echo $path`
12812  fi
12813
12814
12815  input_path="$new_path"
12816  # Check if we need to convert this using DOS-style short mode. If the path
12817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12818  # take no chances and rewrite it.
12819  # Note: m4 eats our [], so we need to use [ and ] instead.
12820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12821  if test "x$has_forbidden_chars" != x; then
12822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12824  fi
12825
12826
12827  windows_path="$new_path"
12828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12829    unix_path=`$CYGPATH -u "$windows_path"`
12830    new_path="$unix_path"
12831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12833    new_path="$unix_path"
12834  fi
12835
12836  if test "x$path" != "x$new_path"; then
12837    BOOT_JDK="$new_path"
12838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12840  fi
12841
12842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12844
12845  else
12846    # We're on a posix platform. Hooray! :)
12847    path="$BOOT_JDK"
12848    has_space=`$ECHO "$path" | $GREP " "`
12849    if test "x$has_space" != x; then
12850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12852      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12853    fi
12854
12855    # Use eval to expand a potential ~
12856    eval path="$path"
12857    if test ! -f "$path" && test ! -d "$path"; then
12858      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12859    fi
12860
12861    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12862  fi
12863
12864              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12865$as_echo_n "checking for Boot JDK... " >&6; }
12866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12867$as_echo "$BOOT_JDK" >&6; }
12868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12869$as_echo_n "checking Boot JDK version... " >&6; }
12870              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12872$as_echo "$BOOT_JDK_VERSION" >&6; }
12873            fi # end check jdk version
12874          fi # end check rt.jar
12875        fi # end check javac
12876      fi # end check java
12877    fi # end check boot jdk found
12878  fi
12879
12880
12881  if test "x$BOOT_JDK_FOUND" = xno; then
12882    # Now execute the test
12883
12884  if test "x$PROGRAMW6432" != x; then
12885    VIRTUAL_DIR="$PROGRAMW6432/Java"
12886
12887  windows_path="$VIRTUAL_DIR"
12888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12889    unix_path=`$CYGPATH -u "$windows_path"`
12890    VIRTUAL_DIR="$unix_path"
12891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12893    VIRTUAL_DIR="$unix_path"
12894  fi
12895
12896
12897  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12898  BOOT_JDK_SUFFIX=""
12899  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12900  if test "x$ALL_JDKS_FOUND" != x; then
12901    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12902
12903  if test "x$BOOT_JDK_FOUND" = xno; then
12904    # Now execute the test
12905
12906        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12907        if test -d "$BOOT_JDK"; then
12908          BOOT_JDK_FOUND=maybe
12909          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12910$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12911        fi
12912
12913
12914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12916      # Do we have a bin/java?
12917      if test ! -x "$BOOT_JDK/bin/java"; then
12918        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12920        BOOT_JDK_FOUND=no
12921      else
12922        # Do we have a bin/javac?
12923        if test ! -x "$BOOT_JDK/bin/javac"; then
12924          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12928          BOOT_JDK_FOUND=no
12929        else
12930          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12931          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12932            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12934            BOOT_JDK_FOUND=no
12935          else
12936            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12938
12939            # Extra M4 quote needed to protect [] in grep expression.
12940            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12941            if test "x$FOUND_VERSION_78" = x; then
12942              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12944              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12945$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12946              BOOT_JDK_FOUND=no
12947            else
12948              # We're done! :-)
12949              BOOT_JDK_FOUND=yes
12950
12951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12952
12953  # Input might be given as Windows format, start by converting to
12954  # unix format.
12955  path="$BOOT_JDK"
12956  new_path=`$CYGPATH -u "$path"`
12957
12958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12961  # "foo.exe" is OK but "foo" is an error.
12962  #
12963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12964  # It is also a way to make sure we got the proper file name for the real test later on.
12965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12966  if test "x$test_shortpath" = x; then
12967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12969    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12970  fi
12971
12972  # Call helper function which possibly converts this using DOS-style short mode.
12973  # If so, the updated path is stored in $new_path.
12974
12975  input_path="$new_path"
12976  # Check if we need to convert this using DOS-style short mode. If the path
12977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12978  # take no chances and rewrite it.
12979  # Note: m4 eats our [], so we need to use [ and ] instead.
12980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12981  if test "x$has_forbidden_chars" != x; then
12982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12986      # Going to short mode and back again did indeed matter. Since short mode is
12987      # case insensitive, let's make it lowercase to improve readability.
12988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12989      # Now convert it back to Unix-stile (cygpath)
12990      input_path=`$CYGPATH -u "$shortmode_path"`
12991      new_path="$input_path"
12992    fi
12993  fi
12994
12995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12996  if test "x$test_cygdrive_prefix" = x; then
12997    # As a simple fix, exclude /usr/bin since it's not a real path.
12998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13000      # a path prefixed by /cygdrive for fixpath to work.
13001      new_path="$CYGWIN_ROOT_PATH$input_path"
13002    fi
13003  fi
13004
13005
13006  if test "x$path" != "x$new_path"; then
13007    BOOT_JDK="$new_path"
13008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13010  fi
13011
13012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13013
13014  path="$BOOT_JDK"
13015  has_colon=`$ECHO $path | $GREP ^.:`
13016  new_path="$path"
13017  if test "x$has_colon" = x; then
13018    # Not in mixed or Windows style, start by that.
13019    new_path=`cmd //c echo $path`
13020  fi
13021
13022
13023  input_path="$new_path"
13024  # Check if we need to convert this using DOS-style short mode. If the path
13025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13026  # take no chances and rewrite it.
13027  # Note: m4 eats our [], so we need to use [ and ] instead.
13028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13029  if test "x$has_forbidden_chars" != x; then
13030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13032  fi
13033
13034
13035  windows_path="$new_path"
13036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13037    unix_path=`$CYGPATH -u "$windows_path"`
13038    new_path="$unix_path"
13039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13041    new_path="$unix_path"
13042  fi
13043
13044  if test "x$path" != "x$new_path"; then
13045    BOOT_JDK="$new_path"
13046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13048  fi
13049
13050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13052
13053  else
13054    # We're on a posix platform. Hooray! :)
13055    path="$BOOT_JDK"
13056    has_space=`$ECHO "$path" | $GREP " "`
13057    if test "x$has_space" != x; then
13058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13060      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13061    fi
13062
13063    # Use eval to expand a potential ~
13064    eval path="$path"
13065    if test ! -f "$path" && test ! -d "$path"; then
13066      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13067    fi
13068
13069    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13070  fi
13071
13072              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13073$as_echo_n "checking for Boot JDK... " >&6; }
13074              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13075$as_echo "$BOOT_JDK" >&6; }
13076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13077$as_echo_n "checking Boot JDK version... " >&6; }
13078              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13079              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13080$as_echo "$BOOT_JDK_VERSION" >&6; }
13081            fi # end check jdk version
13082          fi # end check rt.jar
13083        fi # end check javac
13084      fi # end check java
13085    fi # end check boot jdk found
13086  fi
13087
13088    done
13089  fi
13090
13091  fi
13092
13093
13094    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13095    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13096      # Do we have a bin/java?
13097      if test ! -x "$BOOT_JDK/bin/java"; then
13098        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13100        BOOT_JDK_FOUND=no
13101      else
13102        # Do we have a bin/javac?
13103        if test ! -x "$BOOT_JDK/bin/javac"; then
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13106          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13107$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13108          BOOT_JDK_FOUND=no
13109        else
13110          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13111          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13112            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13114            BOOT_JDK_FOUND=no
13115          else
13116            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13118
13119            # Extra M4 quote needed to protect [] in grep expression.
13120            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13121            if test "x$FOUND_VERSION_78" = x; then
13122              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13124              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13125$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13126              BOOT_JDK_FOUND=no
13127            else
13128              # We're done! :-)
13129              BOOT_JDK_FOUND=yes
13130
13131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13132
13133  # Input might be given as Windows format, start by converting to
13134  # unix format.
13135  path="$BOOT_JDK"
13136  new_path=`$CYGPATH -u "$path"`
13137
13138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13141  # "foo.exe" is OK but "foo" is an error.
13142  #
13143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13144  # It is also a way to make sure we got the proper file name for the real test later on.
13145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13146  if test "x$test_shortpath" = x; then
13147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13149    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13150  fi
13151
13152  # Call helper function which possibly converts this using DOS-style short mode.
13153  # If so, the updated path is stored in $new_path.
13154
13155  input_path="$new_path"
13156  # Check if we need to convert this using DOS-style short mode. If the path
13157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13158  # take no chances and rewrite it.
13159  # Note: m4 eats our [], so we need to use [ and ] instead.
13160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13161  if test "x$has_forbidden_chars" != x; then
13162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13166      # Going to short mode and back again did indeed matter. Since short mode is
13167      # case insensitive, let's make it lowercase to improve readability.
13168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13169      # Now convert it back to Unix-stile (cygpath)
13170      input_path=`$CYGPATH -u "$shortmode_path"`
13171      new_path="$input_path"
13172    fi
13173  fi
13174
13175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13176  if test "x$test_cygdrive_prefix" = x; then
13177    # As a simple fix, exclude /usr/bin since it's not a real path.
13178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13180      # a path prefixed by /cygdrive for fixpath to work.
13181      new_path="$CYGWIN_ROOT_PATH$input_path"
13182    fi
13183  fi
13184
13185
13186  if test "x$path" != "x$new_path"; then
13187    BOOT_JDK="$new_path"
13188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13190  fi
13191
13192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13193
13194  path="$BOOT_JDK"
13195  has_colon=`$ECHO $path | $GREP ^.:`
13196  new_path="$path"
13197  if test "x$has_colon" = x; then
13198    # Not in mixed or Windows style, start by that.
13199    new_path=`cmd //c echo $path`
13200  fi
13201
13202
13203  input_path="$new_path"
13204  # Check if we need to convert this using DOS-style short mode. If the path
13205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13206  # take no chances and rewrite it.
13207  # Note: m4 eats our [], so we need to use [ and ] instead.
13208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13209  if test "x$has_forbidden_chars" != x; then
13210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13212  fi
13213
13214
13215  windows_path="$new_path"
13216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13217    unix_path=`$CYGPATH -u "$windows_path"`
13218    new_path="$unix_path"
13219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13221    new_path="$unix_path"
13222  fi
13223
13224  if test "x$path" != "x$new_path"; then
13225    BOOT_JDK="$new_path"
13226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13228  fi
13229
13230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13232
13233  else
13234    # We're on a posix platform. Hooray! :)
13235    path="$BOOT_JDK"
13236    has_space=`$ECHO "$path" | $GREP " "`
13237    if test "x$has_space" != x; then
13238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13241    fi
13242
13243    # Use eval to expand a potential ~
13244    eval path="$path"
13245    if test ! -f "$path" && test ! -d "$path"; then
13246      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13247    fi
13248
13249    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13250  fi
13251
13252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13253$as_echo_n "checking for Boot JDK... " >&6; }
13254              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13255$as_echo "$BOOT_JDK" >&6; }
13256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13257$as_echo_n "checking Boot JDK version... " >&6; }
13258              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13260$as_echo "$BOOT_JDK_VERSION" >&6; }
13261            fi # end check jdk version
13262          fi # end check rt.jar
13263        fi # end check javac
13264      fi # end check java
13265    fi # end check boot jdk found
13266  fi
13267
13268
13269  if test "x$BOOT_JDK_FOUND" = xno; then
13270    # Now execute the test
13271
13272  if test "x$PROGRAMFILES" != x; then
13273    VIRTUAL_DIR="$PROGRAMFILES/Java"
13274
13275  windows_path="$VIRTUAL_DIR"
13276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13277    unix_path=`$CYGPATH -u "$windows_path"`
13278    VIRTUAL_DIR="$unix_path"
13279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13281    VIRTUAL_DIR="$unix_path"
13282  fi
13283
13284
13285  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13286  BOOT_JDK_SUFFIX=""
13287  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13288  if test "x$ALL_JDKS_FOUND" != x; then
13289    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13290
13291  if test "x$BOOT_JDK_FOUND" = xno; then
13292    # Now execute the test
13293
13294        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13295        if test -d "$BOOT_JDK"; then
13296          BOOT_JDK_FOUND=maybe
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13298$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13299        fi
13300
13301
13302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13304      # Do we have a bin/java?
13305      if test ! -x "$BOOT_JDK/bin/java"; then
13306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13308        BOOT_JDK_FOUND=no
13309      else
13310        # Do we have a bin/javac?
13311        if test ! -x "$BOOT_JDK/bin/javac"; then
13312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13316          BOOT_JDK_FOUND=no
13317        else
13318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13322            BOOT_JDK_FOUND=no
13323          else
13324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13326
13327            # Extra M4 quote needed to protect [] in grep expression.
13328            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13329            if test "x$FOUND_VERSION_78" = x; then
13330              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13332              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13333$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13334              BOOT_JDK_FOUND=no
13335            else
13336              # We're done! :-)
13337              BOOT_JDK_FOUND=yes
13338
13339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13340
13341  # Input might be given as Windows format, start by converting to
13342  # unix format.
13343  path="$BOOT_JDK"
13344  new_path=`$CYGPATH -u "$path"`
13345
13346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13349  # "foo.exe" is OK but "foo" is an error.
13350  #
13351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13352  # It is also a way to make sure we got the proper file name for the real test later on.
13353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13354  if test "x$test_shortpath" = x; then
13355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13358  fi
13359
13360  # Call helper function which possibly converts this using DOS-style short mode.
13361  # If so, the updated path is stored in $new_path.
13362
13363  input_path="$new_path"
13364  # Check if we need to convert this using DOS-style short mode. If the path
13365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13366  # take no chances and rewrite it.
13367  # Note: m4 eats our [], so we need to use [ and ] instead.
13368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13369  if test "x$has_forbidden_chars" != x; then
13370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13374      # Going to short mode and back again did indeed matter. Since short mode is
13375      # case insensitive, let's make it lowercase to improve readability.
13376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13377      # Now convert it back to Unix-stile (cygpath)
13378      input_path=`$CYGPATH -u "$shortmode_path"`
13379      new_path="$input_path"
13380    fi
13381  fi
13382
13383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13384  if test "x$test_cygdrive_prefix" = x; then
13385    # As a simple fix, exclude /usr/bin since it's not a real path.
13386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13388      # a path prefixed by /cygdrive for fixpath to work.
13389      new_path="$CYGWIN_ROOT_PATH$input_path"
13390    fi
13391  fi
13392
13393
13394  if test "x$path" != "x$new_path"; then
13395    BOOT_JDK="$new_path"
13396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13398  fi
13399
13400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13401
13402  path="$BOOT_JDK"
13403  has_colon=`$ECHO $path | $GREP ^.:`
13404  new_path="$path"
13405  if test "x$has_colon" = x; then
13406    # Not in mixed or Windows style, start by that.
13407    new_path=`cmd //c echo $path`
13408  fi
13409
13410
13411  input_path="$new_path"
13412  # Check if we need to convert this using DOS-style short mode. If the path
13413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13414  # take no chances and rewrite it.
13415  # Note: m4 eats our [], so we need to use [ and ] instead.
13416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13417  if test "x$has_forbidden_chars" != x; then
13418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13420  fi
13421
13422
13423  windows_path="$new_path"
13424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13425    unix_path=`$CYGPATH -u "$windows_path"`
13426    new_path="$unix_path"
13427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13429    new_path="$unix_path"
13430  fi
13431
13432  if test "x$path" != "x$new_path"; then
13433    BOOT_JDK="$new_path"
13434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13436  fi
13437
13438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13440
13441  else
13442    # We're on a posix platform. Hooray! :)
13443    path="$BOOT_JDK"
13444    has_space=`$ECHO "$path" | $GREP " "`
13445    if test "x$has_space" != x; then
13446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13448      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13449    fi
13450
13451    # Use eval to expand a potential ~
13452    eval path="$path"
13453    if test ! -f "$path" && test ! -d "$path"; then
13454      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13455    fi
13456
13457    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13458  fi
13459
13460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13461$as_echo_n "checking for Boot JDK... " >&6; }
13462              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13463$as_echo "$BOOT_JDK" >&6; }
13464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13465$as_echo_n "checking Boot JDK version... " >&6; }
13466              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13468$as_echo "$BOOT_JDK_VERSION" >&6; }
13469            fi # end check jdk version
13470          fi # end check rt.jar
13471        fi # end check javac
13472      fi # end check java
13473    fi # end check boot jdk found
13474  fi
13475
13476    done
13477  fi
13478
13479  fi
13480
13481
13482    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13483    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13484      # Do we have a bin/java?
13485      if test ! -x "$BOOT_JDK/bin/java"; then
13486        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13488        BOOT_JDK_FOUND=no
13489      else
13490        # Do we have a bin/javac?
13491        if test ! -x "$BOOT_JDK/bin/javac"; then
13492          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13495$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13496          BOOT_JDK_FOUND=no
13497        else
13498          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13499          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13500            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13502            BOOT_JDK_FOUND=no
13503          else
13504            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13506
13507            # Extra M4 quote needed to protect [] in grep expression.
13508            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13509            if test "x$FOUND_VERSION_78" = x; then
13510              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13513$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13514              BOOT_JDK_FOUND=no
13515            else
13516              # We're done! :-)
13517              BOOT_JDK_FOUND=yes
13518
13519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13520
13521  # Input might be given as Windows format, start by converting to
13522  # unix format.
13523  path="$BOOT_JDK"
13524  new_path=`$CYGPATH -u "$path"`
13525
13526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13529  # "foo.exe" is OK but "foo" is an error.
13530  #
13531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13532  # It is also a way to make sure we got the proper file name for the real test later on.
13533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13534  if test "x$test_shortpath" = x; then
13535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13537    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13538  fi
13539
13540  # Call helper function which possibly converts this using DOS-style short mode.
13541  # If so, the updated path is stored in $new_path.
13542
13543  input_path="$new_path"
13544  # Check if we need to convert this using DOS-style short mode. If the path
13545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13546  # take no chances and rewrite it.
13547  # Note: m4 eats our [], so we need to use [ and ] instead.
13548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13549  if test "x$has_forbidden_chars" != x; then
13550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13554      # Going to short mode and back again did indeed matter. Since short mode is
13555      # case insensitive, let's make it lowercase to improve readability.
13556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13557      # Now convert it back to Unix-stile (cygpath)
13558      input_path=`$CYGPATH -u "$shortmode_path"`
13559      new_path="$input_path"
13560    fi
13561  fi
13562
13563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13564  if test "x$test_cygdrive_prefix" = x; then
13565    # As a simple fix, exclude /usr/bin since it's not a real path.
13566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13568      # a path prefixed by /cygdrive for fixpath to work.
13569      new_path="$CYGWIN_ROOT_PATH$input_path"
13570    fi
13571  fi
13572
13573
13574  if test "x$path" != "x$new_path"; then
13575    BOOT_JDK="$new_path"
13576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13578  fi
13579
13580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13581
13582  path="$BOOT_JDK"
13583  has_colon=`$ECHO $path | $GREP ^.:`
13584  new_path="$path"
13585  if test "x$has_colon" = x; then
13586    # Not in mixed or Windows style, start by that.
13587    new_path=`cmd //c echo $path`
13588  fi
13589
13590
13591  input_path="$new_path"
13592  # Check if we need to convert this using DOS-style short mode. If the path
13593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13594  # take no chances and rewrite it.
13595  # Note: m4 eats our [], so we need to use [ and ] instead.
13596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13597  if test "x$has_forbidden_chars" != x; then
13598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13600  fi
13601
13602
13603  windows_path="$new_path"
13604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13605    unix_path=`$CYGPATH -u "$windows_path"`
13606    new_path="$unix_path"
13607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13609    new_path="$unix_path"
13610  fi
13611
13612  if test "x$path" != "x$new_path"; then
13613    BOOT_JDK="$new_path"
13614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13616  fi
13617
13618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13620
13621  else
13622    # We're on a posix platform. Hooray! :)
13623    path="$BOOT_JDK"
13624    has_space=`$ECHO "$path" | $GREP " "`
13625    if test "x$has_space" != x; then
13626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13628      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13629    fi
13630
13631    # Use eval to expand a potential ~
13632    eval path="$path"
13633    if test ! -f "$path" && test ! -d "$path"; then
13634      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13635    fi
13636
13637    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13638  fi
13639
13640              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13641$as_echo_n "checking for Boot JDK... " >&6; }
13642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13643$as_echo "$BOOT_JDK" >&6; }
13644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13645$as_echo_n "checking Boot JDK version... " >&6; }
13646              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13647              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13648$as_echo "$BOOT_JDK_VERSION" >&6; }
13649            fi # end check jdk version
13650          fi # end check rt.jar
13651        fi # end check javac
13652      fi # end check java
13653    fi # end check boot jdk found
13654  fi
13655
13656
13657  if test "x$BOOT_JDK_FOUND" = xno; then
13658    # Now execute the test
13659
13660  if test "x$ProgramFiles" != x; then
13661    VIRTUAL_DIR="$ProgramFiles/Java"
13662
13663  windows_path="$VIRTUAL_DIR"
13664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13665    unix_path=`$CYGPATH -u "$windows_path"`
13666    VIRTUAL_DIR="$unix_path"
13667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13669    VIRTUAL_DIR="$unix_path"
13670  fi
13671
13672
13673  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13674  BOOT_JDK_SUFFIX=""
13675  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13676  if test "x$ALL_JDKS_FOUND" != x; then
13677    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13678
13679  if test "x$BOOT_JDK_FOUND" = xno; then
13680    # Now execute the test
13681
13682        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13683        if test -d "$BOOT_JDK"; then
13684          BOOT_JDK_FOUND=maybe
13685          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13686$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13687        fi
13688
13689
13690    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13691    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13692      # Do we have a bin/java?
13693      if test ! -x "$BOOT_JDK/bin/java"; then
13694        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13696        BOOT_JDK_FOUND=no
13697      else
13698        # Do we have a bin/javac?
13699        if test ! -x "$BOOT_JDK/bin/javac"; then
13700          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13702          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13703$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13704          BOOT_JDK_FOUND=no
13705        else
13706          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13707          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13708            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13710            BOOT_JDK_FOUND=no
13711          else
13712            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13713            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13714
13715            # Extra M4 quote needed to protect [] in grep expression.
13716            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13717            if test "x$FOUND_VERSION_78" = x; then
13718              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13720              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13721$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13722              BOOT_JDK_FOUND=no
13723            else
13724              # We're done! :-)
13725              BOOT_JDK_FOUND=yes
13726
13727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13728
13729  # Input might be given as Windows format, start by converting to
13730  # unix format.
13731  path="$BOOT_JDK"
13732  new_path=`$CYGPATH -u "$path"`
13733
13734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13737  # "foo.exe" is OK but "foo" is an error.
13738  #
13739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13740  # It is also a way to make sure we got the proper file name for the real test later on.
13741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13742  if test "x$test_shortpath" = x; then
13743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13745    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13746  fi
13747
13748  # Call helper function which possibly converts this using DOS-style short mode.
13749  # If so, the updated path is stored in $new_path.
13750
13751  input_path="$new_path"
13752  # Check if we need to convert this using DOS-style short mode. If the path
13753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13754  # take no chances and rewrite it.
13755  # Note: m4 eats our [], so we need to use [ and ] instead.
13756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13757  if test "x$has_forbidden_chars" != x; then
13758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13762      # Going to short mode and back again did indeed matter. Since short mode is
13763      # case insensitive, let's make it lowercase to improve readability.
13764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13765      # Now convert it back to Unix-stile (cygpath)
13766      input_path=`$CYGPATH -u "$shortmode_path"`
13767      new_path="$input_path"
13768    fi
13769  fi
13770
13771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13772  if test "x$test_cygdrive_prefix" = x; then
13773    # As a simple fix, exclude /usr/bin since it's not a real path.
13774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13776      # a path prefixed by /cygdrive for fixpath to work.
13777      new_path="$CYGWIN_ROOT_PATH$input_path"
13778    fi
13779  fi
13780
13781
13782  if test "x$path" != "x$new_path"; then
13783    BOOT_JDK="$new_path"
13784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13785$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13786  fi
13787
13788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13789
13790  path="$BOOT_JDK"
13791  has_colon=`$ECHO $path | $GREP ^.:`
13792  new_path="$path"
13793  if test "x$has_colon" = x; then
13794    # Not in mixed or Windows style, start by that.
13795    new_path=`cmd //c echo $path`
13796  fi
13797
13798
13799  input_path="$new_path"
13800  # Check if we need to convert this using DOS-style short mode. If the path
13801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13802  # take no chances and rewrite it.
13803  # Note: m4 eats our [], so we need to use [ and ] instead.
13804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13805  if test "x$has_forbidden_chars" != x; then
13806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13808  fi
13809
13810
13811  windows_path="$new_path"
13812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13813    unix_path=`$CYGPATH -u "$windows_path"`
13814    new_path="$unix_path"
13815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13817    new_path="$unix_path"
13818  fi
13819
13820  if test "x$path" != "x$new_path"; then
13821    BOOT_JDK="$new_path"
13822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13823$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13824  fi
13825
13826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13828
13829  else
13830    # We're on a posix platform. Hooray! :)
13831    path="$BOOT_JDK"
13832    has_space=`$ECHO "$path" | $GREP " "`
13833    if test "x$has_space" != x; then
13834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13836      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13837    fi
13838
13839    # Use eval to expand a potential ~
13840    eval path="$path"
13841    if test ! -f "$path" && test ! -d "$path"; then
13842      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13843    fi
13844
13845    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13846  fi
13847
13848              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13849$as_echo_n "checking for Boot JDK... " >&6; }
13850              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13851$as_echo "$BOOT_JDK" >&6; }
13852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13853$as_echo_n "checking Boot JDK version... " >&6; }
13854              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13855              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13856$as_echo "$BOOT_JDK_VERSION" >&6; }
13857            fi # end check jdk version
13858          fi # end check rt.jar
13859        fi # end check javac
13860      fi # end check java
13861    fi # end check boot jdk found
13862  fi
13863
13864    done
13865  fi
13866
13867  fi
13868
13869
13870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13872      # Do we have a bin/java?
13873      if test ! -x "$BOOT_JDK/bin/java"; then
13874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13876        BOOT_JDK_FOUND=no
13877      else
13878        # Do we have a bin/javac?
13879        if test ! -x "$BOOT_JDK/bin/javac"; then
13880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13884          BOOT_JDK_FOUND=no
13885        else
13886          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13887          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13888            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13890            BOOT_JDK_FOUND=no
13891          else
13892            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13893            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13894
13895            # Extra M4 quote needed to protect [] in grep expression.
13896            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13897            if test "x$FOUND_VERSION_78" = x; then
13898              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13900              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13901$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13902              BOOT_JDK_FOUND=no
13903            else
13904              # We're done! :-)
13905              BOOT_JDK_FOUND=yes
13906
13907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13908
13909  # Input might be given as Windows format, start by converting to
13910  # unix format.
13911  path="$BOOT_JDK"
13912  new_path=`$CYGPATH -u "$path"`
13913
13914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13917  # "foo.exe" is OK but "foo" is an error.
13918  #
13919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13920  # It is also a way to make sure we got the proper file name for the real test later on.
13921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13922  if test "x$test_shortpath" = x; then
13923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13926  fi
13927
13928  # Call helper function which possibly converts this using DOS-style short mode.
13929  # If so, the updated path is stored in $new_path.
13930
13931  input_path="$new_path"
13932  # Check if we need to convert this using DOS-style short mode. If the path
13933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13934  # take no chances and rewrite it.
13935  # Note: m4 eats our [], so we need to use [ and ] instead.
13936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13937  if test "x$has_forbidden_chars" != x; then
13938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13942      # Going to short mode and back again did indeed matter. Since short mode is
13943      # case insensitive, let's make it lowercase to improve readability.
13944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13945      # Now convert it back to Unix-stile (cygpath)
13946      input_path=`$CYGPATH -u "$shortmode_path"`
13947      new_path="$input_path"
13948    fi
13949  fi
13950
13951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13952  if test "x$test_cygdrive_prefix" = x; then
13953    # As a simple fix, exclude /usr/bin since it's not a real path.
13954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13956      # a path prefixed by /cygdrive for fixpath to work.
13957      new_path="$CYGWIN_ROOT_PATH$input_path"
13958    fi
13959  fi
13960
13961
13962  if test "x$path" != "x$new_path"; then
13963    BOOT_JDK="$new_path"
13964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13966  fi
13967
13968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13969
13970  path="$BOOT_JDK"
13971  has_colon=`$ECHO $path | $GREP ^.:`
13972  new_path="$path"
13973  if test "x$has_colon" = x; then
13974    # Not in mixed or Windows style, start by that.
13975    new_path=`cmd //c echo $path`
13976  fi
13977
13978
13979  input_path="$new_path"
13980  # Check if we need to convert this using DOS-style short mode. If the path
13981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13982  # take no chances and rewrite it.
13983  # Note: m4 eats our [], so we need to use [ and ] instead.
13984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13985  if test "x$has_forbidden_chars" != x; then
13986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13988  fi
13989
13990
13991  windows_path="$new_path"
13992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13993    unix_path=`$CYGPATH -u "$windows_path"`
13994    new_path="$unix_path"
13995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13997    new_path="$unix_path"
13998  fi
13999
14000  if test "x$path" != "x$new_path"; then
14001    BOOT_JDK="$new_path"
14002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14004  fi
14005
14006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14008
14009  else
14010    # We're on a posix platform. Hooray! :)
14011    path="$BOOT_JDK"
14012    has_space=`$ECHO "$path" | $GREP " "`
14013    if test "x$has_space" != x; then
14014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14016      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14017    fi
14018
14019    # Use eval to expand a potential ~
14020    eval path="$path"
14021    if test ! -f "$path" && test ! -d "$path"; then
14022      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14023    fi
14024
14025    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14026  fi
14027
14028              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14029$as_echo_n "checking for Boot JDK... " >&6; }
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14031$as_echo "$BOOT_JDK" >&6; }
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14033$as_echo_n "checking Boot JDK version... " >&6; }
14034              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14035              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14036$as_echo "$BOOT_JDK_VERSION" >&6; }
14037            fi # end check jdk version
14038          fi # end check rt.jar
14039        fi # end check javac
14040      fi # end check java
14041    fi # end check boot jdk found
14042  fi
14043
14044
14045  if test "x$BOOT_JDK_FOUND" = xno; then
14046    # Now execute the test
14047
14048  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14049  BOOT_JDK_SUFFIX=""
14050  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14051  if test "x$ALL_JDKS_FOUND" != x; then
14052    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14053
14054  if test "x$BOOT_JDK_FOUND" = xno; then
14055    # Now execute the test
14056
14057        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14058        if test -d "$BOOT_JDK"; then
14059          BOOT_JDK_FOUND=maybe
14060          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14061$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14062        fi
14063
14064
14065    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14066    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14067      # Do we have a bin/java?
14068      if test ! -x "$BOOT_JDK/bin/java"; then
14069        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14071        BOOT_JDK_FOUND=no
14072      else
14073        # Do we have a bin/javac?
14074        if test ! -x "$BOOT_JDK/bin/javac"; then
14075          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14077          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14078$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14079          BOOT_JDK_FOUND=no
14080        else
14081          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14082          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14083            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14085            BOOT_JDK_FOUND=no
14086          else
14087            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14088            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14089
14090            # Extra M4 quote needed to protect [] in grep expression.
14091            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14092            if test "x$FOUND_VERSION_78" = x; then
14093              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14096$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14097              BOOT_JDK_FOUND=no
14098            else
14099              # We're done! :-)
14100              BOOT_JDK_FOUND=yes
14101
14102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14103
14104  # Input might be given as Windows format, start by converting to
14105  # unix format.
14106  path="$BOOT_JDK"
14107  new_path=`$CYGPATH -u "$path"`
14108
14109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14112  # "foo.exe" is OK but "foo" is an error.
14113  #
14114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14115  # It is also a way to make sure we got the proper file name for the real test later on.
14116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14117  if test "x$test_shortpath" = x; then
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14120    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14121  fi
14122
14123  # Call helper function which possibly converts this using DOS-style short mode.
14124  # If so, the updated path is stored in $new_path.
14125
14126  input_path="$new_path"
14127  # Check if we need to convert this using DOS-style short mode. If the path
14128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14129  # take no chances and rewrite it.
14130  # Note: m4 eats our [], so we need to use [ and ] instead.
14131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14132  if test "x$has_forbidden_chars" != x; then
14133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14137      # Going to short mode and back again did indeed matter. Since short mode is
14138      # case insensitive, let's make it lowercase to improve readability.
14139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14140      # Now convert it back to Unix-stile (cygpath)
14141      input_path=`$CYGPATH -u "$shortmode_path"`
14142      new_path="$input_path"
14143    fi
14144  fi
14145
14146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14147  if test "x$test_cygdrive_prefix" = x; then
14148    # As a simple fix, exclude /usr/bin since it's not a real path.
14149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14151      # a path prefixed by /cygdrive for fixpath to work.
14152      new_path="$CYGWIN_ROOT_PATH$input_path"
14153    fi
14154  fi
14155
14156
14157  if test "x$path" != "x$new_path"; then
14158    BOOT_JDK="$new_path"
14159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14161  fi
14162
14163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14164
14165  path="$BOOT_JDK"
14166  has_colon=`$ECHO $path | $GREP ^.:`
14167  new_path="$path"
14168  if test "x$has_colon" = x; then
14169    # Not in mixed or Windows style, start by that.
14170    new_path=`cmd //c echo $path`
14171  fi
14172
14173
14174  input_path="$new_path"
14175  # Check if we need to convert this using DOS-style short mode. If the path
14176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14177  # take no chances and rewrite it.
14178  # Note: m4 eats our [], so we need to use [ and ] instead.
14179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14180  if test "x$has_forbidden_chars" != x; then
14181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14183  fi
14184
14185
14186  windows_path="$new_path"
14187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14188    unix_path=`$CYGPATH -u "$windows_path"`
14189    new_path="$unix_path"
14190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14192    new_path="$unix_path"
14193  fi
14194
14195  if test "x$path" != "x$new_path"; then
14196    BOOT_JDK="$new_path"
14197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14199  fi
14200
14201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14203
14204  else
14205    # We're on a posix platform. Hooray! :)
14206    path="$BOOT_JDK"
14207    has_space=`$ECHO "$path" | $GREP " "`
14208    if test "x$has_space" != x; then
14209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14211      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14212    fi
14213
14214    # Use eval to expand a potential ~
14215    eval path="$path"
14216    if test ! -f "$path" && test ! -d "$path"; then
14217      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14218    fi
14219
14220    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14221  fi
14222
14223              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14224$as_echo_n "checking for Boot JDK... " >&6; }
14225              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14226$as_echo "$BOOT_JDK" >&6; }
14227              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14228$as_echo_n "checking Boot JDK version... " >&6; }
14229              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14230              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14231$as_echo "$BOOT_JDK_VERSION" >&6; }
14232            fi # end check jdk version
14233          fi # end check rt.jar
14234        fi # end check javac
14235      fi # end check java
14236    fi # end check boot jdk found
14237  fi
14238
14239    done
14240  fi
14241
14242
14243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14245      # Do we have a bin/java?
14246      if test ! -x "$BOOT_JDK/bin/java"; then
14247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14249        BOOT_JDK_FOUND=no
14250      else
14251        # Do we have a bin/javac?
14252        if test ! -x "$BOOT_JDK/bin/javac"; then
14253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14257          BOOT_JDK_FOUND=no
14258        else
14259          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14260          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14263            BOOT_JDK_FOUND=no
14264          else
14265            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14267
14268            # Extra M4 quote needed to protect [] in grep expression.
14269            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14270            if test "x$FOUND_VERSION_78" = x; then
14271              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14273              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14274$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14275              BOOT_JDK_FOUND=no
14276            else
14277              # We're done! :-)
14278              BOOT_JDK_FOUND=yes
14279
14280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14281
14282  # Input might be given as Windows format, start by converting to
14283  # unix format.
14284  path="$BOOT_JDK"
14285  new_path=`$CYGPATH -u "$path"`
14286
14287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14290  # "foo.exe" is OK but "foo" is an error.
14291  #
14292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14293  # It is also a way to make sure we got the proper file name for the real test later on.
14294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14295  if test "x$test_shortpath" = x; then
14296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14299  fi
14300
14301  # Call helper function which possibly converts this using DOS-style short mode.
14302  # If so, the updated path is stored in $new_path.
14303
14304  input_path="$new_path"
14305  # Check if we need to convert this using DOS-style short mode. If the path
14306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14307  # take no chances and rewrite it.
14308  # Note: m4 eats our [], so we need to use [ and ] instead.
14309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14310  if test "x$has_forbidden_chars" != x; then
14311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14315      # Going to short mode and back again did indeed matter. Since short mode is
14316      # case insensitive, let's make it lowercase to improve readability.
14317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14318      # Now convert it back to Unix-stile (cygpath)
14319      input_path=`$CYGPATH -u "$shortmode_path"`
14320      new_path="$input_path"
14321    fi
14322  fi
14323
14324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14325  if test "x$test_cygdrive_prefix" = x; then
14326    # As a simple fix, exclude /usr/bin since it's not a real path.
14327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14329      # a path prefixed by /cygdrive for fixpath to work.
14330      new_path="$CYGWIN_ROOT_PATH$input_path"
14331    fi
14332  fi
14333
14334
14335  if test "x$path" != "x$new_path"; then
14336    BOOT_JDK="$new_path"
14337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14339  fi
14340
14341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14342
14343  path="$BOOT_JDK"
14344  has_colon=`$ECHO $path | $GREP ^.:`
14345  new_path="$path"
14346  if test "x$has_colon" = x; then
14347    # Not in mixed or Windows style, start by that.
14348    new_path=`cmd //c echo $path`
14349  fi
14350
14351
14352  input_path="$new_path"
14353  # Check if we need to convert this using DOS-style short mode. If the path
14354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14355  # take no chances and rewrite it.
14356  # Note: m4 eats our [], so we need to use [ and ] instead.
14357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14358  if test "x$has_forbidden_chars" != x; then
14359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14361  fi
14362
14363
14364  windows_path="$new_path"
14365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14366    unix_path=`$CYGPATH -u "$windows_path"`
14367    new_path="$unix_path"
14368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14370    new_path="$unix_path"
14371  fi
14372
14373  if test "x$path" != "x$new_path"; then
14374    BOOT_JDK="$new_path"
14375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14377  fi
14378
14379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14381
14382  else
14383    # We're on a posix platform. Hooray! :)
14384    path="$BOOT_JDK"
14385    has_space=`$ECHO "$path" | $GREP " "`
14386    if test "x$has_space" != x; then
14387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14390    fi
14391
14392    # Use eval to expand a potential ~
14393    eval path="$path"
14394    if test ! -f "$path" && test ! -d "$path"; then
14395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14396    fi
14397
14398    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14399  fi
14400
14401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14402$as_echo_n "checking for Boot JDK... " >&6; }
14403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14404$as_echo "$BOOT_JDK" >&6; }
14405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14406$as_echo_n "checking Boot JDK version... " >&6; }
14407              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14409$as_echo "$BOOT_JDK_VERSION" >&6; }
14410            fi # end check jdk version
14411          fi # end check rt.jar
14412        fi # end check javac
14413      fi # end check java
14414    fi # end check boot jdk found
14415  fi
14416
14417  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14418
14419  if test "x$BOOT_JDK_FOUND" = xno; then
14420    # Now execute the test
14421
14422  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14423  BOOT_JDK_SUFFIX="/Contents/Home"
14424  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14425  if test "x$ALL_JDKS_FOUND" != x; then
14426    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14427
14428  if test "x$BOOT_JDK_FOUND" = xno; then
14429    # Now execute the test
14430
14431        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14432        if test -d "$BOOT_JDK"; then
14433          BOOT_JDK_FOUND=maybe
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14435$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14436        fi
14437
14438
14439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14441      # Do we have a bin/java?
14442      if test ! -x "$BOOT_JDK/bin/java"; then
14443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14445        BOOT_JDK_FOUND=no
14446      else
14447        # Do we have a bin/javac?
14448        if test ! -x "$BOOT_JDK/bin/javac"; then
14449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14453          BOOT_JDK_FOUND=no
14454        else
14455          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14456          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14459            BOOT_JDK_FOUND=no
14460          else
14461            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14463
14464            # Extra M4 quote needed to protect [] in grep expression.
14465            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14466            if test "x$FOUND_VERSION_78" = x; then
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14470$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14471              BOOT_JDK_FOUND=no
14472            else
14473              # We're done! :-)
14474              BOOT_JDK_FOUND=yes
14475
14476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14477
14478  # Input might be given as Windows format, start by converting to
14479  # unix format.
14480  path="$BOOT_JDK"
14481  new_path=`$CYGPATH -u "$path"`
14482
14483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14486  # "foo.exe" is OK but "foo" is an error.
14487  #
14488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14489  # It is also a way to make sure we got the proper file name for the real test later on.
14490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14491  if test "x$test_shortpath" = x; then
14492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14494    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14495  fi
14496
14497  # Call helper function which possibly converts this using DOS-style short mode.
14498  # If so, the updated path is stored in $new_path.
14499
14500  input_path="$new_path"
14501  # Check if we need to convert this using DOS-style short mode. If the path
14502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14503  # take no chances and rewrite it.
14504  # Note: m4 eats our [], so we need to use [ and ] instead.
14505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14506  if test "x$has_forbidden_chars" != x; then
14507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14511      # Going to short mode and back again did indeed matter. Since short mode is
14512      # case insensitive, let's make it lowercase to improve readability.
14513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14514      # Now convert it back to Unix-stile (cygpath)
14515      input_path=`$CYGPATH -u "$shortmode_path"`
14516      new_path="$input_path"
14517    fi
14518  fi
14519
14520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14521  if test "x$test_cygdrive_prefix" = x; then
14522    # As a simple fix, exclude /usr/bin since it's not a real path.
14523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14525      # a path prefixed by /cygdrive for fixpath to work.
14526      new_path="$CYGWIN_ROOT_PATH$input_path"
14527    fi
14528  fi
14529
14530
14531  if test "x$path" != "x$new_path"; then
14532    BOOT_JDK="$new_path"
14533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14535  fi
14536
14537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14538
14539  path="$BOOT_JDK"
14540  has_colon=`$ECHO $path | $GREP ^.:`
14541  new_path="$path"
14542  if test "x$has_colon" = x; then
14543    # Not in mixed or Windows style, start by that.
14544    new_path=`cmd //c echo $path`
14545  fi
14546
14547
14548  input_path="$new_path"
14549  # Check if we need to convert this using DOS-style short mode. If the path
14550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14551  # take no chances and rewrite it.
14552  # Note: m4 eats our [], so we need to use [ and ] instead.
14553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14554  if test "x$has_forbidden_chars" != x; then
14555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14557  fi
14558
14559
14560  windows_path="$new_path"
14561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14562    unix_path=`$CYGPATH -u "$windows_path"`
14563    new_path="$unix_path"
14564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14566    new_path="$unix_path"
14567  fi
14568
14569  if test "x$path" != "x$new_path"; then
14570    BOOT_JDK="$new_path"
14571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14573  fi
14574
14575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14577
14578  else
14579    # We're on a posix platform. Hooray! :)
14580    path="$BOOT_JDK"
14581    has_space=`$ECHO "$path" | $GREP " "`
14582    if test "x$has_space" != x; then
14583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14585      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14586    fi
14587
14588    # Use eval to expand a potential ~
14589    eval path="$path"
14590    if test ! -f "$path" && test ! -d "$path"; then
14591      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14592    fi
14593
14594    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14595  fi
14596
14597              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14598$as_echo_n "checking for Boot JDK... " >&6; }
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14600$as_echo "$BOOT_JDK" >&6; }
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14602$as_echo_n "checking Boot JDK version... " >&6; }
14603              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14605$as_echo "$BOOT_JDK_VERSION" >&6; }
14606            fi # end check jdk version
14607          fi # end check rt.jar
14608        fi # end check javac
14609      fi # end check java
14610    fi # end check boot jdk found
14611  fi
14612
14613    done
14614  fi
14615
14616
14617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14619      # Do we have a bin/java?
14620      if test ! -x "$BOOT_JDK/bin/java"; then
14621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14623        BOOT_JDK_FOUND=no
14624      else
14625        # Do we have a bin/javac?
14626        if test ! -x "$BOOT_JDK/bin/javac"; then
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14631          BOOT_JDK_FOUND=no
14632        else
14633          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14634          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14637            BOOT_JDK_FOUND=no
14638          else
14639            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14640            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14641
14642            # Extra M4 quote needed to protect [] in grep expression.
14643            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14644            if test "x$FOUND_VERSION_78" = x; then
14645              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14647              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14648$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14649              BOOT_JDK_FOUND=no
14650            else
14651              # We're done! :-)
14652              BOOT_JDK_FOUND=yes
14653
14654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14655
14656  # Input might be given as Windows format, start by converting to
14657  # unix format.
14658  path="$BOOT_JDK"
14659  new_path=`$CYGPATH -u "$path"`
14660
14661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14664  # "foo.exe" is OK but "foo" is an error.
14665  #
14666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14667  # It is also a way to make sure we got the proper file name for the real test later on.
14668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14669  if test "x$test_shortpath" = x; then
14670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14672    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14673  fi
14674
14675  # Call helper function which possibly converts this using DOS-style short mode.
14676  # If so, the updated path is stored in $new_path.
14677
14678  input_path="$new_path"
14679  # Check if we need to convert this using DOS-style short mode. If the path
14680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14681  # take no chances and rewrite it.
14682  # Note: m4 eats our [], so we need to use [ and ] instead.
14683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14684  if test "x$has_forbidden_chars" != x; then
14685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14689      # Going to short mode and back again did indeed matter. Since short mode is
14690      # case insensitive, let's make it lowercase to improve readability.
14691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14692      # Now convert it back to Unix-stile (cygpath)
14693      input_path=`$CYGPATH -u "$shortmode_path"`
14694      new_path="$input_path"
14695    fi
14696  fi
14697
14698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14699  if test "x$test_cygdrive_prefix" = x; then
14700    # As a simple fix, exclude /usr/bin since it's not a real path.
14701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14703      # a path prefixed by /cygdrive for fixpath to work.
14704      new_path="$CYGWIN_ROOT_PATH$input_path"
14705    fi
14706  fi
14707
14708
14709  if test "x$path" != "x$new_path"; then
14710    BOOT_JDK="$new_path"
14711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14713  fi
14714
14715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14716
14717  path="$BOOT_JDK"
14718  has_colon=`$ECHO $path | $GREP ^.:`
14719  new_path="$path"
14720  if test "x$has_colon" = x; then
14721    # Not in mixed or Windows style, start by that.
14722    new_path=`cmd //c echo $path`
14723  fi
14724
14725
14726  input_path="$new_path"
14727  # Check if we need to convert this using DOS-style short mode. If the path
14728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14729  # take no chances and rewrite it.
14730  # Note: m4 eats our [], so we need to use [ and ] instead.
14731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14732  if test "x$has_forbidden_chars" != x; then
14733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14735  fi
14736
14737
14738  windows_path="$new_path"
14739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14740    unix_path=`$CYGPATH -u "$windows_path"`
14741    new_path="$unix_path"
14742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14744    new_path="$unix_path"
14745  fi
14746
14747  if test "x$path" != "x$new_path"; then
14748    BOOT_JDK="$new_path"
14749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14750$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14751  fi
14752
14753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14755
14756  else
14757    # We're on a posix platform. Hooray! :)
14758    path="$BOOT_JDK"
14759    has_space=`$ECHO "$path" | $GREP " "`
14760    if test "x$has_space" != x; then
14761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14763      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14764    fi
14765
14766    # Use eval to expand a potential ~
14767    eval path="$path"
14768    if test ! -f "$path" && test ! -d "$path"; then
14769      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14770    fi
14771
14772    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14773  fi
14774
14775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14776$as_echo_n "checking for Boot JDK... " >&6; }
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14778$as_echo "$BOOT_JDK" >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14780$as_echo_n "checking Boot JDK version... " >&6; }
14781              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14783$as_echo "$BOOT_JDK_VERSION" >&6; }
14784            fi # end check jdk version
14785          fi # end check rt.jar
14786        fi # end check javac
14787      fi # end check java
14788    fi # end check boot jdk found
14789  fi
14790
14791
14792  if test "x$BOOT_JDK_FOUND" = xno; then
14793    # Now execute the test
14794
14795  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14796  BOOT_JDK_SUFFIX="/Contents/Home"
14797  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14798  if test "x$ALL_JDKS_FOUND" != x; then
14799    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14800
14801  if test "x$BOOT_JDK_FOUND" = xno; then
14802    # Now execute the test
14803
14804        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14805        if test -d "$BOOT_JDK"; then
14806          BOOT_JDK_FOUND=maybe
14807          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14808$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14809        fi
14810
14811
14812    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14813    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14814      # Do we have a bin/java?
14815      if test ! -x "$BOOT_JDK/bin/java"; then
14816        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14818        BOOT_JDK_FOUND=no
14819      else
14820        # Do we have a bin/javac?
14821        if test ! -x "$BOOT_JDK/bin/javac"; then
14822          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14825$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14826          BOOT_JDK_FOUND=no
14827        else
14828          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14829          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14830            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14832            BOOT_JDK_FOUND=no
14833          else
14834            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14835            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14836
14837            # Extra M4 quote needed to protect [] in grep expression.
14838            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14839            if test "x$FOUND_VERSION_78" = x; then
14840              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14842              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14843$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14844              BOOT_JDK_FOUND=no
14845            else
14846              # We're done! :-)
14847              BOOT_JDK_FOUND=yes
14848
14849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14850
14851  # Input might be given as Windows format, start by converting to
14852  # unix format.
14853  path="$BOOT_JDK"
14854  new_path=`$CYGPATH -u "$path"`
14855
14856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14859  # "foo.exe" is OK but "foo" is an error.
14860  #
14861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14862  # It is also a way to make sure we got the proper file name for the real test later on.
14863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14864  if test "x$test_shortpath" = x; then
14865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14867    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14868  fi
14869
14870  # Call helper function which possibly converts this using DOS-style short mode.
14871  # If so, the updated path is stored in $new_path.
14872
14873  input_path="$new_path"
14874  # Check if we need to convert this using DOS-style short mode. If the path
14875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14876  # take no chances and rewrite it.
14877  # Note: m4 eats our [], so we need to use [ and ] instead.
14878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14879  if test "x$has_forbidden_chars" != x; then
14880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14884      # Going to short mode and back again did indeed matter. Since short mode is
14885      # case insensitive, let's make it lowercase to improve readability.
14886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14887      # Now convert it back to Unix-stile (cygpath)
14888      input_path=`$CYGPATH -u "$shortmode_path"`
14889      new_path="$input_path"
14890    fi
14891  fi
14892
14893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14894  if test "x$test_cygdrive_prefix" = x; then
14895    # As a simple fix, exclude /usr/bin since it's not a real path.
14896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14898      # a path prefixed by /cygdrive for fixpath to work.
14899      new_path="$CYGWIN_ROOT_PATH$input_path"
14900    fi
14901  fi
14902
14903
14904  if test "x$path" != "x$new_path"; then
14905    BOOT_JDK="$new_path"
14906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14908  fi
14909
14910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14911
14912  path="$BOOT_JDK"
14913  has_colon=`$ECHO $path | $GREP ^.:`
14914  new_path="$path"
14915  if test "x$has_colon" = x; then
14916    # Not in mixed or Windows style, start by that.
14917    new_path=`cmd //c echo $path`
14918  fi
14919
14920
14921  input_path="$new_path"
14922  # Check if we need to convert this using DOS-style short mode. If the path
14923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14924  # take no chances and rewrite it.
14925  # Note: m4 eats our [], so we need to use [ and ] instead.
14926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14927  if test "x$has_forbidden_chars" != x; then
14928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14930  fi
14931
14932
14933  windows_path="$new_path"
14934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14935    unix_path=`$CYGPATH -u "$windows_path"`
14936    new_path="$unix_path"
14937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14939    new_path="$unix_path"
14940  fi
14941
14942  if test "x$path" != "x$new_path"; then
14943    BOOT_JDK="$new_path"
14944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14945$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14946  fi
14947
14948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14950
14951  else
14952    # We're on a posix platform. Hooray! :)
14953    path="$BOOT_JDK"
14954    has_space=`$ECHO "$path" | $GREP " "`
14955    if test "x$has_space" != x; then
14956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14958      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14959    fi
14960
14961    # Use eval to expand a potential ~
14962    eval path="$path"
14963    if test ! -f "$path" && test ! -d "$path"; then
14964      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14965    fi
14966
14967    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14968  fi
14969
14970              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14971$as_echo_n "checking for Boot JDK... " >&6; }
14972              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14973$as_echo "$BOOT_JDK" >&6; }
14974              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14975$as_echo_n "checking Boot JDK version... " >&6; }
14976              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14977              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14978$as_echo "$BOOT_JDK_VERSION" >&6; }
14979            fi # end check jdk version
14980          fi # end check rt.jar
14981        fi # end check javac
14982      fi # end check java
14983    fi # end check boot jdk found
14984  fi
14985
14986    done
14987  fi
14988
14989
14990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14992      # Do we have a bin/java?
14993      if test ! -x "$BOOT_JDK/bin/java"; then
14994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14996        BOOT_JDK_FOUND=no
14997      else
14998        # Do we have a bin/javac?
14999        if test ! -x "$BOOT_JDK/bin/javac"; then
15000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15004          BOOT_JDK_FOUND=no
15005        else
15006          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15007          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15008            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15010            BOOT_JDK_FOUND=no
15011          else
15012            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15013            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15014
15015            # Extra M4 quote needed to protect [] in grep expression.
15016            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15017            if test "x$FOUND_VERSION_78" = x; then
15018              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15020              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15021$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15022              BOOT_JDK_FOUND=no
15023            else
15024              # We're done! :-)
15025              BOOT_JDK_FOUND=yes
15026
15027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15028
15029  # Input might be given as Windows format, start by converting to
15030  # unix format.
15031  path="$BOOT_JDK"
15032  new_path=`$CYGPATH -u "$path"`
15033
15034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15037  # "foo.exe" is OK but "foo" is an error.
15038  #
15039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15040  # It is also a way to make sure we got the proper file name for the real test later on.
15041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15042  if test "x$test_shortpath" = x; then
15043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15045    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15046  fi
15047
15048  # Call helper function which possibly converts this using DOS-style short mode.
15049  # If so, the updated path is stored in $new_path.
15050
15051  input_path="$new_path"
15052  # Check if we need to convert this using DOS-style short mode. If the path
15053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15054  # take no chances and rewrite it.
15055  # Note: m4 eats our [], so we need to use [ and ] instead.
15056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15057  if test "x$has_forbidden_chars" != x; then
15058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15062      # Going to short mode and back again did indeed matter. Since short mode is
15063      # case insensitive, let's make it lowercase to improve readability.
15064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15065      # Now convert it back to Unix-stile (cygpath)
15066      input_path=`$CYGPATH -u "$shortmode_path"`
15067      new_path="$input_path"
15068    fi
15069  fi
15070
15071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15072  if test "x$test_cygdrive_prefix" = x; then
15073    # As a simple fix, exclude /usr/bin since it's not a real path.
15074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15076      # a path prefixed by /cygdrive for fixpath to work.
15077      new_path="$CYGWIN_ROOT_PATH$input_path"
15078    fi
15079  fi
15080
15081
15082  if test "x$path" != "x$new_path"; then
15083    BOOT_JDK="$new_path"
15084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15086  fi
15087
15088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15089
15090  path="$BOOT_JDK"
15091  has_colon=`$ECHO $path | $GREP ^.:`
15092  new_path="$path"
15093  if test "x$has_colon" = x; then
15094    # Not in mixed or Windows style, start by that.
15095    new_path=`cmd //c echo $path`
15096  fi
15097
15098
15099  input_path="$new_path"
15100  # Check if we need to convert this using DOS-style short mode. If the path
15101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15102  # take no chances and rewrite it.
15103  # Note: m4 eats our [], so we need to use [ and ] instead.
15104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15105  if test "x$has_forbidden_chars" != x; then
15106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15108  fi
15109
15110
15111  windows_path="$new_path"
15112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15113    unix_path=`$CYGPATH -u "$windows_path"`
15114    new_path="$unix_path"
15115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15117    new_path="$unix_path"
15118  fi
15119
15120  if test "x$path" != "x$new_path"; then
15121    BOOT_JDK="$new_path"
15122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15124  fi
15125
15126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15128
15129  else
15130    # We're on a posix platform. Hooray! :)
15131    path="$BOOT_JDK"
15132    has_space=`$ECHO "$path" | $GREP " "`
15133    if test "x$has_space" != x; then
15134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15137    fi
15138
15139    # Use eval to expand a potential ~
15140    eval path="$path"
15141    if test ! -f "$path" && test ! -d "$path"; then
15142      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15143    fi
15144
15145    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15146  fi
15147
15148              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15149$as_echo_n "checking for Boot JDK... " >&6; }
15150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15151$as_echo "$BOOT_JDK" >&6; }
15152              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15153$as_echo_n "checking Boot JDK version... " >&6; }
15154              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15156$as_echo "$BOOT_JDK_VERSION" >&6; }
15157            fi # end check jdk version
15158          fi # end check rt.jar
15159        fi # end check javac
15160      fi # end check java
15161    fi # end check boot jdk found
15162  fi
15163
15164  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15165
15166  if test "x$BOOT_JDK_FOUND" = xno; then
15167    # Now execute the test
15168
15169  BOOT_JDK_PREFIX="/usr/lib/jvm"
15170  BOOT_JDK_SUFFIX=""
15171  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15172  if test "x$ALL_JDKS_FOUND" != x; then
15173    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15174
15175  if test "x$BOOT_JDK_FOUND" = xno; then
15176    # Now execute the test
15177
15178        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15179        if test -d "$BOOT_JDK"; then
15180          BOOT_JDK_FOUND=maybe
15181          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15182$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15183        fi
15184
15185
15186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15188      # Do we have a bin/java?
15189      if test ! -x "$BOOT_JDK/bin/java"; then
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15192        BOOT_JDK_FOUND=no
15193      else
15194        # Do we have a bin/javac?
15195        if test ! -x "$BOOT_JDK/bin/javac"; then
15196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15200          BOOT_JDK_FOUND=no
15201        else
15202          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15203          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15206            BOOT_JDK_FOUND=no
15207          else
15208            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15209            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15210
15211            # Extra M4 quote needed to protect [] in grep expression.
15212            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15213            if test "x$FOUND_VERSION_78" = x; then
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15217$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15218              BOOT_JDK_FOUND=no
15219            else
15220              # We're done! :-)
15221              BOOT_JDK_FOUND=yes
15222
15223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15224
15225  # Input might be given as Windows format, start by converting to
15226  # unix format.
15227  path="$BOOT_JDK"
15228  new_path=`$CYGPATH -u "$path"`
15229
15230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15233  # "foo.exe" is OK but "foo" is an error.
15234  #
15235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15236  # It is also a way to make sure we got the proper file name for the real test later on.
15237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15238  if test "x$test_shortpath" = x; then
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15242  fi
15243
15244  # Call helper function which possibly converts this using DOS-style short mode.
15245  # If so, the updated path is stored in $new_path.
15246
15247  input_path="$new_path"
15248  # Check if we need to convert this using DOS-style short mode. If the path
15249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15250  # take no chances and rewrite it.
15251  # Note: m4 eats our [], so we need to use [ and ] instead.
15252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15253  if test "x$has_forbidden_chars" != x; then
15254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15258      # Going to short mode and back again did indeed matter. Since short mode is
15259      # case insensitive, let's make it lowercase to improve readability.
15260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15261      # Now convert it back to Unix-stile (cygpath)
15262      input_path=`$CYGPATH -u "$shortmode_path"`
15263      new_path="$input_path"
15264    fi
15265  fi
15266
15267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15268  if test "x$test_cygdrive_prefix" = x; then
15269    # As a simple fix, exclude /usr/bin since it's not a real path.
15270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15272      # a path prefixed by /cygdrive for fixpath to work.
15273      new_path="$CYGWIN_ROOT_PATH$input_path"
15274    fi
15275  fi
15276
15277
15278  if test "x$path" != "x$new_path"; then
15279    BOOT_JDK="$new_path"
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15282  fi
15283
15284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15285
15286  path="$BOOT_JDK"
15287  has_colon=`$ECHO $path | $GREP ^.:`
15288  new_path="$path"
15289  if test "x$has_colon" = x; then
15290    # Not in mixed or Windows style, start by that.
15291    new_path=`cmd //c echo $path`
15292  fi
15293
15294
15295  input_path="$new_path"
15296  # Check if we need to convert this using DOS-style short mode. If the path
15297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15298  # take no chances and rewrite it.
15299  # Note: m4 eats our [], so we need to use [ and ] instead.
15300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15301  if test "x$has_forbidden_chars" != x; then
15302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15304  fi
15305
15306
15307  windows_path="$new_path"
15308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15309    unix_path=`$CYGPATH -u "$windows_path"`
15310    new_path="$unix_path"
15311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15313    new_path="$unix_path"
15314  fi
15315
15316  if test "x$path" != "x$new_path"; then
15317    BOOT_JDK="$new_path"
15318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15320  fi
15321
15322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15324
15325  else
15326    # We're on a posix platform. Hooray! :)
15327    path="$BOOT_JDK"
15328    has_space=`$ECHO "$path" | $GREP " "`
15329    if test "x$has_space" != x; then
15330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15332      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15333    fi
15334
15335    # Use eval to expand a potential ~
15336    eval path="$path"
15337    if test ! -f "$path" && test ! -d "$path"; then
15338      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15339    fi
15340
15341    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15342  fi
15343
15344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15345$as_echo_n "checking for Boot JDK... " >&6; }
15346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15347$as_echo "$BOOT_JDK" >&6; }
15348              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15349$as_echo_n "checking Boot JDK version... " >&6; }
15350              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15351              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15352$as_echo "$BOOT_JDK_VERSION" >&6; }
15353            fi # end check jdk version
15354          fi # end check rt.jar
15355        fi # end check javac
15356      fi # end check java
15357    fi # end check boot jdk found
15358  fi
15359
15360    done
15361  fi
15362
15363
15364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15366      # Do we have a bin/java?
15367      if test ! -x "$BOOT_JDK/bin/java"; then
15368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15370        BOOT_JDK_FOUND=no
15371      else
15372        # Do we have a bin/javac?
15373        if test ! -x "$BOOT_JDK/bin/javac"; then
15374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15378          BOOT_JDK_FOUND=no
15379        else
15380          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15381          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15382            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15384            BOOT_JDK_FOUND=no
15385          else
15386            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15387            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15388
15389            # Extra M4 quote needed to protect [] in grep expression.
15390            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15391            if test "x$FOUND_VERSION_78" = x; then
15392              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15394              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15395$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15396              BOOT_JDK_FOUND=no
15397            else
15398              # We're done! :-)
15399              BOOT_JDK_FOUND=yes
15400
15401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15402
15403  # Input might be given as Windows format, start by converting to
15404  # unix format.
15405  path="$BOOT_JDK"
15406  new_path=`$CYGPATH -u "$path"`
15407
15408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15411  # "foo.exe" is OK but "foo" is an error.
15412  #
15413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15414  # It is also a way to make sure we got the proper file name for the real test later on.
15415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15416  if test "x$test_shortpath" = x; then
15417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15419    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15420  fi
15421
15422  # Call helper function which possibly converts this using DOS-style short mode.
15423  # If so, the updated path is stored in $new_path.
15424
15425  input_path="$new_path"
15426  # Check if we need to convert this using DOS-style short mode. If the path
15427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15428  # take no chances and rewrite it.
15429  # Note: m4 eats our [], so we need to use [ and ] instead.
15430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15431  if test "x$has_forbidden_chars" != x; then
15432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15436      # Going to short mode and back again did indeed matter. Since short mode is
15437      # case insensitive, let's make it lowercase to improve readability.
15438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15439      # Now convert it back to Unix-stile (cygpath)
15440      input_path=`$CYGPATH -u "$shortmode_path"`
15441      new_path="$input_path"
15442    fi
15443  fi
15444
15445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15446  if test "x$test_cygdrive_prefix" = x; then
15447    # As a simple fix, exclude /usr/bin since it's not a real path.
15448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15450      # a path prefixed by /cygdrive for fixpath to work.
15451      new_path="$CYGWIN_ROOT_PATH$input_path"
15452    fi
15453  fi
15454
15455
15456  if test "x$path" != "x$new_path"; then
15457    BOOT_JDK="$new_path"
15458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15460  fi
15461
15462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15463
15464  path="$BOOT_JDK"
15465  has_colon=`$ECHO $path | $GREP ^.:`
15466  new_path="$path"
15467  if test "x$has_colon" = x; then
15468    # Not in mixed or Windows style, start by that.
15469    new_path=`cmd //c echo $path`
15470  fi
15471
15472
15473  input_path="$new_path"
15474  # Check if we need to convert this using DOS-style short mode. If the path
15475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15476  # take no chances and rewrite it.
15477  # Note: m4 eats our [], so we need to use [ and ] instead.
15478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15479  if test "x$has_forbidden_chars" != x; then
15480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15482  fi
15483
15484
15485  windows_path="$new_path"
15486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15487    unix_path=`$CYGPATH -u "$windows_path"`
15488    new_path="$unix_path"
15489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15491    new_path="$unix_path"
15492  fi
15493
15494  if test "x$path" != "x$new_path"; then
15495    BOOT_JDK="$new_path"
15496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15498  fi
15499
15500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15502
15503  else
15504    # We're on a posix platform. Hooray! :)
15505    path="$BOOT_JDK"
15506    has_space=`$ECHO "$path" | $GREP " "`
15507    if test "x$has_space" != x; then
15508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15510      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15511    fi
15512
15513    # Use eval to expand a potential ~
15514    eval path="$path"
15515    if test ! -f "$path" && test ! -d "$path"; then
15516      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15517    fi
15518
15519    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15520  fi
15521
15522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15523$as_echo_n "checking for Boot JDK... " >&6; }
15524              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15525$as_echo "$BOOT_JDK" >&6; }
15526              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15527$as_echo_n "checking Boot JDK version... " >&6; }
15528              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15529              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15530$as_echo "$BOOT_JDK_VERSION" >&6; }
15531            fi # end check jdk version
15532          fi # end check rt.jar
15533        fi # end check javac
15534      fi # end check java
15535    fi # end check boot jdk found
15536  fi
15537
15538  fi
15539
15540
15541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15543      # Do we have a bin/java?
15544      if test ! -x "$BOOT_JDK/bin/java"; then
15545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15547        BOOT_JDK_FOUND=no
15548      else
15549        # Do we have a bin/javac?
15550        if test ! -x "$BOOT_JDK/bin/javac"; then
15551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15555          BOOT_JDK_FOUND=no
15556        else
15557          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15558          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15559            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15561            BOOT_JDK_FOUND=no
15562          else
15563            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15565
15566            # Extra M4 quote needed to protect [] in grep expression.
15567            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15568            if test "x$FOUND_VERSION_78" = x; then
15569              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15571              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15572$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15573              BOOT_JDK_FOUND=no
15574            else
15575              # We're done! :-)
15576              BOOT_JDK_FOUND=yes
15577
15578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15579
15580  # Input might be given as Windows format, start by converting to
15581  # unix format.
15582  path="$BOOT_JDK"
15583  new_path=`$CYGPATH -u "$path"`
15584
15585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15588  # "foo.exe" is OK but "foo" is an error.
15589  #
15590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15591  # It is also a way to make sure we got the proper file name for the real test later on.
15592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15593  if test "x$test_shortpath" = x; then
15594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15596    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15597  fi
15598
15599  # Call helper function which possibly converts this using DOS-style short mode.
15600  # If so, the updated path is stored in $new_path.
15601
15602  input_path="$new_path"
15603  # Check if we need to convert this using DOS-style short mode. If the path
15604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15605  # take no chances and rewrite it.
15606  # Note: m4 eats our [], so we need to use [ and ] instead.
15607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15608  if test "x$has_forbidden_chars" != x; then
15609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15613      # Going to short mode and back again did indeed matter. Since short mode is
15614      # case insensitive, let's make it lowercase to improve readability.
15615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15616      # Now convert it back to Unix-stile (cygpath)
15617      input_path=`$CYGPATH -u "$shortmode_path"`
15618      new_path="$input_path"
15619    fi
15620  fi
15621
15622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15623  if test "x$test_cygdrive_prefix" = x; then
15624    # As a simple fix, exclude /usr/bin since it's not a real path.
15625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15627      # a path prefixed by /cygdrive for fixpath to work.
15628      new_path="$CYGWIN_ROOT_PATH$input_path"
15629    fi
15630  fi
15631
15632
15633  if test "x$path" != "x$new_path"; then
15634    BOOT_JDK="$new_path"
15635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15637  fi
15638
15639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15640
15641  path="$BOOT_JDK"
15642  has_colon=`$ECHO $path | $GREP ^.:`
15643  new_path="$path"
15644  if test "x$has_colon" = x; then
15645    # Not in mixed or Windows style, start by that.
15646    new_path=`cmd //c echo $path`
15647  fi
15648
15649
15650  input_path="$new_path"
15651  # Check if we need to convert this using DOS-style short mode. If the path
15652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15653  # take no chances and rewrite it.
15654  # Note: m4 eats our [], so we need to use [ and ] instead.
15655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15656  if test "x$has_forbidden_chars" != x; then
15657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15659  fi
15660
15661
15662  windows_path="$new_path"
15663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15664    unix_path=`$CYGPATH -u "$windows_path"`
15665    new_path="$unix_path"
15666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15668    new_path="$unix_path"
15669  fi
15670
15671  if test "x$path" != "x$new_path"; then
15672    BOOT_JDK="$new_path"
15673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15675  fi
15676
15677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15679
15680  else
15681    # We're on a posix platform. Hooray! :)
15682    path="$BOOT_JDK"
15683    has_space=`$ECHO "$path" | $GREP " "`
15684    if test "x$has_space" != x; then
15685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15687      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15688    fi
15689
15690    # Use eval to expand a potential ~
15691    eval path="$path"
15692    if test ! -f "$path" && test ! -d "$path"; then
15693      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15694    fi
15695
15696    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15697  fi
15698
15699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15700$as_echo_n "checking for Boot JDK... " >&6; }
15701              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15702$as_echo "$BOOT_JDK" >&6; }
15703              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15704$as_echo_n "checking Boot JDK version... " >&6; }
15705              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15706              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15707$as_echo "$BOOT_JDK_VERSION" >&6; }
15708            fi # end check jdk version
15709          fi # end check rt.jar
15710        fi # end check javac
15711      fi # end check java
15712    fi # end check boot jdk found
15713  fi
15714
15715
15716  # If we haven't found anything yet, we've truly lost. Give up.
15717  if test "x$BOOT_JDK_FOUND" = xno; then
15718
15719  # Print a helpful message on how to acquire the necessary build dependency.
15720  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15721  MISSING_DEPENDENCY=openjdk
15722  PKGHANDLER_COMMAND=
15723
15724  case $PKGHANDLER in
15725    apt-get)
15726      apt_help     $MISSING_DEPENDENCY ;;
15727    yum)
15728      yum_help     $MISSING_DEPENDENCY ;;
15729    port)
15730      port_help    $MISSING_DEPENDENCY ;;
15731    pkgutil)
15732      pkgutil_help $MISSING_DEPENDENCY ;;
15733    pkgadd)
15734      pkgadd_help  $MISSING_DEPENDENCY ;;
15735    * )
15736      break ;;
15737  esac
15738
15739  if test "x$PKGHANDLER_COMMAND" != x; then
15740    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15741  fi
15742
15743    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15744$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15745    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15746$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15747    as_fn_error $? "Cannot continue" "$LINENO" 5
15748  fi
15749
15750  # Setup proper paths for what we found
15751  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15752  if test ! -f "$BOOT_RTJAR"; then
15753    # On MacOSX it is called classes.jar
15754    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15755    if test -f "$BOOT_RTJAR"; then
15756      # Remove the ..
15757      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15758    fi
15759  fi
15760  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15761  BOOT_JDK="$BOOT_JDK"
15762
15763
15764
15765
15766  # Setup tools from the Boot JDK.
15767
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15769$as_echo_n "checking for java in Boot JDK... " >&6; }
15770  JAVA=$BOOT_JDK/bin/java
15771  if test ! -x $JAVA; then
15772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15773$as_echo "not found" >&6; }
15774    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15775$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15776    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15777  fi
15778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15779$as_echo "ok" >&6; }
15780
15781
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15783$as_echo_n "checking for javac in Boot JDK... " >&6; }
15784  JAVAC=$BOOT_JDK/bin/javac
15785  if test ! -x $JAVAC; then
15786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15787$as_echo "not found" >&6; }
15788    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15789$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15790    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15791  fi
15792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15793$as_echo "ok" >&6; }
15794
15795
15796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15797$as_echo_n "checking for javah in Boot JDK... " >&6; }
15798  JAVAH=$BOOT_JDK/bin/javah
15799  if test ! -x $JAVAH; then
15800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15801$as_echo "not found" >&6; }
15802    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15803$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15804    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15805  fi
15806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15807$as_echo "ok" >&6; }
15808
15809
15810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15811$as_echo_n "checking for javap in Boot JDK... " >&6; }
15812  JAVAP=$BOOT_JDK/bin/javap
15813  if test ! -x $JAVAP; then
15814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15815$as_echo "not found" >&6; }
15816    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15817$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15818    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15819  fi
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15821$as_echo "ok" >&6; }
15822
15823
15824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15825$as_echo_n "checking for jar in Boot JDK... " >&6; }
15826  JAR=$BOOT_JDK/bin/jar
15827  if test ! -x $JAR; then
15828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15829$as_echo "not found" >&6; }
15830    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15831$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15832    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15833  fi
15834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15835$as_echo "ok" >&6; }
15836
15837
15838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15839$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15840  RMIC=$BOOT_JDK/bin/rmic
15841  if test ! -x $RMIC; then
15842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15843$as_echo "not found" >&6; }
15844    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15845$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15846    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15847  fi
15848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15849$as_echo "ok" >&6; }
15850
15851
15852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15853$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15854  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15855  if test ! -x $NATIVE2ASCII; then
15856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15857$as_echo "not found" >&6; }
15858    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15859$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15860    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15861  fi
15862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15863$as_echo "ok" >&6; }
15864
15865
15866  # Finally, set some other options...
15867
15868  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15869  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15870
15871
15872
15873
15874  ##############################################################################
15875  #
15876  # Specify options for anything that is run with the Boot JDK.
15877  #
15878
15879# Check whether --with-boot-jdk-jvmargs was given.
15880if test "${with_boot_jdk_jvmargs+set}" = set; then :
15881  withval=$with_boot_jdk_jvmargs;
15882fi
15883
15884
15885  if test "x$with_boot_jdk_jvmargs" = x; then
15886    # Not all JVM:s accept the same arguments on the command line.
15887    # OpenJDK specific increase in thread stack for JDK build,
15888    # well more specifically, when running javac.
15889    if test "x$BUILD_NUM_BITS" = x32; then
15890      STACK_SIZE=768
15891    else
15892      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15893      # since 64-bit pointers are pushed on the stach. Apparently, we need
15894      # to increase the stack space when javacing the JDK....
15895      STACK_SIZE=1536
15896    fi
15897
15898    # Minimum amount of heap memory.
15899
15900  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15901  $ECHO "Command: $JAVA -Xms64M -version" >&5
15902  OUTPUT=`$JAVA -Xms64M -version 2>&1`
15903  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15904  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15905  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15906    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15907    JVM_ARG_OK=true
15908  else
15909    $ECHO "Arg failed:" >&5
15910    $ECHO "$OUTPUT" >&5
15911    JVM_ARG_OK=false
15912  fi
15913
15914    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15915      # Why does macosx need more heap? Its the huge JDK batch.
15916
15917  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15918  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15919  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15920  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15921  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15922  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15923    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15924    JVM_ARG_OK=true
15925  else
15926    $ECHO "Arg failed:" >&5
15927    $ECHO "$OUTPUT" >&5
15928    JVM_ARG_OK=false
15929  fi
15930
15931    else
15932
15933  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15934  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15935  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15936  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15937  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15938  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15939    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15940    JVM_ARG_OK=true
15941  else
15942    $ECHO "Arg failed:" >&5
15943    $ECHO "$OUTPUT" >&5
15944    JVM_ARG_OK=false
15945  fi
15946
15947    fi
15948    # When is adding -client something that speeds up the JVM?
15949    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15950
15951  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15952  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15953  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15954  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15955  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15956  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15957    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15958    JVM_ARG_OK=true
15959  else
15960    $ECHO "Arg failed:" >&5
15961    $ECHO "$OUTPUT" >&5
15962    JVM_ARG_OK=false
15963  fi
15964
15965
15966  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15967  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15968  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15969  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15970  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15971  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15972    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15973    JVM_ARG_OK=true
15974  else
15975    $ECHO "Arg failed:" >&5
15976    $ECHO "$OUTPUT" >&5
15977    JVM_ARG_OK=false
15978  fi
15979
15980
15981  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15982  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15983  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15984  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15985  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15986  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15987    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15988    JVM_ARG_OK=true
15989  else
15990    $ECHO "Arg failed:" >&5
15991    $ECHO "$OUTPUT" >&5
15992    JVM_ARG_OK=false
15993  fi
15994
15995    # Disable special log output when a debug build is used as Boot JDK...
15996
15997  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15998  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15999  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16000  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16001  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16002  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16003    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16004    JVM_ARG_OK=true
16005  else
16006    $ECHO "Arg failed:" >&5
16007    $ECHO "$OUTPUT" >&5
16008    JVM_ARG_OK=false
16009  fi
16010
16011  fi
16012
16013  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16014
16015
16016
16017###############################################################################
16018#
16019# Configure the sources to use. We can add or override individual directories.
16020#
16021###############################################################################
16022
16023
16024  # Where are the sources. Any of these can be overridden
16025  # using --with-override-corba and the likes.
16026  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16027  CORBA_TOPDIR="$SRC_ROOT/corba"
16028  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16029  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16030  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16031  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16032  JDK_TOPDIR="$SRC_ROOT/jdk"
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043  ###############################################################################
16044  #
16045  # Pickup additional source for a component from outside of the source root
16046  # or override source for a component.
16047  #
16048
16049# Check whether --with-add-source-root was given.
16050if test "${with_add_source_root+set}" = set; then :
16051  withval=$with_add_source_root;
16052fi
16053
16054
16055
16056# Check whether --with-override-source-root was given.
16057if test "${with_override_source_root+set}" = set; then :
16058  withval=$with_override_source_root;
16059fi
16060
16061
16062
16063# Check whether --with-adds-and-overrides was given.
16064if test "${with_adds_and_overrides+set}" = set; then :
16065  withval=$with_adds_and_overrides;
16066fi
16067
16068
16069  if test "x$with_adds_and_overrides" != x; then
16070    with_add_source_root="$with_adds_and_overrides/adds"
16071    with_override_source_root="$with_adds_and_overrides/overrides"
16072  fi
16073
16074  if test "x$with_add_source_root" != x; then
16075    if ! test -d $with_add_source_root; then
16076      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16077    fi
16078    CURDIR="$PWD"
16079    cd "$with_add_source_root"
16080    ADD_SRC_ROOT="`pwd`"
16081    cd "$CURDIR"
16082    # Verify that the addon source root does not have any root makefiles.
16083    # If it does, then it is usually an error, prevent this.
16084    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16085      test -f $with_add_source_root/langtools/make/Makefile; then
16086      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
16087    fi
16088    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16089      test -f $with_add_source_root/corba/make/Makefile; then
16090      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
16091    fi
16092    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16093      test -f $with_add_source_root/jaxp/make/Makefile; then
16094      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
16095    fi
16096    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16097      test -f $with_add_source_root/jaxws/make/Makefile; then
16098      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
16099    fi
16100    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16101      test -f $with_add_source_root/hotspot/make/Makefile; then
16102      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
16103    fi
16104    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16105      test -f $with_add_source_root/nashorn/make/Makefile; then
16106      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
16107    fi
16108    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16109      test -f $with_add_source_root/jdk/make/Makefile; then
16110      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
16111    fi
16112  fi
16113
16114
16115  if test "x$with_override_source_root" != x; then
16116    if ! test -d $with_override_source_root; then
16117      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16118    fi
16119    CURDIR="$PWD"
16120    cd "$with_override_source_root"
16121    OVERRIDE_SRC_ROOT="`pwd`"
16122    cd "$CURDIR"
16123    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16124      test -f $with_override_source_root/langtools/make/Makefile; then
16125      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
16126    fi
16127    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16128      test -f $with_override_source_root/corba/make/Makefile; then
16129      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
16130    fi
16131    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16132      test -f $with_override_source_root/jaxp/make/Makefile; then
16133      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
16134    fi
16135    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16136      test -f $with_override_source_root/jaxws/make/Makefile; then
16137      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
16138    fi
16139    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16140      test -f $with_override_source_root/hotspot/make/Makefile; then
16141      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
16142    fi
16143    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16144      test -f $with_override_source_root/nashorn/make/Makefile; then
16145      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
16146    fi
16147    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16148      test -f $with_override_source_root/jdk/make/Makefile; then
16149      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
16150    fi
16151  fi
16152
16153
16154  ###############################################################################
16155  #
16156  # Override a repo completely, this is used for example when you have 3 small
16157  # development sandboxes of the langtools sources and want to avoid having 3 full
16158  # OpenJDK sources checked out on disk.
16159  #
16160  # Assuming that the 3 langtools sandboxes are located here:
16161  # /home/fredrik/sandbox1/langtools
16162  # /home/fredrik/sandbox2/langtools
16163  # /home/fredrik/sandbox3/langtools
16164  #
16165  # From the source root you create build subdirs manually:
16166  #     mkdir -p build1 build2 build3
16167  # in each build directory run:
16168  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16169  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16170  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16171  #
16172
16173
16174# Check whether --with-override-langtools was given.
16175if test "${with_override_langtools+set}" = set; then :
16176  withval=$with_override_langtools;
16177fi
16178
16179
16180
16181# Check whether --with-override-corba was given.
16182if test "${with_override_corba+set}" = set; then :
16183  withval=$with_override_corba;
16184fi
16185
16186
16187
16188# Check whether --with-override-jaxp was given.
16189if test "${with_override_jaxp+set}" = set; then :
16190  withval=$with_override_jaxp;
16191fi
16192
16193
16194
16195# Check whether --with-override-jaxws was given.
16196if test "${with_override_jaxws+set}" = set; then :
16197  withval=$with_override_jaxws;
16198fi
16199
16200
16201
16202# Check whether --with-override-hotspot was given.
16203if test "${with_override_hotspot+set}" = set; then :
16204  withval=$with_override_hotspot;
16205fi
16206
16207
16208
16209# Check whether --with-override-nashorn was given.
16210if test "${with_override_nashorn+set}" = set; then :
16211  withval=$with_override_nashorn;
16212fi
16213
16214
16215
16216# Check whether --with-override-jdk was given.
16217if test "${with_override_jdk+set}" = set; then :
16218  withval=$with_override_jdk;
16219fi
16220
16221
16222  if test "x$with_override_langtools" != x; then
16223    CURDIR="$PWD"
16224    cd "$with_override_langtools"
16225    LANGTOOLS_TOPDIR="`pwd`"
16226    cd "$CURDIR"
16227    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16228      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16229    fi
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16231$as_echo_n "checking if langtools should be overridden... " >&6; }
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16233$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16234  fi
16235  if test "x$with_override_corba" != x; then
16236    CURDIR="$PWD"
16237    cd "$with_override_corba"
16238    CORBA_TOPDIR="`pwd`"
16239    cd "$CURDIR"
16240    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16241      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16242    fi
16243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16244$as_echo_n "checking if corba should be overridden... " >&6; }
16245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16246$as_echo "yes with $CORBA_TOPDIR" >&6; }
16247  fi
16248  if test "x$with_override_jaxp" != x; then
16249    CURDIR="$PWD"
16250    cd "$with_override_jaxp"
16251    JAXP_TOPDIR="`pwd`"
16252    cd "$CURDIR"
16253    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16254      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16255    fi
16256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16257$as_echo_n "checking if jaxp should be overridden... " >&6; }
16258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16259$as_echo "yes with $JAXP_TOPDIR" >&6; }
16260  fi
16261  if test "x$with_override_jaxws" != x; then
16262    CURDIR="$PWD"
16263    cd "$with_override_jaxws"
16264    JAXWS_TOPDIR="`pwd`"
16265    cd "$CURDIR"
16266    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16267      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16268    fi
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16270$as_echo_n "checking if jaxws should be overridden... " >&6; }
16271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16272$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16273  fi
16274  if test "x$with_override_hotspot" != x; then
16275    CURDIR="$PWD"
16276    cd "$with_override_hotspot"
16277    HOTSPOT_TOPDIR="`pwd`"
16278    cd "$CURDIR"
16279    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16280        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16281      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16282    fi
16283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16284$as_echo_n "checking if hotspot should be overridden... " >&6; }
16285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16286$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16287  fi
16288  if test "x$with_override_nashorn" != x; then
16289    CURDIR="$PWD"
16290    cd "$with_override_nashorn"
16291    NASHORN_TOPDIR="`pwd`"
16292    cd "$CURDIR"
16293    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16294      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16295    fi
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16297$as_echo_n "checking if nashorn should be overridden... " >&6; }
16298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16299$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16300  fi
16301  if test "x$with_override_jdk" != x; then
16302    CURDIR="$PWD"
16303    cd "$with_override_jdk"
16304    JDK_TOPDIR="`pwd`"
16305    cd "$CURDIR"
16306    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16307      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16308    fi
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16310$as_echo_n "checking if JDK should be overridden... " >&6; }
16311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16312$as_echo "yes with $JDK_TOPDIR" >&6; }
16313  fi
16314
16315
16316  BUILD_OUTPUT="$OUTPUT_ROOT"
16317
16318
16319  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16320  BUILD_HOTSPOT=true
16321
16322
16323
16324# Check whether --with-import-hotspot was given.
16325if test "${with_import_hotspot+set}" = set; then :
16326  withval=$with_import_hotspot;
16327fi
16328
16329  if test "x$with_import_hotspot" != x; then
16330    CURDIR="$PWD"
16331    cd "$with_import_hotspot"
16332    HOTSPOT_DIST="`pwd`"
16333    cd "$CURDIR"
16334    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16335      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16336    fi
16337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16338$as_echo_n "checking if hotspot should be imported... " >&6; }
16339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16340$as_echo "yes from $HOTSPOT_DIST" >&6; }
16341    BUILD_HOTSPOT=false
16342  fi
16343
16344  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16345
16346
16347###############################################################################
16348#
16349# Setup the toolchain (compilers etc), i.e. the tools that need to be
16350# cross-compilation aware.
16351#
16352###############################################################################
16353
16354
16355  ###############################################################################
16356  #
16357  # Configure the development tool paths and potential sysroot.
16358  #
16359  ac_ext=cpp
16360ac_cpp='$CXXCPP $CPPFLAGS'
16361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16364
16365
16366  # The option used to specify the target .o,.a or .so file.
16367  # When compiling, how to specify the to be created object file.
16368  CC_OUT_OPTION='-o$(SPACE)'
16369  # When linking, how to specify the to be created executable.
16370  EXE_OUT_OPTION='-o$(SPACE)'
16371  # When linking, how to specify the to be created dynamically linkable library.
16372  LD_OUT_OPTION='-o$(SPACE)'
16373  # When archiving, how to specify the to be create static archive for object files.
16374  AR_OUT_OPTION='rcs$(SPACE)'
16375
16376
16377
16378
16379
16380# Locate the actual tools
16381
16382
16383# Check whether --with-jtreg was given.
16384if test "${with_jtreg+set}" = set; then :
16385  withval=$with_jtreg;
16386else
16387  with_jtreg=no
16388fi
16389
16390
16391  if test "x$with_jtreg" = xno; then
16392    # jtreg disabled
16393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16394$as_echo_n "checking for jtreg... " >&6; }
16395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16396$as_echo "no" >&6; }
16397  else
16398    if test "x$with_jtreg" != xyes; then
16399      # with path specified.
16400      JT_HOME="$with_jtreg"
16401    fi
16402
16403    if test "x$JT_HOME" != x; then
16404      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16405$as_echo_n "checking for jtreg... " >&6; }
16406
16407      # use JT_HOME enviroment var.
16408
16409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16410
16411  # Input might be given as Windows format, start by converting to
16412  # unix format.
16413  path="$JT_HOME"
16414  new_path=`$CYGPATH -u "$path"`
16415
16416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16419  # "foo.exe" is OK but "foo" is an error.
16420  #
16421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16422  # It is also a way to make sure we got the proper file name for the real test later on.
16423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16424  if test "x$test_shortpath" = x; then
16425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16426$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16427    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16428  fi
16429
16430  # Call helper function which possibly converts this using DOS-style short mode.
16431  # If so, the updated path is stored in $new_path.
16432
16433  input_path="$new_path"
16434  # Check if we need to convert this using DOS-style short mode. If the path
16435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16436  # take no chances and rewrite it.
16437  # Note: m4 eats our [], so we need to use [ and ] instead.
16438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16439  if test "x$has_forbidden_chars" != x; then
16440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16444      # Going to short mode and back again did indeed matter. Since short mode is
16445      # case insensitive, let's make it lowercase to improve readability.
16446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16447      # Now convert it back to Unix-stile (cygpath)
16448      input_path=`$CYGPATH -u "$shortmode_path"`
16449      new_path="$input_path"
16450    fi
16451  fi
16452
16453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16454  if test "x$test_cygdrive_prefix" = x; then
16455    # As a simple fix, exclude /usr/bin since it's not a real path.
16456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16458      # a path prefixed by /cygdrive for fixpath to work.
16459      new_path="$CYGWIN_ROOT_PATH$input_path"
16460    fi
16461  fi
16462
16463
16464  if test "x$path" != "x$new_path"; then
16465    JT_HOME="$new_path"
16466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16467$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16468  fi
16469
16470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16471
16472  path="$JT_HOME"
16473  has_colon=`$ECHO $path | $GREP ^.:`
16474  new_path="$path"
16475  if test "x$has_colon" = x; then
16476    # Not in mixed or Windows style, start by that.
16477    new_path=`cmd //c echo $path`
16478  fi
16479
16480
16481  input_path="$new_path"
16482  # Check if we need to convert this using DOS-style short mode. If the path
16483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16484  # take no chances and rewrite it.
16485  # Note: m4 eats our [], so we need to use [ and ] instead.
16486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16487  if test "x$has_forbidden_chars" != x; then
16488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16490  fi
16491
16492
16493  windows_path="$new_path"
16494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16495    unix_path=`$CYGPATH -u "$windows_path"`
16496    new_path="$unix_path"
16497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16499    new_path="$unix_path"
16500  fi
16501
16502  if test "x$path" != "x$new_path"; then
16503    JT_HOME="$new_path"
16504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16505$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16506  fi
16507
16508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16510
16511  else
16512    # We're on a posix platform. Hooray! :)
16513    path="$JT_HOME"
16514    has_space=`$ECHO "$path" | $GREP " "`
16515    if test "x$has_space" != x; then
16516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16517$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16518      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16519    fi
16520
16521    # Use eval to expand a potential ~
16522    eval path="$path"
16523    if test ! -f "$path" && test ! -d "$path"; then
16524      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16525    fi
16526
16527    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16528  fi
16529
16530
16531      # jtreg win32 script works for everybody
16532      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16533
16534      if test ! -f "$JTREGEXE"; then
16535        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16536      fi
16537
16538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16539$as_echo "$JTREGEXE" >&6; }
16540    else
16541      # try to find jtreg on path
16542
16543  for ac_prog in jtreg
16544do
16545  # Extract the first word of "$ac_prog", so it can be a program name with args.
16546set dummy $ac_prog; ac_word=$2
16547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16548$as_echo_n "checking for $ac_word... " >&6; }
16549if ${ac_cv_path_JTREGEXE+:} false; then :
16550  $as_echo_n "(cached) " >&6
16551else
16552  case $JTREGEXE in
16553  [\\/]* | ?:[\\/]*)
16554  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16555  ;;
16556  *)
16557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16558for as_dir in $PATH
16559do
16560  IFS=$as_save_IFS
16561  test -z "$as_dir" && as_dir=.
16562    for ac_exec_ext in '' $ac_executable_extensions; do
16563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16564    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16566    break 2
16567  fi
16568done
16569  done
16570IFS=$as_save_IFS
16571
16572  ;;
16573esac
16574fi
16575JTREGEXE=$ac_cv_path_JTREGEXE
16576if test -n "$JTREGEXE"; then
16577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16578$as_echo "$JTREGEXE" >&6; }
16579else
16580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16581$as_echo "no" >&6; }
16582fi
16583
16584
16585  test -n "$JTREGEXE" && break
16586done
16587
16588
16589  if test "x$JTREGEXE" = x; then
16590    if test "xjtreg" = x; then
16591      PROG_NAME=jtregexe
16592    else
16593      PROG_NAME=jtreg
16594    fi
16595    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16596$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16597    as_fn_error $? "Cannot continue" "$LINENO" 5
16598  fi
16599
16600
16601      JT_HOME="`$DIRNAME $JTREGEXE`"
16602    fi
16603  fi
16604
16605
16606
16607
16608
16609  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16610
16611  # Store path to cygwin link.exe to help excluding it when searching for
16612  # VS linker. This must be done before changing the PATH when looking for VS.
16613  # Extract the first word of "link", so it can be a program name with args.
16614set dummy link; ac_word=$2
16615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16616$as_echo_n "checking for $ac_word... " >&6; }
16617if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16618  $as_echo_n "(cached) " >&6
16619else
16620  case $CYGWIN_LINK in
16621  [\\/]* | ?:[\\/]*)
16622  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16623  ;;
16624  *)
16625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16626for as_dir in $PATH
16627do
16628  IFS=$as_save_IFS
16629  test -z "$as_dir" && as_dir=.
16630    for ac_exec_ext in '' $ac_executable_extensions; do
16631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16632    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16634    break 2
16635  fi
16636done
16637  done
16638IFS=$as_save_IFS
16639
16640  ;;
16641esac
16642fi
16643CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16644if test -n "$CYGWIN_LINK"; then
16645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16646$as_echo "$CYGWIN_LINK" >&6; }
16647else
16648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16649$as_echo "no" >&6; }
16650fi
16651
16652
16653  if test "x$CYGWIN_LINK" != x; then
16654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16655$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16656    "$CYGWIN_LINK" --version > /dev/null
16657    if test $? -eq 0 ; then
16658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16659$as_echo "yes" >&6; }
16660    else
16661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16662$as_echo "no" >&6; }
16663      # This might be the VS linker. Don't exclude it later on.
16664      CYGWIN_LINK=""
16665    fi
16666  fi
16667
16668  # First-hand choice is to locate and run the vsvars bat file.
16669
16670  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16671    VCVARSFILE="vc/bin/vcvars32.bat"
16672  else
16673    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16674  fi
16675
16676  VS_ENV_CMD=""
16677  VS_ENV_ARGS=""
16678  if test "x$with_toolsdir" != x; then
16679
16680  if test "x$VS_ENV_CMD" = x; then
16681    VS100BASE="$with_toolsdir/../.."
16682    METHOD="--with-tools-dir"
16683
16684  windows_path="$VS100BASE"
16685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16686    unix_path=`$CYGPATH -u "$windows_path"`
16687    VS100BASE="$unix_path"
16688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16690    VS100BASE="$unix_path"
16691  fi
16692
16693    if test -d "$VS100BASE"; then
16694      if test -f "$VS100BASE/$VCVARSFILE"; then
16695        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16696$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16697        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16698      else
16699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16700$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16701        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16702$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16703      fi
16704    fi
16705  fi
16706
16707  fi
16708
16709  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16710    # Having specified an argument which is incorrect will produce an instant failure;
16711    # we should not go on looking
16712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16713$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16714    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16715$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16716    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16717  fi
16718
16719  if test "x$VS100COMNTOOLS" != x; then
16720
16721  if test "x$VS_ENV_CMD" = x; then
16722    VS100BASE="$VS100COMNTOOLS/../.."
16723    METHOD="VS100COMNTOOLS variable"
16724
16725  windows_path="$VS100BASE"
16726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16727    unix_path=`$CYGPATH -u "$windows_path"`
16728    VS100BASE="$unix_path"
16729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16731    VS100BASE="$unix_path"
16732  fi
16733
16734    if test -d "$VS100BASE"; then
16735      if test -f "$VS100BASE/$VCVARSFILE"; then
16736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16737$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16738        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16739      else
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16741$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16742        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16743$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16744      fi
16745    fi
16746  fi
16747
16748  fi
16749  if test "x$PROGRAMFILES" != x; then
16750
16751  if test "x$VS_ENV_CMD" = x; then
16752    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16753    METHOD="well-known name"
16754
16755  windows_path="$VS100BASE"
16756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16757    unix_path=`$CYGPATH -u "$windows_path"`
16758    VS100BASE="$unix_path"
16759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16761    VS100BASE="$unix_path"
16762  fi
16763
16764    if test -d "$VS100BASE"; then
16765      if test -f "$VS100BASE/$VCVARSFILE"; then
16766        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16767$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16768        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16769      else
16770        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16771$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16772        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16773$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16774      fi
16775    fi
16776  fi
16777
16778  fi
16779
16780  if test "x$VS_ENV_CMD" = x; then
16781    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16782    METHOD="well-known name"
16783
16784  windows_path="$VS100BASE"
16785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16786    unix_path=`$CYGPATH -u "$windows_path"`
16787    VS100BASE="$unix_path"
16788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16790    VS100BASE="$unix_path"
16791  fi
16792
16793    if test -d "$VS100BASE"; then
16794      if test -f "$VS100BASE/$VCVARSFILE"; then
16795        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16796$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16797        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16798      else
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16800$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16801        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16802$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16803      fi
16804    fi
16805  fi
16806
16807
16808  if test "x$VS_ENV_CMD" = x; then
16809    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16810    METHOD="well-known name"
16811
16812  windows_path="$VS100BASE"
16813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16814    unix_path=`$CYGPATH -u "$windows_path"`
16815    VS100BASE="$unix_path"
16816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16818    VS100BASE="$unix_path"
16819  fi
16820
16821    if test -d "$VS100BASE"; then
16822      if test -f "$VS100BASE/$VCVARSFILE"; then
16823        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16824$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16825        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16826      else
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16828$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16830$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16831      fi
16832    fi
16833  fi
16834
16835
16836  if test "x$ProgramW6432" != x; then
16837
16838  if test "x$VS_ENV_CMD" = x; then
16839    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16840    METHOD="well-known name"
16841
16842  windows_path="$WIN_SDK_BASE"
16843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16844    unix_path=`$CYGPATH -u "$windows_path"`
16845    WIN_SDK_BASE="$unix_path"
16846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16848    WIN_SDK_BASE="$unix_path"
16849  fi
16850
16851    if test -d "$WIN_SDK_BASE"; then
16852      # There have been cases of partial or broken SDK installations. A missing
16853      # lib dir is not going to work.
16854      if test ! -d "$WIN_SDK_BASE/../lib"; then
16855        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16856$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16857        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16858$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16859      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16861$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16862        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16863        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16864          VS_ENV_ARGS="/x86"
16865        else
16866          VS_ENV_ARGS="/x64"
16867        fi
16868      else
16869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16870$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16872$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16873      fi
16874    fi
16875  fi
16876
16877  fi
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$PROGRAMFILES" != x; then
16921
16922  if test "x$VS_ENV_CMD" = x; then
16923    WIN_SDK_BASE="$PROGRAMFILES/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
16963  if test "x$VS_ENV_CMD" = x; then
16964    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16965    METHOD="well-known name"
16966
16967  windows_path="$WIN_SDK_BASE"
16968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16969    unix_path=`$CYGPATH -u "$windows_path"`
16970    WIN_SDK_BASE="$unix_path"
16971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16973    WIN_SDK_BASE="$unix_path"
16974  fi
16975
16976    if test -d "$WIN_SDK_BASE"; then
16977      # There have been cases of partial or broken SDK installations. A missing
16978      # lib dir is not going to work.
16979      if test ! -d "$WIN_SDK_BASE/../lib"; then
16980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16981$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16983$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16984      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16986$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16987        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16988        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16989          VS_ENV_ARGS="/x86"
16990        else
16991          VS_ENV_ARGS="/x64"
16992        fi
16993      else
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16995$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16996        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16997$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16998      fi
16999    fi
17000  fi
17001
17002
17003  if test "x$VS_ENV_CMD" = x; then
17004    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17005    METHOD="well-known name"
17006
17007  windows_path="$WIN_SDK_BASE"
17008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17009    unix_path=`$CYGPATH -u "$windows_path"`
17010    WIN_SDK_BASE="$unix_path"
17011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17013    WIN_SDK_BASE="$unix_path"
17014  fi
17015
17016    if test -d "$WIN_SDK_BASE"; then
17017      # There have been cases of partial or broken SDK installations. A missing
17018      # lib dir is not going to work.
17019      if test ! -d "$WIN_SDK_BASE/../lib"; then
17020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17021$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17023$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17024      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17026$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17027        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17028        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17029          VS_ENV_ARGS="/x86"
17030        else
17031          VS_ENV_ARGS="/x64"
17032        fi
17033      else
17034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17035$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17036        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17037$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17038      fi
17039    fi
17040  fi
17041
17042
17043  if test "x$VS_ENV_CMD" != x; then
17044    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17045
17046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17047
17048  # First separate the path from the arguments. This will split at the first
17049  # space.
17050  complete="$VS_ENV_CMD"
17051  path="${complete%% *}"
17052  tmp="$complete EOL"
17053  arguments="${tmp#* }"
17054
17055  # Input might be given as Windows format, start by converting to
17056  # unix format.
17057  new_path=`$CYGPATH -u "$path"`
17058
17059  # Now try to locate executable using which
17060  new_path=`$WHICH "$new_path" 2> /dev/null`
17061  # bat and cmd files are not always considered executable in cygwin causing which
17062  # to not find them
17063  if test "x$new_path" = x \
17064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17066    new_path=`$CYGPATH -u "$path"`
17067  fi
17068  if test "x$new_path" = x; then
17069    # Oops. Which didn't find the executable.
17070    # The splitting of arguments from the executable at a space might have been incorrect,
17071    # since paths with space are more likely in Windows. Give it another try with the whole
17072    # argument.
17073    path="$complete"
17074    arguments="EOL"
17075    new_path=`$CYGPATH -u "$path"`
17076    new_path=`$WHICH "$new_path" 2> /dev/null`
17077    # bat and cmd files are not always considered executable in cygwin causing which
17078    # to not find them
17079    if test "x$new_path" = x \
17080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17082      new_path=`$CYGPATH -u "$path"`
17083    fi
17084    if test "x$new_path" = x; then
17085      # It's still not found. Now this is an unrecoverable error.
17086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17087$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17088      has_space=`$ECHO "$complete" | $GREP " "`
17089      if test "x$has_space" != x; then
17090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17092      fi
17093      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17094    fi
17095  fi
17096
17097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17100  # "foo.exe" is OK but "foo" is an error.
17101  #
17102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17103  # It is also a way to make sure we got the proper file name for the real test later on.
17104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17105  if test "x$test_shortpath" = x; then
17106    # Short path failed, file does not exist as specified.
17107    # Try adding .exe or .cmd
17108    if test -f "${new_path}.exe"; then
17109      input_to_shortpath="${new_path}.exe"
17110    elif test -f "${new_path}.cmd"; then
17111      input_to_shortpath="${new_path}.cmd"
17112    else
17113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17114$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17117      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17118    fi
17119  else
17120    input_to_shortpath="$new_path"
17121  fi
17122
17123  # Call helper function which possibly converts this using DOS-style short mode.
17124  # If so, the updated path is stored in $new_path.
17125  new_path="$input_to_shortpath"
17126
17127  input_path="$input_to_shortpath"
17128  # Check if we need to convert this using DOS-style short mode. If the path
17129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17130  # take no chances and rewrite it.
17131  # Note: m4 eats our [], so we need to use [ and ] instead.
17132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17133  if test "x$has_forbidden_chars" != x; then
17134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17138      # Going to short mode and back again did indeed matter. Since short mode is
17139      # case insensitive, let's make it lowercase to improve readability.
17140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17141      # Now convert it back to Unix-stile (cygpath)
17142      input_path=`$CYGPATH -u "$shortmode_path"`
17143      new_path="$input_path"
17144    fi
17145  fi
17146
17147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17148  if test "x$test_cygdrive_prefix" = x; then
17149    # As a simple fix, exclude /usr/bin since it's not a real path.
17150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17152      # a path prefixed by /cygdrive for fixpath to work.
17153      new_path="$CYGWIN_ROOT_PATH$input_path"
17154    fi
17155  fi
17156
17157  # remove trailing .exe if any
17158  new_path="${new_path/%.exe/}"
17159
17160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17161
17162  # First separate the path from the arguments. This will split at the first
17163  # space.
17164  complete="$VS_ENV_CMD"
17165  path="${complete%% *}"
17166  tmp="$complete EOL"
17167  arguments="${tmp#* }"
17168
17169  # Input might be given as Windows format, start by converting to
17170  # unix format.
17171  new_path="$path"
17172
17173  windows_path="$new_path"
17174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17175    unix_path=`$CYGPATH -u "$windows_path"`
17176    new_path="$unix_path"
17177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17179    new_path="$unix_path"
17180  fi
17181
17182
17183  # Now try to locate executable using which
17184  new_path=`$WHICH "$new_path" 2> /dev/null`
17185
17186  if test "x$new_path" = x; then
17187    # Oops. Which didn't find the executable.
17188    # The splitting of arguments from the executable at a space might have been incorrect,
17189    # since paths with space are more likely in Windows. Give it another try with the whole
17190    # argument.
17191    path="$complete"
17192    arguments="EOL"
17193    new_path="$path"
17194
17195  windows_path="$new_path"
17196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17197    unix_path=`$CYGPATH -u "$windows_path"`
17198    new_path="$unix_path"
17199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17201    new_path="$unix_path"
17202  fi
17203
17204
17205    new_path=`$WHICH "$new_path" 2> /dev/null`
17206
17207    if test "x$new_path" = x; then
17208      # It's still not found. Now this is an unrecoverable error.
17209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17210$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17211      has_space=`$ECHO "$complete" | $GREP " "`
17212      if test "x$has_space" != x; then
17213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17215      fi
17216      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17217    fi
17218  fi
17219
17220  # Now new_path has a complete unix path to the binary
17221  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17222    # Keep paths in /bin as-is, but remove trailing .exe if any
17223    new_path="${new_path/%.exe/}"
17224    # Do not save /bin paths to all_fixpath_prefixes!
17225  else
17226    # Not in mixed or Windows style, start by that.
17227    new_path=`cmd //c echo $new_path`
17228
17229  input_path="$new_path"
17230  # Check if we need to convert this using DOS-style short mode. If the path
17231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17232  # take no chances and rewrite it.
17233  # Note: m4 eats our [], so we need to use [ and ] instead.
17234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17235  if test "x$has_forbidden_chars" != x; then
17236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17238  fi
17239
17240    # Output is in $new_path
17241
17242  windows_path="$new_path"
17243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17244    unix_path=`$CYGPATH -u "$windows_path"`
17245    new_path="$unix_path"
17246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17248    new_path="$unix_path"
17249  fi
17250
17251    # remove trailing .exe if any
17252    new_path="${new_path/%.exe/}"
17253
17254    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17255    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17256  fi
17257
17258  else
17259    # We're on a posix platform. Hooray! :)
17260    # First separate the path from the arguments. This will split at the first
17261    # space.
17262    complete="$VS_ENV_CMD"
17263    path="${complete%% *}"
17264    tmp="$complete EOL"
17265    arguments="${tmp#* }"
17266
17267    # Cannot rely on the command "which" here since it doesn't always work.
17268    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17269    if test -z "$is_absolute_path"; then
17270      # Path to executable is not absolute. Find it.
17271      IFS_save="$IFS"
17272      IFS=:
17273      for p in $PATH; do
17274        if test -f "$p/$path" && test -x "$p/$path"; then
17275          new_path="$p/$path"
17276          break
17277        fi
17278      done
17279      IFS="$IFS_save"
17280    else
17281      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17282$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17283      new_path="$path"
17284    fi
17285
17286    if test "x$new_path" = x; then
17287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17288$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17289      has_space=`$ECHO "$complete" | $GREP " "`
17290      if test "x$has_space" != x; then
17291        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17292$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17293      fi
17294      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17295    fi
17296  fi
17297
17298  # Now join together the path and the arguments once again
17299  if test "x$arguments" != xEOL; then
17300    new_complete="$new_path ${arguments% *}"
17301  else
17302    new_complete="$new_path"
17303  fi
17304
17305  if test "x$complete" != "x$new_complete"; then
17306    VS_ENV_CMD="$new_complete"
17307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17308$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17309  fi
17310
17311
17312    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17313    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17314$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17315    cd $OUTPUT_ROOT
17316    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17317    # to autoconf standards.
17318
17319    #----
17320
17321    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17322    # but calculate the difference in Cygwin environment before/after running it and then
17323    # apply the diff.
17324
17325    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17326      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17327      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17328      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17329    else
17330      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17331      _dosbash=`cmd //c echo \`which bash\``
17332    fi
17333
17334    # generate the set of exported vars before/after the vs10 setup
17335    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17336    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17337    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17338    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17339
17340    # Now execute the newly created bat file.
17341    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17342    cmd /c localdevenvtmp.bat | cat
17343
17344    # apply the diff (less some non-vs10 vars named by "!")
17345    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17346    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17347    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17348
17349    # cleanup
17350    $RM localdevenvtmp*
17351    #----
17352    cd $CURDIR
17353    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17355$as_echo "no" >&6; }
17356      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17357$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17358      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17359$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17360      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17361$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17362      as_fn_error $? "Cannot continue" "$LINENO" 5
17363    fi
17364
17365    # Now set all paths and other env variables. This will allow the rest of
17366    # the configure script to find and run the compiler in the proper way.
17367    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17368$as_echo "$as_me: Setting extracted environment variables" >&6;}
17369    . $OUTPUT_ROOT/localdevenv.sh
17370  else
17371    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17372    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17373$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17374  fi
17375
17376  # At this point, we should have corrent variables in the environment, or we can't continue.
17377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17378$as_echo_n "checking for Visual Studio variables... " >&6; }
17379
17380  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17381    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17383$as_echo "present but broken" >&6; }
17384      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17385    else
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17387$as_echo "ok" >&6; }
17388      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17389      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17390      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17391      # Remove any paths containing # (typically F#) as that messes up make
17392      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17393      VS_PATH="$PATH"
17394
17395
17396
17397    fi
17398  else
17399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17400$as_echo "not found" >&6; }
17401
17402    if test "x$VS_ENV_CMD" = x; then
17403      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17404$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17405      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17406$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17407    else
17408      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17409$as_echo "$as_me: Running the extraction script failed." >&6;}
17410    fi
17411    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17412$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17413    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17414$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17415    as_fn_error $? "Cannot continue" "$LINENO" 5
17416  fi
17417
17418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17419$as_echo_n "checking for msvcr100.dll... " >&6; }
17420
17421# Check whether --with-msvcr-dll was given.
17422if test "${with_msvcr_dll+set}" = set; then :
17423  withval=$with_msvcr_dll;
17424fi
17425
17426  if test "x$with_msvcr_dll" != x; then
17427    MSVCR_DLL="$with_msvcr_dll"
17428  else
17429    if test "x$VCINSTALLDIR" != x; then
17430      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17431        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17432      else
17433        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17434        if test "x$MSVCR_DLL" = x; then
17435          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17436        fi
17437      fi
17438      if test "x$MSVCR_DLL" != x; then
17439        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17440$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17441      else
17442        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17443$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17444      fi
17445    fi
17446    # Try some fallback alternatives
17447    if test "x$MSVCR_DLL" = x; then
17448      # If visual studio express is installed, there is usually one with the debugger
17449      if test "x$VS100COMNTOOLS" != x; then
17450        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17451          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17452          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17453$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17454        fi
17455      fi
17456    fi
17457    if test "x$MSVCR_DLL" = x; then
17458      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17459        # Fallback for 32bit builds, look in the windows directory.
17460        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17461          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17462$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17463          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17464        fi
17465      fi
17466    fi
17467  fi
17468  if test "x$MSVCR_DLL" = x; then
17469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17470$as_echo "no" >&6; }
17471    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17472  fi
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17474$as_echo "$MSVCR_DLL" >&6; }
17475
17476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17477
17478  # Input might be given as Windows format, start by converting to
17479  # unix format.
17480  path="$MSVCR_DLL"
17481  new_path=`$CYGPATH -u "$path"`
17482
17483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17486  # "foo.exe" is OK but "foo" is an error.
17487  #
17488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17489  # It is also a way to make sure we got the proper file name for the real test later on.
17490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17491  if test "x$test_shortpath" = x; then
17492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17493$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17494    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17495  fi
17496
17497  # Call helper function which possibly converts this using DOS-style short mode.
17498  # If so, the updated path is stored in $new_path.
17499
17500  input_path="$new_path"
17501  # Check if we need to convert this using DOS-style short mode. If the path
17502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17503  # take no chances and rewrite it.
17504  # Note: m4 eats our [], so we need to use [ and ] instead.
17505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17506  if test "x$has_forbidden_chars" != x; then
17507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17511      # Going to short mode and back again did indeed matter. Since short mode is
17512      # case insensitive, let's make it lowercase to improve readability.
17513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17514      # Now convert it back to Unix-stile (cygpath)
17515      input_path=`$CYGPATH -u "$shortmode_path"`
17516      new_path="$input_path"
17517    fi
17518  fi
17519
17520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17521  if test "x$test_cygdrive_prefix" = x; then
17522    # As a simple fix, exclude /usr/bin since it's not a real path.
17523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17525      # a path prefixed by /cygdrive for fixpath to work.
17526      new_path="$CYGWIN_ROOT_PATH$input_path"
17527    fi
17528  fi
17529
17530
17531  if test "x$path" != "x$new_path"; then
17532    MSVCR_DLL="$new_path"
17533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17534$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17535  fi
17536
17537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17538
17539  path="$MSVCR_DLL"
17540  has_colon=`$ECHO $path | $GREP ^.:`
17541  new_path="$path"
17542  if test "x$has_colon" = x; then
17543    # Not in mixed or Windows style, start by that.
17544    new_path=`cmd //c echo $path`
17545  fi
17546
17547
17548  input_path="$new_path"
17549  # Check if we need to convert this using DOS-style short mode. If the path
17550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17551  # take no chances and rewrite it.
17552  # Note: m4 eats our [], so we need to use [ and ] instead.
17553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17554  if test "x$has_forbidden_chars" != x; then
17555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17557  fi
17558
17559
17560  windows_path="$new_path"
17561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17562    unix_path=`$CYGPATH -u "$windows_path"`
17563    new_path="$unix_path"
17564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17566    new_path="$unix_path"
17567  fi
17568
17569  if test "x$path" != "x$new_path"; then
17570    MSVCR_DLL="$new_path"
17571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17572$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17573  fi
17574
17575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17577
17578  else
17579    # We're on a posix platform. Hooray! :)
17580    path="$MSVCR_DLL"
17581    has_space=`$ECHO "$path" | $GREP " "`
17582    if test "x$has_space" != x; then
17583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17584$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17585      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17586    fi
17587
17588    # Use eval to expand a potential ~
17589    eval path="$path"
17590    if test ! -f "$path" && test ! -d "$path"; then
17591      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17592    fi
17593
17594    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17595  fi
17596
17597
17598
17599
17600# Check whether --with-dxsdk was given.
17601if test "${with_dxsdk+set}" = set; then :
17602  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17603$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17604fi
17605
17606
17607
17608
17609# Check whether --with-dxsdk-lib was given.
17610if test "${with_dxsdk_lib+set}" = set; then :
17611  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17612$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17613fi
17614
17615
17616
17617
17618# Check whether --with-dxsdk-include was given.
17619if test "${with_dxsdk_include+set}" = set; then :
17620  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17621$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17622fi
17623
17624
17625  fi
17626
17627
17628
17629  # If --build AND --host is set, then the configure script will find any
17630  # cross compilation tools in the PATH. Cross compilation tools
17631  # follows the cross compilation standard where they are prefixed with ${host}.
17632  # For example the binary i686-sun-solaris2.10-gcc
17633  # will cross compile for i686-sun-solaris2.10
17634  # If neither of build and host is not set, then build=host and the
17635  # default compiler found in the path will be used.
17636  # Setting only --host, does not seem to be really supported.
17637  # Please set both --build and --host if you want to cross compile.
17638
17639  if test "x$COMPILE_TYPE" = "xcross"; then
17640    # Now we to find a C/C++ compiler that can build executables for the build
17641    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17642    # once. Also, we need to do this before adding a tools dir to the path,
17643    # otherwise we might pick up cross-compilers which don't use standard naming.
17644    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17645    # to wait until they are properly discovered.
17646    for ac_prog in cl cc gcc
17647do
17648  # Extract the first word of "$ac_prog", so it can be a program name with args.
17649set dummy $ac_prog; ac_word=$2
17650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17651$as_echo_n "checking for $ac_word... " >&6; }
17652if ${ac_cv_path_BUILD_CC+:} false; then :
17653  $as_echo_n "(cached) " >&6
17654else
17655  case $BUILD_CC in
17656  [\\/]* | ?:[\\/]*)
17657  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17658  ;;
17659  *)
17660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17661for as_dir in $PATH
17662do
17663  IFS=$as_save_IFS
17664  test -z "$as_dir" && as_dir=.
17665    for ac_exec_ext in '' $ac_executable_extensions; do
17666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17667    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17669    break 2
17670  fi
17671done
17672  done
17673IFS=$as_save_IFS
17674
17675  ;;
17676esac
17677fi
17678BUILD_CC=$ac_cv_path_BUILD_CC
17679if test -n "$BUILD_CC"; then
17680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17681$as_echo "$BUILD_CC" >&6; }
17682else
17683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17684$as_echo "no" >&6; }
17685fi
17686
17687
17688  test -n "$BUILD_CC" && break
17689done
17690
17691
17692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17693
17694  # First separate the path from the arguments. This will split at the first
17695  # space.
17696  complete="$BUILD_CC"
17697  path="${complete%% *}"
17698  tmp="$complete EOL"
17699  arguments="${tmp#* }"
17700
17701  # Input might be given as Windows format, start by converting to
17702  # unix format.
17703  new_path=`$CYGPATH -u "$path"`
17704
17705  # Now try to locate executable using which
17706  new_path=`$WHICH "$new_path" 2> /dev/null`
17707  # bat and cmd files are not always considered executable in cygwin causing which
17708  # to not find them
17709  if test "x$new_path" = x \
17710      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17711      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17712    new_path=`$CYGPATH -u "$path"`
17713  fi
17714  if test "x$new_path" = x; then
17715    # Oops. Which didn't find the executable.
17716    # The splitting of arguments from the executable at a space might have been incorrect,
17717    # since paths with space are more likely in Windows. Give it another try with the whole
17718    # argument.
17719    path="$complete"
17720    arguments="EOL"
17721    new_path=`$CYGPATH -u "$path"`
17722    new_path=`$WHICH "$new_path" 2> /dev/null`
17723    # bat and cmd files are not always considered executable in cygwin causing which
17724    # to not find them
17725    if test "x$new_path" = x \
17726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17728      new_path=`$CYGPATH -u "$path"`
17729    fi
17730    if test "x$new_path" = x; then
17731      # It's still not found. Now this is an unrecoverable error.
17732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17733$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17734      has_space=`$ECHO "$complete" | $GREP " "`
17735      if test "x$has_space" != x; then
17736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17738      fi
17739      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17740    fi
17741  fi
17742
17743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17746  # "foo.exe" is OK but "foo" is an error.
17747  #
17748  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17749  # It is also a way to make sure we got the proper file name for the real test later on.
17750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17751  if test "x$test_shortpath" = x; then
17752    # Short path failed, file does not exist as specified.
17753    # Try adding .exe or .cmd
17754    if test -f "${new_path}.exe"; then
17755      input_to_shortpath="${new_path}.exe"
17756    elif test -f "${new_path}.cmd"; then
17757      input_to_shortpath="${new_path}.cmd"
17758    else
17759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17760$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17761      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17762$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17763      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17764    fi
17765  else
17766    input_to_shortpath="$new_path"
17767  fi
17768
17769  # Call helper function which possibly converts this using DOS-style short mode.
17770  # If so, the updated path is stored in $new_path.
17771  new_path="$input_to_shortpath"
17772
17773  input_path="$input_to_shortpath"
17774  # Check if we need to convert this using DOS-style short mode. If the path
17775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17776  # take no chances and rewrite it.
17777  # Note: m4 eats our [], so we need to use [ and ] instead.
17778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17779  if test "x$has_forbidden_chars" != x; then
17780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17784      # Going to short mode and back again did indeed matter. Since short mode is
17785      # case insensitive, let's make it lowercase to improve readability.
17786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17787      # Now convert it back to Unix-stile (cygpath)
17788      input_path=`$CYGPATH -u "$shortmode_path"`
17789      new_path="$input_path"
17790    fi
17791  fi
17792
17793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17794  if test "x$test_cygdrive_prefix" = x; then
17795    # As a simple fix, exclude /usr/bin since it's not a real path.
17796    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17798      # a path prefixed by /cygdrive for fixpath to work.
17799      new_path="$CYGWIN_ROOT_PATH$input_path"
17800    fi
17801  fi
17802
17803  # remove trailing .exe if any
17804  new_path="${new_path/%.exe/}"
17805
17806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17807
17808  # First separate the path from the arguments. This will split at the first
17809  # space.
17810  complete="$BUILD_CC"
17811  path="${complete%% *}"
17812  tmp="$complete EOL"
17813  arguments="${tmp#* }"
17814
17815  # Input might be given as Windows format, start by converting to
17816  # unix format.
17817  new_path="$path"
17818
17819  windows_path="$new_path"
17820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17821    unix_path=`$CYGPATH -u "$windows_path"`
17822    new_path="$unix_path"
17823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17825    new_path="$unix_path"
17826  fi
17827
17828
17829  # Now try to locate executable using which
17830  new_path=`$WHICH "$new_path" 2> /dev/null`
17831
17832  if test "x$new_path" = x; then
17833    # Oops. Which didn't find the executable.
17834    # The splitting of arguments from the executable at a space might have been incorrect,
17835    # since paths with space are more likely in Windows. Give it another try with the whole
17836    # argument.
17837    path="$complete"
17838    arguments="EOL"
17839    new_path="$path"
17840
17841  windows_path="$new_path"
17842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17843    unix_path=`$CYGPATH -u "$windows_path"`
17844    new_path="$unix_path"
17845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17847    new_path="$unix_path"
17848  fi
17849
17850
17851    new_path=`$WHICH "$new_path" 2> /dev/null`
17852
17853    if test "x$new_path" = x; then
17854      # It's still not found. Now this is an unrecoverable error.
17855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17856$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17857      has_space=`$ECHO "$complete" | $GREP " "`
17858      if test "x$has_space" != x; then
17859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17861      fi
17862      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17863    fi
17864  fi
17865
17866  # Now new_path has a complete unix path to the binary
17867  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17868    # Keep paths in /bin as-is, but remove trailing .exe if any
17869    new_path="${new_path/%.exe/}"
17870    # Do not save /bin paths to all_fixpath_prefixes!
17871  else
17872    # Not in mixed or Windows style, start by that.
17873    new_path=`cmd //c echo $new_path`
17874
17875  input_path="$new_path"
17876  # Check if we need to convert this using DOS-style short mode. If the path
17877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17878  # take no chances and rewrite it.
17879  # Note: m4 eats our [], so we need to use [ and ] instead.
17880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17881  if test "x$has_forbidden_chars" != x; then
17882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17884  fi
17885
17886    # Output is in $new_path
17887
17888  windows_path="$new_path"
17889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17890    unix_path=`$CYGPATH -u "$windows_path"`
17891    new_path="$unix_path"
17892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17894    new_path="$unix_path"
17895  fi
17896
17897    # remove trailing .exe if any
17898    new_path="${new_path/%.exe/}"
17899
17900    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17901    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17902  fi
17903
17904  else
17905    # We're on a posix platform. Hooray! :)
17906    # First separate the path from the arguments. This will split at the first
17907    # space.
17908    complete="$BUILD_CC"
17909    path="${complete%% *}"
17910    tmp="$complete EOL"
17911    arguments="${tmp#* }"
17912
17913    # Cannot rely on the command "which" here since it doesn't always work.
17914    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17915    if test -z "$is_absolute_path"; then
17916      # Path to executable is not absolute. Find it.
17917      IFS_save="$IFS"
17918      IFS=:
17919      for p in $PATH; do
17920        if test -f "$p/$path" && test -x "$p/$path"; then
17921          new_path="$p/$path"
17922          break
17923        fi
17924      done
17925      IFS="$IFS_save"
17926    else
17927      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17928$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17929      new_path="$path"
17930    fi
17931
17932    if test "x$new_path" = x; then
17933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17934$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17935      has_space=`$ECHO "$complete" | $GREP " "`
17936      if test "x$has_space" != x; then
17937        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17938$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17939      fi
17940      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17941    fi
17942  fi
17943
17944  # Now join together the path and the arguments once again
17945  if test "x$arguments" != xEOL; then
17946    new_complete="$new_path ${arguments% *}"
17947  else
17948    new_complete="$new_path"
17949  fi
17950
17951  if test "x$complete" != "x$new_complete"; then
17952    BUILD_CC="$new_complete"
17953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17954$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17955  fi
17956
17957    for ac_prog in cl CC g++
17958do
17959  # Extract the first word of "$ac_prog", so it can be a program name with args.
17960set dummy $ac_prog; ac_word=$2
17961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17962$as_echo_n "checking for $ac_word... " >&6; }
17963if ${ac_cv_path_BUILD_CXX+:} false; then :
17964  $as_echo_n "(cached) " >&6
17965else
17966  case $BUILD_CXX in
17967  [\\/]* | ?:[\\/]*)
17968  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17969  ;;
17970  *)
17971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17972for as_dir in $PATH
17973do
17974  IFS=$as_save_IFS
17975  test -z "$as_dir" && as_dir=.
17976    for ac_exec_ext in '' $ac_executable_extensions; do
17977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17978    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17980    break 2
17981  fi
17982done
17983  done
17984IFS=$as_save_IFS
17985
17986  ;;
17987esac
17988fi
17989BUILD_CXX=$ac_cv_path_BUILD_CXX
17990if test -n "$BUILD_CXX"; then
17991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17992$as_echo "$BUILD_CXX" >&6; }
17993else
17994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17995$as_echo "no" >&6; }
17996fi
17997
17998
17999  test -n "$BUILD_CXX" && break
18000done
18001
18002
18003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18004
18005  # First separate the path from the arguments. This will split at the first
18006  # space.
18007  complete="$BUILD_CXX"
18008  path="${complete%% *}"
18009  tmp="$complete EOL"
18010  arguments="${tmp#* }"
18011
18012  # Input might be given as Windows format, start by converting to
18013  # unix format.
18014  new_path=`$CYGPATH -u "$path"`
18015
18016  # Now try to locate executable using which
18017  new_path=`$WHICH "$new_path" 2> /dev/null`
18018  # bat and cmd files are not always considered executable in cygwin causing which
18019  # to not find them
18020  if test "x$new_path" = x \
18021      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18022      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18023    new_path=`$CYGPATH -u "$path"`
18024  fi
18025  if test "x$new_path" = x; then
18026    # Oops. Which didn't find the executable.
18027    # The splitting of arguments from the executable at a space might have been incorrect,
18028    # since paths with space are more likely in Windows. Give it another try with the whole
18029    # argument.
18030    path="$complete"
18031    arguments="EOL"
18032    new_path=`$CYGPATH -u "$path"`
18033    new_path=`$WHICH "$new_path" 2> /dev/null`
18034    # bat and cmd files are not always considered executable in cygwin causing which
18035    # to not find them
18036    if test "x$new_path" = x \
18037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18039      new_path=`$CYGPATH -u "$path"`
18040    fi
18041    if test "x$new_path" = x; then
18042      # It's still not found. Now this is an unrecoverable error.
18043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18044$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18045      has_space=`$ECHO "$complete" | $GREP " "`
18046      if test "x$has_space" != x; then
18047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18049      fi
18050      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18051    fi
18052  fi
18053
18054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18057  # "foo.exe" is OK but "foo" is an error.
18058  #
18059  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18060  # It is also a way to make sure we got the proper file name for the real test later on.
18061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18062  if test "x$test_shortpath" = x; then
18063    # Short path failed, file does not exist as specified.
18064    # Try adding .exe or .cmd
18065    if test -f "${new_path}.exe"; then
18066      input_to_shortpath="${new_path}.exe"
18067    elif test -f "${new_path}.cmd"; then
18068      input_to_shortpath="${new_path}.cmd"
18069    else
18070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18071$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18074      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18075    fi
18076  else
18077    input_to_shortpath="$new_path"
18078  fi
18079
18080  # Call helper function which possibly converts this using DOS-style short mode.
18081  # If so, the updated path is stored in $new_path.
18082  new_path="$input_to_shortpath"
18083
18084  input_path="$input_to_shortpath"
18085  # Check if we need to convert this using DOS-style short mode. If the path
18086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18087  # take no chances and rewrite it.
18088  # Note: m4 eats our [], so we need to use [ and ] instead.
18089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18090  if test "x$has_forbidden_chars" != x; then
18091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18095      # Going to short mode and back again did indeed matter. Since short mode is
18096      # case insensitive, let's make it lowercase to improve readability.
18097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18098      # Now convert it back to Unix-stile (cygpath)
18099      input_path=`$CYGPATH -u "$shortmode_path"`
18100      new_path="$input_path"
18101    fi
18102  fi
18103
18104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18105  if test "x$test_cygdrive_prefix" = x; then
18106    # As a simple fix, exclude /usr/bin since it's not a real path.
18107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18109      # a path prefixed by /cygdrive for fixpath to work.
18110      new_path="$CYGWIN_ROOT_PATH$input_path"
18111    fi
18112  fi
18113
18114  # remove trailing .exe if any
18115  new_path="${new_path/%.exe/}"
18116
18117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18118
18119  # First separate the path from the arguments. This will split at the first
18120  # space.
18121  complete="$BUILD_CXX"
18122  path="${complete%% *}"
18123  tmp="$complete EOL"
18124  arguments="${tmp#* }"
18125
18126  # Input might be given as Windows format, start by converting to
18127  # unix format.
18128  new_path="$path"
18129
18130  windows_path="$new_path"
18131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18132    unix_path=`$CYGPATH -u "$windows_path"`
18133    new_path="$unix_path"
18134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18136    new_path="$unix_path"
18137  fi
18138
18139
18140  # Now try to locate executable using which
18141  new_path=`$WHICH "$new_path" 2> /dev/null`
18142
18143  if test "x$new_path" = x; then
18144    # Oops. Which didn't find the executable.
18145    # The splitting of arguments from the executable at a space might have been incorrect,
18146    # since paths with space are more likely in Windows. Give it another try with the whole
18147    # argument.
18148    path="$complete"
18149    arguments="EOL"
18150    new_path="$path"
18151
18152  windows_path="$new_path"
18153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18154    unix_path=`$CYGPATH -u "$windows_path"`
18155    new_path="$unix_path"
18156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18158    new_path="$unix_path"
18159  fi
18160
18161
18162    new_path=`$WHICH "$new_path" 2> /dev/null`
18163
18164    if test "x$new_path" = x; then
18165      # It's still not found. Now this is an unrecoverable error.
18166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18167$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18168      has_space=`$ECHO "$complete" | $GREP " "`
18169      if test "x$has_space" != x; then
18170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18172      fi
18173      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18174    fi
18175  fi
18176
18177  # Now new_path has a complete unix path to the binary
18178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18179    # Keep paths in /bin as-is, but remove trailing .exe if any
18180    new_path="${new_path/%.exe/}"
18181    # Do not save /bin paths to all_fixpath_prefixes!
18182  else
18183    # Not in mixed or Windows style, start by that.
18184    new_path=`cmd //c echo $new_path`
18185
18186  input_path="$new_path"
18187  # Check if we need to convert this using DOS-style short mode. If the path
18188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18189  # take no chances and rewrite it.
18190  # Note: m4 eats our [], so we need to use [ and ] instead.
18191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18192  if test "x$has_forbidden_chars" != x; then
18193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18195  fi
18196
18197    # Output is in $new_path
18198
18199  windows_path="$new_path"
18200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18201    unix_path=`$CYGPATH -u "$windows_path"`
18202    new_path="$unix_path"
18203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18205    new_path="$unix_path"
18206  fi
18207
18208    # remove trailing .exe if any
18209    new_path="${new_path/%.exe/}"
18210
18211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18213  fi
18214
18215  else
18216    # We're on a posix platform. Hooray! :)
18217    # First separate the path from the arguments. This will split at the first
18218    # space.
18219    complete="$BUILD_CXX"
18220    path="${complete%% *}"
18221    tmp="$complete EOL"
18222    arguments="${tmp#* }"
18223
18224    # Cannot rely on the command "which" here since it doesn't always work.
18225    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18226    if test -z "$is_absolute_path"; then
18227      # Path to executable is not absolute. Find it.
18228      IFS_save="$IFS"
18229      IFS=:
18230      for p in $PATH; do
18231        if test -f "$p/$path" && test -x "$p/$path"; then
18232          new_path="$p/$path"
18233          break
18234        fi
18235      done
18236      IFS="$IFS_save"
18237    else
18238      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18239$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18240      new_path="$path"
18241    fi
18242
18243    if test "x$new_path" = x; then
18244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18245$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18246      has_space=`$ECHO "$complete" | $GREP " "`
18247      if test "x$has_space" != x; then
18248        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18249$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18250      fi
18251      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18252    fi
18253  fi
18254
18255  # Now join together the path and the arguments once again
18256  if test "x$arguments" != xEOL; then
18257    new_complete="$new_path ${arguments% *}"
18258  else
18259    new_complete="$new_path"
18260  fi
18261
18262  if test "x$complete" != "x$new_complete"; then
18263    BUILD_CXX="$new_complete"
18264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18265$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18266  fi
18267
18268    # Extract the first word of "ld", so it can be a program name with args.
18269set dummy ld; ac_word=$2
18270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18271$as_echo_n "checking for $ac_word... " >&6; }
18272if ${ac_cv_path_BUILD_LD+:} false; then :
18273  $as_echo_n "(cached) " >&6
18274else
18275  case $BUILD_LD in
18276  [\\/]* | ?:[\\/]*)
18277  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18278  ;;
18279  *)
18280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18281for as_dir in $PATH
18282do
18283  IFS=$as_save_IFS
18284  test -z "$as_dir" && as_dir=.
18285    for ac_exec_ext in '' $ac_executable_extensions; do
18286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18287    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18289    break 2
18290  fi
18291done
18292  done
18293IFS=$as_save_IFS
18294
18295  ;;
18296esac
18297fi
18298BUILD_LD=$ac_cv_path_BUILD_LD
18299if test -n "$BUILD_LD"; then
18300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18301$as_echo "$BUILD_LD" >&6; }
18302else
18303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18304$as_echo "no" >&6; }
18305fi
18306
18307
18308
18309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18310
18311  # First separate the path from the arguments. This will split at the first
18312  # space.
18313  complete="$BUILD_LD"
18314  path="${complete%% *}"
18315  tmp="$complete EOL"
18316  arguments="${tmp#* }"
18317
18318  # Input might be given as Windows format, start by converting to
18319  # unix format.
18320  new_path=`$CYGPATH -u "$path"`
18321
18322  # Now try to locate executable using which
18323  new_path=`$WHICH "$new_path" 2> /dev/null`
18324  # bat and cmd files are not always considered executable in cygwin causing which
18325  # to not find them
18326  if test "x$new_path" = x \
18327      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18328      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18329    new_path=`$CYGPATH -u "$path"`
18330  fi
18331  if test "x$new_path" = x; then
18332    # Oops. Which didn't find the executable.
18333    # The splitting of arguments from the executable at a space might have been incorrect,
18334    # since paths with space are more likely in Windows. Give it another try with the whole
18335    # argument.
18336    path="$complete"
18337    arguments="EOL"
18338    new_path=`$CYGPATH -u "$path"`
18339    new_path=`$WHICH "$new_path" 2> /dev/null`
18340    # bat and cmd files are not always considered executable in cygwin causing which
18341    # to not find them
18342    if test "x$new_path" = x \
18343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18345      new_path=`$CYGPATH -u "$path"`
18346    fi
18347    if test "x$new_path" = x; then
18348      # It's still not found. Now this is an unrecoverable error.
18349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18350$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18351      has_space=`$ECHO "$complete" | $GREP " "`
18352      if test "x$has_space" != x; then
18353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18355      fi
18356      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18357    fi
18358  fi
18359
18360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18363  # "foo.exe" is OK but "foo" is an error.
18364  #
18365  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18366  # It is also a way to make sure we got the proper file name for the real test later on.
18367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18368  if test "x$test_shortpath" = x; then
18369    # Short path failed, file does not exist as specified.
18370    # Try adding .exe or .cmd
18371    if test -f "${new_path}.exe"; then
18372      input_to_shortpath="${new_path}.exe"
18373    elif test -f "${new_path}.cmd"; then
18374      input_to_shortpath="${new_path}.cmd"
18375    else
18376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18377$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18380      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18381    fi
18382  else
18383    input_to_shortpath="$new_path"
18384  fi
18385
18386  # Call helper function which possibly converts this using DOS-style short mode.
18387  # If so, the updated path is stored in $new_path.
18388  new_path="$input_to_shortpath"
18389
18390  input_path="$input_to_shortpath"
18391  # Check if we need to convert this using DOS-style short mode. If the path
18392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18393  # take no chances and rewrite it.
18394  # Note: m4 eats our [], so we need to use [ and ] instead.
18395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18396  if test "x$has_forbidden_chars" != x; then
18397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18401      # Going to short mode and back again did indeed matter. Since short mode is
18402      # case insensitive, let's make it lowercase to improve readability.
18403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18404      # Now convert it back to Unix-stile (cygpath)
18405      input_path=`$CYGPATH -u "$shortmode_path"`
18406      new_path="$input_path"
18407    fi
18408  fi
18409
18410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18411  if test "x$test_cygdrive_prefix" = x; then
18412    # As a simple fix, exclude /usr/bin since it's not a real path.
18413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18415      # a path prefixed by /cygdrive for fixpath to work.
18416      new_path="$CYGWIN_ROOT_PATH$input_path"
18417    fi
18418  fi
18419
18420  # remove trailing .exe if any
18421  new_path="${new_path/%.exe/}"
18422
18423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18424
18425  # First separate the path from the arguments. This will split at the first
18426  # space.
18427  complete="$BUILD_LD"
18428  path="${complete%% *}"
18429  tmp="$complete EOL"
18430  arguments="${tmp#* }"
18431
18432  # Input might be given as Windows format, start by converting to
18433  # unix format.
18434  new_path="$path"
18435
18436  windows_path="$new_path"
18437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18438    unix_path=`$CYGPATH -u "$windows_path"`
18439    new_path="$unix_path"
18440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18442    new_path="$unix_path"
18443  fi
18444
18445
18446  # Now try to locate executable using which
18447  new_path=`$WHICH "$new_path" 2> /dev/null`
18448
18449  if test "x$new_path" = x; then
18450    # Oops. Which didn't find the executable.
18451    # The splitting of arguments from the executable at a space might have been incorrect,
18452    # since paths with space are more likely in Windows. Give it another try with the whole
18453    # argument.
18454    path="$complete"
18455    arguments="EOL"
18456    new_path="$path"
18457
18458  windows_path="$new_path"
18459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18460    unix_path=`$CYGPATH -u "$windows_path"`
18461    new_path="$unix_path"
18462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18464    new_path="$unix_path"
18465  fi
18466
18467
18468    new_path=`$WHICH "$new_path" 2> /dev/null`
18469
18470    if test "x$new_path" = x; then
18471      # It's still not found. Now this is an unrecoverable error.
18472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18473$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18474      has_space=`$ECHO "$complete" | $GREP " "`
18475      if test "x$has_space" != x; then
18476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18478      fi
18479      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18480    fi
18481  fi
18482
18483  # Now new_path has a complete unix path to the binary
18484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18485    # Keep paths in /bin as-is, but remove trailing .exe if any
18486    new_path="${new_path/%.exe/}"
18487    # Do not save /bin paths to all_fixpath_prefixes!
18488  else
18489    # Not in mixed or Windows style, start by that.
18490    new_path=`cmd //c echo $new_path`
18491
18492  input_path="$new_path"
18493  # Check if we need to convert this using DOS-style short mode. If the path
18494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18495  # take no chances and rewrite it.
18496  # Note: m4 eats our [], so we need to use [ and ] instead.
18497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18498  if test "x$has_forbidden_chars" != x; then
18499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18501  fi
18502
18503    # Output is in $new_path
18504
18505  windows_path="$new_path"
18506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18507    unix_path=`$CYGPATH -u "$windows_path"`
18508    new_path="$unix_path"
18509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18511    new_path="$unix_path"
18512  fi
18513
18514    # remove trailing .exe if any
18515    new_path="${new_path/%.exe/}"
18516
18517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18519  fi
18520
18521  else
18522    # We're on a posix platform. Hooray! :)
18523    # First separate the path from the arguments. This will split at the first
18524    # space.
18525    complete="$BUILD_LD"
18526    path="${complete%% *}"
18527    tmp="$complete EOL"
18528    arguments="${tmp#* }"
18529
18530    # Cannot rely on the command "which" here since it doesn't always work.
18531    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18532    if test -z "$is_absolute_path"; then
18533      # Path to executable is not absolute. Find it.
18534      IFS_save="$IFS"
18535      IFS=:
18536      for p in $PATH; do
18537        if test -f "$p/$path" && test -x "$p/$path"; then
18538          new_path="$p/$path"
18539          break
18540        fi
18541      done
18542      IFS="$IFS_save"
18543    else
18544      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18545$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18546      new_path="$path"
18547    fi
18548
18549    if test "x$new_path" = x; then
18550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18551$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18552      has_space=`$ECHO "$complete" | $GREP " "`
18553      if test "x$has_space" != x; then
18554        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18556      fi
18557      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18558    fi
18559  fi
18560
18561  # Now join together the path and the arguments once again
18562  if test "x$arguments" != xEOL; then
18563    new_complete="$new_path ${arguments% *}"
18564  else
18565    new_complete="$new_path"
18566  fi
18567
18568  if test "x$complete" != "x$new_complete"; then
18569    BUILD_LD="$new_complete"
18570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18571$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18572  fi
18573
18574  fi
18575
18576
18577
18578
18579  # If a devkit is found on the builddeps server, then prepend its path to the
18580  # PATH variable. If there are cross compilers available in the devkit, these
18581  # will be found by AC_PROG_CC et al.
18582  DEVKIT=
18583
18584
18585  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18586    # Source the builddeps file again, to make sure it uses the latest variables!
18587    . $builddepsfile
18588    # Look for a target and build machine specific resource!
18589    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18590    if test "x$resource" = x; then
18591      # Ok, lets instead look for a target specific resource
18592      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18593    fi
18594    if test "x$resource" = x; then
18595      # Ok, lets instead look for a build specific resource
18596      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18597    fi
18598    if test "x$resource" = x; then
18599      # Ok, lets instead look for a generic resource
18600      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18601      resource=${builddep_devkit}
18602    fi
18603    if test "x$resource" != x; then
18604      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18605$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18606      # If the resource in the builddeps.conf file is an existing directory,
18607      # for example /java/linux/cups
18608      if test -d ${resource}; then
18609        depdir=${resource}
18610      else
18611
18612  # devkit is for example mymodule
18613  # $resource is for example libs/general/libmymod_1_2_3.zip
18614  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18615  # $with_builddeps_dir is for example /localhome/builddeps
18616  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18617  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18618  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18619  filename=`basename $resource`
18620  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18621  filebase=${filename%%.*}
18622  extension=${filename#*.}
18623  installdir=$with_builddeps_dir/$filebase
18624  if test ! -f $installdir/$filename.unpacked; then
18625    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18626$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18627    if test ! -d $installdir; then
18628      mkdir -p $installdir
18629    fi
18630    if test ! -d $installdir; then
18631      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18632    fi
18633    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18634    touch $tmpfile
18635    if test ! -f $tmpfile; then
18636      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18637    fi
18638
18639  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18640  # $tmpfile is the local file name for the downloaded file.
18641  VALID_TOOL=no
18642  if test "x$BDEPS_FTP" = xwget; then
18643    VALID_TOOL=yes
18644    wget -O $tmpfile $with_builddeps_server/$resource
18645  fi
18646  if test "x$BDEPS_FTP" = xlftp; then
18647    VALID_TOOL=yes
18648    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18649  fi
18650  if test "x$BDEPS_FTP" = xftp; then
18651    VALID_TOOL=yes
18652    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18653    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18654    FTPUSERPWD=${FTPSERVER%%@*}
18655    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18656      FTPUSER=${userpwd%%:*}
18657      FTPPWD=${userpwd#*@}
18658      FTPSERVER=${FTPSERVER#*@}
18659    else
18660      FTPUSER=ftp
18661      FTPPWD=ftp
18662    fi
18663    # the "pass" command does not work on some
18664    # ftp clients (read ftp.exe) but if it works,
18665    # passive mode is better!
18666    ( \
18667        echo "user $FTPUSER $FTPPWD"        ; \
18668        echo "pass"                         ; \
18669        echo "bin"                          ; \
18670        echo "get $FTPPATH $tmpfile"              ; \
18671    ) | ftp -in $FTPSERVER
18672  fi
18673  if test "x$VALID_TOOL" != xyes; then
18674    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18675  fi
18676
18677    mv $tmpfile $installdir/$filename
18678    if test ! -s $installdir/$filename; then
18679      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18680    fi
18681    case "$extension" in
18682      zip)  echo "Unzipping $installdir/$filename..."
18683        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18684        ;;
18685      tar.gz) echo "Untaring $installdir/$filename..."
18686        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18687        ;;
18688      tgz) echo "Untaring $installdir/$filename..."
18689        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18690        ;;
18691      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18692        ;;
18693    esac
18694  fi
18695  if test -f $installdir/$filename.unpacked; then
18696    depdir=$installdir
18697  fi
18698
18699      fi
18700      # Source the builddeps file again, because in the previous command, the depdir
18701      # was updated to point at the current build dependency install directory.
18702      . $builddepsfile
18703      # Now extract variables from the builddeps.conf files.
18704      theroot=${builddep_devkit_ROOT}
18705      thecflags=${builddep_devkit_CFLAGS}
18706      thelibs=${builddep_devkit_LIBS}
18707      if test "x$depdir" = x; then
18708        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18709      fi
18710      DEVKIT=$depdir
18711      if test "x$theroot" != x; then
18712        DEVKIT="$theroot"
18713      fi
18714      if test "x$thecflags" != x; then
18715        DEVKIT_CFLAGS="$thecflags"
18716      fi
18717      if test "x$thelibs" != x; then
18718        DEVKIT_LIBS="$thelibs"
18719      fi
18720
18721        # Found devkit
18722        PATH="$DEVKIT/bin:$PATH"
18723        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18724        if test "x$x_includes" = "xNONE"; then
18725          x_includes="$SYS_ROOT/usr/include/X11"
18726        fi
18727        if test "x$x_libraries" = "xNONE"; then
18728          x_libraries="$SYS_ROOT/usr/lib"
18729        fi
18730
18731
18732    fi
18733
18734  fi
18735
18736
18737  # Store the CFLAGS etal passed to the configure script.
18738  ORG_CFLAGS="$CFLAGS"
18739  ORG_CXXFLAGS="$CXXFLAGS"
18740  ORG_OBJCFLAGS="$OBJCFLAGS"
18741
18742  # autoconf magic only relies on PATH, so update it if tools dir is specified
18743  OLD_PATH="$PATH"
18744  if test "x$TOOLS_DIR" != x; then
18745    PATH=$TOOLS_DIR:$PATH
18746  fi
18747
18748
18749  ### Locate C compiler (CC)
18750
18751  # On windows, only cl.exe is supported.
18752  # On Solaris, cc is preferred to gcc.
18753  # Elsewhere, gcc is preferred to cc.
18754
18755  if test "x$CC" != x; then
18756    COMPILER_CHECK_LIST="$CC"
18757  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18758    COMPILER_CHECK_LIST="cl"
18759  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18760    COMPILER_CHECK_LIST="cc gcc"
18761  else
18762    COMPILER_CHECK_LIST="gcc cc"
18763  fi
18764
18765
18766  COMPILER_NAME=C
18767
18768  CC=
18769  # If TOOLS_DIR is set, check for all compiler names in there first
18770  # before checking the rest of the PATH.
18771  if test -n "$TOOLS_DIR"; then
18772    PATH_save="$PATH"
18773    PATH="$TOOLS_DIR"
18774    for ac_prog in $COMPILER_CHECK_LIST
18775do
18776  # Extract the first word of "$ac_prog", so it can be a program name with args.
18777set dummy $ac_prog; ac_word=$2
18778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18779$as_echo_n "checking for $ac_word... " >&6; }
18780if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18781  $as_echo_n "(cached) " >&6
18782else
18783  case $TOOLS_DIR_CC in
18784  [\\/]* | ?:[\\/]*)
18785  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18786  ;;
18787  *)
18788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18789for as_dir in $PATH
18790do
18791  IFS=$as_save_IFS
18792  test -z "$as_dir" && as_dir=.
18793    for ac_exec_ext in '' $ac_executable_extensions; do
18794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18795    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18797    break 2
18798  fi
18799done
18800  done
18801IFS=$as_save_IFS
18802
18803  ;;
18804esac
18805fi
18806TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18807if test -n "$TOOLS_DIR_CC"; then
18808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18809$as_echo "$TOOLS_DIR_CC" >&6; }
18810else
18811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18812$as_echo "no" >&6; }
18813fi
18814
18815
18816  test -n "$TOOLS_DIR_CC" && break
18817done
18818
18819    CC=$TOOLS_DIR_CC
18820    PATH="$PATH_save"
18821  fi
18822
18823  # AC_PATH_PROGS can't be run multiple times with the same variable,
18824  # so create a new name for this run.
18825  if test "x$CC" = x; then
18826    for ac_prog in $COMPILER_CHECK_LIST
18827do
18828  # Extract the first word of "$ac_prog", so it can be a program name with args.
18829set dummy $ac_prog; ac_word=$2
18830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18831$as_echo_n "checking for $ac_word... " >&6; }
18832if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18833  $as_echo_n "(cached) " >&6
18834else
18835  case $POTENTIAL_CC in
18836  [\\/]* | ?:[\\/]*)
18837  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18838  ;;
18839  *)
18840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18841for as_dir in $PATH
18842do
18843  IFS=$as_save_IFS
18844  test -z "$as_dir" && as_dir=.
18845    for ac_exec_ext in '' $ac_executable_extensions; do
18846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18847    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18849    break 2
18850  fi
18851done
18852  done
18853IFS=$as_save_IFS
18854
18855  ;;
18856esac
18857fi
18858POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18859if test -n "$POTENTIAL_CC"; then
18860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18861$as_echo "$POTENTIAL_CC" >&6; }
18862else
18863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18864$as_echo "no" >&6; }
18865fi
18866
18867
18868  test -n "$POTENTIAL_CC" && break
18869done
18870
18871    CC=$POTENTIAL_CC
18872  fi
18873
18874  if test "x$CC" = x; then
18875
18876  # Print a helpful message on how to acquire the necessary build dependency.
18877  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18878  MISSING_DEPENDENCY=devkit
18879  PKGHANDLER_COMMAND=
18880
18881  case $PKGHANDLER in
18882    apt-get)
18883      apt_help     $MISSING_DEPENDENCY ;;
18884    yum)
18885      yum_help     $MISSING_DEPENDENCY ;;
18886    port)
18887      port_help    $MISSING_DEPENDENCY ;;
18888    pkgutil)
18889      pkgutil_help $MISSING_DEPENDENCY ;;
18890    pkgadd)
18891      pkgadd_help  $MISSING_DEPENDENCY ;;
18892    * )
18893      break ;;
18894  esac
18895
18896  if test "x$PKGHANDLER_COMMAND" != x; then
18897    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18898  fi
18899
18900    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18901  fi
18902
18903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18904
18905  # First separate the path from the arguments. This will split at the first
18906  # space.
18907  complete="$CC"
18908  path="${complete%% *}"
18909  tmp="$complete EOL"
18910  arguments="${tmp#* }"
18911
18912  # Input might be given as Windows format, start by converting to
18913  # unix format.
18914  new_path=`$CYGPATH -u "$path"`
18915
18916  # Now try to locate executable using which
18917  new_path=`$WHICH "$new_path" 2> /dev/null`
18918  # bat and cmd files are not always considered executable in cygwin causing which
18919  # to not find them
18920  if test "x$new_path" = x \
18921      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18922      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18923    new_path=`$CYGPATH -u "$path"`
18924  fi
18925  if test "x$new_path" = x; then
18926    # Oops. Which didn't find the executable.
18927    # The splitting of arguments from the executable at a space might have been incorrect,
18928    # since paths with space are more likely in Windows. Give it another try with the whole
18929    # argument.
18930    path="$complete"
18931    arguments="EOL"
18932    new_path=`$CYGPATH -u "$path"`
18933    new_path=`$WHICH "$new_path" 2> /dev/null`
18934    # bat and cmd files are not always considered executable in cygwin causing which
18935    # to not find them
18936    if test "x$new_path" = x \
18937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18939      new_path=`$CYGPATH -u "$path"`
18940    fi
18941    if test "x$new_path" = x; then
18942      # It's still not found. Now this is an unrecoverable error.
18943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18944$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18945      has_space=`$ECHO "$complete" | $GREP " "`
18946      if test "x$has_space" != x; then
18947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18949      fi
18950      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18951    fi
18952  fi
18953
18954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18957  # "foo.exe" is OK but "foo" is an error.
18958  #
18959  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18960  # It is also a way to make sure we got the proper file name for the real test later on.
18961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18962  if test "x$test_shortpath" = x; then
18963    # Short path failed, file does not exist as specified.
18964    # Try adding .exe or .cmd
18965    if test -f "${new_path}.exe"; then
18966      input_to_shortpath="${new_path}.exe"
18967    elif test -f "${new_path}.cmd"; then
18968      input_to_shortpath="${new_path}.cmd"
18969    else
18970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18971$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18972      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18973$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18974      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18975    fi
18976  else
18977    input_to_shortpath="$new_path"
18978  fi
18979
18980  # Call helper function which possibly converts this using DOS-style short mode.
18981  # If so, the updated path is stored in $new_path.
18982  new_path="$input_to_shortpath"
18983
18984  input_path="$input_to_shortpath"
18985  # Check if we need to convert this using DOS-style short mode. If the path
18986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18987  # take no chances and rewrite it.
18988  # Note: m4 eats our [], so we need to use [ and ] instead.
18989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18990  if test "x$has_forbidden_chars" != x; then
18991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18995      # Going to short mode and back again did indeed matter. Since short mode is
18996      # case insensitive, let's make it lowercase to improve readability.
18997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18998      # Now convert it back to Unix-stile (cygpath)
18999      input_path=`$CYGPATH -u "$shortmode_path"`
19000      new_path="$input_path"
19001    fi
19002  fi
19003
19004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19005  if test "x$test_cygdrive_prefix" = x; then
19006    # As a simple fix, exclude /usr/bin since it's not a real path.
19007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19009      # a path prefixed by /cygdrive for fixpath to work.
19010      new_path="$CYGWIN_ROOT_PATH$input_path"
19011    fi
19012  fi
19013
19014  # remove trailing .exe if any
19015  new_path="${new_path/%.exe/}"
19016
19017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19018
19019  # First separate the path from the arguments. This will split at the first
19020  # space.
19021  complete="$CC"
19022  path="${complete%% *}"
19023  tmp="$complete EOL"
19024  arguments="${tmp#* }"
19025
19026  # Input might be given as Windows format, start by converting to
19027  # unix format.
19028  new_path="$path"
19029
19030  windows_path="$new_path"
19031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19032    unix_path=`$CYGPATH -u "$windows_path"`
19033    new_path="$unix_path"
19034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19036    new_path="$unix_path"
19037  fi
19038
19039
19040  # Now try to locate executable using which
19041  new_path=`$WHICH "$new_path" 2> /dev/null`
19042
19043  if test "x$new_path" = x; then
19044    # Oops. Which didn't find the executable.
19045    # The splitting of arguments from the executable at a space might have been incorrect,
19046    # since paths with space are more likely in Windows. Give it another try with the whole
19047    # argument.
19048    path="$complete"
19049    arguments="EOL"
19050    new_path="$path"
19051
19052  windows_path="$new_path"
19053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19054    unix_path=`$CYGPATH -u "$windows_path"`
19055    new_path="$unix_path"
19056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19058    new_path="$unix_path"
19059  fi
19060
19061
19062    new_path=`$WHICH "$new_path" 2> /dev/null`
19063
19064    if test "x$new_path" = x; then
19065      # It's still not found. Now this is an unrecoverable error.
19066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19067$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19068      has_space=`$ECHO "$complete" | $GREP " "`
19069      if test "x$has_space" != x; then
19070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19072      fi
19073      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19074    fi
19075  fi
19076
19077  # Now new_path has a complete unix path to the binary
19078  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19079    # Keep paths in /bin as-is, but remove trailing .exe if any
19080    new_path="${new_path/%.exe/}"
19081    # Do not save /bin paths to all_fixpath_prefixes!
19082  else
19083    # Not in mixed or Windows style, start by that.
19084    new_path=`cmd //c echo $new_path`
19085
19086  input_path="$new_path"
19087  # Check if we need to convert this using DOS-style short mode. If the path
19088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19089  # take no chances and rewrite it.
19090  # Note: m4 eats our [], so we need to use [ and ] instead.
19091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19092  if test "x$has_forbidden_chars" != x; then
19093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19095  fi
19096
19097    # Output is in $new_path
19098
19099  windows_path="$new_path"
19100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19101    unix_path=`$CYGPATH -u "$windows_path"`
19102    new_path="$unix_path"
19103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19105    new_path="$unix_path"
19106  fi
19107
19108    # remove trailing .exe if any
19109    new_path="${new_path/%.exe/}"
19110
19111    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19112    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19113  fi
19114
19115  else
19116    # We're on a posix platform. Hooray! :)
19117    # First separate the path from the arguments. This will split at the first
19118    # space.
19119    complete="$CC"
19120    path="${complete%% *}"
19121    tmp="$complete EOL"
19122    arguments="${tmp#* }"
19123
19124    # Cannot rely on the command "which" here since it doesn't always work.
19125    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19126    if test -z "$is_absolute_path"; then
19127      # Path to executable is not absolute. Find it.
19128      IFS_save="$IFS"
19129      IFS=:
19130      for p in $PATH; do
19131        if test -f "$p/$path" && test -x "$p/$path"; then
19132          new_path="$p/$path"
19133          break
19134        fi
19135      done
19136      IFS="$IFS_save"
19137    else
19138      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19139$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19140      new_path="$path"
19141    fi
19142
19143    if test "x$new_path" = x; then
19144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19145$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19146      has_space=`$ECHO "$complete" | $GREP " "`
19147      if test "x$has_space" != x; then
19148        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19149$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19150      fi
19151      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19152    fi
19153  fi
19154
19155  # Now join together the path and the arguments once again
19156  if test "x$arguments" != xEOL; then
19157    new_complete="$new_path ${arguments% *}"
19158  else
19159    new_complete="$new_path"
19160  fi
19161
19162  if test "x$complete" != "x$new_complete"; then
19163    CC="$new_complete"
19164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19165$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19166  fi
19167
19168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19169$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19170  TEST_COMPILER="$CC"
19171
19172  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19173    # Follow a chain of symbolic links. Use readlink
19174    # where it exists, else fall back to horribly
19175    # complicated shell code.
19176    if test "x$READLINK_TESTED" != yes; then
19177      # On MacOSX there is a readlink tool with a different
19178      # purpose than the GNU readlink tool. Check the found readlink.
19179      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19180      if test "x$ISGNU" = x; then
19181        # A readlink that we do not know how to use.
19182        # Are there other non-GNU readlinks out there?
19183        READLINK_TESTED=yes
19184        READLINK=
19185      fi
19186    fi
19187
19188    if test "x$READLINK" != x; then
19189      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19190    else
19191      # Save the current directory for restoring afterwards
19192      STARTDIR=$PWD
19193      COUNTER=0
19194      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19195      sym_link_file=`$BASENAME $TEST_COMPILER`
19196      cd $sym_link_dir
19197      # Use -P flag to resolve symlinks in directories.
19198      cd `$THEPWDCMD -P`
19199      sym_link_dir=`$THEPWDCMD -P`
19200      # Resolve file symlinks
19201      while test $COUNTER -lt 20; do
19202        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19203        if test "x$ISLINK" == x; then
19204          # This is not a symbolic link! We are done!
19205          break
19206        fi
19207        # Again resolve directory symlinks since the target of the just found
19208        # link could be in a different directory
19209        cd `$DIRNAME $ISLINK`
19210        sym_link_dir=`$THEPWDCMD -P`
19211        sym_link_file=`$BASENAME $ISLINK`
19212        let COUNTER=COUNTER+1
19213      done
19214      cd $STARTDIR
19215      TEST_COMPILER=$sym_link_dir/$sym_link_file
19216    fi
19217  fi
19218
19219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19220$as_echo "$TEST_COMPILER" >&6; }
19221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19222$as_echo_n "checking if CC is disguised ccache... " >&6; }
19223
19224  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19225  if test "x$COMPILER_BASENAME" = "xccache"; then
19226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19227$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19228    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19229    # We want to control ccache invocation ourselves, so ignore this cc and try
19230    # searching again.
19231
19232    # Remove the path to the fake ccache cc from the PATH
19233    RETRY_COMPILER_SAVED_PATH="$PATH"
19234    COMPILER_DIRNAME=`$DIRNAME $CC`
19235    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19236
19237    # Try again looking for our compiler
19238    if test -n "$ac_tool_prefix"; then
19239  for ac_prog in $COMPILER_CHECK_LIST
19240  do
19241    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19242set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19244$as_echo_n "checking for $ac_word... " >&6; }
19245if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19246  $as_echo_n "(cached) " >&6
19247else
19248  if test -n "$PROPER_COMPILER_CC"; then
19249  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19250else
19251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19252for as_dir in $PATH
19253do
19254  IFS=$as_save_IFS
19255  test -z "$as_dir" && as_dir=.
19256    for ac_exec_ext in '' $ac_executable_extensions; do
19257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19258    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19260    break 2
19261  fi
19262done
19263  done
19264IFS=$as_save_IFS
19265
19266fi
19267fi
19268PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19269if test -n "$PROPER_COMPILER_CC"; then
19270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19271$as_echo "$PROPER_COMPILER_CC" >&6; }
19272else
19273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19274$as_echo "no" >&6; }
19275fi
19276
19277
19278    test -n "$PROPER_COMPILER_CC" && break
19279  done
19280fi
19281if test -z "$PROPER_COMPILER_CC"; then
19282  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19283  for ac_prog in $COMPILER_CHECK_LIST
19284do
19285  # Extract the first word of "$ac_prog", so it can be a program name with args.
19286set dummy $ac_prog; ac_word=$2
19287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19288$as_echo_n "checking for $ac_word... " >&6; }
19289if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19290  $as_echo_n "(cached) " >&6
19291else
19292  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19293  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19294else
19295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19296for as_dir in $PATH
19297do
19298  IFS=$as_save_IFS
19299  test -z "$as_dir" && as_dir=.
19300    for ac_exec_ext in '' $ac_executable_extensions; do
19301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19302    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19304    break 2
19305  fi
19306done
19307  done
19308IFS=$as_save_IFS
19309
19310fi
19311fi
19312ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19313if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19315$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19316else
19317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19318$as_echo "no" >&6; }
19319fi
19320
19321
19322  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19323done
19324
19325  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19326    PROPER_COMPILER_CC=""
19327  else
19328    case $cross_compiling:$ac_tool_warned in
19329yes:)
19330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19332ac_tool_warned=yes ;;
19333esac
19334    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19335  fi
19336fi
19337
19338
19339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19340
19341  # First separate the path from the arguments. This will split at the first
19342  # space.
19343  complete="$PROPER_COMPILER_CC"
19344  path="${complete%% *}"
19345  tmp="$complete EOL"
19346  arguments="${tmp#* }"
19347
19348  # Input might be given as Windows format, start by converting to
19349  # unix format.
19350  new_path=`$CYGPATH -u "$path"`
19351
19352  # Now try to locate executable using which
19353  new_path=`$WHICH "$new_path" 2> /dev/null`
19354  # bat and cmd files are not always considered executable in cygwin causing which
19355  # to not find them
19356  if test "x$new_path" = x \
19357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19359    new_path=`$CYGPATH -u "$path"`
19360  fi
19361  if test "x$new_path" = x; then
19362    # Oops. Which didn't find the executable.
19363    # The splitting of arguments from the executable at a space might have been incorrect,
19364    # since paths with space are more likely in Windows. Give it another try with the whole
19365    # argument.
19366    path="$complete"
19367    arguments="EOL"
19368    new_path=`$CYGPATH -u "$path"`
19369    new_path=`$WHICH "$new_path" 2> /dev/null`
19370    # bat and cmd files are not always considered executable in cygwin causing which
19371    # to not find them
19372    if test "x$new_path" = x \
19373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19375      new_path=`$CYGPATH -u "$path"`
19376    fi
19377    if test "x$new_path" = x; then
19378      # It's still not found. Now this is an unrecoverable error.
19379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19380$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19381      has_space=`$ECHO "$complete" | $GREP " "`
19382      if test "x$has_space" != x; then
19383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19385      fi
19386      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19387    fi
19388  fi
19389
19390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19393  # "foo.exe" is OK but "foo" is an error.
19394  #
19395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19396  # It is also a way to make sure we got the proper file name for the real test later on.
19397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19398  if test "x$test_shortpath" = x; then
19399    # Short path failed, file does not exist as specified.
19400    # Try adding .exe or .cmd
19401    if test -f "${new_path}.exe"; then
19402      input_to_shortpath="${new_path}.exe"
19403    elif test -f "${new_path}.cmd"; then
19404      input_to_shortpath="${new_path}.cmd"
19405    else
19406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19407$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19410      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19411    fi
19412  else
19413    input_to_shortpath="$new_path"
19414  fi
19415
19416  # Call helper function which possibly converts this using DOS-style short mode.
19417  # If so, the updated path is stored in $new_path.
19418  new_path="$input_to_shortpath"
19419
19420  input_path="$input_to_shortpath"
19421  # Check if we need to convert this using DOS-style short mode. If the path
19422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19423  # take no chances and rewrite it.
19424  # Note: m4 eats our [], so we need to use [ and ] instead.
19425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19426  if test "x$has_forbidden_chars" != x; then
19427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19431      # Going to short mode and back again did indeed matter. Since short mode is
19432      # case insensitive, let's make it lowercase to improve readability.
19433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19434      # Now convert it back to Unix-stile (cygpath)
19435      input_path=`$CYGPATH -u "$shortmode_path"`
19436      new_path="$input_path"
19437    fi
19438  fi
19439
19440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19441  if test "x$test_cygdrive_prefix" = x; then
19442    # As a simple fix, exclude /usr/bin since it's not a real path.
19443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19445      # a path prefixed by /cygdrive for fixpath to work.
19446      new_path="$CYGWIN_ROOT_PATH$input_path"
19447    fi
19448  fi
19449
19450  # remove trailing .exe if any
19451  new_path="${new_path/%.exe/}"
19452
19453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19454
19455  # First separate the path from the arguments. This will split at the first
19456  # space.
19457  complete="$PROPER_COMPILER_CC"
19458  path="${complete%% *}"
19459  tmp="$complete EOL"
19460  arguments="${tmp#* }"
19461
19462  # Input might be given as Windows format, start by converting to
19463  # unix format.
19464  new_path="$path"
19465
19466  windows_path="$new_path"
19467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19468    unix_path=`$CYGPATH -u "$windows_path"`
19469    new_path="$unix_path"
19470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19472    new_path="$unix_path"
19473  fi
19474
19475
19476  # Now try to locate executable using which
19477  new_path=`$WHICH "$new_path" 2> /dev/null`
19478
19479  if test "x$new_path" = x; then
19480    # Oops. Which didn't find the executable.
19481    # The splitting of arguments from the executable at a space might have been incorrect,
19482    # since paths with space are more likely in Windows. Give it another try with the whole
19483    # argument.
19484    path="$complete"
19485    arguments="EOL"
19486    new_path="$path"
19487
19488  windows_path="$new_path"
19489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19490    unix_path=`$CYGPATH -u "$windows_path"`
19491    new_path="$unix_path"
19492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19494    new_path="$unix_path"
19495  fi
19496
19497
19498    new_path=`$WHICH "$new_path" 2> /dev/null`
19499
19500    if test "x$new_path" = x; then
19501      # It's still not found. Now this is an unrecoverable error.
19502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19503$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19504      has_space=`$ECHO "$complete" | $GREP " "`
19505      if test "x$has_space" != x; then
19506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19508      fi
19509      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19510    fi
19511  fi
19512
19513  # Now new_path has a complete unix path to the binary
19514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19515    # Keep paths in /bin as-is, but remove trailing .exe if any
19516    new_path="${new_path/%.exe/}"
19517    # Do not save /bin paths to all_fixpath_prefixes!
19518  else
19519    # Not in mixed or Windows style, start by that.
19520    new_path=`cmd //c echo $new_path`
19521
19522  input_path="$new_path"
19523  # Check if we need to convert this using DOS-style short mode. If the path
19524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19525  # take no chances and rewrite it.
19526  # Note: m4 eats our [], so we need to use [ and ] instead.
19527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19528  if test "x$has_forbidden_chars" != x; then
19529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19531  fi
19532
19533    # Output is in $new_path
19534
19535  windows_path="$new_path"
19536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19537    unix_path=`$CYGPATH -u "$windows_path"`
19538    new_path="$unix_path"
19539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19541    new_path="$unix_path"
19542  fi
19543
19544    # remove trailing .exe if any
19545    new_path="${new_path/%.exe/}"
19546
19547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19549  fi
19550
19551  else
19552    # We're on a posix platform. Hooray! :)
19553    # First separate the path from the arguments. This will split at the first
19554    # space.
19555    complete="$PROPER_COMPILER_CC"
19556    path="${complete%% *}"
19557    tmp="$complete EOL"
19558    arguments="${tmp#* }"
19559
19560    # Cannot rely on the command "which" here since it doesn't always work.
19561    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19562    if test -z "$is_absolute_path"; then
19563      # Path to executable is not absolute. Find it.
19564      IFS_save="$IFS"
19565      IFS=:
19566      for p in $PATH; do
19567        if test -f "$p/$path" && test -x "$p/$path"; then
19568          new_path="$p/$path"
19569          break
19570        fi
19571      done
19572      IFS="$IFS_save"
19573    else
19574      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19575$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19576      new_path="$path"
19577    fi
19578
19579    if test "x$new_path" = x; then
19580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19581$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19582      has_space=`$ECHO "$complete" | $GREP " "`
19583      if test "x$has_space" != x; then
19584        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19585$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19586      fi
19587      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19588    fi
19589  fi
19590
19591  # Now join together the path and the arguments once again
19592  if test "x$arguments" != xEOL; then
19593    new_complete="$new_path ${arguments% *}"
19594  else
19595    new_complete="$new_path"
19596  fi
19597
19598  if test "x$complete" != "x$new_complete"; then
19599    PROPER_COMPILER_CC="$new_complete"
19600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19601$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19602  fi
19603
19604    PATH="$RETRY_COMPILER_SAVED_PATH"
19605
19606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19607$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19608
19609  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19610    # Follow a chain of symbolic links. Use readlink
19611    # where it exists, else fall back to horribly
19612    # complicated shell code.
19613    if test "x$READLINK_TESTED" != yes; then
19614      # On MacOSX there is a readlink tool with a different
19615      # purpose than the GNU readlink tool. Check the found readlink.
19616      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19617      if test "x$ISGNU" = x; then
19618        # A readlink that we do not know how to use.
19619        # Are there other non-GNU readlinks out there?
19620        READLINK_TESTED=yes
19621        READLINK=
19622      fi
19623    fi
19624
19625    if test "x$READLINK" != x; then
19626      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19627    else
19628      # Save the current directory for restoring afterwards
19629      STARTDIR=$PWD
19630      COUNTER=0
19631      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19632      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19633      cd $sym_link_dir
19634      # Use -P flag to resolve symlinks in directories.
19635      cd `$THEPWDCMD -P`
19636      sym_link_dir=`$THEPWDCMD -P`
19637      # Resolve file symlinks
19638      while test $COUNTER -lt 20; do
19639        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19640        if test "x$ISLINK" == x; then
19641          # This is not a symbolic link! We are done!
19642          break
19643        fi
19644        # Again resolve directory symlinks since the target of the just found
19645        # link could be in a different directory
19646        cd `$DIRNAME $ISLINK`
19647        sym_link_dir=`$THEPWDCMD -P`
19648        sym_link_file=`$BASENAME $ISLINK`
19649        let COUNTER=COUNTER+1
19650      done
19651      cd $STARTDIR
19652      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19653    fi
19654  fi
19655
19656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19657$as_echo "$PROPER_COMPILER_CC" >&6; }
19658    CC="$PROPER_COMPILER_CC"
19659  else
19660    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19661$as_echo "no, keeping CC" >&6; }
19662    CC="$TEST_COMPILER"
19663  fi
19664
19665  COMPILER=$CC
19666  COMPILER_NAME=$COMPILER_NAME
19667
19668  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19669    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19670    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19671    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19672    if test $? -ne 0; then
19673      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19674
19675      { $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
19676$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19677      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19678$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19679      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19680    else
19681      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19682      COMPILER_VENDOR="Sun Studio"
19683    fi
19684  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19685    # First line typically looks something like:
19686    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
19687    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19688    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19689    COMPILER_VENDOR="Microsoft CL.EXE"
19690    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19691    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19692      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19693        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19694      fi
19695    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19696      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19697        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19698      fi
19699    fi
19700  else
19701    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19702    # Check that this is likely to be GCC.
19703    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19704    if test $? -ne 0; then
19705      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19706$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19707      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19708$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19709      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19710    fi
19711
19712    # First line typically looks something like:
19713    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19714    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19715    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19716  fi
19717  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19718  CC_VERSION="$COMPILER_VERSION"
19719  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19720  CC_VENDOR="$COMPILER_VENDOR"
19721
19722  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19723$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19724
19725
19726  # Now that we have resolved CC ourself, let autoconf have its go at it
19727  ac_ext=c
19728ac_cpp='$CPP $CPPFLAGS'
19729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19731ac_compiler_gnu=$ac_cv_c_compiler_gnu
19732if test -n "$ac_tool_prefix"; then
19733  for ac_prog in $CC
19734  do
19735    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19736set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19738$as_echo_n "checking for $ac_word... " >&6; }
19739if ${ac_cv_prog_CC+:} false; then :
19740  $as_echo_n "(cached) " >&6
19741else
19742  if test -n "$CC"; then
19743  ac_cv_prog_CC="$CC" # Let the user override the test.
19744else
19745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19746for as_dir in $PATH
19747do
19748  IFS=$as_save_IFS
19749  test -z "$as_dir" && as_dir=.
19750    for ac_exec_ext in '' $ac_executable_extensions; do
19751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19752    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19754    break 2
19755  fi
19756done
19757  done
19758IFS=$as_save_IFS
19759
19760fi
19761fi
19762CC=$ac_cv_prog_CC
19763if test -n "$CC"; then
19764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19765$as_echo "$CC" >&6; }
19766else
19767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19768$as_echo "no" >&6; }
19769fi
19770
19771
19772    test -n "$CC" && break
19773  done
19774fi
19775if test -z "$CC"; then
19776  ac_ct_CC=$CC
19777  for ac_prog in $CC
19778do
19779  # Extract the first word of "$ac_prog", so it can be a program name with args.
19780set dummy $ac_prog; ac_word=$2
19781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19782$as_echo_n "checking for $ac_word... " >&6; }
19783if ${ac_cv_prog_ac_ct_CC+:} false; then :
19784  $as_echo_n "(cached) " >&6
19785else
19786  if test -n "$ac_ct_CC"; then
19787  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19788else
19789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19790for as_dir in $PATH
19791do
19792  IFS=$as_save_IFS
19793  test -z "$as_dir" && as_dir=.
19794    for ac_exec_ext in '' $ac_executable_extensions; do
19795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19796    ac_cv_prog_ac_ct_CC="$ac_prog"
19797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19798    break 2
19799  fi
19800done
19801  done
19802IFS=$as_save_IFS
19803
19804fi
19805fi
19806ac_ct_CC=$ac_cv_prog_ac_ct_CC
19807if test -n "$ac_ct_CC"; then
19808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19809$as_echo "$ac_ct_CC" >&6; }
19810else
19811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19812$as_echo "no" >&6; }
19813fi
19814
19815
19816  test -n "$ac_ct_CC" && break
19817done
19818
19819  if test "x$ac_ct_CC" = x; then
19820    CC=""
19821  else
19822    case $cross_compiling:$ac_tool_warned in
19823yes:)
19824{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19825$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19826ac_tool_warned=yes ;;
19827esac
19828    CC=$ac_ct_CC
19829  fi
19830fi
19831
19832
19833test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19835as_fn_error $? "no acceptable C compiler found in \$PATH
19836See \`config.log' for more details" "$LINENO" 5; }
19837
19838# Provide some information about the compiler.
19839$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19840set X $ac_compile
19841ac_compiler=$2
19842for ac_option in --version -v -V -qversion; do
19843  { { ac_try="$ac_compiler $ac_option >&5"
19844case "(($ac_try" in
19845  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19846  *) ac_try_echo=$ac_try;;
19847esac
19848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19849$as_echo "$ac_try_echo"; } >&5
19850  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19851  ac_status=$?
19852  if test -s conftest.err; then
19853    sed '10a\
19854... rest of stderr output deleted ...
19855         10q' conftest.err >conftest.er1
19856    cat conftest.er1 >&5
19857  fi
19858  rm -f conftest.er1 conftest.err
19859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19860  test $ac_status = 0; }
19861done
19862
19863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19864/* end confdefs.h.  */
19865
19866int
19867main ()
19868{
19869
19870  ;
19871  return 0;
19872}
19873_ACEOF
19874ac_clean_files_save=$ac_clean_files
19875ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19876# Try to create an executable without -o first, disregard a.out.
19877# It will help us diagnose broken compilers, and finding out an intuition
19878# of exeext.
19879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19880$as_echo_n "checking whether the C compiler works... " >&6; }
19881ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19882
19883# The possible output files:
19884ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19885
19886ac_rmfiles=
19887for ac_file in $ac_files
19888do
19889  case $ac_file in
19890    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19891    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19892  esac
19893done
19894rm -f $ac_rmfiles
19895
19896if { { ac_try="$ac_link_default"
19897case "(($ac_try" in
19898  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19899  *) ac_try_echo=$ac_try;;
19900esac
19901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19902$as_echo "$ac_try_echo"; } >&5
19903  (eval "$ac_link_default") 2>&5
19904  ac_status=$?
19905  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19906  test $ac_status = 0; }; then :
19907  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19908# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19909# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19910# so that the user can short-circuit this test for compilers unknown to
19911# Autoconf.
19912for ac_file in $ac_files ''
19913do
19914  test -f "$ac_file" || continue
19915  case $ac_file in
19916    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19917	;;
19918    [ab].out )
19919	# We found the default executable, but exeext='' is most
19920	# certainly right.
19921	break;;
19922    *.* )
19923	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19924	then :; else
19925	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19926	fi
19927	# We set ac_cv_exeext here because the later test for it is not
19928	# safe: cross compilers may not add the suffix if given an `-o'
19929	# argument, so we may need to know it at that point already.
19930	# Even if this section looks crufty: it has the advantage of
19931	# actually working.
19932	break;;
19933    * )
19934	break;;
19935  esac
19936done
19937test "$ac_cv_exeext" = no && ac_cv_exeext=
19938
19939else
19940  ac_file=''
19941fi
19942if test -z "$ac_file"; then :
19943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19944$as_echo "no" >&6; }
19945$as_echo "$as_me: failed program was:" >&5
19946sed 's/^/| /' conftest.$ac_ext >&5
19947
19948{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19950as_fn_error 77 "C compiler cannot create executables
19951See \`config.log' for more details" "$LINENO" 5; }
19952else
19953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19954$as_echo "yes" >&6; }
19955fi
19956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19957$as_echo_n "checking for C compiler default output file name... " >&6; }
19958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19959$as_echo "$ac_file" >&6; }
19960ac_exeext=$ac_cv_exeext
19961
19962rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19963ac_clean_files=$ac_clean_files_save
19964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19965$as_echo_n "checking for suffix of executables... " >&6; }
19966if { { ac_try="$ac_link"
19967case "(($ac_try" in
19968  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19969  *) ac_try_echo=$ac_try;;
19970esac
19971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19972$as_echo "$ac_try_echo"; } >&5
19973  (eval "$ac_link") 2>&5
19974  ac_status=$?
19975  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19976  test $ac_status = 0; }; then :
19977  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19978# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19979# work properly (i.e., refer to `conftest.exe'), while it won't with
19980# `rm'.
19981for ac_file in conftest.exe conftest conftest.*; do
19982  test -f "$ac_file" || continue
19983  case $ac_file in
19984    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19985    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19986	  break;;
19987    * ) break;;
19988  esac
19989done
19990else
19991  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19993as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19994See \`config.log' for more details" "$LINENO" 5; }
19995fi
19996rm -f conftest conftest$ac_cv_exeext
19997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19998$as_echo "$ac_cv_exeext" >&6; }
19999
20000rm -f conftest.$ac_ext
20001EXEEXT=$ac_cv_exeext
20002ac_exeext=$EXEEXT
20003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20004/* end confdefs.h.  */
20005#include <stdio.h>
20006int
20007main ()
20008{
20009FILE *f = fopen ("conftest.out", "w");
20010 return ferror (f) || fclose (f) != 0;
20011
20012  ;
20013  return 0;
20014}
20015_ACEOF
20016ac_clean_files="$ac_clean_files conftest.out"
20017# Check that the compiler produces executables we can run.  If not, either
20018# the compiler is broken, or we cross compile.
20019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20020$as_echo_n "checking whether we are cross compiling... " >&6; }
20021if test "$cross_compiling" != yes; then
20022  { { ac_try="$ac_link"
20023case "(($ac_try" in
20024  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20025  *) ac_try_echo=$ac_try;;
20026esac
20027eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20028$as_echo "$ac_try_echo"; } >&5
20029  (eval "$ac_link") 2>&5
20030  ac_status=$?
20031  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20032  test $ac_status = 0; }
20033  if { ac_try='./conftest$ac_cv_exeext'
20034  { { case "(($ac_try" in
20035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20036  *) ac_try_echo=$ac_try;;
20037esac
20038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20039$as_echo "$ac_try_echo"; } >&5
20040  (eval "$ac_try") 2>&5
20041  ac_status=$?
20042  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20043  test $ac_status = 0; }; }; then
20044    cross_compiling=no
20045  else
20046    if test "$cross_compiling" = maybe; then
20047	cross_compiling=yes
20048    else
20049	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20051as_fn_error $? "cannot run C compiled programs.
20052If you meant to cross compile, use \`--host'.
20053See \`config.log' for more details" "$LINENO" 5; }
20054    fi
20055  fi
20056fi
20057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20058$as_echo "$cross_compiling" >&6; }
20059
20060rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20061ac_clean_files=$ac_clean_files_save
20062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20063$as_echo_n "checking for suffix of object files... " >&6; }
20064if ${ac_cv_objext+:} false; then :
20065  $as_echo_n "(cached) " >&6
20066else
20067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20068/* end confdefs.h.  */
20069
20070int
20071main ()
20072{
20073
20074  ;
20075  return 0;
20076}
20077_ACEOF
20078rm -f conftest.o conftest.obj
20079if { { ac_try="$ac_compile"
20080case "(($ac_try" in
20081  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20082  *) ac_try_echo=$ac_try;;
20083esac
20084eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20085$as_echo "$ac_try_echo"; } >&5
20086  (eval "$ac_compile") 2>&5
20087  ac_status=$?
20088  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20089  test $ac_status = 0; }; then :
20090  for ac_file in conftest.o conftest.obj conftest.*; do
20091  test -f "$ac_file" || continue;
20092  case $ac_file in
20093    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20094    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20095       break;;
20096  esac
20097done
20098else
20099  $as_echo "$as_me: failed program was:" >&5
20100sed 's/^/| /' conftest.$ac_ext >&5
20101
20102{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20104as_fn_error $? "cannot compute suffix of object files: cannot compile
20105See \`config.log' for more details" "$LINENO" 5; }
20106fi
20107rm -f conftest.$ac_cv_objext conftest.$ac_ext
20108fi
20109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20110$as_echo "$ac_cv_objext" >&6; }
20111OBJEXT=$ac_cv_objext
20112ac_objext=$OBJEXT
20113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20114$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20115if ${ac_cv_c_compiler_gnu+:} false; then :
20116  $as_echo_n "(cached) " >&6
20117else
20118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20119/* end confdefs.h.  */
20120
20121int
20122main ()
20123{
20124#ifndef __GNUC__
20125       choke me
20126#endif
20127
20128  ;
20129  return 0;
20130}
20131_ACEOF
20132if ac_fn_c_try_compile "$LINENO"; then :
20133  ac_compiler_gnu=yes
20134else
20135  ac_compiler_gnu=no
20136fi
20137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20138ac_cv_c_compiler_gnu=$ac_compiler_gnu
20139
20140fi
20141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20142$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20143if test $ac_compiler_gnu = yes; then
20144  GCC=yes
20145else
20146  GCC=
20147fi
20148ac_test_CFLAGS=${CFLAGS+set}
20149ac_save_CFLAGS=$CFLAGS
20150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20151$as_echo_n "checking whether $CC accepts -g... " >&6; }
20152if ${ac_cv_prog_cc_g+:} false; then :
20153  $as_echo_n "(cached) " >&6
20154else
20155  ac_save_c_werror_flag=$ac_c_werror_flag
20156   ac_c_werror_flag=yes
20157   ac_cv_prog_cc_g=no
20158   CFLAGS="-g"
20159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20160/* end confdefs.h.  */
20161
20162int
20163main ()
20164{
20165
20166  ;
20167  return 0;
20168}
20169_ACEOF
20170if ac_fn_c_try_compile "$LINENO"; then :
20171  ac_cv_prog_cc_g=yes
20172else
20173  CFLAGS=""
20174      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20175/* end confdefs.h.  */
20176
20177int
20178main ()
20179{
20180
20181  ;
20182  return 0;
20183}
20184_ACEOF
20185if ac_fn_c_try_compile "$LINENO"; then :
20186
20187else
20188  ac_c_werror_flag=$ac_save_c_werror_flag
20189	 CFLAGS="-g"
20190	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20191/* end confdefs.h.  */
20192
20193int
20194main ()
20195{
20196
20197  ;
20198  return 0;
20199}
20200_ACEOF
20201if ac_fn_c_try_compile "$LINENO"; then :
20202  ac_cv_prog_cc_g=yes
20203fi
20204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20205fi
20206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20207fi
20208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20209   ac_c_werror_flag=$ac_save_c_werror_flag
20210fi
20211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20212$as_echo "$ac_cv_prog_cc_g" >&6; }
20213if test "$ac_test_CFLAGS" = set; then
20214  CFLAGS=$ac_save_CFLAGS
20215elif test $ac_cv_prog_cc_g = yes; then
20216  if test "$GCC" = yes; then
20217    CFLAGS="-g -O2"
20218  else
20219    CFLAGS="-g"
20220  fi
20221else
20222  if test "$GCC" = yes; then
20223    CFLAGS="-O2"
20224  else
20225    CFLAGS=
20226  fi
20227fi
20228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20229$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20230if ${ac_cv_prog_cc_c89+:} false; then :
20231  $as_echo_n "(cached) " >&6
20232else
20233  ac_cv_prog_cc_c89=no
20234ac_save_CC=$CC
20235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20236/* end confdefs.h.  */
20237#include <stdarg.h>
20238#include <stdio.h>
20239struct stat;
20240/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20241struct buf { int x; };
20242FILE * (*rcsopen) (struct buf *, struct stat *, int);
20243static char *e (p, i)
20244     char **p;
20245     int i;
20246{
20247  return p[i];
20248}
20249static char *f (char * (*g) (char **, int), char **p, ...)
20250{
20251  char *s;
20252  va_list v;
20253  va_start (v,p);
20254  s = g (p, va_arg (v,int));
20255  va_end (v);
20256  return s;
20257}
20258
20259/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20260   function prototypes and stuff, but not '\xHH' hex character constants.
20261   These don't provoke an error unfortunately, instead are silently treated
20262   as 'x'.  The following induces an error, until -std is added to get
20263   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20264   array size at least.  It's necessary to write '\x00'==0 to get something
20265   that's true only with -std.  */
20266int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20267
20268/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20269   inside strings and character constants.  */
20270#define FOO(x) 'x'
20271int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20272
20273int test (int i, double x);
20274struct s1 {int (*f) (int a);};
20275struct s2 {int (*f) (double a);};
20276int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20277int argc;
20278char **argv;
20279int
20280main ()
20281{
20282return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20283  ;
20284  return 0;
20285}
20286_ACEOF
20287for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20288	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20289do
20290  CC="$ac_save_CC $ac_arg"
20291  if ac_fn_c_try_compile "$LINENO"; then :
20292  ac_cv_prog_cc_c89=$ac_arg
20293fi
20294rm -f core conftest.err conftest.$ac_objext
20295  test "x$ac_cv_prog_cc_c89" != "xno" && break
20296done
20297rm -f conftest.$ac_ext
20298CC=$ac_save_CC
20299
20300fi
20301# AC_CACHE_VAL
20302case "x$ac_cv_prog_cc_c89" in
20303  x)
20304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20305$as_echo "none needed" >&6; } ;;
20306  xno)
20307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20308$as_echo "unsupported" >&6; } ;;
20309  *)
20310    CC="$CC $ac_cv_prog_cc_c89"
20311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20312$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20313esac
20314if test "x$ac_cv_prog_cc_c89" != xno; then :
20315
20316fi
20317
20318ac_ext=cpp
20319ac_cpp='$CXXCPP $CPPFLAGS'
20320ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20321ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20322ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20323
20324
20325  ### Locate C++ compiler (CXX)
20326
20327  if test "x$CXX" != x; then
20328    COMPILER_CHECK_LIST="$CXX"
20329  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20330    COMPILER_CHECK_LIST="cl"
20331  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20332    COMPILER_CHECK_LIST="CC g++"
20333  else
20334    COMPILER_CHECK_LIST="g++ CC"
20335  fi
20336
20337
20338  COMPILER_NAME=C++
20339
20340  CXX=
20341  # If TOOLS_DIR is set, check for all compiler names in there first
20342  # before checking the rest of the PATH.
20343  if test -n "$TOOLS_DIR"; then
20344    PATH_save="$PATH"
20345    PATH="$TOOLS_DIR"
20346    for ac_prog in $COMPILER_CHECK_LIST
20347do
20348  # Extract the first word of "$ac_prog", so it can be a program name with args.
20349set dummy $ac_prog; ac_word=$2
20350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20351$as_echo_n "checking for $ac_word... " >&6; }
20352if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20353  $as_echo_n "(cached) " >&6
20354else
20355  case $TOOLS_DIR_CXX in
20356  [\\/]* | ?:[\\/]*)
20357  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20358  ;;
20359  *)
20360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20361for as_dir in $PATH
20362do
20363  IFS=$as_save_IFS
20364  test -z "$as_dir" && as_dir=.
20365    for ac_exec_ext in '' $ac_executable_extensions; do
20366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20367    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20369    break 2
20370  fi
20371done
20372  done
20373IFS=$as_save_IFS
20374
20375  ;;
20376esac
20377fi
20378TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20379if test -n "$TOOLS_DIR_CXX"; then
20380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20381$as_echo "$TOOLS_DIR_CXX" >&6; }
20382else
20383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20384$as_echo "no" >&6; }
20385fi
20386
20387
20388  test -n "$TOOLS_DIR_CXX" && break
20389done
20390
20391    CXX=$TOOLS_DIR_CXX
20392    PATH="$PATH_save"
20393  fi
20394
20395  # AC_PATH_PROGS can't be run multiple times with the same variable,
20396  # so create a new name for this run.
20397  if test "x$CXX" = x; then
20398    for ac_prog in $COMPILER_CHECK_LIST
20399do
20400  # Extract the first word of "$ac_prog", so it can be a program name with args.
20401set dummy $ac_prog; ac_word=$2
20402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20403$as_echo_n "checking for $ac_word... " >&6; }
20404if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20405  $as_echo_n "(cached) " >&6
20406else
20407  case $POTENTIAL_CXX in
20408  [\\/]* | ?:[\\/]*)
20409  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20410  ;;
20411  *)
20412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20413for as_dir in $PATH
20414do
20415  IFS=$as_save_IFS
20416  test -z "$as_dir" && as_dir=.
20417    for ac_exec_ext in '' $ac_executable_extensions; do
20418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20419    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20421    break 2
20422  fi
20423done
20424  done
20425IFS=$as_save_IFS
20426
20427  ;;
20428esac
20429fi
20430POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20431if test -n "$POTENTIAL_CXX"; then
20432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20433$as_echo "$POTENTIAL_CXX" >&6; }
20434else
20435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20436$as_echo "no" >&6; }
20437fi
20438
20439
20440  test -n "$POTENTIAL_CXX" && break
20441done
20442
20443    CXX=$POTENTIAL_CXX
20444  fi
20445
20446  if test "x$CXX" = x; then
20447
20448  # Print a helpful message on how to acquire the necessary build dependency.
20449  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20450  MISSING_DEPENDENCY=devkit
20451  PKGHANDLER_COMMAND=
20452
20453  case $PKGHANDLER in
20454    apt-get)
20455      apt_help     $MISSING_DEPENDENCY ;;
20456    yum)
20457      yum_help     $MISSING_DEPENDENCY ;;
20458    port)
20459      port_help    $MISSING_DEPENDENCY ;;
20460    pkgutil)
20461      pkgutil_help $MISSING_DEPENDENCY ;;
20462    pkgadd)
20463      pkgadd_help  $MISSING_DEPENDENCY ;;
20464    * )
20465      break ;;
20466  esac
20467
20468  if test "x$PKGHANDLER_COMMAND" != x; then
20469    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20470  fi
20471
20472    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20473  fi
20474
20475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20476
20477  # First separate the path from the arguments. This will split at the first
20478  # space.
20479  complete="$CXX"
20480  path="${complete%% *}"
20481  tmp="$complete EOL"
20482  arguments="${tmp#* }"
20483
20484  # Input might be given as Windows format, start by converting to
20485  # unix format.
20486  new_path=`$CYGPATH -u "$path"`
20487
20488  # Now try to locate executable using which
20489  new_path=`$WHICH "$new_path" 2> /dev/null`
20490  # bat and cmd files are not always considered executable in cygwin causing which
20491  # to not find them
20492  if test "x$new_path" = x \
20493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20495    new_path=`$CYGPATH -u "$path"`
20496  fi
20497  if test "x$new_path" = x; then
20498    # Oops. Which didn't find the executable.
20499    # The splitting of arguments from the executable at a space might have been incorrect,
20500    # since paths with space are more likely in Windows. Give it another try with the whole
20501    # argument.
20502    path="$complete"
20503    arguments="EOL"
20504    new_path=`$CYGPATH -u "$path"`
20505    new_path=`$WHICH "$new_path" 2> /dev/null`
20506    # bat and cmd files are not always considered executable in cygwin causing which
20507    # to not find them
20508    if test "x$new_path" = x \
20509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20511      new_path=`$CYGPATH -u "$path"`
20512    fi
20513    if test "x$new_path" = x; then
20514      # It's still not found. Now this is an unrecoverable error.
20515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20516$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20517      has_space=`$ECHO "$complete" | $GREP " "`
20518      if test "x$has_space" != x; then
20519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20521      fi
20522      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20523    fi
20524  fi
20525
20526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20529  # "foo.exe" is OK but "foo" is an error.
20530  #
20531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20532  # It is also a way to make sure we got the proper file name for the real test later on.
20533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20534  if test "x$test_shortpath" = x; then
20535    # Short path failed, file does not exist as specified.
20536    # Try adding .exe or .cmd
20537    if test -f "${new_path}.exe"; then
20538      input_to_shortpath="${new_path}.exe"
20539    elif test -f "${new_path}.cmd"; then
20540      input_to_shortpath="${new_path}.cmd"
20541    else
20542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20543$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20546      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20547    fi
20548  else
20549    input_to_shortpath="$new_path"
20550  fi
20551
20552  # Call helper function which possibly converts this using DOS-style short mode.
20553  # If so, the updated path is stored in $new_path.
20554  new_path="$input_to_shortpath"
20555
20556  input_path="$input_to_shortpath"
20557  # Check if we need to convert this using DOS-style short mode. If the path
20558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20559  # take no chances and rewrite it.
20560  # Note: m4 eats our [], so we need to use [ and ] instead.
20561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20562  if test "x$has_forbidden_chars" != x; then
20563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20567      # Going to short mode and back again did indeed matter. Since short mode is
20568      # case insensitive, let's make it lowercase to improve readability.
20569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20570      # Now convert it back to Unix-stile (cygpath)
20571      input_path=`$CYGPATH -u "$shortmode_path"`
20572      new_path="$input_path"
20573    fi
20574  fi
20575
20576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20577  if test "x$test_cygdrive_prefix" = x; then
20578    # As a simple fix, exclude /usr/bin since it's not a real path.
20579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20581      # a path prefixed by /cygdrive for fixpath to work.
20582      new_path="$CYGWIN_ROOT_PATH$input_path"
20583    fi
20584  fi
20585
20586  # remove trailing .exe if any
20587  new_path="${new_path/%.exe/}"
20588
20589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20590
20591  # First separate the path from the arguments. This will split at the first
20592  # space.
20593  complete="$CXX"
20594  path="${complete%% *}"
20595  tmp="$complete EOL"
20596  arguments="${tmp#* }"
20597
20598  # Input might be given as Windows format, start by converting to
20599  # unix format.
20600  new_path="$path"
20601
20602  windows_path="$new_path"
20603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20604    unix_path=`$CYGPATH -u "$windows_path"`
20605    new_path="$unix_path"
20606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20608    new_path="$unix_path"
20609  fi
20610
20611
20612  # Now try to locate executable using which
20613  new_path=`$WHICH "$new_path" 2> /dev/null`
20614
20615  if test "x$new_path" = x; then
20616    # Oops. Which didn't find the executable.
20617    # The splitting of arguments from the executable at a space might have been incorrect,
20618    # since paths with space are more likely in Windows. Give it another try with the whole
20619    # argument.
20620    path="$complete"
20621    arguments="EOL"
20622    new_path="$path"
20623
20624  windows_path="$new_path"
20625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20626    unix_path=`$CYGPATH -u "$windows_path"`
20627    new_path="$unix_path"
20628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20630    new_path="$unix_path"
20631  fi
20632
20633
20634    new_path=`$WHICH "$new_path" 2> /dev/null`
20635
20636    if test "x$new_path" = x; then
20637      # It's still not found. Now this is an unrecoverable error.
20638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20639$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20640      has_space=`$ECHO "$complete" | $GREP " "`
20641      if test "x$has_space" != x; then
20642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20644      fi
20645      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20646    fi
20647  fi
20648
20649  # Now new_path has a complete unix path to the binary
20650  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20651    # Keep paths in /bin as-is, but remove trailing .exe if any
20652    new_path="${new_path/%.exe/}"
20653    # Do not save /bin paths to all_fixpath_prefixes!
20654  else
20655    # Not in mixed or Windows style, start by that.
20656    new_path=`cmd //c echo $new_path`
20657
20658  input_path="$new_path"
20659  # Check if we need to convert this using DOS-style short mode. If the path
20660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20661  # take no chances and rewrite it.
20662  # Note: m4 eats our [], so we need to use [ and ] instead.
20663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20664  if test "x$has_forbidden_chars" != x; then
20665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20667  fi
20668
20669    # Output is in $new_path
20670
20671  windows_path="$new_path"
20672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20673    unix_path=`$CYGPATH -u "$windows_path"`
20674    new_path="$unix_path"
20675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20677    new_path="$unix_path"
20678  fi
20679
20680    # remove trailing .exe if any
20681    new_path="${new_path/%.exe/}"
20682
20683    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20684    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20685  fi
20686
20687  else
20688    # We're on a posix platform. Hooray! :)
20689    # First separate the path from the arguments. This will split at the first
20690    # space.
20691    complete="$CXX"
20692    path="${complete%% *}"
20693    tmp="$complete EOL"
20694    arguments="${tmp#* }"
20695
20696    # Cannot rely on the command "which" here since it doesn't always work.
20697    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20698    if test -z "$is_absolute_path"; then
20699      # Path to executable is not absolute. Find it.
20700      IFS_save="$IFS"
20701      IFS=:
20702      for p in $PATH; do
20703        if test -f "$p/$path" && test -x "$p/$path"; then
20704          new_path="$p/$path"
20705          break
20706        fi
20707      done
20708      IFS="$IFS_save"
20709    else
20710      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20711$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20712      new_path="$path"
20713    fi
20714
20715    if test "x$new_path" = x; then
20716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20717$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20718      has_space=`$ECHO "$complete" | $GREP " "`
20719      if test "x$has_space" != x; then
20720        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20721$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20722      fi
20723      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20724    fi
20725  fi
20726
20727  # Now join together the path and the arguments once again
20728  if test "x$arguments" != xEOL; then
20729    new_complete="$new_path ${arguments% *}"
20730  else
20731    new_complete="$new_path"
20732  fi
20733
20734  if test "x$complete" != "x$new_complete"; then
20735    CXX="$new_complete"
20736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20737$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20738  fi
20739
20740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20741$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20742  TEST_COMPILER="$CXX"
20743
20744  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20745    # Follow a chain of symbolic links. Use readlink
20746    # where it exists, else fall back to horribly
20747    # complicated shell code.
20748    if test "x$READLINK_TESTED" != yes; then
20749      # On MacOSX there is a readlink tool with a different
20750      # purpose than the GNU readlink tool. Check the found readlink.
20751      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20752      if test "x$ISGNU" = x; then
20753        # A readlink that we do not know how to use.
20754        # Are there other non-GNU readlinks out there?
20755        READLINK_TESTED=yes
20756        READLINK=
20757      fi
20758    fi
20759
20760    if test "x$READLINK" != x; then
20761      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20762    else
20763      # Save the current directory for restoring afterwards
20764      STARTDIR=$PWD
20765      COUNTER=0
20766      sym_link_dir=`$DIRNAME $TEST_COMPILER`
20767      sym_link_file=`$BASENAME $TEST_COMPILER`
20768      cd $sym_link_dir
20769      # Use -P flag to resolve symlinks in directories.
20770      cd `$THEPWDCMD -P`
20771      sym_link_dir=`$THEPWDCMD -P`
20772      # Resolve file symlinks
20773      while test $COUNTER -lt 20; do
20774        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20775        if test "x$ISLINK" == x; then
20776          # This is not a symbolic link! We are done!
20777          break
20778        fi
20779        # Again resolve directory symlinks since the target of the just found
20780        # link could be in a different directory
20781        cd `$DIRNAME $ISLINK`
20782        sym_link_dir=`$THEPWDCMD -P`
20783        sym_link_file=`$BASENAME $ISLINK`
20784        let COUNTER=COUNTER+1
20785      done
20786      cd $STARTDIR
20787      TEST_COMPILER=$sym_link_dir/$sym_link_file
20788    fi
20789  fi
20790
20791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20792$as_echo "$TEST_COMPILER" >&6; }
20793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20794$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20795
20796  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20797  if test "x$COMPILER_BASENAME" = "xccache"; then
20798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20799$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20800    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20801    # We want to control ccache invocation ourselves, so ignore this cc and try
20802    # searching again.
20803
20804    # Remove the path to the fake ccache cc from the PATH
20805    RETRY_COMPILER_SAVED_PATH="$PATH"
20806    COMPILER_DIRNAME=`$DIRNAME $CXX`
20807    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20808
20809    # Try again looking for our compiler
20810    if test -n "$ac_tool_prefix"; then
20811  for ac_prog in $COMPILER_CHECK_LIST
20812  do
20813    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20814set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20816$as_echo_n "checking for $ac_word... " >&6; }
20817if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20818  $as_echo_n "(cached) " >&6
20819else
20820  if test -n "$PROPER_COMPILER_CXX"; then
20821  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20822else
20823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20824for as_dir in $PATH
20825do
20826  IFS=$as_save_IFS
20827  test -z "$as_dir" && as_dir=.
20828    for ac_exec_ext in '' $ac_executable_extensions; do
20829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20830    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20832    break 2
20833  fi
20834done
20835  done
20836IFS=$as_save_IFS
20837
20838fi
20839fi
20840PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20841if test -n "$PROPER_COMPILER_CXX"; then
20842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20843$as_echo "$PROPER_COMPILER_CXX" >&6; }
20844else
20845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20846$as_echo "no" >&6; }
20847fi
20848
20849
20850    test -n "$PROPER_COMPILER_CXX" && break
20851  done
20852fi
20853if test -z "$PROPER_COMPILER_CXX"; then
20854  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20855  for ac_prog in $COMPILER_CHECK_LIST
20856do
20857  # Extract the first word of "$ac_prog", so it can be a program name with args.
20858set dummy $ac_prog; ac_word=$2
20859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20860$as_echo_n "checking for $ac_word... " >&6; }
20861if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20862  $as_echo_n "(cached) " >&6
20863else
20864  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20865  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20866else
20867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20868for as_dir in $PATH
20869do
20870  IFS=$as_save_IFS
20871  test -z "$as_dir" && as_dir=.
20872    for ac_exec_ext in '' $ac_executable_extensions; do
20873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20874    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20876    break 2
20877  fi
20878done
20879  done
20880IFS=$as_save_IFS
20881
20882fi
20883fi
20884ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20885if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20887$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20888else
20889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20890$as_echo "no" >&6; }
20891fi
20892
20893
20894  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20895done
20896
20897  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20898    PROPER_COMPILER_CXX=""
20899  else
20900    case $cross_compiling:$ac_tool_warned in
20901yes:)
20902{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20903$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20904ac_tool_warned=yes ;;
20905esac
20906    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20907  fi
20908fi
20909
20910
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912
20913  # First separate the path from the arguments. This will split at the first
20914  # space.
20915  complete="$PROPER_COMPILER_CXX"
20916  path="${complete%% *}"
20917  tmp="$complete EOL"
20918  arguments="${tmp#* }"
20919
20920  # Input might be given as Windows format, start by converting to
20921  # unix format.
20922  new_path=`$CYGPATH -u "$path"`
20923
20924  # Now try to locate executable using which
20925  new_path=`$WHICH "$new_path" 2> /dev/null`
20926  # bat and cmd files are not always considered executable in cygwin causing which
20927  # to not find them
20928  if test "x$new_path" = x \
20929      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20930      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20931    new_path=`$CYGPATH -u "$path"`
20932  fi
20933  if test "x$new_path" = x; then
20934    # Oops. Which didn't find the executable.
20935    # The splitting of arguments from the executable at a space might have been incorrect,
20936    # since paths with space are more likely in Windows. Give it another try with the whole
20937    # argument.
20938    path="$complete"
20939    arguments="EOL"
20940    new_path=`$CYGPATH -u "$path"`
20941    new_path=`$WHICH "$new_path" 2> /dev/null`
20942    # bat and cmd files are not always considered executable in cygwin causing which
20943    # to not find them
20944    if test "x$new_path" = x \
20945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20947      new_path=`$CYGPATH -u "$path"`
20948    fi
20949    if test "x$new_path" = x; then
20950      # It's still not found. Now this is an unrecoverable error.
20951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20952$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20953      has_space=`$ECHO "$complete" | $GREP " "`
20954      if test "x$has_space" != x; then
20955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20957      fi
20958      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20959    fi
20960  fi
20961
20962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20965  # "foo.exe" is OK but "foo" is an error.
20966  #
20967  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20968  # It is also a way to make sure we got the proper file name for the real test later on.
20969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20970  if test "x$test_shortpath" = x; then
20971    # Short path failed, file does not exist as specified.
20972    # Try adding .exe or .cmd
20973    if test -f "${new_path}.exe"; then
20974      input_to_shortpath="${new_path}.exe"
20975    elif test -f "${new_path}.cmd"; then
20976      input_to_shortpath="${new_path}.cmd"
20977    else
20978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20979$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20980      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20981$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20982      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20983    fi
20984  else
20985    input_to_shortpath="$new_path"
20986  fi
20987
20988  # Call helper function which possibly converts this using DOS-style short mode.
20989  # If so, the updated path is stored in $new_path.
20990  new_path="$input_to_shortpath"
20991
20992  input_path="$input_to_shortpath"
20993  # Check if we need to convert this using DOS-style short mode. If the path
20994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20995  # take no chances and rewrite it.
20996  # Note: m4 eats our [], so we need to use [ and ] instead.
20997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20998  if test "x$has_forbidden_chars" != x; then
20999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21003      # Going to short mode and back again did indeed matter. Since short mode is
21004      # case insensitive, let's make it lowercase to improve readability.
21005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21006      # Now convert it back to Unix-stile (cygpath)
21007      input_path=`$CYGPATH -u "$shortmode_path"`
21008      new_path="$input_path"
21009    fi
21010  fi
21011
21012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21013  if test "x$test_cygdrive_prefix" = x; then
21014    # As a simple fix, exclude /usr/bin since it's not a real path.
21015    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21017      # a path prefixed by /cygdrive for fixpath to work.
21018      new_path="$CYGWIN_ROOT_PATH$input_path"
21019    fi
21020  fi
21021
21022  # remove trailing .exe if any
21023  new_path="${new_path/%.exe/}"
21024
21025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21026
21027  # First separate the path from the arguments. This will split at the first
21028  # space.
21029  complete="$PROPER_COMPILER_CXX"
21030  path="${complete%% *}"
21031  tmp="$complete EOL"
21032  arguments="${tmp#* }"
21033
21034  # Input might be given as Windows format, start by converting to
21035  # unix format.
21036  new_path="$path"
21037
21038  windows_path="$new_path"
21039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21040    unix_path=`$CYGPATH -u "$windows_path"`
21041    new_path="$unix_path"
21042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21044    new_path="$unix_path"
21045  fi
21046
21047
21048  # Now try to locate executable using which
21049  new_path=`$WHICH "$new_path" 2> /dev/null`
21050
21051  if test "x$new_path" = x; then
21052    # Oops. Which didn't find the executable.
21053    # The splitting of arguments from the executable at a space might have been incorrect,
21054    # since paths with space are more likely in Windows. Give it another try with the whole
21055    # argument.
21056    path="$complete"
21057    arguments="EOL"
21058    new_path="$path"
21059
21060  windows_path="$new_path"
21061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21062    unix_path=`$CYGPATH -u "$windows_path"`
21063    new_path="$unix_path"
21064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21066    new_path="$unix_path"
21067  fi
21068
21069
21070    new_path=`$WHICH "$new_path" 2> /dev/null`
21071
21072    if test "x$new_path" = x; then
21073      # It's still not found. Now this is an unrecoverable error.
21074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21075$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21076      has_space=`$ECHO "$complete" | $GREP " "`
21077      if test "x$has_space" != x; then
21078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21080      fi
21081      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21082    fi
21083  fi
21084
21085  # Now new_path has a complete unix path to the binary
21086  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21087    # Keep paths in /bin as-is, but remove trailing .exe if any
21088    new_path="${new_path/%.exe/}"
21089    # Do not save /bin paths to all_fixpath_prefixes!
21090  else
21091    # Not in mixed or Windows style, start by that.
21092    new_path=`cmd //c echo $new_path`
21093
21094  input_path="$new_path"
21095  # Check if we need to convert this using DOS-style short mode. If the path
21096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21097  # take no chances and rewrite it.
21098  # Note: m4 eats our [], so we need to use [ and ] instead.
21099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21100  if test "x$has_forbidden_chars" != x; then
21101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21103  fi
21104
21105    # Output is in $new_path
21106
21107  windows_path="$new_path"
21108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21109    unix_path=`$CYGPATH -u "$windows_path"`
21110    new_path="$unix_path"
21111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21113    new_path="$unix_path"
21114  fi
21115
21116    # remove trailing .exe if any
21117    new_path="${new_path/%.exe/}"
21118
21119    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21120    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21121  fi
21122
21123  else
21124    # We're on a posix platform. Hooray! :)
21125    # First separate the path from the arguments. This will split at the first
21126    # space.
21127    complete="$PROPER_COMPILER_CXX"
21128    path="${complete%% *}"
21129    tmp="$complete EOL"
21130    arguments="${tmp#* }"
21131
21132    # Cannot rely on the command "which" here since it doesn't always work.
21133    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21134    if test -z "$is_absolute_path"; then
21135      # Path to executable is not absolute. Find it.
21136      IFS_save="$IFS"
21137      IFS=:
21138      for p in $PATH; do
21139        if test -f "$p/$path" && test -x "$p/$path"; then
21140          new_path="$p/$path"
21141          break
21142        fi
21143      done
21144      IFS="$IFS_save"
21145    else
21146      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21147$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21148      new_path="$path"
21149    fi
21150
21151    if test "x$new_path" = x; then
21152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21153$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21154      has_space=`$ECHO "$complete" | $GREP " "`
21155      if test "x$has_space" != x; then
21156        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21157$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21158      fi
21159      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21160    fi
21161  fi
21162
21163  # Now join together the path and the arguments once again
21164  if test "x$arguments" != xEOL; then
21165    new_complete="$new_path ${arguments% *}"
21166  else
21167    new_complete="$new_path"
21168  fi
21169
21170  if test "x$complete" != "x$new_complete"; then
21171    PROPER_COMPILER_CXX="$new_complete"
21172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21173$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21174  fi
21175
21176    PATH="$RETRY_COMPILER_SAVED_PATH"
21177
21178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21179$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21180
21181  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21182    # Follow a chain of symbolic links. Use readlink
21183    # where it exists, else fall back to horribly
21184    # complicated shell code.
21185    if test "x$READLINK_TESTED" != yes; then
21186      # On MacOSX there is a readlink tool with a different
21187      # purpose than the GNU readlink tool. Check the found readlink.
21188      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21189      if test "x$ISGNU" = x; then
21190        # A readlink that we do not know how to use.
21191        # Are there other non-GNU readlinks out there?
21192        READLINK_TESTED=yes
21193        READLINK=
21194      fi
21195    fi
21196
21197    if test "x$READLINK" != x; then
21198      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21199    else
21200      # Save the current directory for restoring afterwards
21201      STARTDIR=$PWD
21202      COUNTER=0
21203      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21204      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21205      cd $sym_link_dir
21206      # Use -P flag to resolve symlinks in directories.
21207      cd `$THEPWDCMD -P`
21208      sym_link_dir=`$THEPWDCMD -P`
21209      # Resolve file symlinks
21210      while test $COUNTER -lt 20; do
21211        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21212        if test "x$ISLINK" == x; then
21213          # This is not a symbolic link! We are done!
21214          break
21215        fi
21216        # Again resolve directory symlinks since the target of the just found
21217        # link could be in a different directory
21218        cd `$DIRNAME $ISLINK`
21219        sym_link_dir=`$THEPWDCMD -P`
21220        sym_link_file=`$BASENAME $ISLINK`
21221        let COUNTER=COUNTER+1
21222      done
21223      cd $STARTDIR
21224      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21225    fi
21226  fi
21227
21228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21229$as_echo "$PROPER_COMPILER_CXX" >&6; }
21230    CXX="$PROPER_COMPILER_CXX"
21231  else
21232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21233$as_echo "no, keeping CXX" >&6; }
21234    CXX="$TEST_COMPILER"
21235  fi
21236
21237  COMPILER=$CXX
21238  COMPILER_NAME=$COMPILER_NAME
21239
21240  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21241    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21242    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21243    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21244    if test $? -ne 0; then
21245      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21246
21247      { $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
21248$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21249      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21250$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21251      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21252    else
21253      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21254      COMPILER_VENDOR="Sun Studio"
21255    fi
21256  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21257    # First line typically looks something like:
21258    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21259    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21260    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21261    COMPILER_VENDOR="Microsoft CL.EXE"
21262    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21263    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21264      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21265        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21266      fi
21267    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21268      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21269        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21270      fi
21271    fi
21272  else
21273    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21274    # Check that this is likely to be GCC.
21275    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21276    if test $? -ne 0; then
21277      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21278$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21279      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21280$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21281      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21282    fi
21283
21284    # First line typically looks something like:
21285    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21286    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21287    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21288  fi
21289  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21290  CXX_VERSION="$COMPILER_VERSION"
21291  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21292  CXX_VENDOR="$COMPILER_VENDOR"
21293
21294  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21295$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21296
21297
21298  # Now that we have resolved CXX ourself, let autoconf have its go at it
21299  ac_ext=cpp
21300ac_cpp='$CXXCPP $CPPFLAGS'
21301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21304if test -z "$CXX"; then
21305  if test -n "$CCC"; then
21306    CXX=$CCC
21307  else
21308    if test -n "$ac_tool_prefix"; then
21309  for ac_prog in $CXX
21310  do
21311    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21312set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21314$as_echo_n "checking for $ac_word... " >&6; }
21315if ${ac_cv_prog_CXX+:} false; then :
21316  $as_echo_n "(cached) " >&6
21317else
21318  if test -n "$CXX"; then
21319  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21320else
21321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21322for as_dir in $PATH
21323do
21324  IFS=$as_save_IFS
21325  test -z "$as_dir" && as_dir=.
21326    for ac_exec_ext in '' $ac_executable_extensions; do
21327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21328    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21330    break 2
21331  fi
21332done
21333  done
21334IFS=$as_save_IFS
21335
21336fi
21337fi
21338CXX=$ac_cv_prog_CXX
21339if test -n "$CXX"; then
21340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21341$as_echo "$CXX" >&6; }
21342else
21343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21344$as_echo "no" >&6; }
21345fi
21346
21347
21348    test -n "$CXX" && break
21349  done
21350fi
21351if test -z "$CXX"; then
21352  ac_ct_CXX=$CXX
21353  for ac_prog in $CXX
21354do
21355  # Extract the first word of "$ac_prog", so it can be a program name with args.
21356set dummy $ac_prog; ac_word=$2
21357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21358$as_echo_n "checking for $ac_word... " >&6; }
21359if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21360  $as_echo_n "(cached) " >&6
21361else
21362  if test -n "$ac_ct_CXX"; then
21363  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21364else
21365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21366for as_dir in $PATH
21367do
21368  IFS=$as_save_IFS
21369  test -z "$as_dir" && as_dir=.
21370    for ac_exec_ext in '' $ac_executable_extensions; do
21371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21372    ac_cv_prog_ac_ct_CXX="$ac_prog"
21373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21374    break 2
21375  fi
21376done
21377  done
21378IFS=$as_save_IFS
21379
21380fi
21381fi
21382ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21383if test -n "$ac_ct_CXX"; then
21384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21385$as_echo "$ac_ct_CXX" >&6; }
21386else
21387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21388$as_echo "no" >&6; }
21389fi
21390
21391
21392  test -n "$ac_ct_CXX" && break
21393done
21394
21395  if test "x$ac_ct_CXX" = x; then
21396    CXX="g++"
21397  else
21398    case $cross_compiling:$ac_tool_warned in
21399yes:)
21400{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21401$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21402ac_tool_warned=yes ;;
21403esac
21404    CXX=$ac_ct_CXX
21405  fi
21406fi
21407
21408  fi
21409fi
21410# Provide some information about the compiler.
21411$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21412set X $ac_compile
21413ac_compiler=$2
21414for ac_option in --version -v -V -qversion; do
21415  { { ac_try="$ac_compiler $ac_option >&5"
21416case "(($ac_try" in
21417  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21418  *) ac_try_echo=$ac_try;;
21419esac
21420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21421$as_echo "$ac_try_echo"; } >&5
21422  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21423  ac_status=$?
21424  if test -s conftest.err; then
21425    sed '10a\
21426... rest of stderr output deleted ...
21427         10q' conftest.err >conftest.er1
21428    cat conftest.er1 >&5
21429  fi
21430  rm -f conftest.er1 conftest.err
21431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21432  test $ac_status = 0; }
21433done
21434
21435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21436$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21437if ${ac_cv_cxx_compiler_gnu+:} false; then :
21438  $as_echo_n "(cached) " >&6
21439else
21440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21441/* end confdefs.h.  */
21442
21443int
21444main ()
21445{
21446#ifndef __GNUC__
21447       choke me
21448#endif
21449
21450  ;
21451  return 0;
21452}
21453_ACEOF
21454if ac_fn_cxx_try_compile "$LINENO"; then :
21455  ac_compiler_gnu=yes
21456else
21457  ac_compiler_gnu=no
21458fi
21459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21460ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21461
21462fi
21463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21464$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21465if test $ac_compiler_gnu = yes; then
21466  GXX=yes
21467else
21468  GXX=
21469fi
21470ac_test_CXXFLAGS=${CXXFLAGS+set}
21471ac_save_CXXFLAGS=$CXXFLAGS
21472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21473$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21474if ${ac_cv_prog_cxx_g+:} false; then :
21475  $as_echo_n "(cached) " >&6
21476else
21477  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21478   ac_cxx_werror_flag=yes
21479   ac_cv_prog_cxx_g=no
21480   CXXFLAGS="-g"
21481   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21482/* end confdefs.h.  */
21483
21484int
21485main ()
21486{
21487
21488  ;
21489  return 0;
21490}
21491_ACEOF
21492if ac_fn_cxx_try_compile "$LINENO"; then :
21493  ac_cv_prog_cxx_g=yes
21494else
21495  CXXFLAGS=""
21496      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21497/* end confdefs.h.  */
21498
21499int
21500main ()
21501{
21502
21503  ;
21504  return 0;
21505}
21506_ACEOF
21507if ac_fn_cxx_try_compile "$LINENO"; then :
21508
21509else
21510  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21511	 CXXFLAGS="-g"
21512	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21513/* end confdefs.h.  */
21514
21515int
21516main ()
21517{
21518
21519  ;
21520  return 0;
21521}
21522_ACEOF
21523if ac_fn_cxx_try_compile "$LINENO"; then :
21524  ac_cv_prog_cxx_g=yes
21525fi
21526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21527fi
21528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21529fi
21530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21531   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21532fi
21533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21534$as_echo "$ac_cv_prog_cxx_g" >&6; }
21535if test "$ac_test_CXXFLAGS" = set; then
21536  CXXFLAGS=$ac_save_CXXFLAGS
21537elif test $ac_cv_prog_cxx_g = yes; then
21538  if test "$GXX" = yes; then
21539    CXXFLAGS="-g -O2"
21540  else
21541    CXXFLAGS="-g"
21542  fi
21543else
21544  if test "$GXX" = yes; then
21545    CXXFLAGS="-O2"
21546  else
21547    CXXFLAGS=
21548  fi
21549fi
21550ac_ext=cpp
21551ac_cpp='$CXXCPP $CPPFLAGS'
21552ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21553ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21554ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21555
21556
21557  ### Locate other tools
21558
21559  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21560    ac_ext=m
21561ac_cpp='$OBJCPP $CPPFLAGS'
21562ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21563ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21564ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21565if test -n "$ac_tool_prefix"; then
21566  for ac_prog in gcc objcc objc cc CC
21567  do
21568    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21569set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21571$as_echo_n "checking for $ac_word... " >&6; }
21572if ${ac_cv_prog_OBJC+:} false; then :
21573  $as_echo_n "(cached) " >&6
21574else
21575  if test -n "$OBJC"; then
21576  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21577else
21578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21579for as_dir in $PATH
21580do
21581  IFS=$as_save_IFS
21582  test -z "$as_dir" && as_dir=.
21583    for ac_exec_ext in '' $ac_executable_extensions; do
21584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21585    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21587    break 2
21588  fi
21589done
21590  done
21591IFS=$as_save_IFS
21592
21593fi
21594fi
21595OBJC=$ac_cv_prog_OBJC
21596if test -n "$OBJC"; then
21597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21598$as_echo "$OBJC" >&6; }
21599else
21600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21601$as_echo "no" >&6; }
21602fi
21603
21604
21605    test -n "$OBJC" && break
21606  done
21607fi
21608if test -z "$OBJC"; then
21609  ac_ct_OBJC=$OBJC
21610  for ac_prog in gcc objcc objc cc CC
21611do
21612  # Extract the first word of "$ac_prog", so it can be a program name with args.
21613set dummy $ac_prog; ac_word=$2
21614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21615$as_echo_n "checking for $ac_word... " >&6; }
21616if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21617  $as_echo_n "(cached) " >&6
21618else
21619  if test -n "$ac_ct_OBJC"; then
21620  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21621else
21622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21623for as_dir in $PATH
21624do
21625  IFS=$as_save_IFS
21626  test -z "$as_dir" && as_dir=.
21627    for ac_exec_ext in '' $ac_executable_extensions; do
21628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21629    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21631    break 2
21632  fi
21633done
21634  done
21635IFS=$as_save_IFS
21636
21637fi
21638fi
21639ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21640if test -n "$ac_ct_OBJC"; then
21641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21642$as_echo "$ac_ct_OBJC" >&6; }
21643else
21644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21645$as_echo "no" >&6; }
21646fi
21647
21648
21649  test -n "$ac_ct_OBJC" && break
21650done
21651
21652  if test "x$ac_ct_OBJC" = x; then
21653    OBJC="gcc"
21654  else
21655    case $cross_compiling:$ac_tool_warned in
21656yes:)
21657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21659ac_tool_warned=yes ;;
21660esac
21661    OBJC=$ac_ct_OBJC
21662  fi
21663fi
21664
21665# Provide some information about the compiler.
21666$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21667set X $ac_compile
21668ac_compiler=$2
21669for ac_option in --version -v -V -qversion; do
21670  { { ac_try="$ac_compiler $ac_option >&5"
21671case "(($ac_try" in
21672  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21673  *) ac_try_echo=$ac_try;;
21674esac
21675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21676$as_echo "$ac_try_echo"; } >&5
21677  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21678  ac_status=$?
21679  if test -s conftest.err; then
21680    sed '10a\
21681... rest of stderr output deleted ...
21682         10q' conftest.err >conftest.er1
21683    cat conftest.er1 >&5
21684  fi
21685  rm -f conftest.er1 conftest.err
21686  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21687  test $ac_status = 0; }
21688done
21689
21690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21691$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21692if ${ac_cv_objc_compiler_gnu+:} false; then :
21693  $as_echo_n "(cached) " >&6
21694else
21695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21696/* end confdefs.h.  */
21697
21698int
21699main ()
21700{
21701#ifndef __GNUC__
21702       choke me
21703#endif
21704
21705  ;
21706  return 0;
21707}
21708_ACEOF
21709if ac_fn_objc_try_compile "$LINENO"; then :
21710  ac_compiler_gnu=yes
21711else
21712  ac_compiler_gnu=no
21713fi
21714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21715ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21716
21717fi
21718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21719$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21720if test $ac_compiler_gnu = yes; then
21721  GOBJC=yes
21722else
21723  GOBJC=
21724fi
21725ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21726ac_save_OBJCFLAGS=$OBJCFLAGS
21727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21728$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21729if ${ac_cv_prog_objc_g+:} false; then :
21730  $as_echo_n "(cached) " >&6
21731else
21732  ac_save_objc_werror_flag=$ac_objc_werror_flag
21733   ac_objc_werror_flag=yes
21734   ac_cv_prog_objc_g=no
21735   OBJCFLAGS="-g"
21736   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21737/* end confdefs.h.  */
21738
21739int
21740main ()
21741{
21742
21743  ;
21744  return 0;
21745}
21746_ACEOF
21747if ac_fn_objc_try_compile "$LINENO"; then :
21748  ac_cv_prog_objc_g=yes
21749else
21750  OBJCFLAGS=""
21751      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21752/* end confdefs.h.  */
21753
21754int
21755main ()
21756{
21757
21758  ;
21759  return 0;
21760}
21761_ACEOF
21762if ac_fn_objc_try_compile "$LINENO"; then :
21763
21764else
21765  ac_objc_werror_flag=$ac_save_objc_werror_flag
21766	 OBJCFLAGS="-g"
21767	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21768/* end confdefs.h.  */
21769
21770int
21771main ()
21772{
21773
21774  ;
21775  return 0;
21776}
21777_ACEOF
21778if ac_fn_objc_try_compile "$LINENO"; then :
21779  ac_cv_prog_objc_g=yes
21780fi
21781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21782fi
21783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21784fi
21785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21786   ac_objc_werror_flag=$ac_save_objc_werror_flag
21787fi
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21789$as_echo "$ac_cv_prog_objc_g" >&6; }
21790if test "$ac_test_OBJCFLAGS" = set; then
21791  OBJCFLAGS=$ac_save_OBJCFLAGS
21792elif test $ac_cv_prog_objc_g = yes; then
21793  if test "$GOBJC" = yes; then
21794    OBJCFLAGS="-g -O2"
21795  else
21796    OBJCFLAGS="-g"
21797  fi
21798else
21799  if test "$GOBJC" = yes; then
21800    OBJCFLAGS="-O2"
21801  else
21802    OBJCFLAGS=
21803  fi
21804fi
21805ac_ext=cpp
21806ac_cpp='$CXXCPP $CPPFLAGS'
21807ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21808ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21809ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21810
21811
21812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21813
21814  # First separate the path from the arguments. This will split at the first
21815  # space.
21816  complete="$OBJC"
21817  path="${complete%% *}"
21818  tmp="$complete EOL"
21819  arguments="${tmp#* }"
21820
21821  # Input might be given as Windows format, start by converting to
21822  # unix format.
21823  new_path=`$CYGPATH -u "$path"`
21824
21825  # Now try to locate executable using which
21826  new_path=`$WHICH "$new_path" 2> /dev/null`
21827  # bat and cmd files are not always considered executable in cygwin causing which
21828  # to not find them
21829  if test "x$new_path" = x \
21830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21832    new_path=`$CYGPATH -u "$path"`
21833  fi
21834  if test "x$new_path" = x; then
21835    # Oops. Which didn't find the executable.
21836    # The splitting of arguments from the executable at a space might have been incorrect,
21837    # since paths with space are more likely in Windows. Give it another try with the whole
21838    # argument.
21839    path="$complete"
21840    arguments="EOL"
21841    new_path=`$CYGPATH -u "$path"`
21842    new_path=`$WHICH "$new_path" 2> /dev/null`
21843    # bat and cmd files are not always considered executable in cygwin causing which
21844    # to not find them
21845    if test "x$new_path" = x \
21846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21848      new_path=`$CYGPATH -u "$path"`
21849    fi
21850    if test "x$new_path" = x; then
21851      # It's still not found. Now this is an unrecoverable error.
21852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21853$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21854      has_space=`$ECHO "$complete" | $GREP " "`
21855      if test "x$has_space" != x; then
21856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21858      fi
21859      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21860    fi
21861  fi
21862
21863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21866  # "foo.exe" is OK but "foo" is an error.
21867  #
21868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21869  # It is also a way to make sure we got the proper file name for the real test later on.
21870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21871  if test "x$test_shortpath" = x; then
21872    # Short path failed, file does not exist as specified.
21873    # Try adding .exe or .cmd
21874    if test -f "${new_path}.exe"; then
21875      input_to_shortpath="${new_path}.exe"
21876    elif test -f "${new_path}.cmd"; then
21877      input_to_shortpath="${new_path}.cmd"
21878    else
21879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21880$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21883      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21884    fi
21885  else
21886    input_to_shortpath="$new_path"
21887  fi
21888
21889  # Call helper function which possibly converts this using DOS-style short mode.
21890  # If so, the updated path is stored in $new_path.
21891  new_path="$input_to_shortpath"
21892
21893  input_path="$input_to_shortpath"
21894  # Check if we need to convert this using DOS-style short mode. If the path
21895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21896  # take no chances and rewrite it.
21897  # Note: m4 eats our [], so we need to use [ and ] instead.
21898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21899  if test "x$has_forbidden_chars" != x; then
21900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21904      # Going to short mode and back again did indeed matter. Since short mode is
21905      # case insensitive, let's make it lowercase to improve readability.
21906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21907      # Now convert it back to Unix-stile (cygpath)
21908      input_path=`$CYGPATH -u "$shortmode_path"`
21909      new_path="$input_path"
21910    fi
21911  fi
21912
21913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21914  if test "x$test_cygdrive_prefix" = x; then
21915    # As a simple fix, exclude /usr/bin since it's not a real path.
21916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21918      # a path prefixed by /cygdrive for fixpath to work.
21919      new_path="$CYGWIN_ROOT_PATH$input_path"
21920    fi
21921  fi
21922
21923  # remove trailing .exe if any
21924  new_path="${new_path/%.exe/}"
21925
21926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21927
21928  # First separate the path from the arguments. This will split at the first
21929  # space.
21930  complete="$OBJC"
21931  path="${complete%% *}"
21932  tmp="$complete EOL"
21933  arguments="${tmp#* }"
21934
21935  # Input might be given as Windows format, start by converting to
21936  # unix format.
21937  new_path="$path"
21938
21939  windows_path="$new_path"
21940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21941    unix_path=`$CYGPATH -u "$windows_path"`
21942    new_path="$unix_path"
21943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21945    new_path="$unix_path"
21946  fi
21947
21948
21949  # Now try to locate executable using which
21950  new_path=`$WHICH "$new_path" 2> /dev/null`
21951
21952  if test "x$new_path" = x; then
21953    # Oops. Which didn't find the executable.
21954    # The splitting of arguments from the executable at a space might have been incorrect,
21955    # since paths with space are more likely in Windows. Give it another try with the whole
21956    # argument.
21957    path="$complete"
21958    arguments="EOL"
21959    new_path="$path"
21960
21961  windows_path="$new_path"
21962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21963    unix_path=`$CYGPATH -u "$windows_path"`
21964    new_path="$unix_path"
21965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21967    new_path="$unix_path"
21968  fi
21969
21970
21971    new_path=`$WHICH "$new_path" 2> /dev/null`
21972
21973    if test "x$new_path" = x; then
21974      # It's still not found. Now this is an unrecoverable error.
21975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21976$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21977      has_space=`$ECHO "$complete" | $GREP " "`
21978      if test "x$has_space" != x; then
21979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21981      fi
21982      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21983    fi
21984  fi
21985
21986  # Now new_path has a complete unix path to the binary
21987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21988    # Keep paths in /bin as-is, but remove trailing .exe if any
21989    new_path="${new_path/%.exe/}"
21990    # Do not save /bin paths to all_fixpath_prefixes!
21991  else
21992    # Not in mixed or Windows style, start by that.
21993    new_path=`cmd //c echo $new_path`
21994
21995  input_path="$new_path"
21996  # Check if we need to convert this using DOS-style short mode. If the path
21997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21998  # take no chances and rewrite it.
21999  # Note: m4 eats our [], so we need to use [ and ] instead.
22000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22001  if test "x$has_forbidden_chars" != x; then
22002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22004  fi
22005
22006    # Output is in $new_path
22007
22008  windows_path="$new_path"
22009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22010    unix_path=`$CYGPATH -u "$windows_path"`
22011    new_path="$unix_path"
22012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22014    new_path="$unix_path"
22015  fi
22016
22017    # remove trailing .exe if any
22018    new_path="${new_path/%.exe/}"
22019
22020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22022  fi
22023
22024  else
22025    # We're on a posix platform. Hooray! :)
22026    # First separate the path from the arguments. This will split at the first
22027    # space.
22028    complete="$OBJC"
22029    path="${complete%% *}"
22030    tmp="$complete EOL"
22031    arguments="${tmp#* }"
22032
22033    # Cannot rely on the command "which" here since it doesn't always work.
22034    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22035    if test -z "$is_absolute_path"; then
22036      # Path to executable is not absolute. Find it.
22037      IFS_save="$IFS"
22038      IFS=:
22039      for p in $PATH; do
22040        if test -f "$p/$path" && test -x "$p/$path"; then
22041          new_path="$p/$path"
22042          break
22043        fi
22044      done
22045      IFS="$IFS_save"
22046    else
22047      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22048$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22049      new_path="$path"
22050    fi
22051
22052    if test "x$new_path" = x; then
22053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22054$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22055      has_space=`$ECHO "$complete" | $GREP " "`
22056      if test "x$has_space" != x; then
22057        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22059      fi
22060      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22061    fi
22062  fi
22063
22064  # Now join together the path and the arguments once again
22065  if test "x$arguments" != xEOL; then
22066    new_complete="$new_path ${arguments% *}"
22067  else
22068    new_complete="$new_path"
22069  fi
22070
22071  if test "x$complete" != "x$new_complete"; then
22072    OBJC="$new_complete"
22073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22074$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22075  fi
22076
22077  else
22078    OBJC=
22079  fi
22080
22081  # Restore the flags to the user specified values.
22082  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22083  CFLAGS="$ORG_CFLAGS"
22084  CXXFLAGS="$ORG_CXXFLAGS"
22085  OBJCFLAGS="$ORG_OBJCFLAGS"
22086
22087  LD="$CC"
22088  LDEXE="$CC"
22089  LDCXX="$CXX"
22090  LDEXECXX="$CXX"
22091
22092  # LDEXE is the linker to use, when creating executables.
22093
22094  # Linking C++ libraries.
22095
22096  # Linking C++ executables.
22097
22098
22099  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22100    if test -n "$ac_tool_prefix"; then
22101  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22102set dummy ${ac_tool_prefix}ar; ac_word=$2
22103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22104$as_echo_n "checking for $ac_word... " >&6; }
22105if ${ac_cv_prog_AR+:} false; then :
22106  $as_echo_n "(cached) " >&6
22107else
22108  if test -n "$AR"; then
22109  ac_cv_prog_AR="$AR" # Let the user override the test.
22110else
22111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22112for as_dir in $PATH
22113do
22114  IFS=$as_save_IFS
22115  test -z "$as_dir" && as_dir=.
22116    for ac_exec_ext in '' $ac_executable_extensions; do
22117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22118    ac_cv_prog_AR="${ac_tool_prefix}ar"
22119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22120    break 2
22121  fi
22122done
22123  done
22124IFS=$as_save_IFS
22125
22126fi
22127fi
22128AR=$ac_cv_prog_AR
22129if test -n "$AR"; then
22130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22131$as_echo "$AR" >&6; }
22132else
22133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22134$as_echo "no" >&6; }
22135fi
22136
22137
22138fi
22139if test -z "$ac_cv_prog_AR"; then
22140  ac_ct_AR=$AR
22141  # Extract the first word of "ar", so it can be a program name with args.
22142set dummy ar; ac_word=$2
22143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22144$as_echo_n "checking for $ac_word... " >&6; }
22145if ${ac_cv_prog_ac_ct_AR+:} false; then :
22146  $as_echo_n "(cached) " >&6
22147else
22148  if test -n "$ac_ct_AR"; then
22149  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22150else
22151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22152for as_dir in $PATH
22153do
22154  IFS=$as_save_IFS
22155  test -z "$as_dir" && as_dir=.
22156    for ac_exec_ext in '' $ac_executable_extensions; do
22157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22158    ac_cv_prog_ac_ct_AR="ar"
22159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22160    break 2
22161  fi
22162done
22163  done
22164IFS=$as_save_IFS
22165
22166fi
22167fi
22168ac_ct_AR=$ac_cv_prog_ac_ct_AR
22169if test -n "$ac_ct_AR"; then
22170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22171$as_echo "$ac_ct_AR" >&6; }
22172else
22173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22174$as_echo "no" >&6; }
22175fi
22176
22177  if test "x$ac_ct_AR" = x; then
22178    AR=""
22179  else
22180    case $cross_compiling:$ac_tool_warned in
22181yes:)
22182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22184ac_tool_warned=yes ;;
22185esac
22186    AR=$ac_ct_AR
22187  fi
22188else
22189  AR="$ac_cv_prog_AR"
22190fi
22191
22192
22193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22194
22195  # First separate the path from the arguments. This will split at the first
22196  # space.
22197  complete="$AR"
22198  path="${complete%% *}"
22199  tmp="$complete EOL"
22200  arguments="${tmp#* }"
22201
22202  # Input might be given as Windows format, start by converting to
22203  # unix format.
22204  new_path=`$CYGPATH -u "$path"`
22205
22206  # Now try to locate executable using which
22207  new_path=`$WHICH "$new_path" 2> /dev/null`
22208  # bat and cmd files are not always considered executable in cygwin causing which
22209  # to not find them
22210  if test "x$new_path" = x \
22211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22213    new_path=`$CYGPATH -u "$path"`
22214  fi
22215  if test "x$new_path" = x; then
22216    # Oops. Which didn't find the executable.
22217    # The splitting of arguments from the executable at a space might have been incorrect,
22218    # since paths with space are more likely in Windows. Give it another try with the whole
22219    # argument.
22220    path="$complete"
22221    arguments="EOL"
22222    new_path=`$CYGPATH -u "$path"`
22223    new_path=`$WHICH "$new_path" 2> /dev/null`
22224    # bat and cmd files are not always considered executable in cygwin causing which
22225    # to not find them
22226    if test "x$new_path" = x \
22227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22229      new_path=`$CYGPATH -u "$path"`
22230    fi
22231    if test "x$new_path" = x; then
22232      # It's still not found. Now this is an unrecoverable error.
22233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22234$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22235      has_space=`$ECHO "$complete" | $GREP " "`
22236      if test "x$has_space" != x; then
22237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22239      fi
22240      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22241    fi
22242  fi
22243
22244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22247  # "foo.exe" is OK but "foo" is an error.
22248  #
22249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22250  # It is also a way to make sure we got the proper file name for the real test later on.
22251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22252  if test "x$test_shortpath" = x; then
22253    # Short path failed, file does not exist as specified.
22254    # Try adding .exe or .cmd
22255    if test -f "${new_path}.exe"; then
22256      input_to_shortpath="${new_path}.exe"
22257    elif test -f "${new_path}.cmd"; then
22258      input_to_shortpath="${new_path}.cmd"
22259    else
22260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22261$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22264      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22265    fi
22266  else
22267    input_to_shortpath="$new_path"
22268  fi
22269
22270  # Call helper function which possibly converts this using DOS-style short mode.
22271  # If so, the updated path is stored in $new_path.
22272  new_path="$input_to_shortpath"
22273
22274  input_path="$input_to_shortpath"
22275  # Check if we need to convert this using DOS-style short mode. If the path
22276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22277  # take no chances and rewrite it.
22278  # Note: m4 eats our [], so we need to use [ and ] instead.
22279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22280  if test "x$has_forbidden_chars" != x; then
22281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22285      # Going to short mode and back again did indeed matter. Since short mode is
22286      # case insensitive, let's make it lowercase to improve readability.
22287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22288      # Now convert it back to Unix-stile (cygpath)
22289      input_path=`$CYGPATH -u "$shortmode_path"`
22290      new_path="$input_path"
22291    fi
22292  fi
22293
22294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22295  if test "x$test_cygdrive_prefix" = x; then
22296    # As a simple fix, exclude /usr/bin since it's not a real path.
22297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22299      # a path prefixed by /cygdrive for fixpath to work.
22300      new_path="$CYGWIN_ROOT_PATH$input_path"
22301    fi
22302  fi
22303
22304  # remove trailing .exe if any
22305  new_path="${new_path/%.exe/}"
22306
22307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22308
22309  # First separate the path from the arguments. This will split at the first
22310  # space.
22311  complete="$AR"
22312  path="${complete%% *}"
22313  tmp="$complete EOL"
22314  arguments="${tmp#* }"
22315
22316  # Input might be given as Windows format, start by converting to
22317  # unix format.
22318  new_path="$path"
22319
22320  windows_path="$new_path"
22321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22322    unix_path=`$CYGPATH -u "$windows_path"`
22323    new_path="$unix_path"
22324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22326    new_path="$unix_path"
22327  fi
22328
22329
22330  # Now try to locate executable using which
22331  new_path=`$WHICH "$new_path" 2> /dev/null`
22332
22333  if test "x$new_path" = x; then
22334    # Oops. Which didn't find the executable.
22335    # The splitting of arguments from the executable at a space might have been incorrect,
22336    # since paths with space are more likely in Windows. Give it another try with the whole
22337    # argument.
22338    path="$complete"
22339    arguments="EOL"
22340    new_path="$path"
22341
22342  windows_path="$new_path"
22343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22344    unix_path=`$CYGPATH -u "$windows_path"`
22345    new_path="$unix_path"
22346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22348    new_path="$unix_path"
22349  fi
22350
22351
22352    new_path=`$WHICH "$new_path" 2> /dev/null`
22353
22354    if test "x$new_path" = x; then
22355      # It's still not found. Now this is an unrecoverable error.
22356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22357$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22358      has_space=`$ECHO "$complete" | $GREP " "`
22359      if test "x$has_space" != x; then
22360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22362      fi
22363      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22364    fi
22365  fi
22366
22367  # Now new_path has a complete unix path to the binary
22368  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22369    # Keep paths in /bin as-is, but remove trailing .exe if any
22370    new_path="${new_path/%.exe/}"
22371    # Do not save /bin paths to all_fixpath_prefixes!
22372  else
22373    # Not in mixed or Windows style, start by that.
22374    new_path=`cmd //c echo $new_path`
22375
22376  input_path="$new_path"
22377  # Check if we need to convert this using DOS-style short mode. If the path
22378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22379  # take no chances and rewrite it.
22380  # Note: m4 eats our [], so we need to use [ and ] instead.
22381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22382  if test "x$has_forbidden_chars" != x; then
22383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22385  fi
22386
22387    # Output is in $new_path
22388
22389  windows_path="$new_path"
22390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22391    unix_path=`$CYGPATH -u "$windows_path"`
22392    new_path="$unix_path"
22393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22395    new_path="$unix_path"
22396  fi
22397
22398    # remove trailing .exe if any
22399    new_path="${new_path/%.exe/}"
22400
22401    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22402    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22403  fi
22404
22405  else
22406    # We're on a posix platform. Hooray! :)
22407    # First separate the path from the arguments. This will split at the first
22408    # space.
22409    complete="$AR"
22410    path="${complete%% *}"
22411    tmp="$complete EOL"
22412    arguments="${tmp#* }"
22413
22414    # Cannot rely on the command "which" here since it doesn't always work.
22415    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22416    if test -z "$is_absolute_path"; then
22417      # Path to executable is not absolute. Find it.
22418      IFS_save="$IFS"
22419      IFS=:
22420      for p in $PATH; do
22421        if test -f "$p/$path" && test -x "$p/$path"; then
22422          new_path="$p/$path"
22423          break
22424        fi
22425      done
22426      IFS="$IFS_save"
22427    else
22428      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22429$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22430      new_path="$path"
22431    fi
22432
22433    if test "x$new_path" = x; then
22434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22435$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22436      has_space=`$ECHO "$complete" | $GREP " "`
22437      if test "x$has_space" != x; then
22438        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22439$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22440      fi
22441      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22442    fi
22443  fi
22444
22445  # Now join together the path and the arguments once again
22446  if test "x$arguments" != xEOL; then
22447    new_complete="$new_path ${arguments% *}"
22448  else
22449    new_complete="$new_path"
22450  fi
22451
22452  if test "x$complete" != "x$new_complete"; then
22453    AR="$new_complete"
22454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22455$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22456  fi
22457
22458  fi
22459  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22460    ARFLAGS="-r"
22461  else
22462    ARFLAGS=""
22463  fi
22464
22465
22466  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22467  HOTSPOT_CXX="$CXX"
22468  HOTSPOT_LD="$LD"
22469
22470
22471
22472  COMPILER_NAME=gcc
22473  COMPILER_TYPE=CC
22474  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22475
22476    # For now, assume that we are always compiling using cl.exe.
22477    CC_OUT_OPTION=-Fo
22478    EXE_OUT_OPTION=-out:
22479    LD_OUT_OPTION=-out:
22480    AR_OUT_OPTION=-out:
22481    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22482    # program for something completely different.
22483    # Extract the first word of "link", so it can be a program name with args.
22484set dummy link; ac_word=$2
22485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22486$as_echo_n "checking for $ac_word... " >&6; }
22487if ${ac_cv_prog_WINLD+:} false; then :
22488  $as_echo_n "(cached) " >&6
22489else
22490  if test -n "$WINLD"; then
22491  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22492else
22493  ac_prog_rejected=no
22494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22495for as_dir in $PATH
22496do
22497  IFS=$as_save_IFS
22498  test -z "$as_dir" && as_dir=.
22499    for ac_exec_ext in '' $ac_executable_extensions; do
22500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22501    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22502       ac_prog_rejected=yes
22503       continue
22504     fi
22505    ac_cv_prog_WINLD="link"
22506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22507    break 2
22508  fi
22509done
22510  done
22511IFS=$as_save_IFS
22512
22513if test $ac_prog_rejected = yes; then
22514  # We found a bogon in the path, so make sure we never use it.
22515  set dummy $ac_cv_prog_WINLD
22516  shift
22517  if test $# != 0; then
22518    # We chose a different compiler from the bogus one.
22519    # However, it has the same basename, so the bogon will be chosen
22520    # first if we set WINLD to just the basename; use the full file name.
22521    shift
22522    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22523  fi
22524fi
22525fi
22526fi
22527WINLD=$ac_cv_prog_WINLD
22528if test -n "$WINLD"; then
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22530$as_echo "$WINLD" >&6; }
22531else
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22533$as_echo "no" >&6; }
22534fi
22535
22536
22537    # Since we must ignore the first found link, WINLD will contain
22538    # the full path to the link.exe program.
22539
22540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22541
22542  # First separate the path from the arguments. This will split at the first
22543  # space.
22544  complete="$WINLD"
22545  path="${complete%% *}"
22546  tmp="$complete EOL"
22547  arguments="${tmp#* }"
22548
22549  # Input might be given as Windows format, start by converting to
22550  # unix format.
22551  new_path=`$CYGPATH -u "$path"`
22552
22553  # Now try to locate executable using which
22554  new_path=`$WHICH "$new_path" 2> /dev/null`
22555  # bat and cmd files are not always considered executable in cygwin causing which
22556  # to not find them
22557  if test "x$new_path" = x \
22558      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22559      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22560    new_path=`$CYGPATH -u "$path"`
22561  fi
22562  if test "x$new_path" = x; then
22563    # Oops. Which didn't find the executable.
22564    # The splitting of arguments from the executable at a space might have been incorrect,
22565    # since paths with space are more likely in Windows. Give it another try with the whole
22566    # argument.
22567    path="$complete"
22568    arguments="EOL"
22569    new_path=`$CYGPATH -u "$path"`
22570    new_path=`$WHICH "$new_path" 2> /dev/null`
22571    # bat and cmd files are not always considered executable in cygwin causing which
22572    # to not find them
22573    if test "x$new_path" = x \
22574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22576      new_path=`$CYGPATH -u "$path"`
22577    fi
22578    if test "x$new_path" = x; then
22579      # It's still not found. Now this is an unrecoverable error.
22580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22581$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22582      has_space=`$ECHO "$complete" | $GREP " "`
22583      if test "x$has_space" != x; then
22584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22586      fi
22587      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22588    fi
22589  fi
22590
22591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22594  # "foo.exe" is OK but "foo" is an error.
22595  #
22596  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22597  # It is also a way to make sure we got the proper file name for the real test later on.
22598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22599  if test "x$test_shortpath" = x; then
22600    # Short path failed, file does not exist as specified.
22601    # Try adding .exe or .cmd
22602    if test -f "${new_path}.exe"; then
22603      input_to_shortpath="${new_path}.exe"
22604    elif test -f "${new_path}.cmd"; then
22605      input_to_shortpath="${new_path}.cmd"
22606    else
22607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22608$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22611      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22612    fi
22613  else
22614    input_to_shortpath="$new_path"
22615  fi
22616
22617  # Call helper function which possibly converts this using DOS-style short mode.
22618  # If so, the updated path is stored in $new_path.
22619  new_path="$input_to_shortpath"
22620
22621  input_path="$input_to_shortpath"
22622  # Check if we need to convert this using DOS-style short mode. If the path
22623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22624  # take no chances and rewrite it.
22625  # Note: m4 eats our [], so we need to use [ and ] instead.
22626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22627  if test "x$has_forbidden_chars" != x; then
22628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22632      # Going to short mode and back again did indeed matter. Since short mode is
22633      # case insensitive, let's make it lowercase to improve readability.
22634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22635      # Now convert it back to Unix-stile (cygpath)
22636      input_path=`$CYGPATH -u "$shortmode_path"`
22637      new_path="$input_path"
22638    fi
22639  fi
22640
22641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22642  if test "x$test_cygdrive_prefix" = x; then
22643    # As a simple fix, exclude /usr/bin since it's not a real path.
22644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22646      # a path prefixed by /cygdrive for fixpath to work.
22647      new_path="$CYGWIN_ROOT_PATH$input_path"
22648    fi
22649  fi
22650
22651  # remove trailing .exe if any
22652  new_path="${new_path/%.exe/}"
22653
22654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22655
22656  # First separate the path from the arguments. This will split at the first
22657  # space.
22658  complete="$WINLD"
22659  path="${complete%% *}"
22660  tmp="$complete EOL"
22661  arguments="${tmp#* }"
22662
22663  # Input might be given as Windows format, start by converting to
22664  # unix format.
22665  new_path="$path"
22666
22667  windows_path="$new_path"
22668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22669    unix_path=`$CYGPATH -u "$windows_path"`
22670    new_path="$unix_path"
22671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22673    new_path="$unix_path"
22674  fi
22675
22676
22677  # Now try to locate executable using which
22678  new_path=`$WHICH "$new_path" 2> /dev/null`
22679
22680  if test "x$new_path" = x; then
22681    # Oops. Which didn't find the executable.
22682    # The splitting of arguments from the executable at a space might have been incorrect,
22683    # since paths with space are more likely in Windows. Give it another try with the whole
22684    # argument.
22685    path="$complete"
22686    arguments="EOL"
22687    new_path="$path"
22688
22689  windows_path="$new_path"
22690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22691    unix_path=`$CYGPATH -u "$windows_path"`
22692    new_path="$unix_path"
22693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22695    new_path="$unix_path"
22696  fi
22697
22698
22699    new_path=`$WHICH "$new_path" 2> /dev/null`
22700
22701    if test "x$new_path" = x; then
22702      # It's still not found. Now this is an unrecoverable error.
22703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22704$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22705      has_space=`$ECHO "$complete" | $GREP " "`
22706      if test "x$has_space" != x; then
22707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22709      fi
22710      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22711    fi
22712  fi
22713
22714  # Now new_path has a complete unix path to the binary
22715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22716    # Keep paths in /bin as-is, but remove trailing .exe if any
22717    new_path="${new_path/%.exe/}"
22718    # Do not save /bin paths to all_fixpath_prefixes!
22719  else
22720    # Not in mixed or Windows style, start by that.
22721    new_path=`cmd //c echo $new_path`
22722
22723  input_path="$new_path"
22724  # Check if we need to convert this using DOS-style short mode. If the path
22725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22726  # take no chances and rewrite it.
22727  # Note: m4 eats our [], so we need to use [ and ] instead.
22728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22729  if test "x$has_forbidden_chars" != x; then
22730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22732  fi
22733
22734    # Output is in $new_path
22735
22736  windows_path="$new_path"
22737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22738    unix_path=`$CYGPATH -u "$windows_path"`
22739    new_path="$unix_path"
22740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22742    new_path="$unix_path"
22743  fi
22744
22745    # remove trailing .exe if any
22746    new_path="${new_path/%.exe/}"
22747
22748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22750  fi
22751
22752  else
22753    # We're on a posix platform. Hooray! :)
22754    # First separate the path from the arguments. This will split at the first
22755    # space.
22756    complete="$WINLD"
22757    path="${complete%% *}"
22758    tmp="$complete EOL"
22759    arguments="${tmp#* }"
22760
22761    # Cannot rely on the command "which" here since it doesn't always work.
22762    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22763    if test -z "$is_absolute_path"; then
22764      # Path to executable is not absolute. Find it.
22765      IFS_save="$IFS"
22766      IFS=:
22767      for p in $PATH; do
22768        if test -f "$p/$path" && test -x "$p/$path"; then
22769          new_path="$p/$path"
22770          break
22771        fi
22772      done
22773      IFS="$IFS_save"
22774    else
22775      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22776$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22777      new_path="$path"
22778    fi
22779
22780    if test "x$new_path" = x; then
22781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22782$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22783      has_space=`$ECHO "$complete" | $GREP " "`
22784      if test "x$has_space" != x; then
22785        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22787      fi
22788      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22789    fi
22790  fi
22791
22792  # Now join together the path and the arguments once again
22793  if test "x$arguments" != xEOL; then
22794    new_complete="$new_path ${arguments% *}"
22795  else
22796    new_complete="$new_path"
22797  fi
22798
22799  if test "x$complete" != "x$new_complete"; then
22800    WINLD="$new_complete"
22801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22802$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22803  fi
22804
22805    printf "Windows linker was found at $WINLD\n"
22806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22807$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22808    "$WINLD" --version > /dev/null
22809    if test $? -eq 0 ; then
22810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22811$as_echo "no" >&6; }
22812      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22813    else
22814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22815$as_echo "yes" >&6; }
22816    fi
22817    LD="$WINLD"
22818    LDEXE="$WINLD"
22819    LDCXX="$WINLD"
22820    LDEXECXX="$WINLD"
22821
22822    # Extract the first word of "mt", so it can be a program name with args.
22823set dummy mt; ac_word=$2
22824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22825$as_echo_n "checking for $ac_word... " >&6; }
22826if ${ac_cv_prog_MT+:} false; then :
22827  $as_echo_n "(cached) " >&6
22828else
22829  if test -n "$MT"; then
22830  ac_cv_prog_MT="$MT" # Let the user override the test.
22831else
22832  ac_prog_rejected=no
22833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22834for as_dir in $PATH
22835do
22836  IFS=$as_save_IFS
22837  test -z "$as_dir" && as_dir=.
22838    for ac_exec_ext in '' $ac_executable_extensions; do
22839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22840    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22841       ac_prog_rejected=yes
22842       continue
22843     fi
22844    ac_cv_prog_MT="mt"
22845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22846    break 2
22847  fi
22848done
22849  done
22850IFS=$as_save_IFS
22851
22852if test $ac_prog_rejected = yes; then
22853  # We found a bogon in the path, so make sure we never use it.
22854  set dummy $ac_cv_prog_MT
22855  shift
22856  if test $# != 0; then
22857    # We chose a different compiler from the bogus one.
22858    # However, it has the same basename, so the bogon will be chosen
22859    # first if we set MT to just the basename; use the full file name.
22860    shift
22861    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22862  fi
22863fi
22864fi
22865fi
22866MT=$ac_cv_prog_MT
22867if test -n "$MT"; then
22868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22869$as_echo "$MT" >&6; }
22870else
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22872$as_echo "no" >&6; }
22873fi
22874
22875
22876
22877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22878
22879  # First separate the path from the arguments. This will split at the first
22880  # space.
22881  complete="$MT"
22882  path="${complete%% *}"
22883  tmp="$complete EOL"
22884  arguments="${tmp#* }"
22885
22886  # Input might be given as Windows format, start by converting to
22887  # unix format.
22888  new_path=`$CYGPATH -u "$path"`
22889
22890  # Now try to locate executable using which
22891  new_path=`$WHICH "$new_path" 2> /dev/null`
22892  # bat and cmd files are not always considered executable in cygwin causing which
22893  # to not find them
22894  if test "x$new_path" = x \
22895      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22896      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22897    new_path=`$CYGPATH -u "$path"`
22898  fi
22899  if test "x$new_path" = x; then
22900    # Oops. Which didn't find the executable.
22901    # The splitting of arguments from the executable at a space might have been incorrect,
22902    # since paths with space are more likely in Windows. Give it another try with the whole
22903    # argument.
22904    path="$complete"
22905    arguments="EOL"
22906    new_path=`$CYGPATH -u "$path"`
22907    new_path=`$WHICH "$new_path" 2> /dev/null`
22908    # bat and cmd files are not always considered executable in cygwin causing which
22909    # to not find them
22910    if test "x$new_path" = x \
22911        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22912        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22913      new_path=`$CYGPATH -u "$path"`
22914    fi
22915    if test "x$new_path" = x; then
22916      # It's still not found. Now this is an unrecoverable error.
22917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22918$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22919      has_space=`$ECHO "$complete" | $GREP " "`
22920      if test "x$has_space" != x; then
22921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22923      fi
22924      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22925    fi
22926  fi
22927
22928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22931  # "foo.exe" is OK but "foo" is an error.
22932  #
22933  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22934  # It is also a way to make sure we got the proper file name for the real test later on.
22935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22936  if test "x$test_shortpath" = x; then
22937    # Short path failed, file does not exist as specified.
22938    # Try adding .exe or .cmd
22939    if test -f "${new_path}.exe"; then
22940      input_to_shortpath="${new_path}.exe"
22941    elif test -f "${new_path}.cmd"; then
22942      input_to_shortpath="${new_path}.cmd"
22943    else
22944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22945$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22946      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22947$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22948      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22949    fi
22950  else
22951    input_to_shortpath="$new_path"
22952  fi
22953
22954  # Call helper function which possibly converts this using DOS-style short mode.
22955  # If so, the updated path is stored in $new_path.
22956  new_path="$input_to_shortpath"
22957
22958  input_path="$input_to_shortpath"
22959  # Check if we need to convert this using DOS-style short mode. If the path
22960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22961  # take no chances and rewrite it.
22962  # Note: m4 eats our [], so we need to use [ and ] instead.
22963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22964  if test "x$has_forbidden_chars" != x; then
22965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22969      # Going to short mode and back again did indeed matter. Since short mode is
22970      # case insensitive, let's make it lowercase to improve readability.
22971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22972      # Now convert it back to Unix-stile (cygpath)
22973      input_path=`$CYGPATH -u "$shortmode_path"`
22974      new_path="$input_path"
22975    fi
22976  fi
22977
22978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22979  if test "x$test_cygdrive_prefix" = x; then
22980    # As a simple fix, exclude /usr/bin since it's not a real path.
22981    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22983      # a path prefixed by /cygdrive for fixpath to work.
22984      new_path="$CYGWIN_ROOT_PATH$input_path"
22985    fi
22986  fi
22987
22988  # remove trailing .exe if any
22989  new_path="${new_path/%.exe/}"
22990
22991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22992
22993  # First separate the path from the arguments. This will split at the first
22994  # space.
22995  complete="$MT"
22996  path="${complete%% *}"
22997  tmp="$complete EOL"
22998  arguments="${tmp#* }"
22999
23000  # Input might be given as Windows format, start by converting to
23001  # unix format.
23002  new_path="$path"
23003
23004  windows_path="$new_path"
23005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23006    unix_path=`$CYGPATH -u "$windows_path"`
23007    new_path="$unix_path"
23008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23010    new_path="$unix_path"
23011  fi
23012
23013
23014  # Now try to locate executable using which
23015  new_path=`$WHICH "$new_path" 2> /dev/null`
23016
23017  if test "x$new_path" = x; then
23018    # Oops. Which didn't find the executable.
23019    # The splitting of arguments from the executable at a space might have been incorrect,
23020    # since paths with space are more likely in Windows. Give it another try with the whole
23021    # argument.
23022    path="$complete"
23023    arguments="EOL"
23024    new_path="$path"
23025
23026  windows_path="$new_path"
23027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23028    unix_path=`$CYGPATH -u "$windows_path"`
23029    new_path="$unix_path"
23030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23032    new_path="$unix_path"
23033  fi
23034
23035
23036    new_path=`$WHICH "$new_path" 2> /dev/null`
23037
23038    if test "x$new_path" = x; then
23039      # It's still not found. Now this is an unrecoverable error.
23040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23041$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23042      has_space=`$ECHO "$complete" | $GREP " "`
23043      if test "x$has_space" != x; then
23044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23046      fi
23047      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23048    fi
23049  fi
23050
23051  # Now new_path has a complete unix path to the binary
23052  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23053    # Keep paths in /bin as-is, but remove trailing .exe if any
23054    new_path="${new_path/%.exe/}"
23055    # Do not save /bin paths to all_fixpath_prefixes!
23056  else
23057    # Not in mixed or Windows style, start by that.
23058    new_path=`cmd //c echo $new_path`
23059
23060  input_path="$new_path"
23061  # Check if we need to convert this using DOS-style short mode. If the path
23062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23063  # take no chances and rewrite it.
23064  # Note: m4 eats our [], so we need to use [ and ] instead.
23065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23066  if test "x$has_forbidden_chars" != x; then
23067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23069  fi
23070
23071    # Output is in $new_path
23072
23073  windows_path="$new_path"
23074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23075    unix_path=`$CYGPATH -u "$windows_path"`
23076    new_path="$unix_path"
23077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23079    new_path="$unix_path"
23080  fi
23081
23082    # remove trailing .exe if any
23083    new_path="${new_path/%.exe/}"
23084
23085    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23086    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23087  fi
23088
23089  else
23090    # We're on a posix platform. Hooray! :)
23091    # First separate the path from the arguments. This will split at the first
23092    # space.
23093    complete="$MT"
23094    path="${complete%% *}"
23095    tmp="$complete EOL"
23096    arguments="${tmp#* }"
23097
23098    # Cannot rely on the command "which" here since it doesn't always work.
23099    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23100    if test -z "$is_absolute_path"; then
23101      # Path to executable is not absolute. Find it.
23102      IFS_save="$IFS"
23103      IFS=:
23104      for p in $PATH; do
23105        if test -f "$p/$path" && test -x "$p/$path"; then
23106          new_path="$p/$path"
23107          break
23108        fi
23109      done
23110      IFS="$IFS_save"
23111    else
23112      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23113$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23114      new_path="$path"
23115    fi
23116
23117    if test "x$new_path" = x; then
23118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23119$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23120      has_space=`$ECHO "$complete" | $GREP " "`
23121      if test "x$has_space" != x; then
23122        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23123$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23124      fi
23125      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23126    fi
23127  fi
23128
23129  # Now join together the path and the arguments once again
23130  if test "x$arguments" != xEOL; then
23131    new_complete="$new_path ${arguments% *}"
23132  else
23133    new_complete="$new_path"
23134  fi
23135
23136  if test "x$complete" != "x$new_complete"; then
23137    MT="$new_complete"
23138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23139$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23140  fi
23141
23142    # The resource compiler
23143    # Extract the first word of "rc", so it can be a program name with args.
23144set dummy rc; ac_word=$2
23145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23146$as_echo_n "checking for $ac_word... " >&6; }
23147if ${ac_cv_prog_RC+:} false; then :
23148  $as_echo_n "(cached) " >&6
23149else
23150  if test -n "$RC"; then
23151  ac_cv_prog_RC="$RC" # Let the user override the test.
23152else
23153  ac_prog_rejected=no
23154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23155for as_dir in $PATH
23156do
23157  IFS=$as_save_IFS
23158  test -z "$as_dir" && as_dir=.
23159    for ac_exec_ext in '' $ac_executable_extensions; do
23160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23161    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23162       ac_prog_rejected=yes
23163       continue
23164     fi
23165    ac_cv_prog_RC="rc"
23166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23167    break 2
23168  fi
23169done
23170  done
23171IFS=$as_save_IFS
23172
23173if test $ac_prog_rejected = yes; then
23174  # We found a bogon in the path, so make sure we never use it.
23175  set dummy $ac_cv_prog_RC
23176  shift
23177  if test $# != 0; then
23178    # We chose a different compiler from the bogus one.
23179    # However, it has the same basename, so the bogon will be chosen
23180    # first if we set RC to just the basename; use the full file name.
23181    shift
23182    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23183  fi
23184fi
23185fi
23186fi
23187RC=$ac_cv_prog_RC
23188if test -n "$RC"; then
23189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23190$as_echo "$RC" >&6; }
23191else
23192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23193$as_echo "no" >&6; }
23194fi
23195
23196
23197
23198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23199
23200  # First separate the path from the arguments. This will split at the first
23201  # space.
23202  complete="$RC"
23203  path="${complete%% *}"
23204  tmp="$complete EOL"
23205  arguments="${tmp#* }"
23206
23207  # Input might be given as Windows format, start by converting to
23208  # unix format.
23209  new_path=`$CYGPATH -u "$path"`
23210
23211  # Now try to locate executable using which
23212  new_path=`$WHICH "$new_path" 2> /dev/null`
23213  # bat and cmd files are not always considered executable in cygwin causing which
23214  # to not find them
23215  if test "x$new_path" = x \
23216      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23217      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23218    new_path=`$CYGPATH -u "$path"`
23219  fi
23220  if test "x$new_path" = x; then
23221    # Oops. Which didn't find the executable.
23222    # The splitting of arguments from the executable at a space might have been incorrect,
23223    # since paths with space are more likely in Windows. Give it another try with the whole
23224    # argument.
23225    path="$complete"
23226    arguments="EOL"
23227    new_path=`$CYGPATH -u "$path"`
23228    new_path=`$WHICH "$new_path" 2> /dev/null`
23229    # bat and cmd files are not always considered executable in cygwin causing which
23230    # to not find them
23231    if test "x$new_path" = x \
23232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23234      new_path=`$CYGPATH -u "$path"`
23235    fi
23236    if test "x$new_path" = x; then
23237      # It's still not found. Now this is an unrecoverable error.
23238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23239$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23240      has_space=`$ECHO "$complete" | $GREP " "`
23241      if test "x$has_space" != x; then
23242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23244      fi
23245      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23246    fi
23247  fi
23248
23249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23252  # "foo.exe" is OK but "foo" is an error.
23253  #
23254  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23255  # It is also a way to make sure we got the proper file name for the real test later on.
23256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23257  if test "x$test_shortpath" = x; then
23258    # Short path failed, file does not exist as specified.
23259    # Try adding .exe or .cmd
23260    if test -f "${new_path}.exe"; then
23261      input_to_shortpath="${new_path}.exe"
23262    elif test -f "${new_path}.cmd"; then
23263      input_to_shortpath="${new_path}.cmd"
23264    else
23265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23266$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23267      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23268$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23269      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23270    fi
23271  else
23272    input_to_shortpath="$new_path"
23273  fi
23274
23275  # Call helper function which possibly converts this using DOS-style short mode.
23276  # If so, the updated path is stored in $new_path.
23277  new_path="$input_to_shortpath"
23278
23279  input_path="$input_to_shortpath"
23280  # Check if we need to convert this using DOS-style short mode. If the path
23281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23282  # take no chances and rewrite it.
23283  # Note: m4 eats our [], so we need to use [ and ] instead.
23284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23285  if test "x$has_forbidden_chars" != x; then
23286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23290      # Going to short mode and back again did indeed matter. Since short mode is
23291      # case insensitive, let's make it lowercase to improve readability.
23292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23293      # Now convert it back to Unix-stile (cygpath)
23294      input_path=`$CYGPATH -u "$shortmode_path"`
23295      new_path="$input_path"
23296    fi
23297  fi
23298
23299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23300  if test "x$test_cygdrive_prefix" = x; then
23301    # As a simple fix, exclude /usr/bin since it's not a real path.
23302    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23304      # a path prefixed by /cygdrive for fixpath to work.
23305      new_path="$CYGWIN_ROOT_PATH$input_path"
23306    fi
23307  fi
23308
23309  # remove trailing .exe if any
23310  new_path="${new_path/%.exe/}"
23311
23312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23313
23314  # First separate the path from the arguments. This will split at the first
23315  # space.
23316  complete="$RC"
23317  path="${complete%% *}"
23318  tmp="$complete EOL"
23319  arguments="${tmp#* }"
23320
23321  # Input might be given as Windows format, start by converting to
23322  # unix format.
23323  new_path="$path"
23324
23325  windows_path="$new_path"
23326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23327    unix_path=`$CYGPATH -u "$windows_path"`
23328    new_path="$unix_path"
23329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23331    new_path="$unix_path"
23332  fi
23333
23334
23335  # Now try to locate executable using which
23336  new_path=`$WHICH "$new_path" 2> /dev/null`
23337
23338  if test "x$new_path" = x; then
23339    # Oops. Which didn't find the executable.
23340    # The splitting of arguments from the executable at a space might have been incorrect,
23341    # since paths with space are more likely in Windows. Give it another try with the whole
23342    # argument.
23343    path="$complete"
23344    arguments="EOL"
23345    new_path="$path"
23346
23347  windows_path="$new_path"
23348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23349    unix_path=`$CYGPATH -u "$windows_path"`
23350    new_path="$unix_path"
23351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23353    new_path="$unix_path"
23354  fi
23355
23356
23357    new_path=`$WHICH "$new_path" 2> /dev/null`
23358
23359    if test "x$new_path" = x; then
23360      # It's still not found. Now this is an unrecoverable error.
23361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23362$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23363      has_space=`$ECHO "$complete" | $GREP " "`
23364      if test "x$has_space" != x; then
23365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23367      fi
23368      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23369    fi
23370  fi
23371
23372  # Now new_path has a complete unix path to the binary
23373  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23374    # Keep paths in /bin as-is, but remove trailing .exe if any
23375    new_path="${new_path/%.exe/}"
23376    # Do not save /bin paths to all_fixpath_prefixes!
23377  else
23378    # Not in mixed or Windows style, start by that.
23379    new_path=`cmd //c echo $new_path`
23380
23381  input_path="$new_path"
23382  # Check if we need to convert this using DOS-style short mode. If the path
23383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23384  # take no chances and rewrite it.
23385  # Note: m4 eats our [], so we need to use [ and ] instead.
23386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23387  if test "x$has_forbidden_chars" != x; then
23388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23390  fi
23391
23392    # Output is in $new_path
23393
23394  windows_path="$new_path"
23395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23396    unix_path=`$CYGPATH -u "$windows_path"`
23397    new_path="$unix_path"
23398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23400    new_path="$unix_path"
23401  fi
23402
23403    # remove trailing .exe if any
23404    new_path="${new_path/%.exe/}"
23405
23406    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23407    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23408  fi
23409
23410  else
23411    # We're on a posix platform. Hooray! :)
23412    # First separate the path from the arguments. This will split at the first
23413    # space.
23414    complete="$RC"
23415    path="${complete%% *}"
23416    tmp="$complete EOL"
23417    arguments="${tmp#* }"
23418
23419    # Cannot rely on the command "which" here since it doesn't always work.
23420    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23421    if test -z "$is_absolute_path"; then
23422      # Path to executable is not absolute. Find it.
23423      IFS_save="$IFS"
23424      IFS=:
23425      for p in $PATH; do
23426        if test -f "$p/$path" && test -x "$p/$path"; then
23427          new_path="$p/$path"
23428          break
23429        fi
23430      done
23431      IFS="$IFS_save"
23432    else
23433      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23434$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23435      new_path="$path"
23436    fi
23437
23438    if test "x$new_path" = x; then
23439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23440$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23441      has_space=`$ECHO "$complete" | $GREP " "`
23442      if test "x$has_space" != x; then
23443        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23445      fi
23446      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23447    fi
23448  fi
23449
23450  # Now join together the path and the arguments once again
23451  if test "x$arguments" != xEOL; then
23452    new_complete="$new_path ${arguments% *}"
23453  else
23454    new_complete="$new_path"
23455  fi
23456
23457  if test "x$complete" != "x$new_complete"; then
23458    RC="$new_complete"
23459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23460$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23461  fi
23462
23463
23464    # For hotspot, we need these in Windows mixed path,
23465    # so rewrite them all. Need added .exe suffix.
23466    HOTSPOT_CXX="$CXX.exe"
23467    HOTSPOT_LD="$LD.exe"
23468    HOTSPOT_MT="$MT.exe"
23469    HOTSPOT_RC="$RC.exe"
23470
23471  unix_path="$HOTSPOT_CXX"
23472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23473    windows_path=`$CYGPATH -m "$unix_path"`
23474    HOTSPOT_CXX="$windows_path"
23475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23476    windows_path=`cmd //c echo $unix_path`
23477    HOTSPOT_CXX="$windows_path"
23478  fi
23479
23480
23481  unix_path="$HOTSPOT_LD"
23482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23483    windows_path=`$CYGPATH -m "$unix_path"`
23484    HOTSPOT_LD="$windows_path"
23485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23486    windows_path=`cmd //c echo $unix_path`
23487    HOTSPOT_LD="$windows_path"
23488  fi
23489
23490
23491  unix_path="$HOTSPOT_MT"
23492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23493    windows_path=`$CYGPATH -m "$unix_path"`
23494    HOTSPOT_MT="$windows_path"
23495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23496    windows_path=`cmd //c echo $unix_path`
23497    HOTSPOT_MT="$windows_path"
23498  fi
23499
23500
23501  unix_path="$HOTSPOT_RC"
23502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23503    windows_path=`$CYGPATH -m "$unix_path"`
23504    HOTSPOT_RC="$windows_path"
23505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23506    windows_path=`cmd //c echo $unix_path`
23507    HOTSPOT_RC="$windows_path"
23508  fi
23509
23510
23511
23512
23513    RC_FLAGS="-nologo -l 0x409 -r"
23514    if test "x$VARIANT" = xOPT; then :
23515
23516    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23517
23518fi
23519
23520  # The version variables used to create RC_FLAGS may be overridden
23521  # in a custom configure script, or possibly the command line.
23522  # Let those variables be expanded at make time in spec.gmk.
23523  # The \$ are escaped to the shell, and the $(...) variables
23524  # are evaluated by make.
23525  RC_FLAGS="$RC_FLAGS \
23526      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23527      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23528      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23529      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23530      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23531      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23532      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23533
23534  # lib.exe is used to create static libraries.
23535  # Extract the first word of "lib", so it can be a program name with args.
23536set dummy lib; ac_word=$2
23537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23538$as_echo_n "checking for $ac_word... " >&6; }
23539if ${ac_cv_prog_WINAR+:} false; then :
23540  $as_echo_n "(cached) " >&6
23541else
23542  if test -n "$WINAR"; then
23543  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23544else
23545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23546for as_dir in $PATH
23547do
23548  IFS=$as_save_IFS
23549  test -z "$as_dir" && as_dir=.
23550    for ac_exec_ext in '' $ac_executable_extensions; do
23551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23552    ac_cv_prog_WINAR="lib"
23553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23554    break 2
23555  fi
23556done
23557  done
23558IFS=$as_save_IFS
23559
23560fi
23561fi
23562WINAR=$ac_cv_prog_WINAR
23563if test -n "$WINAR"; then
23564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23565$as_echo "$WINAR" >&6; }
23566else
23567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23568$as_echo "no" >&6; }
23569fi
23570
23571
23572
23573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23574
23575  # First separate the path from the arguments. This will split at the first
23576  # space.
23577  complete="$WINAR"
23578  path="${complete%% *}"
23579  tmp="$complete EOL"
23580  arguments="${tmp#* }"
23581
23582  # Input might be given as Windows format, start by converting to
23583  # unix format.
23584  new_path=`$CYGPATH -u "$path"`
23585
23586  # Now try to locate executable using which
23587  new_path=`$WHICH "$new_path" 2> /dev/null`
23588  # bat and cmd files are not always considered executable in cygwin causing which
23589  # to not find them
23590  if test "x$new_path" = x \
23591      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23592      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23593    new_path=`$CYGPATH -u "$path"`
23594  fi
23595  if test "x$new_path" = x; then
23596    # Oops. Which didn't find the executable.
23597    # The splitting of arguments from the executable at a space might have been incorrect,
23598    # since paths with space are more likely in Windows. Give it another try with the whole
23599    # argument.
23600    path="$complete"
23601    arguments="EOL"
23602    new_path=`$CYGPATH -u "$path"`
23603    new_path=`$WHICH "$new_path" 2> /dev/null`
23604    # bat and cmd files are not always considered executable in cygwin causing which
23605    # to not find them
23606    if test "x$new_path" = x \
23607        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23608        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23609      new_path=`$CYGPATH -u "$path"`
23610    fi
23611    if test "x$new_path" = x; then
23612      # It's still not found. Now this is an unrecoverable error.
23613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23614$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23615      has_space=`$ECHO "$complete" | $GREP " "`
23616      if test "x$has_space" != x; then
23617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23619      fi
23620      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23621    fi
23622  fi
23623
23624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23627  # "foo.exe" is OK but "foo" is an error.
23628  #
23629  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23630  # It is also a way to make sure we got the proper file name for the real test later on.
23631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23632  if test "x$test_shortpath" = x; then
23633    # Short path failed, file does not exist as specified.
23634    # Try adding .exe or .cmd
23635    if test -f "${new_path}.exe"; then
23636      input_to_shortpath="${new_path}.exe"
23637    elif test -f "${new_path}.cmd"; then
23638      input_to_shortpath="${new_path}.cmd"
23639    else
23640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23641$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23642      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23643$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23644      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23645    fi
23646  else
23647    input_to_shortpath="$new_path"
23648  fi
23649
23650  # Call helper function which possibly converts this using DOS-style short mode.
23651  # If so, the updated path is stored in $new_path.
23652  new_path="$input_to_shortpath"
23653
23654  input_path="$input_to_shortpath"
23655  # Check if we need to convert this using DOS-style short mode. If the path
23656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23657  # take no chances and rewrite it.
23658  # Note: m4 eats our [], so we need to use [ and ] instead.
23659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23660  if test "x$has_forbidden_chars" != x; then
23661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23665      # Going to short mode and back again did indeed matter. Since short mode is
23666      # case insensitive, let's make it lowercase to improve readability.
23667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23668      # Now convert it back to Unix-stile (cygpath)
23669      input_path=`$CYGPATH -u "$shortmode_path"`
23670      new_path="$input_path"
23671    fi
23672  fi
23673
23674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23675  if test "x$test_cygdrive_prefix" = x; then
23676    # As a simple fix, exclude /usr/bin since it's not a real path.
23677    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23679      # a path prefixed by /cygdrive for fixpath to work.
23680      new_path="$CYGWIN_ROOT_PATH$input_path"
23681    fi
23682  fi
23683
23684  # remove trailing .exe if any
23685  new_path="${new_path/%.exe/}"
23686
23687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23688
23689  # First separate the path from the arguments. This will split at the first
23690  # space.
23691  complete="$WINAR"
23692  path="${complete%% *}"
23693  tmp="$complete EOL"
23694  arguments="${tmp#* }"
23695
23696  # Input might be given as Windows format, start by converting to
23697  # unix format.
23698  new_path="$path"
23699
23700  windows_path="$new_path"
23701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23702    unix_path=`$CYGPATH -u "$windows_path"`
23703    new_path="$unix_path"
23704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23706    new_path="$unix_path"
23707  fi
23708
23709
23710  # Now try to locate executable using which
23711  new_path=`$WHICH "$new_path" 2> /dev/null`
23712
23713  if test "x$new_path" = x; then
23714    # Oops. Which didn't find the executable.
23715    # The splitting of arguments from the executable at a space might have been incorrect,
23716    # since paths with space are more likely in Windows. Give it another try with the whole
23717    # argument.
23718    path="$complete"
23719    arguments="EOL"
23720    new_path="$path"
23721
23722  windows_path="$new_path"
23723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23724    unix_path=`$CYGPATH -u "$windows_path"`
23725    new_path="$unix_path"
23726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23728    new_path="$unix_path"
23729  fi
23730
23731
23732    new_path=`$WHICH "$new_path" 2> /dev/null`
23733
23734    if test "x$new_path" = x; then
23735      # It's still not found. Now this is an unrecoverable error.
23736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23737$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23738      has_space=`$ECHO "$complete" | $GREP " "`
23739      if test "x$has_space" != x; then
23740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23742      fi
23743      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23744    fi
23745  fi
23746
23747  # Now new_path has a complete unix path to the binary
23748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23749    # Keep paths in /bin as-is, but remove trailing .exe if any
23750    new_path="${new_path/%.exe/}"
23751    # Do not save /bin paths to all_fixpath_prefixes!
23752  else
23753    # Not in mixed or Windows style, start by that.
23754    new_path=`cmd //c echo $new_path`
23755
23756  input_path="$new_path"
23757  # Check if we need to convert this using DOS-style short mode. If the path
23758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23759  # take no chances and rewrite it.
23760  # Note: m4 eats our [], so we need to use [ and ] instead.
23761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23762  if test "x$has_forbidden_chars" != x; then
23763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23765  fi
23766
23767    # Output is in $new_path
23768
23769  windows_path="$new_path"
23770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23771    unix_path=`$CYGPATH -u "$windows_path"`
23772    new_path="$unix_path"
23773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23775    new_path="$unix_path"
23776  fi
23777
23778    # remove trailing .exe if any
23779    new_path="${new_path/%.exe/}"
23780
23781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23783  fi
23784
23785  else
23786    # We're on a posix platform. Hooray! :)
23787    # First separate the path from the arguments. This will split at the first
23788    # space.
23789    complete="$WINAR"
23790    path="${complete%% *}"
23791    tmp="$complete EOL"
23792    arguments="${tmp#* }"
23793
23794    # Cannot rely on the command "which" here since it doesn't always work.
23795    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23796    if test -z "$is_absolute_path"; then
23797      # Path to executable is not absolute. Find it.
23798      IFS_save="$IFS"
23799      IFS=:
23800      for p in $PATH; do
23801        if test -f "$p/$path" && test -x "$p/$path"; then
23802          new_path="$p/$path"
23803          break
23804        fi
23805      done
23806      IFS="$IFS_save"
23807    else
23808      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23809$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23810      new_path="$path"
23811    fi
23812
23813    if test "x$new_path" = x; then
23814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23815$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23816      has_space=`$ECHO "$complete" | $GREP " "`
23817      if test "x$has_space" != x; then
23818        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23819$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23820      fi
23821      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23822    fi
23823  fi
23824
23825  # Now join together the path and the arguments once again
23826  if test "x$arguments" != xEOL; then
23827    new_complete="$new_path ${arguments% *}"
23828  else
23829    new_complete="$new_path"
23830  fi
23831
23832  if test "x$complete" != "x$new_complete"; then
23833    WINAR="$new_complete"
23834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23835$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23836  fi
23837
23838  AR="$WINAR"
23839  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23840
23841  # Extract the first word of "dumpbin", so it can be a program name with args.
23842set dummy dumpbin; ac_word=$2
23843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23844$as_echo_n "checking for $ac_word... " >&6; }
23845if ${ac_cv_prog_DUMPBIN+:} false; then :
23846  $as_echo_n "(cached) " >&6
23847else
23848  if test -n "$DUMPBIN"; then
23849  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23850else
23851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23852for as_dir in $PATH
23853do
23854  IFS=$as_save_IFS
23855  test -z "$as_dir" && as_dir=.
23856    for ac_exec_ext in '' $ac_executable_extensions; do
23857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23858    ac_cv_prog_DUMPBIN="dumpbin"
23859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23860    break 2
23861  fi
23862done
23863  done
23864IFS=$as_save_IFS
23865
23866fi
23867fi
23868DUMPBIN=$ac_cv_prog_DUMPBIN
23869if test -n "$DUMPBIN"; then
23870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23871$as_echo "$DUMPBIN" >&6; }
23872else
23873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23874$as_echo "no" >&6; }
23875fi
23876
23877
23878
23879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23880
23881  # First separate the path from the arguments. This will split at the first
23882  # space.
23883  complete="$DUMPBIN"
23884  path="${complete%% *}"
23885  tmp="$complete EOL"
23886  arguments="${tmp#* }"
23887
23888  # Input might be given as Windows format, start by converting to
23889  # unix format.
23890  new_path=`$CYGPATH -u "$path"`
23891
23892  # Now try to locate executable using which
23893  new_path=`$WHICH "$new_path" 2> /dev/null`
23894  # bat and cmd files are not always considered executable in cygwin causing which
23895  # to not find them
23896  if test "x$new_path" = x \
23897      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23898      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23899    new_path=`$CYGPATH -u "$path"`
23900  fi
23901  if test "x$new_path" = x; then
23902    # Oops. Which didn't find the executable.
23903    # The splitting of arguments from the executable at a space might have been incorrect,
23904    # since paths with space are more likely in Windows. Give it another try with the whole
23905    # argument.
23906    path="$complete"
23907    arguments="EOL"
23908    new_path=`$CYGPATH -u "$path"`
23909    new_path=`$WHICH "$new_path" 2> /dev/null`
23910    # bat and cmd files are not always considered executable in cygwin causing which
23911    # to not find them
23912    if test "x$new_path" = x \
23913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23915      new_path=`$CYGPATH -u "$path"`
23916    fi
23917    if test "x$new_path" = x; then
23918      # It's still not found. Now this is an unrecoverable error.
23919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23920$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23921      has_space=`$ECHO "$complete" | $GREP " "`
23922      if test "x$has_space" != x; then
23923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23925      fi
23926      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23927    fi
23928  fi
23929
23930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23933  # "foo.exe" is OK but "foo" is an error.
23934  #
23935  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23936  # It is also a way to make sure we got the proper file name for the real test later on.
23937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23938  if test "x$test_shortpath" = x; then
23939    # Short path failed, file does not exist as specified.
23940    # Try adding .exe or .cmd
23941    if test -f "${new_path}.exe"; then
23942      input_to_shortpath="${new_path}.exe"
23943    elif test -f "${new_path}.cmd"; then
23944      input_to_shortpath="${new_path}.cmd"
23945    else
23946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23947$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23948      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23949$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23950      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23951    fi
23952  else
23953    input_to_shortpath="$new_path"
23954  fi
23955
23956  # Call helper function which possibly converts this using DOS-style short mode.
23957  # If so, the updated path is stored in $new_path.
23958  new_path="$input_to_shortpath"
23959
23960  input_path="$input_to_shortpath"
23961  # Check if we need to convert this using DOS-style short mode. If the path
23962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23963  # take no chances and rewrite it.
23964  # Note: m4 eats our [], so we need to use [ and ] instead.
23965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23966  if test "x$has_forbidden_chars" != x; then
23967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23971      # Going to short mode and back again did indeed matter. Since short mode is
23972      # case insensitive, let's make it lowercase to improve readability.
23973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23974      # Now convert it back to Unix-stile (cygpath)
23975      input_path=`$CYGPATH -u "$shortmode_path"`
23976      new_path="$input_path"
23977    fi
23978  fi
23979
23980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23981  if test "x$test_cygdrive_prefix" = x; then
23982    # As a simple fix, exclude /usr/bin since it's not a real path.
23983    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23985      # a path prefixed by /cygdrive for fixpath to work.
23986      new_path="$CYGWIN_ROOT_PATH$input_path"
23987    fi
23988  fi
23989
23990  # remove trailing .exe if any
23991  new_path="${new_path/%.exe/}"
23992
23993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23994
23995  # First separate the path from the arguments. This will split at the first
23996  # space.
23997  complete="$DUMPBIN"
23998  path="${complete%% *}"
23999  tmp="$complete EOL"
24000  arguments="${tmp#* }"
24001
24002  # Input might be given as Windows format, start by converting to
24003  # unix format.
24004  new_path="$path"
24005
24006  windows_path="$new_path"
24007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24008    unix_path=`$CYGPATH -u "$windows_path"`
24009    new_path="$unix_path"
24010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24012    new_path="$unix_path"
24013  fi
24014
24015
24016  # Now try to locate executable using which
24017  new_path=`$WHICH "$new_path" 2> /dev/null`
24018
24019  if test "x$new_path" = x; then
24020    # Oops. Which didn't find the executable.
24021    # The splitting of arguments from the executable at a space might have been incorrect,
24022    # since paths with space are more likely in Windows. Give it another try with the whole
24023    # argument.
24024    path="$complete"
24025    arguments="EOL"
24026    new_path="$path"
24027
24028  windows_path="$new_path"
24029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24030    unix_path=`$CYGPATH -u "$windows_path"`
24031    new_path="$unix_path"
24032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24034    new_path="$unix_path"
24035  fi
24036
24037
24038    new_path=`$WHICH "$new_path" 2> /dev/null`
24039
24040    if test "x$new_path" = x; then
24041      # It's still not found. Now this is an unrecoverable error.
24042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24043$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24044      has_space=`$ECHO "$complete" | $GREP " "`
24045      if test "x$has_space" != x; then
24046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24048      fi
24049      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24050    fi
24051  fi
24052
24053  # Now new_path has a complete unix path to the binary
24054  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24055    # Keep paths in /bin as-is, but remove trailing .exe if any
24056    new_path="${new_path/%.exe/}"
24057    # Do not save /bin paths to all_fixpath_prefixes!
24058  else
24059    # Not in mixed or Windows style, start by that.
24060    new_path=`cmd //c echo $new_path`
24061
24062  input_path="$new_path"
24063  # Check if we need to convert this using DOS-style short mode. If the path
24064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24065  # take no chances and rewrite it.
24066  # Note: m4 eats our [], so we need to use [ and ] instead.
24067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24068  if test "x$has_forbidden_chars" != x; then
24069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24071  fi
24072
24073    # Output is in $new_path
24074
24075  windows_path="$new_path"
24076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24077    unix_path=`$CYGPATH -u "$windows_path"`
24078    new_path="$unix_path"
24079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24081    new_path="$unix_path"
24082  fi
24083
24084    # remove trailing .exe if any
24085    new_path="${new_path/%.exe/}"
24086
24087    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24088    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24089  fi
24090
24091  else
24092    # We're on a posix platform. Hooray! :)
24093    # First separate the path from the arguments. This will split at the first
24094    # space.
24095    complete="$DUMPBIN"
24096    path="${complete%% *}"
24097    tmp="$complete EOL"
24098    arguments="${tmp#* }"
24099
24100    # Cannot rely on the command "which" here since it doesn't always work.
24101    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24102    if test -z "$is_absolute_path"; then
24103      # Path to executable is not absolute. Find it.
24104      IFS_save="$IFS"
24105      IFS=:
24106      for p in $PATH; do
24107        if test -f "$p/$path" && test -x "$p/$path"; then
24108          new_path="$p/$path"
24109          break
24110        fi
24111      done
24112      IFS="$IFS_save"
24113    else
24114      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24115$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24116      new_path="$path"
24117    fi
24118
24119    if test "x$new_path" = x; then
24120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24121$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24122      has_space=`$ECHO "$complete" | $GREP " "`
24123      if test "x$has_space" != x; then
24124        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24125$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24126      fi
24127      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24128    fi
24129  fi
24130
24131  # Now join together the path and the arguments once again
24132  if test "x$arguments" != xEOL; then
24133    new_complete="$new_path ${arguments% *}"
24134  else
24135    new_complete="$new_path"
24136  fi
24137
24138  if test "x$complete" != "x$new_complete"; then
24139    DUMPBIN="$new_complete"
24140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24141$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24142  fi
24143
24144
24145      COMPILER_TYPE=CL
24146      CCXXFLAGS="$CCXXFLAGS -nologo"
24147
24148fi
24149
24150
24151
24152  ac_ext=c
24153ac_cpp='$CPP $CPPFLAGS'
24154ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24155ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24156ac_compiler_gnu=$ac_cv_c_compiler_gnu
24157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24158$as_echo_n "checking how to run the C preprocessor... " >&6; }
24159# On Suns, sometimes $CPP names a directory.
24160if test -n "$CPP" && test -d "$CPP"; then
24161  CPP=
24162fi
24163if test -z "$CPP"; then
24164  if ${ac_cv_prog_CPP+:} false; then :
24165  $as_echo_n "(cached) " >&6
24166else
24167      # Double quotes because CPP needs to be expanded
24168    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24169    do
24170      ac_preproc_ok=false
24171for ac_c_preproc_warn_flag in '' yes
24172do
24173  # Use a header file that comes with gcc, so configuring glibc
24174  # with a fresh cross-compiler works.
24175  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24176  # <limits.h> exists even on freestanding compilers.
24177  # On the NeXT, cc -E runs the code through the compiler's parser,
24178  # not just through cpp. "Syntax error" is here to catch this case.
24179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24180/* end confdefs.h.  */
24181#ifdef __STDC__
24182# include <limits.h>
24183#else
24184# include <assert.h>
24185#endif
24186		     Syntax error
24187_ACEOF
24188if ac_fn_c_try_cpp "$LINENO"; then :
24189
24190else
24191  # Broken: fails on valid input.
24192continue
24193fi
24194rm -f conftest.err conftest.i conftest.$ac_ext
24195
24196  # OK, works on sane cases.  Now check whether nonexistent headers
24197  # can be detected and how.
24198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24199/* end confdefs.h.  */
24200#include <ac_nonexistent.h>
24201_ACEOF
24202if ac_fn_c_try_cpp "$LINENO"; then :
24203  # Broken: success on invalid input.
24204continue
24205else
24206  # Passes both tests.
24207ac_preproc_ok=:
24208break
24209fi
24210rm -f conftest.err conftest.i conftest.$ac_ext
24211
24212done
24213# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24214rm -f conftest.i conftest.err conftest.$ac_ext
24215if $ac_preproc_ok; then :
24216  break
24217fi
24218
24219    done
24220    ac_cv_prog_CPP=$CPP
24221
24222fi
24223  CPP=$ac_cv_prog_CPP
24224else
24225  ac_cv_prog_CPP=$CPP
24226fi
24227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24228$as_echo "$CPP" >&6; }
24229ac_preproc_ok=false
24230for ac_c_preproc_warn_flag in '' yes
24231do
24232  # Use a header file that comes with gcc, so configuring glibc
24233  # with a fresh cross-compiler works.
24234  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24235  # <limits.h> exists even on freestanding compilers.
24236  # On the NeXT, cc -E runs the code through the compiler's parser,
24237  # not just through cpp. "Syntax error" is here to catch this case.
24238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24239/* end confdefs.h.  */
24240#ifdef __STDC__
24241# include <limits.h>
24242#else
24243# include <assert.h>
24244#endif
24245		     Syntax error
24246_ACEOF
24247if ac_fn_c_try_cpp "$LINENO"; then :
24248
24249else
24250  # Broken: fails on valid input.
24251continue
24252fi
24253rm -f conftest.err conftest.i conftest.$ac_ext
24254
24255  # OK, works on sane cases.  Now check whether nonexistent headers
24256  # can be detected and how.
24257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24258/* end confdefs.h.  */
24259#include <ac_nonexistent.h>
24260_ACEOF
24261if ac_fn_c_try_cpp "$LINENO"; then :
24262  # Broken: success on invalid input.
24263continue
24264else
24265  # Passes both tests.
24266ac_preproc_ok=:
24267break
24268fi
24269rm -f conftest.err conftest.i conftest.$ac_ext
24270
24271done
24272# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24273rm -f conftest.i conftest.err conftest.$ac_ext
24274if $ac_preproc_ok; then :
24275
24276else
24277  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24279as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24280See \`config.log' for more details" "$LINENO" 5; }
24281fi
24282
24283ac_ext=cpp
24284ac_cpp='$CXXCPP $CPPFLAGS'
24285ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24286ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24287ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24288
24289
24290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24291
24292  # First separate the path from the arguments. This will split at the first
24293  # space.
24294  complete="$CPP"
24295  path="${complete%% *}"
24296  tmp="$complete EOL"
24297  arguments="${tmp#* }"
24298
24299  # Input might be given as Windows format, start by converting to
24300  # unix format.
24301  new_path=`$CYGPATH -u "$path"`
24302
24303  # Now try to locate executable using which
24304  new_path=`$WHICH "$new_path" 2> /dev/null`
24305  # bat and cmd files are not always considered executable in cygwin causing which
24306  # to not find them
24307  if test "x$new_path" = x \
24308      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24309      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24310    new_path=`$CYGPATH -u "$path"`
24311  fi
24312  if test "x$new_path" = x; then
24313    # Oops. Which didn't find the executable.
24314    # The splitting of arguments from the executable at a space might have been incorrect,
24315    # since paths with space are more likely in Windows. Give it another try with the whole
24316    # argument.
24317    path="$complete"
24318    arguments="EOL"
24319    new_path=`$CYGPATH -u "$path"`
24320    new_path=`$WHICH "$new_path" 2> /dev/null`
24321    # bat and cmd files are not always considered executable in cygwin causing which
24322    # to not find them
24323    if test "x$new_path" = x \
24324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24326      new_path=`$CYGPATH -u "$path"`
24327    fi
24328    if test "x$new_path" = x; then
24329      # It's still not found. Now this is an unrecoverable error.
24330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24331$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24332      has_space=`$ECHO "$complete" | $GREP " "`
24333      if test "x$has_space" != x; then
24334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24336      fi
24337      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24338    fi
24339  fi
24340
24341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24344  # "foo.exe" is OK but "foo" is an error.
24345  #
24346  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24347  # It is also a way to make sure we got the proper file name for the real test later on.
24348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24349  if test "x$test_shortpath" = x; then
24350    # Short path failed, file does not exist as specified.
24351    # Try adding .exe or .cmd
24352    if test -f "${new_path}.exe"; then
24353      input_to_shortpath="${new_path}.exe"
24354    elif test -f "${new_path}.cmd"; then
24355      input_to_shortpath="${new_path}.cmd"
24356    else
24357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24358$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24361      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24362    fi
24363  else
24364    input_to_shortpath="$new_path"
24365  fi
24366
24367  # Call helper function which possibly converts this using DOS-style short mode.
24368  # If so, the updated path is stored in $new_path.
24369  new_path="$input_to_shortpath"
24370
24371  input_path="$input_to_shortpath"
24372  # Check if we need to convert this using DOS-style short mode. If the path
24373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24374  # take no chances and rewrite it.
24375  # Note: m4 eats our [], so we need to use [ and ] instead.
24376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24377  if test "x$has_forbidden_chars" != x; then
24378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24382      # Going to short mode and back again did indeed matter. Since short mode is
24383      # case insensitive, let's make it lowercase to improve readability.
24384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24385      # Now convert it back to Unix-stile (cygpath)
24386      input_path=`$CYGPATH -u "$shortmode_path"`
24387      new_path="$input_path"
24388    fi
24389  fi
24390
24391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24392  if test "x$test_cygdrive_prefix" = x; then
24393    # As a simple fix, exclude /usr/bin since it's not a real path.
24394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24396      # a path prefixed by /cygdrive for fixpath to work.
24397      new_path="$CYGWIN_ROOT_PATH$input_path"
24398    fi
24399  fi
24400
24401  # remove trailing .exe if any
24402  new_path="${new_path/%.exe/}"
24403
24404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24405
24406  # First separate the path from the arguments. This will split at the first
24407  # space.
24408  complete="$CPP"
24409  path="${complete%% *}"
24410  tmp="$complete EOL"
24411  arguments="${tmp#* }"
24412
24413  # Input might be given as Windows format, start by converting to
24414  # unix format.
24415  new_path="$path"
24416
24417  windows_path="$new_path"
24418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24419    unix_path=`$CYGPATH -u "$windows_path"`
24420    new_path="$unix_path"
24421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24423    new_path="$unix_path"
24424  fi
24425
24426
24427  # Now try to locate executable using which
24428  new_path=`$WHICH "$new_path" 2> /dev/null`
24429
24430  if test "x$new_path" = x; then
24431    # Oops. Which didn't find the executable.
24432    # The splitting of arguments from the executable at a space might have been incorrect,
24433    # since paths with space are more likely in Windows. Give it another try with the whole
24434    # argument.
24435    path="$complete"
24436    arguments="EOL"
24437    new_path="$path"
24438
24439  windows_path="$new_path"
24440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24441    unix_path=`$CYGPATH -u "$windows_path"`
24442    new_path="$unix_path"
24443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24445    new_path="$unix_path"
24446  fi
24447
24448
24449    new_path=`$WHICH "$new_path" 2> /dev/null`
24450
24451    if test "x$new_path" = x; then
24452      # It's still not found. Now this is an unrecoverable error.
24453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24454$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24455      has_space=`$ECHO "$complete" | $GREP " "`
24456      if test "x$has_space" != x; then
24457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24459      fi
24460      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24461    fi
24462  fi
24463
24464  # Now new_path has a complete unix path to the binary
24465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24466    # Keep paths in /bin as-is, but remove trailing .exe if any
24467    new_path="${new_path/%.exe/}"
24468    # Do not save /bin paths to all_fixpath_prefixes!
24469  else
24470    # Not in mixed or Windows style, start by that.
24471    new_path=`cmd //c echo $new_path`
24472
24473  input_path="$new_path"
24474  # Check if we need to convert this using DOS-style short mode. If the path
24475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24476  # take no chances and rewrite it.
24477  # Note: m4 eats our [], so we need to use [ and ] instead.
24478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24479  if test "x$has_forbidden_chars" != x; then
24480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24482  fi
24483
24484    # Output is in $new_path
24485
24486  windows_path="$new_path"
24487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24488    unix_path=`$CYGPATH -u "$windows_path"`
24489    new_path="$unix_path"
24490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24492    new_path="$unix_path"
24493  fi
24494
24495    # remove trailing .exe if any
24496    new_path="${new_path/%.exe/}"
24497
24498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24500  fi
24501
24502  else
24503    # We're on a posix platform. Hooray! :)
24504    # First separate the path from the arguments. This will split at the first
24505    # space.
24506    complete="$CPP"
24507    path="${complete%% *}"
24508    tmp="$complete EOL"
24509    arguments="${tmp#* }"
24510
24511    # Cannot rely on the command "which" here since it doesn't always work.
24512    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24513    if test -z "$is_absolute_path"; then
24514      # Path to executable is not absolute. Find it.
24515      IFS_save="$IFS"
24516      IFS=:
24517      for p in $PATH; do
24518        if test -f "$p/$path" && test -x "$p/$path"; then
24519          new_path="$p/$path"
24520          break
24521        fi
24522      done
24523      IFS="$IFS_save"
24524    else
24525      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24526$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24527      new_path="$path"
24528    fi
24529
24530    if test "x$new_path" = x; then
24531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24532$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24533      has_space=`$ECHO "$complete" | $GREP " "`
24534      if test "x$has_space" != x; then
24535        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24537      fi
24538      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24539    fi
24540  fi
24541
24542  # Now join together the path and the arguments once again
24543  if test "x$arguments" != xEOL; then
24544    new_complete="$new_path ${arguments% *}"
24545  else
24546    new_complete="$new_path"
24547  fi
24548
24549  if test "x$complete" != "x$new_complete"; then
24550    CPP="$new_complete"
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24552$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24553  fi
24554
24555
24556  ac_ext=cpp
24557ac_cpp='$CXXCPP $CPPFLAGS'
24558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24562$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24563if test -z "$CXXCPP"; then
24564  if ${ac_cv_prog_CXXCPP+:} false; then :
24565  $as_echo_n "(cached) " >&6
24566else
24567      # Double quotes because CXXCPP needs to be expanded
24568    for CXXCPP in "$CXX -E" "/lib/cpp"
24569    do
24570      ac_preproc_ok=false
24571for ac_cxx_preproc_warn_flag in '' yes
24572do
24573  # Use a header file that comes with gcc, so configuring glibc
24574  # with a fresh cross-compiler works.
24575  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24576  # <limits.h> exists even on freestanding compilers.
24577  # On the NeXT, cc -E runs the code through the compiler's parser,
24578  # not just through cpp. "Syntax error" is here to catch this case.
24579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24580/* end confdefs.h.  */
24581#ifdef __STDC__
24582# include <limits.h>
24583#else
24584# include <assert.h>
24585#endif
24586		     Syntax error
24587_ACEOF
24588if ac_fn_cxx_try_cpp "$LINENO"; then :
24589
24590else
24591  # Broken: fails on valid input.
24592continue
24593fi
24594rm -f conftest.err conftest.i conftest.$ac_ext
24595
24596  # OK, works on sane cases.  Now check whether nonexistent headers
24597  # can be detected and how.
24598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24599/* end confdefs.h.  */
24600#include <ac_nonexistent.h>
24601_ACEOF
24602if ac_fn_cxx_try_cpp "$LINENO"; then :
24603  # Broken: success on invalid input.
24604continue
24605else
24606  # Passes both tests.
24607ac_preproc_ok=:
24608break
24609fi
24610rm -f conftest.err conftest.i conftest.$ac_ext
24611
24612done
24613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24614rm -f conftest.i conftest.err conftest.$ac_ext
24615if $ac_preproc_ok; then :
24616  break
24617fi
24618
24619    done
24620    ac_cv_prog_CXXCPP=$CXXCPP
24621
24622fi
24623  CXXCPP=$ac_cv_prog_CXXCPP
24624else
24625  ac_cv_prog_CXXCPP=$CXXCPP
24626fi
24627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24628$as_echo "$CXXCPP" >&6; }
24629ac_preproc_ok=false
24630for ac_cxx_preproc_warn_flag in '' yes
24631do
24632  # Use a header file that comes with gcc, so configuring glibc
24633  # with a fresh cross-compiler works.
24634  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24635  # <limits.h> exists even on freestanding compilers.
24636  # On the NeXT, cc -E runs the code through the compiler's parser,
24637  # not just through cpp. "Syntax error" is here to catch this case.
24638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24639/* end confdefs.h.  */
24640#ifdef __STDC__
24641# include <limits.h>
24642#else
24643# include <assert.h>
24644#endif
24645		     Syntax error
24646_ACEOF
24647if ac_fn_cxx_try_cpp "$LINENO"; then :
24648
24649else
24650  # Broken: fails on valid input.
24651continue
24652fi
24653rm -f conftest.err conftest.i conftest.$ac_ext
24654
24655  # OK, works on sane cases.  Now check whether nonexistent headers
24656  # can be detected and how.
24657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24658/* end confdefs.h.  */
24659#include <ac_nonexistent.h>
24660_ACEOF
24661if ac_fn_cxx_try_cpp "$LINENO"; then :
24662  # Broken: success on invalid input.
24663continue
24664else
24665  # Passes both tests.
24666ac_preproc_ok=:
24667break
24668fi
24669rm -f conftest.err conftest.i conftest.$ac_ext
24670
24671done
24672# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24673rm -f conftest.i conftest.err conftest.$ac_ext
24674if $ac_preproc_ok; then :
24675
24676else
24677  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24679as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24680See \`config.log' for more details" "$LINENO" 5; }
24681fi
24682
24683ac_ext=cpp
24684ac_cpp='$CXXCPP $CPPFLAGS'
24685ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24686ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24687ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24688
24689
24690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24691
24692  # First separate the path from the arguments. This will split at the first
24693  # space.
24694  complete="$CXXCPP"
24695  path="${complete%% *}"
24696  tmp="$complete EOL"
24697  arguments="${tmp#* }"
24698
24699  # Input might be given as Windows format, start by converting to
24700  # unix format.
24701  new_path=`$CYGPATH -u "$path"`
24702
24703  # Now try to locate executable using which
24704  new_path=`$WHICH "$new_path" 2> /dev/null`
24705  # bat and cmd files are not always considered executable in cygwin causing which
24706  # to not find them
24707  if test "x$new_path" = x \
24708      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24709      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24710    new_path=`$CYGPATH -u "$path"`
24711  fi
24712  if test "x$new_path" = x; then
24713    # Oops. Which didn't find the executable.
24714    # The splitting of arguments from the executable at a space might have been incorrect,
24715    # since paths with space are more likely in Windows. Give it another try with the whole
24716    # argument.
24717    path="$complete"
24718    arguments="EOL"
24719    new_path=`$CYGPATH -u "$path"`
24720    new_path=`$WHICH "$new_path" 2> /dev/null`
24721    # bat and cmd files are not always considered executable in cygwin causing which
24722    # to not find them
24723    if test "x$new_path" = x \
24724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24726      new_path=`$CYGPATH -u "$path"`
24727    fi
24728    if test "x$new_path" = x; then
24729      # It's still not found. Now this is an unrecoverable error.
24730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24731$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24732      has_space=`$ECHO "$complete" | $GREP " "`
24733      if test "x$has_space" != x; then
24734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24736      fi
24737      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24738    fi
24739  fi
24740
24741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24744  # "foo.exe" is OK but "foo" is an error.
24745  #
24746  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24747  # It is also a way to make sure we got the proper file name for the real test later on.
24748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24749  if test "x$test_shortpath" = x; then
24750    # Short path failed, file does not exist as specified.
24751    # Try adding .exe or .cmd
24752    if test -f "${new_path}.exe"; then
24753      input_to_shortpath="${new_path}.exe"
24754    elif test -f "${new_path}.cmd"; then
24755      input_to_shortpath="${new_path}.cmd"
24756    else
24757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24758$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24759      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24760$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24761      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24762    fi
24763  else
24764    input_to_shortpath="$new_path"
24765  fi
24766
24767  # Call helper function which possibly converts this using DOS-style short mode.
24768  # If so, the updated path is stored in $new_path.
24769  new_path="$input_to_shortpath"
24770
24771  input_path="$input_to_shortpath"
24772  # Check if we need to convert this using DOS-style short mode. If the path
24773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24774  # take no chances and rewrite it.
24775  # Note: m4 eats our [], so we need to use [ and ] instead.
24776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24777  if test "x$has_forbidden_chars" != x; then
24778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24782      # Going to short mode and back again did indeed matter. Since short mode is
24783      # case insensitive, let's make it lowercase to improve readability.
24784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24785      # Now convert it back to Unix-stile (cygpath)
24786      input_path=`$CYGPATH -u "$shortmode_path"`
24787      new_path="$input_path"
24788    fi
24789  fi
24790
24791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24792  if test "x$test_cygdrive_prefix" = x; then
24793    # As a simple fix, exclude /usr/bin since it's not a real path.
24794    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24796      # a path prefixed by /cygdrive for fixpath to work.
24797      new_path="$CYGWIN_ROOT_PATH$input_path"
24798    fi
24799  fi
24800
24801  # remove trailing .exe if any
24802  new_path="${new_path/%.exe/}"
24803
24804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24805
24806  # First separate the path from the arguments. This will split at the first
24807  # space.
24808  complete="$CXXCPP"
24809  path="${complete%% *}"
24810  tmp="$complete EOL"
24811  arguments="${tmp#* }"
24812
24813  # Input might be given as Windows format, start by converting to
24814  # unix format.
24815  new_path="$path"
24816
24817  windows_path="$new_path"
24818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24819    unix_path=`$CYGPATH -u "$windows_path"`
24820    new_path="$unix_path"
24821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24823    new_path="$unix_path"
24824  fi
24825
24826
24827  # Now try to locate executable using which
24828  new_path=`$WHICH "$new_path" 2> /dev/null`
24829
24830  if test "x$new_path" = x; then
24831    # Oops. Which didn't find the executable.
24832    # The splitting of arguments from the executable at a space might have been incorrect,
24833    # since paths with space are more likely in Windows. Give it another try with the whole
24834    # argument.
24835    path="$complete"
24836    arguments="EOL"
24837    new_path="$path"
24838
24839  windows_path="$new_path"
24840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24841    unix_path=`$CYGPATH -u "$windows_path"`
24842    new_path="$unix_path"
24843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24845    new_path="$unix_path"
24846  fi
24847
24848
24849    new_path=`$WHICH "$new_path" 2> /dev/null`
24850
24851    if test "x$new_path" = x; then
24852      # It's still not found. Now this is an unrecoverable error.
24853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24854$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24855      has_space=`$ECHO "$complete" | $GREP " "`
24856      if test "x$has_space" != x; then
24857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24859      fi
24860      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24861    fi
24862  fi
24863
24864  # Now new_path has a complete unix path to the binary
24865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24866    # Keep paths in /bin as-is, but remove trailing .exe if any
24867    new_path="${new_path/%.exe/}"
24868    # Do not save /bin paths to all_fixpath_prefixes!
24869  else
24870    # Not in mixed or Windows style, start by that.
24871    new_path=`cmd //c echo $new_path`
24872
24873  input_path="$new_path"
24874  # Check if we need to convert this using DOS-style short mode. If the path
24875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24876  # take no chances and rewrite it.
24877  # Note: m4 eats our [], so we need to use [ and ] instead.
24878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24879  if test "x$has_forbidden_chars" != x; then
24880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24882  fi
24883
24884    # Output is in $new_path
24885
24886  windows_path="$new_path"
24887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24888    unix_path=`$CYGPATH -u "$windows_path"`
24889    new_path="$unix_path"
24890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24892    new_path="$unix_path"
24893  fi
24894
24895    # remove trailing .exe if any
24896    new_path="${new_path/%.exe/}"
24897
24898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24900  fi
24901
24902  else
24903    # We're on a posix platform. Hooray! :)
24904    # First separate the path from the arguments. This will split at the first
24905    # space.
24906    complete="$CXXCPP"
24907    path="${complete%% *}"
24908    tmp="$complete EOL"
24909    arguments="${tmp#* }"
24910
24911    # Cannot rely on the command "which" here since it doesn't always work.
24912    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24913    if test -z "$is_absolute_path"; then
24914      # Path to executable is not absolute. Find it.
24915      IFS_save="$IFS"
24916      IFS=:
24917      for p in $PATH; do
24918        if test -f "$p/$path" && test -x "$p/$path"; then
24919          new_path="$p/$path"
24920          break
24921        fi
24922      done
24923      IFS="$IFS_save"
24924    else
24925      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24926$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24927      new_path="$path"
24928    fi
24929
24930    if test "x$new_path" = x; then
24931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24932$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24933      has_space=`$ECHO "$complete" | $GREP " "`
24934      if test "x$has_space" != x; then
24935        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24937      fi
24938      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24939    fi
24940  fi
24941
24942  # Now join together the path and the arguments once again
24943  if test "x$arguments" != xEOL; then
24944    new_complete="$new_path ${arguments% *}"
24945  else
24946    new_complete="$new_path"
24947  fi
24948
24949  if test "x$complete" != "x$new_complete"; then
24950    CXXCPP="$new_complete"
24951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24952$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24953  fi
24954
24955
24956  if test "x$COMPILE_TYPE" != "xcross"; then
24957    # If we are not cross compiling, use the same compilers for
24958    # building the build platform executables. The cross-compilation
24959    # case needed to be done earlier, but this can only be done after
24960    # the native tools have been localized.
24961    BUILD_CC="$CC"
24962    BUILD_CXX="$CXX"
24963    BUILD_LD="$LD"
24964  fi
24965
24966  # for solaris we really need solaris tools, and not gnu equivalent
24967  #   these seems to normally reside in /usr/ccs/bin so add that to path before
24968  #   starting to probe
24969  #
24970  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24971  #         so that it can be overriden --with-tools-dir
24972  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24973    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24974  fi
24975
24976  # Find the right assembler.
24977  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24978    # Extract the first word of "as", so it can be a program name with args.
24979set dummy as; ac_word=$2
24980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24981$as_echo_n "checking for $ac_word... " >&6; }
24982if ${ac_cv_path_AS+:} false; then :
24983  $as_echo_n "(cached) " >&6
24984else
24985  case $AS in
24986  [\\/]* | ?:[\\/]*)
24987  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24988  ;;
24989  *)
24990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24991for as_dir in $PATH
24992do
24993  IFS=$as_save_IFS
24994  test -z "$as_dir" && as_dir=.
24995    for ac_exec_ext in '' $ac_executable_extensions; do
24996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24997    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24999    break 2
25000  fi
25001done
25002  done
25003IFS=$as_save_IFS
25004
25005  ;;
25006esac
25007fi
25008AS=$ac_cv_path_AS
25009if test -n "$AS"; then
25010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25011$as_echo "$AS" >&6; }
25012else
25013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25014$as_echo "no" >&6; }
25015fi
25016
25017
25018
25019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25020
25021  # First separate the path from the arguments. This will split at the first
25022  # space.
25023  complete="$AS"
25024  path="${complete%% *}"
25025  tmp="$complete EOL"
25026  arguments="${tmp#* }"
25027
25028  # Input might be given as Windows format, start by converting to
25029  # unix format.
25030  new_path=`$CYGPATH -u "$path"`
25031
25032  # Now try to locate executable using which
25033  new_path=`$WHICH "$new_path" 2> /dev/null`
25034  # bat and cmd files are not always considered executable in cygwin causing which
25035  # to not find them
25036  if test "x$new_path" = x \
25037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25039    new_path=`$CYGPATH -u "$path"`
25040  fi
25041  if test "x$new_path" = x; then
25042    # Oops. Which didn't find the executable.
25043    # The splitting of arguments from the executable at a space might have been incorrect,
25044    # since paths with space are more likely in Windows. Give it another try with the whole
25045    # argument.
25046    path="$complete"
25047    arguments="EOL"
25048    new_path=`$CYGPATH -u "$path"`
25049    new_path=`$WHICH "$new_path" 2> /dev/null`
25050    # bat and cmd files are not always considered executable in cygwin causing which
25051    # to not find them
25052    if test "x$new_path" = x \
25053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25055      new_path=`$CYGPATH -u "$path"`
25056    fi
25057    if test "x$new_path" = x; then
25058      # It's still not found. Now this is an unrecoverable error.
25059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25060$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25061      has_space=`$ECHO "$complete" | $GREP " "`
25062      if test "x$has_space" != x; then
25063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25065      fi
25066      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25067    fi
25068  fi
25069
25070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25073  # "foo.exe" is OK but "foo" is an error.
25074  #
25075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25076  # It is also a way to make sure we got the proper file name for the real test later on.
25077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25078  if test "x$test_shortpath" = x; then
25079    # Short path failed, file does not exist as specified.
25080    # Try adding .exe or .cmd
25081    if test -f "${new_path}.exe"; then
25082      input_to_shortpath="${new_path}.exe"
25083    elif test -f "${new_path}.cmd"; then
25084      input_to_shortpath="${new_path}.cmd"
25085    else
25086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25087$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25090      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25091    fi
25092  else
25093    input_to_shortpath="$new_path"
25094  fi
25095
25096  # Call helper function which possibly converts this using DOS-style short mode.
25097  # If so, the updated path is stored in $new_path.
25098  new_path="$input_to_shortpath"
25099
25100  input_path="$input_to_shortpath"
25101  # Check if we need to convert this using DOS-style short mode. If the path
25102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25103  # take no chances and rewrite it.
25104  # Note: m4 eats our [], so we need to use [ and ] instead.
25105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25106  if test "x$has_forbidden_chars" != x; then
25107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25111      # Going to short mode and back again did indeed matter. Since short mode is
25112      # case insensitive, let's make it lowercase to improve readability.
25113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25114      # Now convert it back to Unix-stile (cygpath)
25115      input_path=`$CYGPATH -u "$shortmode_path"`
25116      new_path="$input_path"
25117    fi
25118  fi
25119
25120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25121  if test "x$test_cygdrive_prefix" = x; then
25122    # As a simple fix, exclude /usr/bin since it's not a real path.
25123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25125      # a path prefixed by /cygdrive for fixpath to work.
25126      new_path="$CYGWIN_ROOT_PATH$input_path"
25127    fi
25128  fi
25129
25130  # remove trailing .exe if any
25131  new_path="${new_path/%.exe/}"
25132
25133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25134
25135  # First separate the path from the arguments. This will split at the first
25136  # space.
25137  complete="$AS"
25138  path="${complete%% *}"
25139  tmp="$complete EOL"
25140  arguments="${tmp#* }"
25141
25142  # Input might be given as Windows format, start by converting to
25143  # unix format.
25144  new_path="$path"
25145
25146  windows_path="$new_path"
25147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25148    unix_path=`$CYGPATH -u "$windows_path"`
25149    new_path="$unix_path"
25150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25152    new_path="$unix_path"
25153  fi
25154
25155
25156  # Now try to locate executable using which
25157  new_path=`$WHICH "$new_path" 2> /dev/null`
25158
25159  if test "x$new_path" = x; then
25160    # Oops. Which didn't find the executable.
25161    # The splitting of arguments from the executable at a space might have been incorrect,
25162    # since paths with space are more likely in Windows. Give it another try with the whole
25163    # argument.
25164    path="$complete"
25165    arguments="EOL"
25166    new_path="$path"
25167
25168  windows_path="$new_path"
25169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25170    unix_path=`$CYGPATH -u "$windows_path"`
25171    new_path="$unix_path"
25172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25174    new_path="$unix_path"
25175  fi
25176
25177
25178    new_path=`$WHICH "$new_path" 2> /dev/null`
25179
25180    if test "x$new_path" = x; then
25181      # It's still not found. Now this is an unrecoverable error.
25182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25183$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25184      has_space=`$ECHO "$complete" | $GREP " "`
25185      if test "x$has_space" != x; then
25186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25188      fi
25189      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25190    fi
25191  fi
25192
25193  # Now new_path has a complete unix path to the binary
25194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25195    # Keep paths in /bin as-is, but remove trailing .exe if any
25196    new_path="${new_path/%.exe/}"
25197    # Do not save /bin paths to all_fixpath_prefixes!
25198  else
25199    # Not in mixed or Windows style, start by that.
25200    new_path=`cmd //c echo $new_path`
25201
25202  input_path="$new_path"
25203  # Check if we need to convert this using DOS-style short mode. If the path
25204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25205  # take no chances and rewrite it.
25206  # Note: m4 eats our [], so we need to use [ and ] instead.
25207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25208  if test "x$has_forbidden_chars" != x; then
25209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25211  fi
25212
25213    # Output is in $new_path
25214
25215  windows_path="$new_path"
25216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25217    unix_path=`$CYGPATH -u "$windows_path"`
25218    new_path="$unix_path"
25219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25221    new_path="$unix_path"
25222  fi
25223
25224    # remove trailing .exe if any
25225    new_path="${new_path/%.exe/}"
25226
25227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25229  fi
25230
25231  else
25232    # We're on a posix platform. Hooray! :)
25233    # First separate the path from the arguments. This will split at the first
25234    # space.
25235    complete="$AS"
25236    path="${complete%% *}"
25237    tmp="$complete EOL"
25238    arguments="${tmp#* }"
25239
25240    # Cannot rely on the command "which" here since it doesn't always work.
25241    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25242    if test -z "$is_absolute_path"; then
25243      # Path to executable is not absolute. Find it.
25244      IFS_save="$IFS"
25245      IFS=:
25246      for p in $PATH; do
25247        if test -f "$p/$path" && test -x "$p/$path"; then
25248          new_path="$p/$path"
25249          break
25250        fi
25251      done
25252      IFS="$IFS_save"
25253    else
25254      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25255$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25256      new_path="$path"
25257    fi
25258
25259    if test "x$new_path" = x; then
25260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25261$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25262      has_space=`$ECHO "$complete" | $GREP " "`
25263      if test "x$has_space" != x; then
25264        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25266      fi
25267      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25268    fi
25269  fi
25270
25271  # Now join together the path and the arguments once again
25272  if test "x$arguments" != xEOL; then
25273    new_complete="$new_path ${arguments% *}"
25274  else
25275    new_complete="$new_path"
25276  fi
25277
25278  if test "x$complete" != "x$new_complete"; then
25279    AS="$new_complete"
25280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25281$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25282  fi
25283
25284  else
25285    AS="$CC -c"
25286  fi
25287
25288
25289  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25290    # Extract the first word of "nm", so it can be a program name with args.
25291set dummy nm; ac_word=$2
25292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25293$as_echo_n "checking for $ac_word... " >&6; }
25294if ${ac_cv_path_NM+:} false; then :
25295  $as_echo_n "(cached) " >&6
25296else
25297  case $NM in
25298  [\\/]* | ?:[\\/]*)
25299  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25300  ;;
25301  *)
25302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25303for as_dir in $PATH
25304do
25305  IFS=$as_save_IFS
25306  test -z "$as_dir" && as_dir=.
25307    for ac_exec_ext in '' $ac_executable_extensions; do
25308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25309    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25311    break 2
25312  fi
25313done
25314  done
25315IFS=$as_save_IFS
25316
25317  ;;
25318esac
25319fi
25320NM=$ac_cv_path_NM
25321if test -n "$NM"; then
25322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25323$as_echo "$NM" >&6; }
25324else
25325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25326$as_echo "no" >&6; }
25327fi
25328
25329
25330
25331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25332
25333  # First separate the path from the arguments. This will split at the first
25334  # space.
25335  complete="$NM"
25336  path="${complete%% *}"
25337  tmp="$complete EOL"
25338  arguments="${tmp#* }"
25339
25340  # Input might be given as Windows format, start by converting to
25341  # unix format.
25342  new_path=`$CYGPATH -u "$path"`
25343
25344  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
25355    # The splitting of arguments from the executable at a space might have been incorrect,
25356    # since paths with space are more likely in Windows. Give it another try with the whole
25357    # argument.
25358    path="$complete"
25359    arguments="EOL"
25360    new_path=`$CYGPATH -u "$path"`
25361    new_path=`$WHICH "$new_path" 2> /dev/null`
25362    # bat and cmd files are not always considered executable in cygwin causing which
25363    # to not find them
25364    if test "x$new_path" = x \
25365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25367      new_path=`$CYGPATH -u "$path"`
25368    fi
25369    if test "x$new_path" = x; then
25370      # It's still not found. Now this is an unrecoverable error.
25371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25372$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25373      has_space=`$ECHO "$complete" | $GREP " "`
25374      if test "x$has_space" != x; then
25375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25377      fi
25378      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25379    fi
25380  fi
25381
25382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25385  # "foo.exe" is OK but "foo" is an error.
25386  #
25387  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25388  # It is also a way to make sure we got the proper file name for the real test later on.
25389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25390  if test "x$test_shortpath" = x; then
25391    # Short path failed, file does not exist as specified.
25392    # Try adding .exe or .cmd
25393    if test -f "${new_path}.exe"; then
25394      input_to_shortpath="${new_path}.exe"
25395    elif test -f "${new_path}.cmd"; then
25396      input_to_shortpath="${new_path}.cmd"
25397    else
25398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25399$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25400      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25401$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25402      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25403    fi
25404  else
25405    input_to_shortpath="$new_path"
25406  fi
25407
25408  # Call helper function which possibly converts this using DOS-style short mode.
25409  # If so, the updated path is stored in $new_path.
25410  new_path="$input_to_shortpath"
25411
25412  input_path="$input_to_shortpath"
25413  # Check if we need to convert this using DOS-style short mode. If the path
25414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25415  # take no chances and rewrite it.
25416  # Note: m4 eats our [], so we need to use [ and ] instead.
25417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25418  if test "x$has_forbidden_chars" != x; then
25419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25423      # Going to short mode and back again did indeed matter. Since short mode is
25424      # case insensitive, let's make it lowercase to improve readability.
25425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25426      # Now convert it back to Unix-stile (cygpath)
25427      input_path=`$CYGPATH -u "$shortmode_path"`
25428      new_path="$input_path"
25429    fi
25430  fi
25431
25432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25433  if test "x$test_cygdrive_prefix" = x; then
25434    # As a simple fix, exclude /usr/bin since it's not a real path.
25435    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25437      # a path prefixed by /cygdrive for fixpath to work.
25438      new_path="$CYGWIN_ROOT_PATH$input_path"
25439    fi
25440  fi
25441
25442  # remove trailing .exe if any
25443  new_path="${new_path/%.exe/}"
25444
25445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25446
25447  # First separate the path from the arguments. This will split at the first
25448  # space.
25449  complete="$NM"
25450  path="${complete%% *}"
25451  tmp="$complete EOL"
25452  arguments="${tmp#* }"
25453
25454  # Input might be given as Windows format, start by converting to
25455  # unix format.
25456  new_path="$path"
25457
25458  windows_path="$new_path"
25459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25460    unix_path=`$CYGPATH -u "$windows_path"`
25461    new_path="$unix_path"
25462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25464    new_path="$unix_path"
25465  fi
25466
25467
25468  # Now try to locate executable using which
25469  new_path=`$WHICH "$new_path" 2> /dev/null`
25470
25471  if test "x$new_path" = x; then
25472    # Oops. Which didn't find the executable.
25473    # The splitting of arguments from the executable at a space might have been incorrect,
25474    # since paths with space are more likely in Windows. Give it another try with the whole
25475    # argument.
25476    path="$complete"
25477    arguments="EOL"
25478    new_path="$path"
25479
25480  windows_path="$new_path"
25481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25482    unix_path=`$CYGPATH -u "$windows_path"`
25483    new_path="$unix_path"
25484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25486    new_path="$unix_path"
25487  fi
25488
25489
25490    new_path=`$WHICH "$new_path" 2> /dev/null`
25491
25492    if test "x$new_path" = x; then
25493      # It's still not found. Now this is an unrecoverable error.
25494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25495$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25496      has_space=`$ECHO "$complete" | $GREP " "`
25497      if test "x$has_space" != x; then
25498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25500      fi
25501      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25502    fi
25503  fi
25504
25505  # Now new_path has a complete unix path to the binary
25506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25507    # Keep paths in /bin as-is, but remove trailing .exe if any
25508    new_path="${new_path/%.exe/}"
25509    # Do not save /bin paths to all_fixpath_prefixes!
25510  else
25511    # Not in mixed or Windows style, start by that.
25512    new_path=`cmd //c echo $new_path`
25513
25514  input_path="$new_path"
25515  # Check if we need to convert this using DOS-style short mode. If the path
25516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25517  # take no chances and rewrite it.
25518  # Note: m4 eats our [], so we need to use [ and ] instead.
25519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25520  if test "x$has_forbidden_chars" != x; then
25521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25523  fi
25524
25525    # Output is in $new_path
25526
25527  windows_path="$new_path"
25528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25529    unix_path=`$CYGPATH -u "$windows_path"`
25530    new_path="$unix_path"
25531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25533    new_path="$unix_path"
25534  fi
25535
25536    # remove trailing .exe if any
25537    new_path="${new_path/%.exe/}"
25538
25539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25541  fi
25542
25543  else
25544    # We're on a posix platform. Hooray! :)
25545    # First separate the path from the arguments. This will split at the first
25546    # space.
25547    complete="$NM"
25548    path="${complete%% *}"
25549    tmp="$complete EOL"
25550    arguments="${tmp#* }"
25551
25552    # Cannot rely on the command "which" here since it doesn't always work.
25553    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25554    if test -z "$is_absolute_path"; then
25555      # Path to executable is not absolute. Find it.
25556      IFS_save="$IFS"
25557      IFS=:
25558      for p in $PATH; do
25559        if test -f "$p/$path" && test -x "$p/$path"; then
25560          new_path="$p/$path"
25561          break
25562        fi
25563      done
25564      IFS="$IFS_save"
25565    else
25566      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25567$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25568      new_path="$path"
25569    fi
25570
25571    if test "x$new_path" = x; then
25572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25573$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25574      has_space=`$ECHO "$complete" | $GREP " "`
25575      if test "x$has_space" != x; then
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25578      fi
25579      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25580    fi
25581  fi
25582
25583  # Now join together the path and the arguments once again
25584  if test "x$arguments" != xEOL; then
25585    new_complete="$new_path ${arguments% *}"
25586  else
25587    new_complete="$new_path"
25588  fi
25589
25590  if test "x$complete" != "x$new_complete"; then
25591    NM="$new_complete"
25592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25593$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25594  fi
25595
25596    # Extract the first word of "gnm", so it can be a program name with args.
25597set dummy gnm; ac_word=$2
25598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25599$as_echo_n "checking for $ac_word... " >&6; }
25600if ${ac_cv_path_GNM+:} false; then :
25601  $as_echo_n "(cached) " >&6
25602else
25603  case $GNM in
25604  [\\/]* | ?:[\\/]*)
25605  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25606  ;;
25607  *)
25608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25609for as_dir in $PATH
25610do
25611  IFS=$as_save_IFS
25612  test -z "$as_dir" && as_dir=.
25613    for ac_exec_ext in '' $ac_executable_extensions; do
25614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25615    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25617    break 2
25618  fi
25619done
25620  done
25621IFS=$as_save_IFS
25622
25623  ;;
25624esac
25625fi
25626GNM=$ac_cv_path_GNM
25627if test -n "$GNM"; then
25628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25629$as_echo "$GNM" >&6; }
25630else
25631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25632$as_echo "no" >&6; }
25633fi
25634
25635
25636
25637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25638
25639  # First separate the path from the arguments. This will split at the first
25640  # space.
25641  complete="$GNM"
25642  path="${complete%% *}"
25643  tmp="$complete EOL"
25644  arguments="${tmp#* }"
25645
25646  # Input might be given as Windows format, start by converting to
25647  # unix format.
25648  new_path=`$CYGPATH -u "$path"`
25649
25650  # Now try to locate executable using which
25651  new_path=`$WHICH "$new_path" 2> /dev/null`
25652  # bat and cmd files are not always considered executable in cygwin causing which
25653  # to not find them
25654  if test "x$new_path" = x \
25655      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25656      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25657    new_path=`$CYGPATH -u "$path"`
25658  fi
25659  if test "x$new_path" = x; then
25660    # Oops. Which didn't find the executable.
25661    # The splitting of arguments from the executable at a space might have been incorrect,
25662    # since paths with space are more likely in Windows. Give it another try with the whole
25663    # argument.
25664    path="$complete"
25665    arguments="EOL"
25666    new_path=`$CYGPATH -u "$path"`
25667    new_path=`$WHICH "$new_path" 2> /dev/null`
25668    # bat and cmd files are not always considered executable in cygwin causing which
25669    # to not find them
25670    if test "x$new_path" = x \
25671        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25672        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25673      new_path=`$CYGPATH -u "$path"`
25674    fi
25675    if test "x$new_path" = x; then
25676      # It's still not found. Now this is an unrecoverable error.
25677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25678$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25679      has_space=`$ECHO "$complete" | $GREP " "`
25680      if test "x$has_space" != x; then
25681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25683      fi
25684      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25685    fi
25686  fi
25687
25688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25691  # "foo.exe" is OK but "foo" is an error.
25692  #
25693  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25694  # It is also a way to make sure we got the proper file name for the real test later on.
25695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25696  if test "x$test_shortpath" = x; then
25697    # Short path failed, file does not exist as specified.
25698    # Try adding .exe or .cmd
25699    if test -f "${new_path}.exe"; then
25700      input_to_shortpath="${new_path}.exe"
25701    elif test -f "${new_path}.cmd"; then
25702      input_to_shortpath="${new_path}.cmd"
25703    else
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25705$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25706      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25708      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25709    fi
25710  else
25711    input_to_shortpath="$new_path"
25712  fi
25713
25714  # Call helper function which possibly converts this using DOS-style short mode.
25715  # If so, the updated path is stored in $new_path.
25716  new_path="$input_to_shortpath"
25717
25718  input_path="$input_to_shortpath"
25719  # Check if we need to convert this using DOS-style short mode. If the path
25720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25721  # take no chances and rewrite it.
25722  # Note: m4 eats our [], so we need to use [ and ] instead.
25723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25724  if test "x$has_forbidden_chars" != x; then
25725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25729      # Going to short mode and back again did indeed matter. Since short mode is
25730      # case insensitive, let's make it lowercase to improve readability.
25731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25732      # Now convert it back to Unix-stile (cygpath)
25733      input_path=`$CYGPATH -u "$shortmode_path"`
25734      new_path="$input_path"
25735    fi
25736  fi
25737
25738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25739  if test "x$test_cygdrive_prefix" = x; then
25740    # As a simple fix, exclude /usr/bin since it's not a real path.
25741    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25743      # a path prefixed by /cygdrive for fixpath to work.
25744      new_path="$CYGWIN_ROOT_PATH$input_path"
25745    fi
25746  fi
25747
25748  # remove trailing .exe if any
25749  new_path="${new_path/%.exe/}"
25750
25751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25752
25753  # First separate the path from the arguments. This will split at the first
25754  # space.
25755  complete="$GNM"
25756  path="${complete%% *}"
25757  tmp="$complete EOL"
25758  arguments="${tmp#* }"
25759
25760  # Input might be given as Windows format, start by converting to
25761  # unix format.
25762  new_path="$path"
25763
25764  windows_path="$new_path"
25765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25766    unix_path=`$CYGPATH -u "$windows_path"`
25767    new_path="$unix_path"
25768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25770    new_path="$unix_path"
25771  fi
25772
25773
25774  # Now try to locate executable using which
25775  new_path=`$WHICH "$new_path" 2> /dev/null`
25776
25777  if test "x$new_path" = x; then
25778    # Oops. Which didn't find the executable.
25779    # The splitting of arguments from the executable at a space might have been incorrect,
25780    # since paths with space are more likely in Windows. Give it another try with the whole
25781    # argument.
25782    path="$complete"
25783    arguments="EOL"
25784    new_path="$path"
25785
25786  windows_path="$new_path"
25787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25788    unix_path=`$CYGPATH -u "$windows_path"`
25789    new_path="$unix_path"
25790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25792    new_path="$unix_path"
25793  fi
25794
25795
25796    new_path=`$WHICH "$new_path" 2> /dev/null`
25797
25798    if test "x$new_path" = x; then
25799      # It's still not found. Now this is an unrecoverable error.
25800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25801$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25802      has_space=`$ECHO "$complete" | $GREP " "`
25803      if test "x$has_space" != x; then
25804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25806      fi
25807      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25808    fi
25809  fi
25810
25811  # Now new_path has a complete unix path to the binary
25812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25813    # Keep paths in /bin as-is, but remove trailing .exe if any
25814    new_path="${new_path/%.exe/}"
25815    # Do not save /bin paths to all_fixpath_prefixes!
25816  else
25817    # Not in mixed or Windows style, start by that.
25818    new_path=`cmd //c echo $new_path`
25819
25820  input_path="$new_path"
25821  # Check if we need to convert this using DOS-style short mode. If the path
25822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25823  # take no chances and rewrite it.
25824  # Note: m4 eats our [], so we need to use [ and ] instead.
25825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25826  if test "x$has_forbidden_chars" != x; then
25827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25829  fi
25830
25831    # Output is in $new_path
25832
25833  windows_path="$new_path"
25834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25835    unix_path=`$CYGPATH -u "$windows_path"`
25836    new_path="$unix_path"
25837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25839    new_path="$unix_path"
25840  fi
25841
25842    # remove trailing .exe if any
25843    new_path="${new_path/%.exe/}"
25844
25845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25847  fi
25848
25849  else
25850    # We're on a posix platform. Hooray! :)
25851    # First separate the path from the arguments. This will split at the first
25852    # space.
25853    complete="$GNM"
25854    path="${complete%% *}"
25855    tmp="$complete EOL"
25856    arguments="${tmp#* }"
25857
25858    # Cannot rely on the command "which" here since it doesn't always work.
25859    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25860    if test -z "$is_absolute_path"; then
25861      # Path to executable is not absolute. Find it.
25862      IFS_save="$IFS"
25863      IFS=:
25864      for p in $PATH; do
25865        if test -f "$p/$path" && test -x "$p/$path"; then
25866          new_path="$p/$path"
25867          break
25868        fi
25869      done
25870      IFS="$IFS_save"
25871    else
25872      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25873$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25874      new_path="$path"
25875    fi
25876
25877    if test "x$new_path" = x; then
25878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25879$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25880      has_space=`$ECHO "$complete" | $GREP " "`
25881      if test "x$has_space" != x; then
25882        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25884      fi
25885      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25886    fi
25887  fi
25888
25889  # Now join together the path and the arguments once again
25890  if test "x$arguments" != xEOL; then
25891    new_complete="$new_path ${arguments% *}"
25892  else
25893    new_complete="$new_path"
25894  fi
25895
25896  if test "x$complete" != "x$new_complete"; then
25897    GNM="$new_complete"
25898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25899$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25900  fi
25901
25902    # Extract the first word of "strip", so it can be a program name with args.
25903set dummy strip; ac_word=$2
25904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25905$as_echo_n "checking for $ac_word... " >&6; }
25906if ${ac_cv_path_STRIP+:} false; then :
25907  $as_echo_n "(cached) " >&6
25908else
25909  case $STRIP in
25910  [\\/]* | ?:[\\/]*)
25911  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25912  ;;
25913  *)
25914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25915for as_dir in $PATH
25916do
25917  IFS=$as_save_IFS
25918  test -z "$as_dir" && as_dir=.
25919    for ac_exec_ext in '' $ac_executable_extensions; do
25920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25921    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25923    break 2
25924  fi
25925done
25926  done
25927IFS=$as_save_IFS
25928
25929  ;;
25930esac
25931fi
25932STRIP=$ac_cv_path_STRIP
25933if test -n "$STRIP"; then
25934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25935$as_echo "$STRIP" >&6; }
25936else
25937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25938$as_echo "no" >&6; }
25939fi
25940
25941
25942
25943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25944
25945  # First separate the path from the arguments. This will split at the first
25946  # space.
25947  complete="$STRIP"
25948  path="${complete%% *}"
25949  tmp="$complete EOL"
25950  arguments="${tmp#* }"
25951
25952  # Input might be given as Windows format, start by converting to
25953  # unix format.
25954  new_path=`$CYGPATH -u "$path"`
25955
25956  # Now try to locate executable using which
25957  new_path=`$WHICH "$new_path" 2> /dev/null`
25958  # bat and cmd files are not always considered executable in cygwin causing which
25959  # to not find them
25960  if test "x$new_path" = x \
25961      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25962      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25963    new_path=`$CYGPATH -u "$path"`
25964  fi
25965  if test "x$new_path" = x; then
25966    # Oops. Which didn't find the executable.
25967    # The splitting of arguments from the executable at a space might have been incorrect,
25968    # since paths with space are more likely in Windows. Give it another try with the whole
25969    # argument.
25970    path="$complete"
25971    arguments="EOL"
25972    new_path=`$CYGPATH -u "$path"`
25973    new_path=`$WHICH "$new_path" 2> /dev/null`
25974    # bat and cmd files are not always considered executable in cygwin causing which
25975    # to not find them
25976    if test "x$new_path" = x \
25977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25979      new_path=`$CYGPATH -u "$path"`
25980    fi
25981    if test "x$new_path" = x; then
25982      # It's still not found. Now this is an unrecoverable error.
25983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25984$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25985      has_space=`$ECHO "$complete" | $GREP " "`
25986      if test "x$has_space" != x; then
25987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25989      fi
25990      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25991    fi
25992  fi
25993
25994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25997  # "foo.exe" is OK but "foo" is an error.
25998  #
25999  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26000  # It is also a way to make sure we got the proper file name for the real test later on.
26001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26002  if test "x$test_shortpath" = x; then
26003    # Short path failed, file does not exist as specified.
26004    # Try adding .exe or .cmd
26005    if test -f "${new_path}.exe"; then
26006      input_to_shortpath="${new_path}.exe"
26007    elif test -f "${new_path}.cmd"; then
26008      input_to_shortpath="${new_path}.cmd"
26009    else
26010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26011$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26012      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26013$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26014      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26015    fi
26016  else
26017    input_to_shortpath="$new_path"
26018  fi
26019
26020  # Call helper function which possibly converts this using DOS-style short mode.
26021  # If so, the updated path is stored in $new_path.
26022  new_path="$input_to_shortpath"
26023
26024  input_path="$input_to_shortpath"
26025  # Check if we need to convert this using DOS-style short mode. If the path
26026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26027  # take no chances and rewrite it.
26028  # Note: m4 eats our [], so we need to use [ and ] instead.
26029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26030  if test "x$has_forbidden_chars" != x; then
26031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26035      # Going to short mode and back again did indeed matter. Since short mode is
26036      # case insensitive, let's make it lowercase to improve readability.
26037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26038      # Now convert it back to Unix-stile (cygpath)
26039      input_path=`$CYGPATH -u "$shortmode_path"`
26040      new_path="$input_path"
26041    fi
26042  fi
26043
26044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26045  if test "x$test_cygdrive_prefix" = x; then
26046    # As a simple fix, exclude /usr/bin since it's not a real path.
26047    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26049      # a path prefixed by /cygdrive for fixpath to work.
26050      new_path="$CYGWIN_ROOT_PATH$input_path"
26051    fi
26052  fi
26053
26054  # remove trailing .exe if any
26055  new_path="${new_path/%.exe/}"
26056
26057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26058
26059  # First separate the path from the arguments. This will split at the first
26060  # space.
26061  complete="$STRIP"
26062  path="${complete%% *}"
26063  tmp="$complete EOL"
26064  arguments="${tmp#* }"
26065
26066  # Input might be given as Windows format, start by converting to
26067  # unix format.
26068  new_path="$path"
26069
26070  windows_path="$new_path"
26071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26072    unix_path=`$CYGPATH -u "$windows_path"`
26073    new_path="$unix_path"
26074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26076    new_path="$unix_path"
26077  fi
26078
26079
26080  # Now try to locate executable using which
26081  new_path=`$WHICH "$new_path" 2> /dev/null`
26082
26083  if test "x$new_path" = x; then
26084    # Oops. Which didn't find the executable.
26085    # The splitting of arguments from the executable at a space might have been incorrect,
26086    # since paths with space are more likely in Windows. Give it another try with the whole
26087    # argument.
26088    path="$complete"
26089    arguments="EOL"
26090    new_path="$path"
26091
26092  windows_path="$new_path"
26093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26094    unix_path=`$CYGPATH -u "$windows_path"`
26095    new_path="$unix_path"
26096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26098    new_path="$unix_path"
26099  fi
26100
26101
26102    new_path=`$WHICH "$new_path" 2> /dev/null`
26103
26104    if test "x$new_path" = x; then
26105      # It's still not found. Now this is an unrecoverable error.
26106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26107$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26108      has_space=`$ECHO "$complete" | $GREP " "`
26109      if test "x$has_space" != x; then
26110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26112      fi
26113      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26114    fi
26115  fi
26116
26117  # Now new_path has a complete unix path to the binary
26118  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26119    # Keep paths in /bin as-is, but remove trailing .exe if any
26120    new_path="${new_path/%.exe/}"
26121    # Do not save /bin paths to all_fixpath_prefixes!
26122  else
26123    # Not in mixed or Windows style, start by that.
26124    new_path=`cmd //c echo $new_path`
26125
26126  input_path="$new_path"
26127  # Check if we need to convert this using DOS-style short mode. If the path
26128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26129  # take no chances and rewrite it.
26130  # Note: m4 eats our [], so we need to use [ and ] instead.
26131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26132  if test "x$has_forbidden_chars" != x; then
26133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26135  fi
26136
26137    # Output is in $new_path
26138
26139  windows_path="$new_path"
26140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26141    unix_path=`$CYGPATH -u "$windows_path"`
26142    new_path="$unix_path"
26143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26145    new_path="$unix_path"
26146  fi
26147
26148    # remove trailing .exe if any
26149    new_path="${new_path/%.exe/}"
26150
26151    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26152    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26153  fi
26154
26155  else
26156    # We're on a posix platform. Hooray! :)
26157    # First separate the path from the arguments. This will split at the first
26158    # space.
26159    complete="$STRIP"
26160    path="${complete%% *}"
26161    tmp="$complete EOL"
26162    arguments="${tmp#* }"
26163
26164    # Cannot rely on the command "which" here since it doesn't always work.
26165    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26166    if test -z "$is_absolute_path"; then
26167      # Path to executable is not absolute. Find it.
26168      IFS_save="$IFS"
26169      IFS=:
26170      for p in $PATH; do
26171        if test -f "$p/$path" && test -x "$p/$path"; then
26172          new_path="$p/$path"
26173          break
26174        fi
26175      done
26176      IFS="$IFS_save"
26177    else
26178      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26179$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26180      new_path="$path"
26181    fi
26182
26183    if test "x$new_path" = x; then
26184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26185$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26186      has_space=`$ECHO "$complete" | $GREP " "`
26187      if test "x$has_space" != x; then
26188        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26189$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26190      fi
26191      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26192    fi
26193  fi
26194
26195  # Now join together the path and the arguments once again
26196  if test "x$arguments" != xEOL; then
26197    new_complete="$new_path ${arguments% *}"
26198  else
26199    new_complete="$new_path"
26200  fi
26201
26202  if test "x$complete" != "x$new_complete"; then
26203    STRIP="$new_complete"
26204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26205$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26206  fi
26207
26208    # Extract the first word of "mcs", so it can be a program name with args.
26209set dummy mcs; ac_word=$2
26210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26211$as_echo_n "checking for $ac_word... " >&6; }
26212if ${ac_cv_path_MCS+:} false; then :
26213  $as_echo_n "(cached) " >&6
26214else
26215  case $MCS in
26216  [\\/]* | ?:[\\/]*)
26217  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26218  ;;
26219  *)
26220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26221for as_dir in $PATH
26222do
26223  IFS=$as_save_IFS
26224  test -z "$as_dir" && as_dir=.
26225    for ac_exec_ext in '' $ac_executable_extensions; do
26226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26227    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26229    break 2
26230  fi
26231done
26232  done
26233IFS=$as_save_IFS
26234
26235  ;;
26236esac
26237fi
26238MCS=$ac_cv_path_MCS
26239if test -n "$MCS"; then
26240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26241$as_echo "$MCS" >&6; }
26242else
26243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26244$as_echo "no" >&6; }
26245fi
26246
26247
26248
26249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26250
26251  # First separate the path from the arguments. This will split at the first
26252  # space.
26253  complete="$MCS"
26254  path="${complete%% *}"
26255  tmp="$complete EOL"
26256  arguments="${tmp#* }"
26257
26258  # Input might be given as Windows format, start by converting to
26259  # unix format.
26260  new_path=`$CYGPATH -u "$path"`
26261
26262  # Now try to locate executable using which
26263  new_path=`$WHICH "$new_path" 2> /dev/null`
26264  # bat and cmd files are not always considered executable in cygwin causing which
26265  # to not find them
26266  if test "x$new_path" = x \
26267      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26268      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26269    new_path=`$CYGPATH -u "$path"`
26270  fi
26271  if test "x$new_path" = x; then
26272    # Oops. Which didn't find the executable.
26273    # The splitting of arguments from the executable at a space might have been incorrect,
26274    # since paths with space are more likely in Windows. Give it another try with the whole
26275    # argument.
26276    path="$complete"
26277    arguments="EOL"
26278    new_path=`$CYGPATH -u "$path"`
26279    new_path=`$WHICH "$new_path" 2> /dev/null`
26280    # bat and cmd files are not always considered executable in cygwin causing which
26281    # to not find them
26282    if test "x$new_path" = x \
26283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26285      new_path=`$CYGPATH -u "$path"`
26286    fi
26287    if test "x$new_path" = x; then
26288      # It's still not found. Now this is an unrecoverable error.
26289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26290$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26291      has_space=`$ECHO "$complete" | $GREP " "`
26292      if test "x$has_space" != x; then
26293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26295      fi
26296      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26297    fi
26298  fi
26299
26300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26303  # "foo.exe" is OK but "foo" is an error.
26304  #
26305  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26306  # It is also a way to make sure we got the proper file name for the real test later on.
26307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26308  if test "x$test_shortpath" = x; then
26309    # Short path failed, file does not exist as specified.
26310    # Try adding .exe or .cmd
26311    if test -f "${new_path}.exe"; then
26312      input_to_shortpath="${new_path}.exe"
26313    elif test -f "${new_path}.cmd"; then
26314      input_to_shortpath="${new_path}.cmd"
26315    else
26316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26317$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26320      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26321    fi
26322  else
26323    input_to_shortpath="$new_path"
26324  fi
26325
26326  # Call helper function which possibly converts this using DOS-style short mode.
26327  # If so, the updated path is stored in $new_path.
26328  new_path="$input_to_shortpath"
26329
26330  input_path="$input_to_shortpath"
26331  # Check if we need to convert this using DOS-style short mode. If the path
26332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26333  # take no chances and rewrite it.
26334  # Note: m4 eats our [], so we need to use [ and ] instead.
26335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26336  if test "x$has_forbidden_chars" != x; then
26337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26341      # Going to short mode and back again did indeed matter. Since short mode is
26342      # case insensitive, let's make it lowercase to improve readability.
26343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26344      # Now convert it back to Unix-stile (cygpath)
26345      input_path=`$CYGPATH -u "$shortmode_path"`
26346      new_path="$input_path"
26347    fi
26348  fi
26349
26350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26351  if test "x$test_cygdrive_prefix" = x; then
26352    # As a simple fix, exclude /usr/bin since it's not a real path.
26353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26355      # a path prefixed by /cygdrive for fixpath to work.
26356      new_path="$CYGWIN_ROOT_PATH$input_path"
26357    fi
26358  fi
26359
26360  # remove trailing .exe if any
26361  new_path="${new_path/%.exe/}"
26362
26363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26364
26365  # First separate the path from the arguments. This will split at the first
26366  # space.
26367  complete="$MCS"
26368  path="${complete%% *}"
26369  tmp="$complete EOL"
26370  arguments="${tmp#* }"
26371
26372  # Input might be given as Windows format, start by converting to
26373  # unix format.
26374  new_path="$path"
26375
26376  windows_path="$new_path"
26377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26378    unix_path=`$CYGPATH -u "$windows_path"`
26379    new_path="$unix_path"
26380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26382    new_path="$unix_path"
26383  fi
26384
26385
26386  # Now try to locate executable using which
26387  new_path=`$WHICH "$new_path" 2> /dev/null`
26388
26389  if test "x$new_path" = x; then
26390    # Oops. Which didn't find the executable.
26391    # The splitting of arguments from the executable at a space might have been incorrect,
26392    # since paths with space are more likely in Windows. Give it another try with the whole
26393    # argument.
26394    path="$complete"
26395    arguments="EOL"
26396    new_path="$path"
26397
26398  windows_path="$new_path"
26399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26400    unix_path=`$CYGPATH -u "$windows_path"`
26401    new_path="$unix_path"
26402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26404    new_path="$unix_path"
26405  fi
26406
26407
26408    new_path=`$WHICH "$new_path" 2> /dev/null`
26409
26410    if test "x$new_path" = x; then
26411      # It's still not found. Now this is an unrecoverable error.
26412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26413$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26414      has_space=`$ECHO "$complete" | $GREP " "`
26415      if test "x$has_space" != x; then
26416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26418      fi
26419      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26420    fi
26421  fi
26422
26423  # Now new_path has a complete unix path to the binary
26424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26425    # Keep paths in /bin as-is, but remove trailing .exe if any
26426    new_path="${new_path/%.exe/}"
26427    # Do not save /bin paths to all_fixpath_prefixes!
26428  else
26429    # Not in mixed or Windows style, start by that.
26430    new_path=`cmd //c echo $new_path`
26431
26432  input_path="$new_path"
26433  # Check if we need to convert this using DOS-style short mode. If the path
26434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26435  # take no chances and rewrite it.
26436  # Note: m4 eats our [], so we need to use [ and ] instead.
26437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26438  if test "x$has_forbidden_chars" != x; then
26439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26441  fi
26442
26443    # Output is in $new_path
26444
26445  windows_path="$new_path"
26446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26447    unix_path=`$CYGPATH -u "$windows_path"`
26448    new_path="$unix_path"
26449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26451    new_path="$unix_path"
26452  fi
26453
26454    # remove trailing .exe if any
26455    new_path="${new_path/%.exe/}"
26456
26457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26459  fi
26460
26461  else
26462    # We're on a posix platform. Hooray! :)
26463    # First separate the path from the arguments. This will split at the first
26464    # space.
26465    complete="$MCS"
26466    path="${complete%% *}"
26467    tmp="$complete EOL"
26468    arguments="${tmp#* }"
26469
26470    # Cannot rely on the command "which" here since it doesn't always work.
26471    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26472    if test -z "$is_absolute_path"; then
26473      # Path to executable is not absolute. Find it.
26474      IFS_save="$IFS"
26475      IFS=:
26476      for p in $PATH; do
26477        if test -f "$p/$path" && test -x "$p/$path"; then
26478          new_path="$p/$path"
26479          break
26480        fi
26481      done
26482      IFS="$IFS_save"
26483    else
26484      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26485$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26486      new_path="$path"
26487    fi
26488
26489    if test "x$new_path" = x; then
26490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26491$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26492      has_space=`$ECHO "$complete" | $GREP " "`
26493      if test "x$has_space" != x; then
26494        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26496      fi
26497      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26498    fi
26499  fi
26500
26501  # Now join together the path and the arguments once again
26502  if test "x$arguments" != xEOL; then
26503    new_complete="$new_path ${arguments% *}"
26504  else
26505    new_complete="$new_path"
26506  fi
26507
26508  if test "x$complete" != "x$new_complete"; then
26509    MCS="$new_complete"
26510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26511$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26512  fi
26513
26514  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26515    if test -n "$ac_tool_prefix"; then
26516  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26517set dummy ${ac_tool_prefix}nm; ac_word=$2
26518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26519$as_echo_n "checking for $ac_word... " >&6; }
26520if ${ac_cv_prog_NM+:} false; then :
26521  $as_echo_n "(cached) " >&6
26522else
26523  if test -n "$NM"; then
26524  ac_cv_prog_NM="$NM" # Let the user override the test.
26525else
26526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26527for as_dir in $PATH
26528do
26529  IFS=$as_save_IFS
26530  test -z "$as_dir" && as_dir=.
26531    for ac_exec_ext in '' $ac_executable_extensions; do
26532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26533    ac_cv_prog_NM="${ac_tool_prefix}nm"
26534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26535    break 2
26536  fi
26537done
26538  done
26539IFS=$as_save_IFS
26540
26541fi
26542fi
26543NM=$ac_cv_prog_NM
26544if test -n "$NM"; then
26545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26546$as_echo "$NM" >&6; }
26547else
26548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26549$as_echo "no" >&6; }
26550fi
26551
26552
26553fi
26554if test -z "$ac_cv_prog_NM"; then
26555  ac_ct_NM=$NM
26556  # Extract the first word of "nm", so it can be a program name with args.
26557set dummy nm; ac_word=$2
26558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26559$as_echo_n "checking for $ac_word... " >&6; }
26560if ${ac_cv_prog_ac_ct_NM+:} false; then :
26561  $as_echo_n "(cached) " >&6
26562else
26563  if test -n "$ac_ct_NM"; then
26564  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26565else
26566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26567for as_dir in $PATH
26568do
26569  IFS=$as_save_IFS
26570  test -z "$as_dir" && as_dir=.
26571    for ac_exec_ext in '' $ac_executable_extensions; do
26572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26573    ac_cv_prog_ac_ct_NM="nm"
26574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26575    break 2
26576  fi
26577done
26578  done
26579IFS=$as_save_IFS
26580
26581fi
26582fi
26583ac_ct_NM=$ac_cv_prog_ac_ct_NM
26584if test -n "$ac_ct_NM"; then
26585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26586$as_echo "$ac_ct_NM" >&6; }
26587else
26588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26589$as_echo "no" >&6; }
26590fi
26591
26592  if test "x$ac_ct_NM" = x; then
26593    NM=""
26594  else
26595    case $cross_compiling:$ac_tool_warned in
26596yes:)
26597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26599ac_tool_warned=yes ;;
26600esac
26601    NM=$ac_ct_NM
26602  fi
26603else
26604  NM="$ac_cv_prog_NM"
26605fi
26606
26607
26608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26609
26610  # First separate the path from the arguments. This will split at the first
26611  # space.
26612  complete="$NM"
26613  path="${complete%% *}"
26614  tmp="$complete EOL"
26615  arguments="${tmp#* }"
26616
26617  # Input might be given as Windows format, start by converting to
26618  # unix format.
26619  new_path=`$CYGPATH -u "$path"`
26620
26621  # Now try to locate executable using which
26622  new_path=`$WHICH "$new_path" 2> /dev/null`
26623  # bat and cmd files are not always considered executable in cygwin causing which
26624  # to not find them
26625  if test "x$new_path" = x \
26626      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26627      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26628    new_path=`$CYGPATH -u "$path"`
26629  fi
26630  if test "x$new_path" = x; then
26631    # Oops. Which didn't find the executable.
26632    # The splitting of arguments from the executable at a space might have been incorrect,
26633    # since paths with space are more likely in Windows. Give it another try with the whole
26634    # argument.
26635    path="$complete"
26636    arguments="EOL"
26637    new_path=`$CYGPATH -u "$path"`
26638    new_path=`$WHICH "$new_path" 2> /dev/null`
26639    # bat and cmd files are not always considered executable in cygwin causing which
26640    # to not find them
26641    if test "x$new_path" = x \
26642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26644      new_path=`$CYGPATH -u "$path"`
26645    fi
26646    if test "x$new_path" = x; then
26647      # It's still not found. Now this is an unrecoverable error.
26648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26649$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26650      has_space=`$ECHO "$complete" | $GREP " "`
26651      if test "x$has_space" != x; then
26652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26654      fi
26655      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26656    fi
26657  fi
26658
26659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26662  # "foo.exe" is OK but "foo" is an error.
26663  #
26664  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26665  # It is also a way to make sure we got the proper file name for the real test later on.
26666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26667  if test "x$test_shortpath" = x; then
26668    # Short path failed, file does not exist as specified.
26669    # Try adding .exe or .cmd
26670    if test -f "${new_path}.exe"; then
26671      input_to_shortpath="${new_path}.exe"
26672    elif test -f "${new_path}.cmd"; then
26673      input_to_shortpath="${new_path}.cmd"
26674    else
26675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26676$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26679      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26680    fi
26681  else
26682    input_to_shortpath="$new_path"
26683  fi
26684
26685  # Call helper function which possibly converts this using DOS-style short mode.
26686  # If so, the updated path is stored in $new_path.
26687  new_path="$input_to_shortpath"
26688
26689  input_path="$input_to_shortpath"
26690  # Check if we need to convert this using DOS-style short mode. If the path
26691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26692  # take no chances and rewrite it.
26693  # Note: m4 eats our [], so we need to use [ and ] instead.
26694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26695  if test "x$has_forbidden_chars" != x; then
26696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26700      # Going to short mode and back again did indeed matter. Since short mode is
26701      # case insensitive, let's make it lowercase to improve readability.
26702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26703      # Now convert it back to Unix-stile (cygpath)
26704      input_path=`$CYGPATH -u "$shortmode_path"`
26705      new_path="$input_path"
26706    fi
26707  fi
26708
26709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26710  if test "x$test_cygdrive_prefix" = x; then
26711    # As a simple fix, exclude /usr/bin since it's not a real path.
26712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26714      # a path prefixed by /cygdrive for fixpath to work.
26715      new_path="$CYGWIN_ROOT_PATH$input_path"
26716    fi
26717  fi
26718
26719  # remove trailing .exe if any
26720  new_path="${new_path/%.exe/}"
26721
26722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26723
26724  # First separate the path from the arguments. This will split at the first
26725  # space.
26726  complete="$NM"
26727  path="${complete%% *}"
26728  tmp="$complete EOL"
26729  arguments="${tmp#* }"
26730
26731  # Input might be given as Windows format, start by converting to
26732  # unix format.
26733  new_path="$path"
26734
26735  windows_path="$new_path"
26736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26737    unix_path=`$CYGPATH -u "$windows_path"`
26738    new_path="$unix_path"
26739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26741    new_path="$unix_path"
26742  fi
26743
26744
26745  # Now try to locate executable using which
26746  new_path=`$WHICH "$new_path" 2> /dev/null`
26747
26748  if test "x$new_path" = x; then
26749    # Oops. Which didn't find the executable.
26750    # The splitting of arguments from the executable at a space might have been incorrect,
26751    # since paths with space are more likely in Windows. Give it another try with the whole
26752    # argument.
26753    path="$complete"
26754    arguments="EOL"
26755    new_path="$path"
26756
26757  windows_path="$new_path"
26758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759    unix_path=`$CYGPATH -u "$windows_path"`
26760    new_path="$unix_path"
26761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26763    new_path="$unix_path"
26764  fi
26765
26766
26767    new_path=`$WHICH "$new_path" 2> /dev/null`
26768
26769    if test "x$new_path" = x; then
26770      # It's still not found. Now this is an unrecoverable error.
26771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26772$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26773      has_space=`$ECHO "$complete" | $GREP " "`
26774      if test "x$has_space" != x; then
26775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26777      fi
26778      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26779    fi
26780  fi
26781
26782  # Now new_path has a complete unix path to the binary
26783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26784    # Keep paths in /bin as-is, but remove trailing .exe if any
26785    new_path="${new_path/%.exe/}"
26786    # Do not save /bin paths to all_fixpath_prefixes!
26787  else
26788    # Not in mixed or Windows style, start by that.
26789    new_path=`cmd //c echo $new_path`
26790
26791  input_path="$new_path"
26792  # Check if we need to convert this using DOS-style short mode. If the path
26793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26794  # take no chances and rewrite it.
26795  # Note: m4 eats our [], so we need to use [ and ] instead.
26796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26797  if test "x$has_forbidden_chars" != x; then
26798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26800  fi
26801
26802    # Output is in $new_path
26803
26804  windows_path="$new_path"
26805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26806    unix_path=`$CYGPATH -u "$windows_path"`
26807    new_path="$unix_path"
26808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26810    new_path="$unix_path"
26811  fi
26812
26813    # remove trailing .exe if any
26814    new_path="${new_path/%.exe/}"
26815
26816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26818  fi
26819
26820  else
26821    # We're on a posix platform. Hooray! :)
26822    # First separate the path from the arguments. This will split at the first
26823    # space.
26824    complete="$NM"
26825    path="${complete%% *}"
26826    tmp="$complete EOL"
26827    arguments="${tmp#* }"
26828
26829    # Cannot rely on the command "which" here since it doesn't always work.
26830    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26831    if test -z "$is_absolute_path"; then
26832      # Path to executable is not absolute. Find it.
26833      IFS_save="$IFS"
26834      IFS=:
26835      for p in $PATH; do
26836        if test -f "$p/$path" && test -x "$p/$path"; then
26837          new_path="$p/$path"
26838          break
26839        fi
26840      done
26841      IFS="$IFS_save"
26842    else
26843      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26844$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26845      new_path="$path"
26846    fi
26847
26848    if test "x$new_path" = x; then
26849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26850$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26851      has_space=`$ECHO "$complete" | $GREP " "`
26852      if test "x$has_space" != x; then
26853        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26855      fi
26856      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26857    fi
26858  fi
26859
26860  # Now join together the path and the arguments once again
26861  if test "x$arguments" != xEOL; then
26862    new_complete="$new_path ${arguments% *}"
26863  else
26864    new_complete="$new_path"
26865  fi
26866
26867  if test "x$complete" != "x$new_complete"; then
26868    NM="$new_complete"
26869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26870$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26871  fi
26872
26873    GNM="$NM"
26874
26875    if test -n "$ac_tool_prefix"; then
26876  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26877set dummy ${ac_tool_prefix}strip; ac_word=$2
26878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26879$as_echo_n "checking for $ac_word... " >&6; }
26880if ${ac_cv_prog_STRIP+:} false; then :
26881  $as_echo_n "(cached) " >&6
26882else
26883  if test -n "$STRIP"; then
26884  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26885else
26886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26887for as_dir in $PATH
26888do
26889  IFS=$as_save_IFS
26890  test -z "$as_dir" && as_dir=.
26891    for ac_exec_ext in '' $ac_executable_extensions; do
26892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26893    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26895    break 2
26896  fi
26897done
26898  done
26899IFS=$as_save_IFS
26900
26901fi
26902fi
26903STRIP=$ac_cv_prog_STRIP
26904if test -n "$STRIP"; then
26905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26906$as_echo "$STRIP" >&6; }
26907else
26908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26909$as_echo "no" >&6; }
26910fi
26911
26912
26913fi
26914if test -z "$ac_cv_prog_STRIP"; then
26915  ac_ct_STRIP=$STRIP
26916  # Extract the first word of "strip", so it can be a program name with args.
26917set dummy strip; ac_word=$2
26918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26919$as_echo_n "checking for $ac_word... " >&6; }
26920if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26921  $as_echo_n "(cached) " >&6
26922else
26923  if test -n "$ac_ct_STRIP"; then
26924  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26925else
26926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26927for as_dir in $PATH
26928do
26929  IFS=$as_save_IFS
26930  test -z "$as_dir" && as_dir=.
26931    for ac_exec_ext in '' $ac_executable_extensions; do
26932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26933    ac_cv_prog_ac_ct_STRIP="strip"
26934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26935    break 2
26936  fi
26937done
26938  done
26939IFS=$as_save_IFS
26940
26941fi
26942fi
26943ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26944if test -n "$ac_ct_STRIP"; then
26945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26946$as_echo "$ac_ct_STRIP" >&6; }
26947else
26948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26949$as_echo "no" >&6; }
26950fi
26951
26952  if test "x$ac_ct_STRIP" = x; then
26953    STRIP=""
26954  else
26955    case $cross_compiling:$ac_tool_warned in
26956yes:)
26957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26959ac_tool_warned=yes ;;
26960esac
26961    STRIP=$ac_ct_STRIP
26962  fi
26963else
26964  STRIP="$ac_cv_prog_STRIP"
26965fi
26966
26967
26968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26969
26970  # First separate the path from the arguments. This will split at the first
26971  # space.
26972  complete="$STRIP"
26973  path="${complete%% *}"
26974  tmp="$complete EOL"
26975  arguments="${tmp#* }"
26976
26977  # Input might be given as Windows format, start by converting to
26978  # unix format.
26979  new_path=`$CYGPATH -u "$path"`
26980
26981  # Now try to locate executable using which
26982  new_path=`$WHICH "$new_path" 2> /dev/null`
26983  # bat and cmd files are not always considered executable in cygwin causing which
26984  # to not find them
26985  if test "x$new_path" = x \
26986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26988    new_path=`$CYGPATH -u "$path"`
26989  fi
26990  if test "x$new_path" = x; then
26991    # Oops. Which didn't find the executable.
26992    # The splitting of arguments from the executable at a space might have been incorrect,
26993    # since paths with space are more likely in Windows. Give it another try with the whole
26994    # argument.
26995    path="$complete"
26996    arguments="EOL"
26997    new_path=`$CYGPATH -u "$path"`
26998    new_path=`$WHICH "$new_path" 2> /dev/null`
26999    # bat and cmd files are not always considered executable in cygwin causing which
27000    # to not find them
27001    if test "x$new_path" = x \
27002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27004      new_path=`$CYGPATH -u "$path"`
27005    fi
27006    if test "x$new_path" = x; then
27007      # It's still not found. Now this is an unrecoverable error.
27008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27009$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27010      has_space=`$ECHO "$complete" | $GREP " "`
27011      if test "x$has_space" != x; then
27012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27014      fi
27015      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27016    fi
27017  fi
27018
27019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27022  # "foo.exe" is OK but "foo" is an error.
27023  #
27024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27025  # It is also a way to make sure we got the proper file name for the real test later on.
27026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27027  if test "x$test_shortpath" = x; then
27028    # Short path failed, file does not exist as specified.
27029    # Try adding .exe or .cmd
27030    if test -f "${new_path}.exe"; then
27031      input_to_shortpath="${new_path}.exe"
27032    elif test -f "${new_path}.cmd"; then
27033      input_to_shortpath="${new_path}.cmd"
27034    else
27035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27036$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27039      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27040    fi
27041  else
27042    input_to_shortpath="$new_path"
27043  fi
27044
27045  # Call helper function which possibly converts this using DOS-style short mode.
27046  # If so, the updated path is stored in $new_path.
27047  new_path="$input_to_shortpath"
27048
27049  input_path="$input_to_shortpath"
27050  # Check if we need to convert this using DOS-style short mode. If the path
27051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27052  # take no chances and rewrite it.
27053  # Note: m4 eats our [], so we need to use [ and ] instead.
27054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27055  if test "x$has_forbidden_chars" != x; then
27056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27060      # Going to short mode and back again did indeed matter. Since short mode is
27061      # case insensitive, let's make it lowercase to improve readability.
27062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27063      # Now convert it back to Unix-stile (cygpath)
27064      input_path=`$CYGPATH -u "$shortmode_path"`
27065      new_path="$input_path"
27066    fi
27067  fi
27068
27069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27070  if test "x$test_cygdrive_prefix" = x; then
27071    # As a simple fix, exclude /usr/bin since it's not a real path.
27072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27074      # a path prefixed by /cygdrive for fixpath to work.
27075      new_path="$CYGWIN_ROOT_PATH$input_path"
27076    fi
27077  fi
27078
27079  # remove trailing .exe if any
27080  new_path="${new_path/%.exe/}"
27081
27082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27083
27084  # First separate the path from the arguments. This will split at the first
27085  # space.
27086  complete="$STRIP"
27087  path="${complete%% *}"
27088  tmp="$complete EOL"
27089  arguments="${tmp#* }"
27090
27091  # Input might be given as Windows format, start by converting to
27092  # unix format.
27093  new_path="$path"
27094
27095  windows_path="$new_path"
27096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27097    unix_path=`$CYGPATH -u "$windows_path"`
27098    new_path="$unix_path"
27099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27101    new_path="$unix_path"
27102  fi
27103
27104
27105  # Now try to locate executable using which
27106  new_path=`$WHICH "$new_path" 2> /dev/null`
27107
27108  if test "x$new_path" = x; then
27109    # Oops. Which didn't find the executable.
27110    # The splitting of arguments from the executable at a space might have been incorrect,
27111    # since paths with space are more likely in Windows. Give it another try with the whole
27112    # argument.
27113    path="$complete"
27114    arguments="EOL"
27115    new_path="$path"
27116
27117  windows_path="$new_path"
27118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27119    unix_path=`$CYGPATH -u "$windows_path"`
27120    new_path="$unix_path"
27121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27123    new_path="$unix_path"
27124  fi
27125
27126
27127    new_path=`$WHICH "$new_path" 2> /dev/null`
27128
27129    if test "x$new_path" = x; then
27130      # It's still not found. Now this is an unrecoverable error.
27131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27132$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27133      has_space=`$ECHO "$complete" | $GREP " "`
27134      if test "x$has_space" != x; then
27135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27137      fi
27138      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27139    fi
27140  fi
27141
27142  # Now new_path has a complete unix path to the binary
27143  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27144    # Keep paths in /bin as-is, but remove trailing .exe if any
27145    new_path="${new_path/%.exe/}"
27146    # Do not save /bin paths to all_fixpath_prefixes!
27147  else
27148    # Not in mixed or Windows style, start by that.
27149    new_path=`cmd //c echo $new_path`
27150
27151  input_path="$new_path"
27152  # Check if we need to convert this using DOS-style short mode. If the path
27153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27154  # take no chances and rewrite it.
27155  # Note: m4 eats our [], so we need to use [ and ] instead.
27156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27157  if test "x$has_forbidden_chars" != x; then
27158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27160  fi
27161
27162    # Output is in $new_path
27163
27164  windows_path="$new_path"
27165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27166    unix_path=`$CYGPATH -u "$windows_path"`
27167    new_path="$unix_path"
27168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27170    new_path="$unix_path"
27171  fi
27172
27173    # remove trailing .exe if any
27174    new_path="${new_path/%.exe/}"
27175
27176    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27177    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27178  fi
27179
27180  else
27181    # We're on a posix platform. Hooray! :)
27182    # First separate the path from the arguments. This will split at the first
27183    # space.
27184    complete="$STRIP"
27185    path="${complete%% *}"
27186    tmp="$complete EOL"
27187    arguments="${tmp#* }"
27188
27189    # Cannot rely on the command "which" here since it doesn't always work.
27190    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27191    if test -z "$is_absolute_path"; then
27192      # Path to executable is not absolute. Find it.
27193      IFS_save="$IFS"
27194      IFS=:
27195      for p in $PATH; do
27196        if test -f "$p/$path" && test -x "$p/$path"; then
27197          new_path="$p/$path"
27198          break
27199        fi
27200      done
27201      IFS="$IFS_save"
27202    else
27203      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27204$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27205      new_path="$path"
27206    fi
27207
27208    if test "x$new_path" = x; then
27209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27210$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27211      has_space=`$ECHO "$complete" | $GREP " "`
27212      if test "x$has_space" != x; then
27213        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27214$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27215      fi
27216      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27217    fi
27218  fi
27219
27220  # Now join together the path and the arguments once again
27221  if test "x$arguments" != xEOL; then
27222    new_complete="$new_path ${arguments% *}"
27223  else
27224    new_complete="$new_path"
27225  fi
27226
27227  if test "x$complete" != "x$new_complete"; then
27228    STRIP="$new_complete"
27229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27230$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27231  fi
27232
27233  fi
27234
27235  # objcopy is used for moving debug symbols to separate files when
27236  # full debug symbols are enabled.
27237  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27238    if test -n "$ac_tool_prefix"; then
27239  for ac_prog in gobjcopy objcopy
27240  do
27241    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27242set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27244$as_echo_n "checking for $ac_word... " >&6; }
27245if ${ac_cv_prog_OBJCOPY+:} false; then :
27246  $as_echo_n "(cached) " >&6
27247else
27248  if test -n "$OBJCOPY"; then
27249  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27250else
27251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27252for as_dir in $PATH
27253do
27254  IFS=$as_save_IFS
27255  test -z "$as_dir" && as_dir=.
27256    for ac_exec_ext in '' $ac_executable_extensions; do
27257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27258    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27260    break 2
27261  fi
27262done
27263  done
27264IFS=$as_save_IFS
27265
27266fi
27267fi
27268OBJCOPY=$ac_cv_prog_OBJCOPY
27269if test -n "$OBJCOPY"; then
27270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27271$as_echo "$OBJCOPY" >&6; }
27272else
27273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27274$as_echo "no" >&6; }
27275fi
27276
27277
27278    test -n "$OBJCOPY" && break
27279  done
27280fi
27281if test -z "$OBJCOPY"; then
27282  ac_ct_OBJCOPY=$OBJCOPY
27283  for ac_prog in gobjcopy objcopy
27284do
27285  # Extract the first word of "$ac_prog", so it can be a program name with args.
27286set dummy $ac_prog; ac_word=$2
27287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27288$as_echo_n "checking for $ac_word... " >&6; }
27289if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27290  $as_echo_n "(cached) " >&6
27291else
27292  if test -n "$ac_ct_OBJCOPY"; then
27293  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27294else
27295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27296for as_dir in $PATH
27297do
27298  IFS=$as_save_IFS
27299  test -z "$as_dir" && as_dir=.
27300    for ac_exec_ext in '' $ac_executable_extensions; do
27301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27302    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27304    break 2
27305  fi
27306done
27307  done
27308IFS=$as_save_IFS
27309
27310fi
27311fi
27312ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27313if test -n "$ac_ct_OBJCOPY"; then
27314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27315$as_echo "$ac_ct_OBJCOPY" >&6; }
27316else
27317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27318$as_echo "no" >&6; }
27319fi
27320
27321
27322  test -n "$ac_ct_OBJCOPY" && break
27323done
27324
27325  if test "x$ac_ct_OBJCOPY" = x; then
27326    OBJCOPY=""
27327  else
27328    case $cross_compiling:$ac_tool_warned in
27329yes:)
27330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27332ac_tool_warned=yes ;;
27333esac
27334    OBJCOPY=$ac_ct_OBJCOPY
27335  fi
27336fi
27337
27338    # Only call fixup if objcopy was found.
27339    if test -n "$OBJCOPY"; then
27340
27341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27342
27343  # First separate the path from the arguments. This will split at the first
27344  # space.
27345  complete="$OBJCOPY"
27346  path="${complete%% *}"
27347  tmp="$complete EOL"
27348  arguments="${tmp#* }"
27349
27350  # Input might be given as Windows format, start by converting to
27351  # unix format.
27352  new_path=`$CYGPATH -u "$path"`
27353
27354  # Now try to locate executable using which
27355  new_path=`$WHICH "$new_path" 2> /dev/null`
27356  # bat and cmd files are not always considered executable in cygwin causing which
27357  # to not find them
27358  if test "x$new_path" = x \
27359      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27360      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27361    new_path=`$CYGPATH -u "$path"`
27362  fi
27363  if test "x$new_path" = x; then
27364    # Oops. Which didn't find the executable.
27365    # The splitting of arguments from the executable at a space might have been incorrect,
27366    # since paths with space are more likely in Windows. Give it another try with the whole
27367    # argument.
27368    path="$complete"
27369    arguments="EOL"
27370    new_path=`$CYGPATH -u "$path"`
27371    new_path=`$WHICH "$new_path" 2> /dev/null`
27372    # bat and cmd files are not always considered executable in cygwin causing which
27373    # to not find them
27374    if test "x$new_path" = x \
27375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27377      new_path=`$CYGPATH -u "$path"`
27378    fi
27379    if test "x$new_path" = x; then
27380      # It's still not found. Now this is an unrecoverable error.
27381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27382$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27383      has_space=`$ECHO "$complete" | $GREP " "`
27384      if test "x$has_space" != x; then
27385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27387      fi
27388      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27389    fi
27390  fi
27391
27392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27395  # "foo.exe" is OK but "foo" is an error.
27396  #
27397  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27398  # It is also a way to make sure we got the proper file name for the real test later on.
27399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27400  if test "x$test_shortpath" = x; then
27401    # Short path failed, file does not exist as specified.
27402    # Try adding .exe or .cmd
27403    if test -f "${new_path}.exe"; then
27404      input_to_shortpath="${new_path}.exe"
27405    elif test -f "${new_path}.cmd"; then
27406      input_to_shortpath="${new_path}.cmd"
27407    else
27408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27409$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27410      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27411$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27412      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27413    fi
27414  else
27415    input_to_shortpath="$new_path"
27416  fi
27417
27418  # Call helper function which possibly converts this using DOS-style short mode.
27419  # If so, the updated path is stored in $new_path.
27420  new_path="$input_to_shortpath"
27421
27422  input_path="$input_to_shortpath"
27423  # Check if we need to convert this using DOS-style short mode. If the path
27424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27425  # take no chances and rewrite it.
27426  # Note: m4 eats our [], so we need to use [ and ] instead.
27427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27428  if test "x$has_forbidden_chars" != x; then
27429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27433      # Going to short mode and back again did indeed matter. Since short mode is
27434      # case insensitive, let's make it lowercase to improve readability.
27435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27436      # Now convert it back to Unix-stile (cygpath)
27437      input_path=`$CYGPATH -u "$shortmode_path"`
27438      new_path="$input_path"
27439    fi
27440  fi
27441
27442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27443  if test "x$test_cygdrive_prefix" = x; then
27444    # As a simple fix, exclude /usr/bin since it's not a real path.
27445    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27447      # a path prefixed by /cygdrive for fixpath to work.
27448      new_path="$CYGWIN_ROOT_PATH$input_path"
27449    fi
27450  fi
27451
27452  # remove trailing .exe if any
27453  new_path="${new_path/%.exe/}"
27454
27455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27456
27457  # First separate the path from the arguments. This will split at the first
27458  # space.
27459  complete="$OBJCOPY"
27460  path="${complete%% *}"
27461  tmp="$complete EOL"
27462  arguments="${tmp#* }"
27463
27464  # Input might be given as Windows format, start by converting to
27465  # unix format.
27466  new_path="$path"
27467
27468  windows_path="$new_path"
27469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27470    unix_path=`$CYGPATH -u "$windows_path"`
27471    new_path="$unix_path"
27472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27474    new_path="$unix_path"
27475  fi
27476
27477
27478  # Now try to locate executable using which
27479  new_path=`$WHICH "$new_path" 2> /dev/null`
27480
27481  if test "x$new_path" = x; then
27482    # Oops. Which didn't find the executable.
27483    # The splitting of arguments from the executable at a space might have been incorrect,
27484    # since paths with space are more likely in Windows. Give it another try with the whole
27485    # argument.
27486    path="$complete"
27487    arguments="EOL"
27488    new_path="$path"
27489
27490  windows_path="$new_path"
27491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27492    unix_path=`$CYGPATH -u "$windows_path"`
27493    new_path="$unix_path"
27494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27496    new_path="$unix_path"
27497  fi
27498
27499
27500    new_path=`$WHICH "$new_path" 2> /dev/null`
27501
27502    if test "x$new_path" = x; then
27503      # It's still not found. Now this is an unrecoverable error.
27504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27505$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27506      has_space=`$ECHO "$complete" | $GREP " "`
27507      if test "x$has_space" != x; then
27508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27510      fi
27511      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27512    fi
27513  fi
27514
27515  # Now new_path has a complete unix path to the binary
27516  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27517    # Keep paths in /bin as-is, but remove trailing .exe if any
27518    new_path="${new_path/%.exe/}"
27519    # Do not save /bin paths to all_fixpath_prefixes!
27520  else
27521    # Not in mixed or Windows style, start by that.
27522    new_path=`cmd //c echo $new_path`
27523
27524  input_path="$new_path"
27525  # Check if we need to convert this using DOS-style short mode. If the path
27526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27527  # take no chances and rewrite it.
27528  # Note: m4 eats our [], so we need to use [ and ] instead.
27529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27530  if test "x$has_forbidden_chars" != x; then
27531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27533  fi
27534
27535    # Output is in $new_path
27536
27537  windows_path="$new_path"
27538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27539    unix_path=`$CYGPATH -u "$windows_path"`
27540    new_path="$unix_path"
27541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27543    new_path="$unix_path"
27544  fi
27545
27546    # remove trailing .exe if any
27547    new_path="${new_path/%.exe/}"
27548
27549    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27550    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27551  fi
27552
27553  else
27554    # We're on a posix platform. Hooray! :)
27555    # First separate the path from the arguments. This will split at the first
27556    # space.
27557    complete="$OBJCOPY"
27558    path="${complete%% *}"
27559    tmp="$complete EOL"
27560    arguments="${tmp#* }"
27561
27562    # Cannot rely on the command "which" here since it doesn't always work.
27563    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27564    if test -z "$is_absolute_path"; then
27565      # Path to executable is not absolute. Find it.
27566      IFS_save="$IFS"
27567      IFS=:
27568      for p in $PATH; do
27569        if test -f "$p/$path" && test -x "$p/$path"; then
27570          new_path="$p/$path"
27571          break
27572        fi
27573      done
27574      IFS="$IFS_save"
27575    else
27576      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27577$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27578      new_path="$path"
27579    fi
27580
27581    if test "x$new_path" = x; then
27582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27583$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27584      has_space=`$ECHO "$complete" | $GREP " "`
27585      if test "x$has_space" != x; then
27586        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27588      fi
27589      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27590    fi
27591  fi
27592
27593  # Now join together the path and the arguments once again
27594  if test "x$arguments" != xEOL; then
27595    new_complete="$new_path ${arguments% *}"
27596  else
27597    new_complete="$new_path"
27598  fi
27599
27600  if test "x$complete" != "x$new_complete"; then
27601    OBJCOPY="$new_complete"
27602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27603$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27604  fi
27605
27606    fi
27607  fi
27608
27609  if test -n "$ac_tool_prefix"; then
27610  for ac_prog in gobjdump objdump
27611  do
27612    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27613set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27615$as_echo_n "checking for $ac_word... " >&6; }
27616if ${ac_cv_prog_OBJDUMP+:} false; then :
27617  $as_echo_n "(cached) " >&6
27618else
27619  if test -n "$OBJDUMP"; then
27620  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27621else
27622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27623for as_dir in $PATH
27624do
27625  IFS=$as_save_IFS
27626  test -z "$as_dir" && as_dir=.
27627    for ac_exec_ext in '' $ac_executable_extensions; do
27628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27629    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27631    break 2
27632  fi
27633done
27634  done
27635IFS=$as_save_IFS
27636
27637fi
27638fi
27639OBJDUMP=$ac_cv_prog_OBJDUMP
27640if test -n "$OBJDUMP"; then
27641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27642$as_echo "$OBJDUMP" >&6; }
27643else
27644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27645$as_echo "no" >&6; }
27646fi
27647
27648
27649    test -n "$OBJDUMP" && break
27650  done
27651fi
27652if test -z "$OBJDUMP"; then
27653  ac_ct_OBJDUMP=$OBJDUMP
27654  for ac_prog in gobjdump objdump
27655do
27656  # Extract the first word of "$ac_prog", so it can be a program name with args.
27657set dummy $ac_prog; ac_word=$2
27658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27659$as_echo_n "checking for $ac_word... " >&6; }
27660if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27661  $as_echo_n "(cached) " >&6
27662else
27663  if test -n "$ac_ct_OBJDUMP"; then
27664  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27665else
27666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27667for as_dir in $PATH
27668do
27669  IFS=$as_save_IFS
27670  test -z "$as_dir" && as_dir=.
27671    for ac_exec_ext in '' $ac_executable_extensions; do
27672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27673    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27675    break 2
27676  fi
27677done
27678  done
27679IFS=$as_save_IFS
27680
27681fi
27682fi
27683ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27684if test -n "$ac_ct_OBJDUMP"; then
27685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27686$as_echo "$ac_ct_OBJDUMP" >&6; }
27687else
27688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27689$as_echo "no" >&6; }
27690fi
27691
27692
27693  test -n "$ac_ct_OBJDUMP" && break
27694done
27695
27696  if test "x$ac_ct_OBJDUMP" = x; then
27697    OBJDUMP=""
27698  else
27699    case $cross_compiling:$ac_tool_warned in
27700yes:)
27701{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27702$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27703ac_tool_warned=yes ;;
27704esac
27705    OBJDUMP=$ac_ct_OBJDUMP
27706  fi
27707fi
27708
27709  if test "x$OBJDUMP" != x; then
27710    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27711
27712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27713
27714  # First separate the path from the arguments. This will split at the first
27715  # space.
27716  complete="$OBJDUMP"
27717  path="${complete%% *}"
27718  tmp="$complete EOL"
27719  arguments="${tmp#* }"
27720
27721  # Input might be given as Windows format, start by converting to
27722  # unix format.
27723  new_path=`$CYGPATH -u "$path"`
27724
27725  # Now try to locate executable using which
27726  new_path=`$WHICH "$new_path" 2> /dev/null`
27727  # bat and cmd files are not always considered executable in cygwin causing which
27728  # to not find them
27729  if test "x$new_path" = x \
27730      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27731      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27732    new_path=`$CYGPATH -u "$path"`
27733  fi
27734  if test "x$new_path" = x; then
27735    # Oops. Which didn't find the executable.
27736    # The splitting of arguments from the executable at a space might have been incorrect,
27737    # since paths with space are more likely in Windows. Give it another try with the whole
27738    # argument.
27739    path="$complete"
27740    arguments="EOL"
27741    new_path=`$CYGPATH -u "$path"`
27742    new_path=`$WHICH "$new_path" 2> /dev/null`
27743    # bat and cmd files are not always considered executable in cygwin causing which
27744    # to not find them
27745    if test "x$new_path" = x \
27746        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27747        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27748      new_path=`$CYGPATH -u "$path"`
27749    fi
27750    if test "x$new_path" = x; then
27751      # It's still not found. Now this is an unrecoverable error.
27752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27753$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27754      has_space=`$ECHO "$complete" | $GREP " "`
27755      if test "x$has_space" != x; then
27756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27758      fi
27759      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27760    fi
27761  fi
27762
27763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27766  # "foo.exe" is OK but "foo" is an error.
27767  #
27768  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27769  # It is also a way to make sure we got the proper file name for the real test later on.
27770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27771  if test "x$test_shortpath" = x; then
27772    # Short path failed, file does not exist as specified.
27773    # Try adding .exe or .cmd
27774    if test -f "${new_path}.exe"; then
27775      input_to_shortpath="${new_path}.exe"
27776    elif test -f "${new_path}.cmd"; then
27777      input_to_shortpath="${new_path}.cmd"
27778    else
27779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27780$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27781      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27782$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27783      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27784    fi
27785  else
27786    input_to_shortpath="$new_path"
27787  fi
27788
27789  # Call helper function which possibly converts this using DOS-style short mode.
27790  # If so, the updated path is stored in $new_path.
27791  new_path="$input_to_shortpath"
27792
27793  input_path="$input_to_shortpath"
27794  # Check if we need to convert this using DOS-style short mode. If the path
27795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27796  # take no chances and rewrite it.
27797  # Note: m4 eats our [], so we need to use [ and ] instead.
27798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27799  if test "x$has_forbidden_chars" != x; then
27800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27804      # Going to short mode and back again did indeed matter. Since short mode is
27805      # case insensitive, let's make it lowercase to improve readability.
27806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27807      # Now convert it back to Unix-stile (cygpath)
27808      input_path=`$CYGPATH -u "$shortmode_path"`
27809      new_path="$input_path"
27810    fi
27811  fi
27812
27813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27814  if test "x$test_cygdrive_prefix" = x; then
27815    # As a simple fix, exclude /usr/bin since it's not a real path.
27816    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27818      # a path prefixed by /cygdrive for fixpath to work.
27819      new_path="$CYGWIN_ROOT_PATH$input_path"
27820    fi
27821  fi
27822
27823  # remove trailing .exe if any
27824  new_path="${new_path/%.exe/}"
27825
27826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27827
27828  # First separate the path from the arguments. This will split at the first
27829  # space.
27830  complete="$OBJDUMP"
27831  path="${complete%% *}"
27832  tmp="$complete EOL"
27833  arguments="${tmp#* }"
27834
27835  # Input might be given as Windows format, start by converting to
27836  # unix format.
27837  new_path="$path"
27838
27839  windows_path="$new_path"
27840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27841    unix_path=`$CYGPATH -u "$windows_path"`
27842    new_path="$unix_path"
27843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27845    new_path="$unix_path"
27846  fi
27847
27848
27849  # Now try to locate executable using which
27850  new_path=`$WHICH "$new_path" 2> /dev/null`
27851
27852  if test "x$new_path" = x; then
27853    # Oops. Which didn't find the executable.
27854    # The splitting of arguments from the executable at a space might have been incorrect,
27855    # since paths with space are more likely in Windows. Give it another try with the whole
27856    # argument.
27857    path="$complete"
27858    arguments="EOL"
27859    new_path="$path"
27860
27861  windows_path="$new_path"
27862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27863    unix_path=`$CYGPATH -u "$windows_path"`
27864    new_path="$unix_path"
27865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27867    new_path="$unix_path"
27868  fi
27869
27870
27871    new_path=`$WHICH "$new_path" 2> /dev/null`
27872
27873    if test "x$new_path" = x; then
27874      # It's still not found. Now this is an unrecoverable error.
27875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27876$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27877      has_space=`$ECHO "$complete" | $GREP " "`
27878      if test "x$has_space" != x; then
27879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27881      fi
27882      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27883    fi
27884  fi
27885
27886  # Now new_path has a complete unix path to the binary
27887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27888    # Keep paths in /bin as-is, but remove trailing .exe if any
27889    new_path="${new_path/%.exe/}"
27890    # Do not save /bin paths to all_fixpath_prefixes!
27891  else
27892    # Not in mixed or Windows style, start by that.
27893    new_path=`cmd //c echo $new_path`
27894
27895  input_path="$new_path"
27896  # Check if we need to convert this using DOS-style short mode. If the path
27897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27898  # take no chances and rewrite it.
27899  # Note: m4 eats our [], so we need to use [ and ] instead.
27900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27901  if test "x$has_forbidden_chars" != x; then
27902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27904  fi
27905
27906    # Output is in $new_path
27907
27908  windows_path="$new_path"
27909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27910    unix_path=`$CYGPATH -u "$windows_path"`
27911    new_path="$unix_path"
27912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27914    new_path="$unix_path"
27915  fi
27916
27917    # remove trailing .exe if any
27918    new_path="${new_path/%.exe/}"
27919
27920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27922  fi
27923
27924  else
27925    # We're on a posix platform. Hooray! :)
27926    # First separate the path from the arguments. This will split at the first
27927    # space.
27928    complete="$OBJDUMP"
27929    path="${complete%% *}"
27930    tmp="$complete EOL"
27931    arguments="${tmp#* }"
27932
27933    # Cannot rely on the command "which" here since it doesn't always work.
27934    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27935    if test -z "$is_absolute_path"; then
27936      # Path to executable is not absolute. Find it.
27937      IFS_save="$IFS"
27938      IFS=:
27939      for p in $PATH; do
27940        if test -f "$p/$path" && test -x "$p/$path"; then
27941          new_path="$p/$path"
27942          break
27943        fi
27944      done
27945      IFS="$IFS_save"
27946    else
27947      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27948$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27949      new_path="$path"
27950    fi
27951
27952    if test "x$new_path" = x; then
27953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27954$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27955      has_space=`$ECHO "$complete" | $GREP " "`
27956      if test "x$has_space" != x; then
27957        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27959      fi
27960      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27961    fi
27962  fi
27963
27964  # Now join together the path and the arguments once again
27965  if test "x$arguments" != xEOL; then
27966    new_complete="$new_path ${arguments% *}"
27967  else
27968    new_complete="$new_path"
27969  fi
27970
27971  if test "x$complete" != "x$new_complete"; then
27972    OBJDUMP="$new_complete"
27973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27974$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27975  fi
27976
27977  fi
27978
27979  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27980    # Extract the first word of "lipo", so it can be a program name with args.
27981set dummy lipo; ac_word=$2
27982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27983$as_echo_n "checking for $ac_word... " >&6; }
27984if ${ac_cv_path_LIPO+:} false; then :
27985  $as_echo_n "(cached) " >&6
27986else
27987  case $LIPO in
27988  [\\/]* | ?:[\\/]*)
27989  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27990  ;;
27991  *)
27992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27993for as_dir in $PATH
27994do
27995  IFS=$as_save_IFS
27996  test -z "$as_dir" && as_dir=.
27997    for ac_exec_ext in '' $ac_executable_extensions; do
27998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27999    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28001    break 2
28002  fi
28003done
28004  done
28005IFS=$as_save_IFS
28006
28007  ;;
28008esac
28009fi
28010LIPO=$ac_cv_path_LIPO
28011if test -n "$LIPO"; then
28012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28013$as_echo "$LIPO" >&6; }
28014else
28015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28016$as_echo "no" >&6; }
28017fi
28018
28019
28020
28021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28022
28023  # First separate the path from the arguments. This will split at the first
28024  # space.
28025  complete="$LIPO"
28026  path="${complete%% *}"
28027  tmp="$complete EOL"
28028  arguments="${tmp#* }"
28029
28030  # Input might be given as Windows format, start by converting to
28031  # unix format.
28032  new_path=`$CYGPATH -u "$path"`
28033
28034  # Now try to locate executable using which
28035  new_path=`$WHICH "$new_path" 2> /dev/null`
28036  # bat and cmd files are not always considered executable in cygwin causing which
28037  # to not find them
28038  if test "x$new_path" = x \
28039      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28040      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28041    new_path=`$CYGPATH -u "$path"`
28042  fi
28043  if test "x$new_path" = x; then
28044    # Oops. Which didn't find the executable.
28045    # The splitting of arguments from the executable at a space might have been incorrect,
28046    # since paths with space are more likely in Windows. Give it another try with the whole
28047    # argument.
28048    path="$complete"
28049    arguments="EOL"
28050    new_path=`$CYGPATH -u "$path"`
28051    new_path=`$WHICH "$new_path" 2> /dev/null`
28052    # bat and cmd files are not always considered executable in cygwin causing which
28053    # to not find them
28054    if test "x$new_path" = x \
28055        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28056        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28057      new_path=`$CYGPATH -u "$path"`
28058    fi
28059    if test "x$new_path" = x; then
28060      # It's still not found. Now this is an unrecoverable error.
28061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28062$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28063      has_space=`$ECHO "$complete" | $GREP " "`
28064      if test "x$has_space" != x; then
28065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28067      fi
28068      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28069    fi
28070  fi
28071
28072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28075  # "foo.exe" is OK but "foo" is an error.
28076  #
28077  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28078  # It is also a way to make sure we got the proper file name for the real test later on.
28079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28080  if test "x$test_shortpath" = x; then
28081    # Short path failed, file does not exist as specified.
28082    # Try adding .exe or .cmd
28083    if test -f "${new_path}.exe"; then
28084      input_to_shortpath="${new_path}.exe"
28085    elif test -f "${new_path}.cmd"; then
28086      input_to_shortpath="${new_path}.cmd"
28087    else
28088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28089$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28090      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28091$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28092      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28093    fi
28094  else
28095    input_to_shortpath="$new_path"
28096  fi
28097
28098  # Call helper function which possibly converts this using DOS-style short mode.
28099  # If so, the updated path is stored in $new_path.
28100  new_path="$input_to_shortpath"
28101
28102  input_path="$input_to_shortpath"
28103  # Check if we need to convert this using DOS-style short mode. If the path
28104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28105  # take no chances and rewrite it.
28106  # Note: m4 eats our [], so we need to use [ and ] instead.
28107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28108  if test "x$has_forbidden_chars" != x; then
28109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28113      # Going to short mode and back again did indeed matter. Since short mode is
28114      # case insensitive, let's make it lowercase to improve readability.
28115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28116      # Now convert it back to Unix-stile (cygpath)
28117      input_path=`$CYGPATH -u "$shortmode_path"`
28118      new_path="$input_path"
28119    fi
28120  fi
28121
28122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28123  if test "x$test_cygdrive_prefix" = x; then
28124    # As a simple fix, exclude /usr/bin since it's not a real path.
28125    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28127      # a path prefixed by /cygdrive for fixpath to work.
28128      new_path="$CYGWIN_ROOT_PATH$input_path"
28129    fi
28130  fi
28131
28132  # remove trailing .exe if any
28133  new_path="${new_path/%.exe/}"
28134
28135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28136
28137  # First separate the path from the arguments. This will split at the first
28138  # space.
28139  complete="$LIPO"
28140  path="${complete%% *}"
28141  tmp="$complete EOL"
28142  arguments="${tmp#* }"
28143
28144  # Input might be given as Windows format, start by converting to
28145  # unix format.
28146  new_path="$path"
28147
28148  windows_path="$new_path"
28149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28150    unix_path=`$CYGPATH -u "$windows_path"`
28151    new_path="$unix_path"
28152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28154    new_path="$unix_path"
28155  fi
28156
28157
28158  # Now try to locate executable using which
28159  new_path=`$WHICH "$new_path" 2> /dev/null`
28160
28161  if test "x$new_path" = x; then
28162    # Oops. Which didn't find the executable.
28163    # The splitting of arguments from the executable at a space might have been incorrect,
28164    # since paths with space are more likely in Windows. Give it another try with the whole
28165    # argument.
28166    path="$complete"
28167    arguments="EOL"
28168    new_path="$path"
28169
28170  windows_path="$new_path"
28171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28172    unix_path=`$CYGPATH -u "$windows_path"`
28173    new_path="$unix_path"
28174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28176    new_path="$unix_path"
28177  fi
28178
28179
28180    new_path=`$WHICH "$new_path" 2> /dev/null`
28181
28182    if test "x$new_path" = x; then
28183      # It's still not found. Now this is an unrecoverable error.
28184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28185$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28186      has_space=`$ECHO "$complete" | $GREP " "`
28187      if test "x$has_space" != x; then
28188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28190      fi
28191      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28192    fi
28193  fi
28194
28195  # Now new_path has a complete unix path to the binary
28196  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28197    # Keep paths in /bin as-is, but remove trailing .exe if any
28198    new_path="${new_path/%.exe/}"
28199    # Do not save /bin paths to all_fixpath_prefixes!
28200  else
28201    # Not in mixed or Windows style, start by that.
28202    new_path=`cmd //c echo $new_path`
28203
28204  input_path="$new_path"
28205  # Check if we need to convert this using DOS-style short mode. If the path
28206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28207  # take no chances and rewrite it.
28208  # Note: m4 eats our [], so we need to use [ and ] instead.
28209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28210  if test "x$has_forbidden_chars" != x; then
28211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28213  fi
28214
28215    # Output is in $new_path
28216
28217  windows_path="$new_path"
28218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28219    unix_path=`$CYGPATH -u "$windows_path"`
28220    new_path="$unix_path"
28221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28223    new_path="$unix_path"
28224  fi
28225
28226    # remove trailing .exe if any
28227    new_path="${new_path/%.exe/}"
28228
28229    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28230    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28231  fi
28232
28233  else
28234    # We're on a posix platform. Hooray! :)
28235    # First separate the path from the arguments. This will split at the first
28236    # space.
28237    complete="$LIPO"
28238    path="${complete%% *}"
28239    tmp="$complete EOL"
28240    arguments="${tmp#* }"
28241
28242    # Cannot rely on the command "which" here since it doesn't always work.
28243    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28244    if test -z "$is_absolute_path"; then
28245      # Path to executable is not absolute. Find it.
28246      IFS_save="$IFS"
28247      IFS=:
28248      for p in $PATH; do
28249        if test -f "$p/$path" && test -x "$p/$path"; then
28250          new_path="$p/$path"
28251          break
28252        fi
28253      done
28254      IFS="$IFS_save"
28255    else
28256      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28257$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28258      new_path="$path"
28259    fi
28260
28261    if test "x$new_path" = x; then
28262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28263$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28264      has_space=`$ECHO "$complete" | $GREP " "`
28265      if test "x$has_space" != x; then
28266        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28268      fi
28269      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28270    fi
28271  fi
28272
28273  # Now join together the path and the arguments once again
28274  if test "x$arguments" != xEOL; then
28275    new_complete="$new_path ${arguments% *}"
28276  else
28277    new_complete="$new_path"
28278  fi
28279
28280  if test "x$complete" != "x$new_complete"; then
28281    LIPO="$new_complete"
28282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28283$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28284  fi
28285
28286  fi
28287
28288
28289
28290  # Restore old path without tools dir
28291  PATH="$OLD_PATH"
28292
28293
28294# FIXME: Currently we must test this after paths but before flags. Fix!
28295
28296# And we can test some aspects on the target using configure macros.
28297
28298
28299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28300$as_echo_n "checking for ANSI C header files... " >&6; }
28301if ${ac_cv_header_stdc+:} false; then :
28302  $as_echo_n "(cached) " >&6
28303else
28304  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28305/* end confdefs.h.  */
28306#include <stdlib.h>
28307#include <stdarg.h>
28308#include <string.h>
28309#include <float.h>
28310
28311int
28312main ()
28313{
28314
28315  ;
28316  return 0;
28317}
28318_ACEOF
28319if ac_fn_cxx_try_compile "$LINENO"; then :
28320  ac_cv_header_stdc=yes
28321else
28322  ac_cv_header_stdc=no
28323fi
28324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28325
28326if test $ac_cv_header_stdc = yes; then
28327  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28329/* end confdefs.h.  */
28330#include <string.h>
28331
28332_ACEOF
28333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28334  $EGREP "memchr" >/dev/null 2>&1; then :
28335
28336else
28337  ac_cv_header_stdc=no
28338fi
28339rm -f conftest*
28340
28341fi
28342
28343if test $ac_cv_header_stdc = yes; then
28344  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28346/* end confdefs.h.  */
28347#include <stdlib.h>
28348
28349_ACEOF
28350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28351  $EGREP "free" >/dev/null 2>&1; then :
28352
28353else
28354  ac_cv_header_stdc=no
28355fi
28356rm -f conftest*
28357
28358fi
28359
28360if test $ac_cv_header_stdc = yes; then
28361  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28362  if test "$cross_compiling" = yes; then :
28363  :
28364else
28365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28366/* end confdefs.h.  */
28367#include <ctype.h>
28368#include <stdlib.h>
28369#if ((' ' & 0x0FF) == 0x020)
28370# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28371# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28372#else
28373# define ISLOWER(c) \
28374		   (('a' <= (c) && (c) <= 'i') \
28375		     || ('j' <= (c) && (c) <= 'r') \
28376		     || ('s' <= (c) && (c) <= 'z'))
28377# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28378#endif
28379
28380#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28381int
28382main ()
28383{
28384  int i;
28385  for (i = 0; i < 256; i++)
28386    if (XOR (islower (i), ISLOWER (i))
28387	|| toupper (i) != TOUPPER (i))
28388      return 2;
28389  return 0;
28390}
28391_ACEOF
28392if ac_fn_cxx_try_run "$LINENO"; then :
28393
28394else
28395  ac_cv_header_stdc=no
28396fi
28397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28398  conftest.$ac_objext conftest.beam conftest.$ac_ext
28399fi
28400
28401fi
28402fi
28403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28404$as_echo "$ac_cv_header_stdc" >&6; }
28405if test $ac_cv_header_stdc = yes; then
28406
28407$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28408
28409fi
28410
28411# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28412for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28413		  inttypes.h stdint.h unistd.h
28414do :
28415  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28416ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28417"
28418if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28419  cat >>confdefs.h <<_ACEOF
28420#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28421_ACEOF
28422
28423fi
28424
28425done
28426
28427
28428
28429  ###############################################################################
28430  #
28431  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28432  # (The JVM can use 32 or 64 bit Java pointers but that decision
28433  # is made at runtime.)
28434  #
28435
28436  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28437    # Always specify -m flags on Solaris
28438
28439  # When we add flags to the "official" CFLAGS etc, we need to
28440  # keep track of these additions in ADDED_CFLAGS etc. These
28441  # will later be checked to make sure only controlled additions
28442  # have been made to CFLAGS etc.
28443  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28444  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28445  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28446
28447  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28448  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28449  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28450
28451  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28452  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28453  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28454
28455  elif test "x$COMPILE_TYPE" = xreduced; then
28456    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28457      # Specify -m if running reduced on other Posix platforms
28458
28459  # When we add flags to the "official" CFLAGS etc, we need to
28460  # keep track of these additions in ADDED_CFLAGS etc. These
28461  # will later be checked to make sure only controlled additions
28462  # have been made to CFLAGS etc.
28463  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28464  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28465  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28466
28467  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28468  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28469  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28470
28471  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28472  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28473  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28474
28475    fi
28476  fi
28477
28478  # Make compilation sanity check
28479  for ac_header in stdio.h
28480do :
28481  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28482if test "x$ac_cv_header_stdio_h" = xyes; then :
28483  cat >>confdefs.h <<_ACEOF
28484#define HAVE_STDIO_H 1
28485_ACEOF
28486
28487else
28488
28489    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28490$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28491    if test "x$COMPILE_TYPE" = xreduced; then
28492      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28493$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28494    elif test "x$COMPILE_TYPE" = xcross; then
28495      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28496$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28497    fi
28498    as_fn_error $? "Cannot continue." "$LINENO" 5
28499
28500fi
28501
28502done
28503
28504
28505  # The cast to long int works around a bug in the HP C Compiler
28506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28508# This bug is HP SR number 8606223364.
28509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28510$as_echo_n "checking size of int *... " >&6; }
28511if ${ac_cv_sizeof_int_p+:} false; then :
28512  $as_echo_n "(cached) " >&6
28513else
28514  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28515
28516else
28517  if test "$ac_cv_type_int_p" = yes; then
28518     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28520as_fn_error 77 "cannot compute sizeof (int *)
28521See \`config.log' for more details" "$LINENO" 5; }
28522   else
28523     ac_cv_sizeof_int_p=0
28524   fi
28525fi
28526
28527fi
28528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28529$as_echo "$ac_cv_sizeof_int_p" >&6; }
28530
28531
28532
28533cat >>confdefs.h <<_ACEOF
28534#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28535_ACEOF
28536
28537
28538
28539  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28540    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28541    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28542  fi
28543
28544  if test "x$SIZEOF_INT_P" = x; then
28545    # The test failed, lets stick to the assumed value.
28546    { $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
28547$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28548  else
28549    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28550
28551    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28552      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
28553    fi
28554  fi
28555
28556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28557$as_echo_n "checking for target address size... " >&6; }
28558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28559$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28560
28561
28562  ###############################################################################
28563  #
28564  # Is the target little of big endian?
28565  #
28566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28567$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28568if ${ac_cv_c_bigendian+:} false; then :
28569  $as_echo_n "(cached) " >&6
28570else
28571  ac_cv_c_bigendian=unknown
28572    # See if we're dealing with a universal compiler.
28573    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28574/* end confdefs.h.  */
28575#ifndef __APPLE_CC__
28576	       not a universal capable compiler
28577	     #endif
28578	     typedef int dummy;
28579
28580_ACEOF
28581if ac_fn_cxx_try_compile "$LINENO"; then :
28582
28583	# Check for potential -arch flags.  It is not universal unless
28584	# there are at least two -arch flags with different values.
28585	ac_arch=
28586	ac_prev=
28587	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28588	 if test -n "$ac_prev"; then
28589	   case $ac_word in
28590	     i?86 | x86_64 | ppc | ppc64)
28591	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28592		 ac_arch=$ac_word
28593	       else
28594		 ac_cv_c_bigendian=universal
28595		 break
28596	       fi
28597	       ;;
28598	   esac
28599	   ac_prev=
28600	 elif test "x$ac_word" = "x-arch"; then
28601	   ac_prev=arch
28602	 fi
28603       done
28604fi
28605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28606    if test $ac_cv_c_bigendian = unknown; then
28607      # See if sys/param.h defines the BYTE_ORDER macro.
28608      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28609/* end confdefs.h.  */
28610#include <sys/types.h>
28611	     #include <sys/param.h>
28612
28613int
28614main ()
28615{
28616#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28617		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28618		     && LITTLE_ENDIAN)
28619	      bogus endian macros
28620	     #endif
28621
28622  ;
28623  return 0;
28624}
28625_ACEOF
28626if ac_fn_cxx_try_compile "$LINENO"; then :
28627  # It does; now see whether it defined to BIG_ENDIAN or not.
28628	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28629/* end confdefs.h.  */
28630#include <sys/types.h>
28631		#include <sys/param.h>
28632
28633int
28634main ()
28635{
28636#if BYTE_ORDER != BIG_ENDIAN
28637		 not big endian
28638		#endif
28639
28640  ;
28641  return 0;
28642}
28643_ACEOF
28644if ac_fn_cxx_try_compile "$LINENO"; then :
28645  ac_cv_c_bigendian=yes
28646else
28647  ac_cv_c_bigendian=no
28648fi
28649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28650fi
28651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28652    fi
28653    if test $ac_cv_c_bigendian = unknown; then
28654      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28655      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28656/* end confdefs.h.  */
28657#include <limits.h>
28658
28659int
28660main ()
28661{
28662#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28663	      bogus endian macros
28664	     #endif
28665
28666  ;
28667  return 0;
28668}
28669_ACEOF
28670if ac_fn_cxx_try_compile "$LINENO"; then :
28671  # It does; now see whether it defined to _BIG_ENDIAN or not.
28672	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28673/* end confdefs.h.  */
28674#include <limits.h>
28675
28676int
28677main ()
28678{
28679#ifndef _BIG_ENDIAN
28680		 not big endian
28681		#endif
28682
28683  ;
28684  return 0;
28685}
28686_ACEOF
28687if ac_fn_cxx_try_compile "$LINENO"; then :
28688  ac_cv_c_bigendian=yes
28689else
28690  ac_cv_c_bigendian=no
28691fi
28692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28693fi
28694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28695    fi
28696    if test $ac_cv_c_bigendian = unknown; then
28697      # Compile a test program.
28698      if test "$cross_compiling" = yes; then :
28699  # Try to guess by grepping values from an object file.
28700	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28701/* end confdefs.h.  */
28702short int ascii_mm[] =
28703		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28704		short int ascii_ii[] =
28705		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28706		int use_ascii (int i) {
28707		  return ascii_mm[i] + ascii_ii[i];
28708		}
28709		short int ebcdic_ii[] =
28710		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28711		short int ebcdic_mm[] =
28712		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28713		int use_ebcdic (int i) {
28714		  return ebcdic_mm[i] + ebcdic_ii[i];
28715		}
28716		extern int foo;
28717
28718int
28719main ()
28720{
28721return use_ascii (foo) == use_ebcdic (foo);
28722  ;
28723  return 0;
28724}
28725_ACEOF
28726if ac_fn_cxx_try_compile "$LINENO"; then :
28727  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28728	      ac_cv_c_bigendian=yes
28729	    fi
28730	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28731	      if test "$ac_cv_c_bigendian" = unknown; then
28732		ac_cv_c_bigendian=no
28733	      else
28734		# finding both strings is unlikely to happen, but who knows?
28735		ac_cv_c_bigendian=unknown
28736	      fi
28737	    fi
28738fi
28739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28740else
28741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28742/* end confdefs.h.  */
28743$ac_includes_default
28744int
28745main ()
28746{
28747
28748	     /* Are we little or big endian?  From Harbison&Steele.  */
28749	     union
28750	     {
28751	       long int l;
28752	       char c[sizeof (long int)];
28753	     } u;
28754	     u.l = 1;
28755	     return u.c[sizeof (long int) - 1] == 1;
28756
28757  ;
28758  return 0;
28759}
28760_ACEOF
28761if ac_fn_cxx_try_run "$LINENO"; then :
28762  ac_cv_c_bigendian=no
28763else
28764  ac_cv_c_bigendian=yes
28765fi
28766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28767  conftest.$ac_objext conftest.beam conftest.$ac_ext
28768fi
28769
28770    fi
28771fi
28772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28773$as_echo "$ac_cv_c_bigendian" >&6; }
28774 case $ac_cv_c_bigendian in #(
28775   yes)
28776     ENDIAN="big";; #(
28777   no)
28778     ENDIAN="little" ;; #(
28779   universal)
28780     ENDIAN="universal_endianness"
28781     ;; #(
28782   *)
28783     ENDIAN="unknown" ;;
28784 esac
28785
28786
28787  if test "x$ENDIAN" = xuniversal_endianness; then
28788    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28789  fi
28790  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28791    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
28792  fi
28793
28794
28795# Configure flags for the tools
28796
28797
28798  ###############################################################################
28799  #
28800  # How to compile shared libraries.
28801  #
28802
28803  if test "x$GCC" = xyes; then
28804    COMPILER_NAME=gcc
28805    PICFLAG="-fPIC"
28806    LIBRARY_PREFIX=lib
28807    SHARED_LIBRARY='lib$1.so'
28808    STATIC_LIBRARY='lib$1.a'
28809    SHARED_LIBRARY_FLAGS="-shared"
28810    SHARED_LIBRARY_SUFFIX='.so'
28811    STATIC_LIBRARY_SUFFIX='.a'
28812    OBJ_SUFFIX='.o'
28813    EXE_SUFFIX=''
28814    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28815    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28816    C_FLAG_REORDER=''
28817    CXX_FLAG_REORDER=''
28818    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28819    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28820    LD="$CC"
28821    LDEXE="$CC"
28822    LDCXX="$CXX"
28823    LDEXECXX="$CXX"
28824    POST_STRIP_CMD="$STRIP -g"
28825
28826    # Linking is different on MacOSX
28827    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28828      # Might change in the future to clang.
28829      COMPILER_NAME=gcc
28830      SHARED_LIBRARY='lib$1.dylib'
28831      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28832      SHARED_LIBRARY_SUFFIX='.dylib'
28833      EXE_SUFFIX=''
28834      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28835      SET_SHARED_LIBRARY_MAPFILE=''
28836      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28837      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28838      POST_STRIP_CMD="$STRIP -S"
28839    fi
28840  else
28841    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28842      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28843      COMPILER_NAME=ossc
28844      PICFLAG="-KPIC"
28845      LIBRARY_PREFIX=lib
28846      SHARED_LIBRARY='lib$1.so'
28847      STATIC_LIBRARY='lib$1.a'
28848      SHARED_LIBRARY_FLAGS="-G"
28849      SHARED_LIBRARY_SUFFIX='.so'
28850      STATIC_LIBRARY_SUFFIX='.a'
28851      OBJ_SUFFIX='.o'
28852      EXE_SUFFIX=''
28853      SET_SHARED_LIBRARY_NAME=''
28854      SET_SHARED_LIBRARY_MAPFILE='-M$1'
28855      C_FLAG_REORDER='-xF'
28856      CXX_FLAG_REORDER='-xF'
28857      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28858      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28859      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28860      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28861      CFLAGS_JDKLIB_EXTRA='-xstrconst'
28862      POST_STRIP_CMD="$STRIP -x"
28863      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28864    fi
28865    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28866      # If it is not gcc, then assume it is the MS Visual Studio compiler
28867      COMPILER_NAME=cl
28868      PICFLAG=""
28869      LIBRARY_PREFIX=
28870      SHARED_LIBRARY='$1.dll'
28871      STATIC_LIBRARY='$1.lib'
28872      SHARED_LIBRARY_FLAGS="-LD"
28873      SHARED_LIBRARY_SUFFIX='.dll'
28874      STATIC_LIBRARY_SUFFIX='.lib'
28875      OBJ_SUFFIX='.obj'
28876      EXE_SUFFIX='.exe'
28877      SET_SHARED_LIBRARY_NAME=''
28878      SET_SHARED_LIBRARY_MAPFILE=''
28879      SET_SHARED_LIBRARY_ORIGIN=''
28880      SET_EXECUTABLE_ORIGIN=''
28881    fi
28882  fi
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902  # The (cross) compiler is now configured, we can now test capabilities
28903  # of the target platform.
28904
28905
28906
28907  ###############################################################################
28908  #
28909  # Setup the opt flags for different compilers
28910  # and different operating systems.
28911  #
28912
28913  #
28914  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
28915  #
28916  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28917    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28918    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28919    CFLAGS="$CFLAGS -mstackrealign"
28920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28921$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28922    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28923/* end confdefs.h.  */
28924int main() { return 0; }
28925_ACEOF
28926if ac_fn_cxx_try_link "$LINENO"; then :
28927
28928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28929$as_echo "yes" >&6; }
28930
28931else
28932
28933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28934$as_echo "no" >&6; }
28935          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28936
28937
28938fi
28939rm -f core conftest.err conftest.$ac_objext \
28940    conftest$ac_exeext conftest.$ac_ext
28941  fi
28942
28943  C_FLAG_DEPS="-MMD -MF"
28944  CXX_FLAG_DEPS="-MMD -MF"
28945
28946  case $COMPILER_TYPE in
28947    CC )
28948      case $COMPILER_NAME in
28949        gcc )
28950          case $OPENJDK_TARGET_OS in
28951            macosx )
28952              # On MacOSX we optimize for size, something
28953              # we should do for all platforms?
28954              C_O_FLAG_HI="-Os"
28955              C_O_FLAG_NORM="-Os"
28956              C_O_FLAG_NONE=""
28957              ;;
28958            *)
28959              C_O_FLAG_HI="-O3"
28960              C_O_FLAG_NORM="-O2"
28961              C_O_FLAG_NONE="-O0"
28962              ;;
28963          esac
28964          CXX_O_FLAG_HI="$C_O_FLAG_HI"
28965          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28966          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28967          CFLAGS_DEBUG_SYMBOLS="-g"
28968          CXXFLAGS_DEBUG_SYMBOLS="-g"
28969          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28970            CFLAGS_DEBUG_SYMBOLS="-g1"
28971            CXXFLAGS_DEBUG_SYMBOLS="-g1"
28972          fi
28973          ;;
28974        ossc )
28975          #
28976          # Forte has different names for this with their C++ compiler...
28977          #
28978          C_FLAG_DEPS="-xMMD -xMF"
28979          CXX_FLAG_DEPS="-xMMD -xMF"
28980
28981          # Extra options used with HIGHEST
28982          #
28983          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28984          #          done with care, there are some assumptions below that need to
28985          #          be understood about the use of pointers, and IEEE behavior.
28986          #
28987          # Use non-standard floating point mode (not IEEE 754)
28988          CC_HIGHEST="$CC_HIGHEST -fns"
28989          # Do some simplification of floating point arithmetic (not IEEE 754)
28990          CC_HIGHEST="$CC_HIGHEST -fsimple"
28991          # Use single precision floating point with 'float'
28992          CC_HIGHEST="$CC_HIGHEST -fsingle"
28993          # Assume memory references via basic pointer types do not alias
28994          #   (Source with excessing pointer casting and data access with mixed
28995          #    pointer types are not recommended)
28996          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28997          # Use intrinsic or inline versions for math/std functions
28998          #   (If you expect perfect errno behavior, do not use this)
28999          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29000          # Loop data dependency optimizations (need -xO3 or higher)
29001          CC_HIGHEST="$CC_HIGHEST -xdepend"
29002          # Pointer parameters to functions do not overlap
29003          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29004          #    If you pass in multiple pointers to the same data, do not use this)
29005          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29006          # Inline some library routines
29007          #   (If you expect perfect errno behavior, do not use this)
29008          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29009          # Use optimized math routines
29010          #   (If you expect perfect errno behavior, do not use this)
29011          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29012          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29013
29014          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29015            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29016            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29017          fi
29018
29019          case $OPENJDK_TARGET_CPU_ARCH in
29020            x86)
29021              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29022              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29023              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29024              C_O_FLAG_NONE="-xregs=no%frameptr"
29025              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29026              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29027              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29028              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29029              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29030                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29031                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29032              fi
29033              ;;
29034            sparc)
29035              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29036              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29037              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29038              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29039              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29040              C_O_FLAG_NONE=""
29041              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29042              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29043              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29044              CXX_O_FLAG_NONE=""
29045              ;;
29046          esac
29047
29048          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29049          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29050      esac
29051      ;;
29052    CL )
29053      C_O_FLAG_HIGHEST="-O2"
29054      C_O_FLAG_HI="-O1"
29055      C_O_FLAG_NORM="-O1"
29056      C_O_FLAG_NONE="-Od"
29057      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29058      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29059      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29060      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29061      ;;
29062  esac
29063
29064  if test -z "$C_O_FLAG_HIGHEST"; then
29065    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29066  fi
29067
29068  if test -z "$CXX_O_FLAG_HIGHEST"; then
29069    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29070  fi
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29086    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29087$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29088  fi
29089
29090  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29091    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29092$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29093  fi
29094
29095  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29096    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29097$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29098  fi
29099
29100
29101# Check whether --with-extra-cflags was given.
29102if test "${with_extra_cflags+set}" = set; then :
29103  withval=$with_extra_cflags;
29104fi
29105
29106
29107
29108# Check whether --with-extra-cxxflags was given.
29109if test "${with_extra_cxxflags+set}" = set; then :
29110  withval=$with_extra_cxxflags;
29111fi
29112
29113
29114
29115# Check whether --with-extra-ldflags was given.
29116if test "${with_extra_ldflags+set}" = set; then :
29117  withval=$with_extra_ldflags;
29118fi
29119
29120
29121  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29122  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29123  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29124
29125  # Hotspot needs these set in their legacy form
29126  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29127  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29128  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29129
29130
29131
29132
29133
29134  ###############################################################################
29135  #
29136  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29137  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29138  #
29139  case $COMPILER_NAME in
29140    gcc )
29141      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29142      -pipe \
29143      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29144      case $OPENJDK_TARGET_CPU_ARCH in
29145        arm )
29146          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29147          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29148          ;;
29149        ppc )
29150          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29151          ;;
29152        * )
29153          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29154          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29155          ;;
29156      esac
29157      ;;
29158    ossc )
29159      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29160      case $OPENJDK_TARGET_CPU_ARCH in
29161        x86 )
29162          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29163          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29164          ;;
29165      esac
29166
29167      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29168      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29169
29170      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29171      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29172      ;;
29173    cl )
29174      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29175      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29176      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29177      -DWIN32 -DIAL"
29178      case $OPENJDK_TARGET_CPU in
29179        x86 )
29180          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29181          ;;
29182        x86_64 )
29183          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29184          ;;
29185      esac
29186      ;;
29187  esac
29188
29189  ###############################################################################
29190
29191  # Adjust flags according to debug level.
29192  case $DEBUG_LEVEL in
29193    fastdebug )
29194      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29195      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29196      C_O_FLAG_HI="$C_O_FLAG_NORM"
29197      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29198      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29199      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29200      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29201      ;;
29202    slowdebug )
29203      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29204      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29205      C_O_FLAG_HI="$C_O_FLAG_NONE"
29206      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29207      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29208      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29209      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29210      ;;
29211  esac
29212
29213  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29214
29215  # The package path is used only on macosx?
29216  PACKAGE_PATH=/opt/local
29217
29218
29219  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29220    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29221    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29222    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29223    #   Note: -Dmacro         is the same as    #define macro 1
29224    #         -Dmacro=        is the same as    #define macro
29225    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29226      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29227    else
29228      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29229    fi
29230  else
29231    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29232  fi
29233  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29234    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29235  fi
29236  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29237    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29238  fi
29239  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29240    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29241  fi
29242  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29243    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29244    # Setting these parameters makes it an error to link to macosx APIs that are
29245    # newer than the given OS version and makes the linked binaries compatible even
29246    # if built on a newer version of the OS.
29247    # The expected format is X.Y.Z
29248    MACOSX_VERSION_MIN=10.7.0
29249
29250    # The macro takes the version with no dots, ex: 1070
29251    # Let the flags variables get resolved in make for easier override on make
29252    # command line.
29253    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29254    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29255  fi
29256  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29257    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29258  fi
29259  if test "x$DEBUG_LEVEL" = xrelease; then
29260    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29261  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29262    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29263  fi
29264  else
29265    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29266  fi
29267
29268  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29269  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29270
29271  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29272      -I${JDK_OUTPUTDIR}/include \
29273      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29274      -I${JDK_TOPDIR}/src/share/javavm/export \
29275      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29276      -I${JDK_TOPDIR}/src/share/native/common \
29277      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29278
29279  # The shared libraries are compiled using the picflag.
29280  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29281  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29282
29283  # Executable flags
29284  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29285  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29286
29287  # Now this is odd. The JDK native libraries have to link against libjvm.so
29288  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29289  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29290  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29291  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29292  # libraries will link to whatever is in memory. Yuck.
29293  #
29294  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29295  if test "x$COMPILER_NAME" = xcl; then
29296    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29297    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29298      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29299    fi
29300    # TODO: make -debug optional "--disable-full-debug-symbols"
29301    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29302    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29303    LDFLAGS_JDKLIB_SUFFIX=""
29304    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29305      LDFLAGS_STACK_SIZE=1048576
29306    else
29307      LDFLAGS_STACK_SIZE=327680
29308    fi
29309    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29310  else
29311    if test "x$COMPILER_NAME" = xgcc; then
29312      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29313      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29314      if test -n "$HAS_GNU_HASH"; then
29315        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29316      fi
29317      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29318        # And since we now know that the linker is gnu, then add -z defs, to forbid
29319        # undefined symbols in object files.
29320        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29321        if test "x$DEBUG_LEVEL" = "xrelease"; then
29322          # When building release libraries, tell the linker optimize them.
29323          # Should this be supplied to the OSS linker as well?
29324          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29325        fi
29326      fi
29327    fi
29328    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29329        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29330
29331    # On some platforms (mac) the linker warns about non existing -L dirs.
29332    # Add server first if available. Linking aginst client does not always produce the same results.
29333    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29334    # Default to server for other variants.
29335    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29336      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29337    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29338      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29339    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29340      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29341    else
29342      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29343    fi
29344
29345    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29346    if test "x$COMPILER_NAME" = xossc; then
29347      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29348    fi
29349
29350    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29351    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29352      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29353    fi
29354  fi
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370  # Some Zero and Shark settings.
29371  # ZERO_ARCHFLAG tells the compiler which mode to build for
29372  case "${OPENJDK_TARGET_CPU}" in
29373    s390)
29374      ZERO_ARCHFLAG="-m31"
29375      ;;
29376    *)
29377      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29378  esac
29379
29380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29381$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29382  supports=yes
29383
29384  saved_cflags="$CFLAGS"
29385  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29386  ac_ext=c
29387ac_cpp='$CPP $CPPFLAGS'
29388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29390ac_compiler_gnu=$ac_cv_c_compiler_gnu
29391
29392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29393/* end confdefs.h.  */
29394int i;
29395_ACEOF
29396if ac_fn_c_try_compile "$LINENO"; then :
29397
29398else
29399  supports=no
29400fi
29401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29402  ac_ext=cpp
29403ac_cpp='$CXXCPP $CPPFLAGS'
29404ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29405ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29406ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29407
29408  CFLAGS="$saved_cflags"
29409
29410  saved_cxxflags="$CXXFLAGS"
29411  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29412  ac_ext=cpp
29413ac_cpp='$CXXCPP $CPPFLAGS'
29414ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29415ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29416ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29417
29418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29419/* end confdefs.h.  */
29420int i;
29421_ACEOF
29422if ac_fn_cxx_try_compile "$LINENO"; then :
29423
29424else
29425  supports=no
29426fi
29427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29428  ac_ext=cpp
29429ac_cpp='$CXXCPP $CPPFLAGS'
29430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29433
29434  CXXFLAGS="$saved_cxxflags"
29435
29436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29437$as_echo "$supports" >&6; }
29438  if test "x$supports" = "xyes" ; then
29439    :
29440  else
29441    ZERO_ARCHFLAG=""
29442  fi
29443
29444
29445
29446  # Check that the compiler supports -mX flags
29447  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29448
29449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29450$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29451  supports=yes
29452
29453  saved_cflags="$CFLAGS"
29454  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29455  ac_ext=c
29456ac_cpp='$CPP $CPPFLAGS'
29457ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29458ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29459ac_compiler_gnu=$ac_cv_c_compiler_gnu
29460
29461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29462/* end confdefs.h.  */
29463int i;
29464_ACEOF
29465if ac_fn_c_try_compile "$LINENO"; then :
29466
29467else
29468  supports=no
29469fi
29470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29471  ac_ext=cpp
29472ac_cpp='$CXXCPP $CPPFLAGS'
29473ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29474ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29475ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29476
29477  CFLAGS="$saved_cflags"
29478
29479  saved_cxxflags="$CXXFLAGS"
29480  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29481  ac_ext=cpp
29482ac_cpp='$CXXCPP $CPPFLAGS'
29483ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29484ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29485ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29486
29487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29488/* end confdefs.h.  */
29489int i;
29490_ACEOF
29491if ac_fn_cxx_try_compile "$LINENO"; then :
29492
29493else
29494  supports=no
29495fi
29496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29497  ac_ext=cpp
29498ac_cpp='$CXXCPP $CPPFLAGS'
29499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29502
29503  CXXFLAGS="$saved_cxxflags"
29504
29505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29506$as_echo "$supports" >&6; }
29507  if test "x$supports" = "xyes" ; then
29508    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29509  else
29510    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29511  fi
29512
29513
29514
29515
29516# Setup debug symbols (need objcopy from the toolchain for that)
29517
29518  #
29519  # ENABLE_DEBUG_SYMBOLS
29520  # This must be done after the toolchain is setup, since we're looking at objcopy.
29521  #
29522  # Check whether --enable-debug-symbols was given.
29523if test "${enable_debug_symbols+set}" = set; then :
29524  enableval=$enable_debug_symbols;
29525fi
29526
29527
29528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29529$as_echo_n "checking if we should generate debug symbols... " >&6; }
29530
29531  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29532    # explicit enabling of enable-debug-symbols and can't find objcopy
29533    #   this is an error
29534    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29535  fi
29536
29537  if test "x$enable_debug_symbols" = "xyes"; then
29538    ENABLE_DEBUG_SYMBOLS=true
29539  elif test "x$enable_debug_symbols" = "xno"; then
29540    ENABLE_DEBUG_SYMBOLS=false
29541  else
29542    # default on macosx is false
29543    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29544      ENABLE_DEBUG_SYMBOLS=false
29545      # Default is on if objcopy is found, otherwise off
29546    elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29547      ENABLE_DEBUG_SYMBOLS=true
29548    else
29549      ENABLE_DEBUG_SYMBOLS=false
29550    fi
29551  fi
29552
29553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29554$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29555
29556  #
29557  # ZIP_DEBUGINFO_FILES
29558  #
29559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29560$as_echo_n "checking if we should zip debug-info files... " >&6; }
29561  # Check whether --enable-zip-debug-info was given.
29562if test "${enable_zip_debug_info+set}" = set; then :
29563  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29564else
29565  enable_zip_debug_info="yes"
29566fi
29567
29568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29569$as_echo "${enable_zip_debug_info}" >&6; }
29570
29571  if test "x${enable_zip_debug_info}" = "xno"; then
29572    ZIP_DEBUGINFO_FILES=false
29573  else
29574    ZIP_DEBUGINFO_FILES=true
29575  fi
29576
29577
29578
29579
29580
29581
29582
29583###############################################################################
29584#
29585# Check dependencies for external and internal libraries.
29586#
29587###############################################################################
29588
29589
29590
29591  ###############################################################################
29592  #
29593  # OS specific settings that we never will need to probe.
29594  #
29595  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29596    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29597$as_echo_n "checking what is not needed on Linux?... " >&6; }
29598    PULSE_NOT_NEEDED=yes
29599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29600$as_echo "pulse" >&6; }
29601  fi
29602
29603  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29605$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29606    ALSA_NOT_NEEDED=yes
29607    PULSE_NOT_NEEDED=yes
29608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29609$as_echo "alsa pulse" >&6; }
29610  fi
29611
29612  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29614$as_echo_n "checking what is not needed on Windows?... " >&6; }
29615    CUPS_NOT_NEEDED=yes
29616    ALSA_NOT_NEEDED=yes
29617    PULSE_NOT_NEEDED=yes
29618    X11_NOT_NEEDED=yes
29619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29620$as_echo "alsa cups pulse x11" >&6; }
29621  fi
29622
29623  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29625$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29626    ALSA_NOT_NEEDED=yes
29627    PULSE_NOT_NEEDED=yes
29628    X11_NOT_NEEDED=yes
29629    FREETYPE2_NOT_NEEDED=yes
29630    # If the java runtime framework is disabled, then we need X11.
29631    # This will be adjusted below.
29632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29633$as_echo "alsa pulse x11" >&6; }
29634  fi
29635
29636  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29638$as_echo_n "checking what is not needed on bsd?... " >&6; }
29639    ALSA_NOT_NEEDED=yes
29640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29641$as_echo "alsa" >&6; }
29642  fi
29643
29644  if test "x$OPENJDK" = "xfalse"; then
29645    FREETYPE2_NOT_NEEDED=yes
29646  fi
29647
29648  if test "x$SUPPORT_HEADFUL" = xno; then
29649    X11_NOT_NEEDED=yes
29650  fi
29651
29652  ###############################################################################
29653  #
29654  # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29655  # that uses this API.
29656  #
29657  # Check whether --enable-macosx-runtime-support was given.
29658if test "${enable_macosx_runtime_support+set}" = set; then :
29659  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29660else
29661  MACOSX_RUNTIME_SUPPORT="no"
29662fi
29663
29664
29665  USE_MACOSX_RUNTIME_SUPPORT=no
29666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29667$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29668  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29669    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29670      MACOSX_RUNTIME_SUPPORT=yes
29671      USE_MACOSX_RUNTIME_SUPPORT=yes
29672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29673$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29674    else
29675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29676$as_echo "yes, but explicitly disabled." >&6; }
29677    fi
29678  else
29679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29680$as_echo "no" >&6; }
29681  fi
29682
29683  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29685$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29686    X11_NOT_NEEDED=
29687    FREETYPE2_NOT_NEEDED=
29688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29689$as_echo "alsa pulse" >&6; }
29690  fi
29691
29692
29693
29694  ###############################################################################
29695  #
29696  # Check for X Windows
29697  #
29698
29699  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29700  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29701  # --x-libraries for the sysroot, if that seems to be correct.
29702  if test "x$SYS_ROOT" != "x/"; then
29703    if test "x$x_includes" = xNONE; then
29704      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29705        x_includes="$SYS_ROOT/usr/X11R6/include"
29706      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29707        x_includes="$SYS_ROOT/usr/include"
29708      fi
29709    fi
29710    if test "x$x_libraries" = xNONE; then
29711      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29712        x_libraries="$SYS_ROOT/usr/X11R6/lib"
29713      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29714        x_libraries="$SYS_ROOT/usr/lib64"
29715      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29716        x_libraries="$SYS_ROOT/usr/lib"
29717      fi
29718    fi
29719  fi
29720
29721  # Now let autoconf do it's magic
29722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29723$as_echo_n "checking for X... " >&6; }
29724
29725
29726# Check whether --with-x was given.
29727if test "${with_x+set}" = set; then :
29728  withval=$with_x;
29729fi
29730
29731# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29732if test "x$with_x" = xno; then
29733  # The user explicitly disabled X.
29734  have_x=disabled
29735else
29736  case $x_includes,$x_libraries in #(
29737    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29738    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29739  $as_echo_n "(cached) " >&6
29740else
29741  # One or both of the vars are not set, and there is no cached value.
29742ac_x_includes=no ac_x_libraries=no
29743rm -f -r conftest.dir
29744if mkdir conftest.dir; then
29745  cd conftest.dir
29746  cat >Imakefile <<'_ACEOF'
29747incroot:
29748	@echo incroot='${INCROOT}'
29749usrlibdir:
29750	@echo usrlibdir='${USRLIBDIR}'
29751libdir:
29752	@echo libdir='${LIBDIR}'
29753_ACEOF
29754  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29755    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29756    for ac_var in incroot usrlibdir libdir; do
29757      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29758    done
29759    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29760    for ac_extension in a so sl dylib la dll; do
29761      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29762	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29763	ac_im_usrlibdir=$ac_im_libdir; break
29764      fi
29765    done
29766    # Screen out bogus values from the imake configuration.  They are
29767    # bogus both because they are the default anyway, and because
29768    # using them would break gcc on systems where it needs fixed includes.
29769    case $ac_im_incroot in
29770	/usr/include) ac_x_includes= ;;
29771	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29772    esac
29773    case $ac_im_usrlibdir in
29774	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29775	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29776    esac
29777  fi
29778  cd ..
29779  rm -f -r conftest.dir
29780fi
29781
29782# Standard set of common directories for X headers.
29783# Check X11 before X11Rn because it is often a symlink to the current release.
29784ac_x_header_dirs='
29785/usr/X11/include
29786/usr/X11R7/include
29787/usr/X11R6/include
29788/usr/X11R5/include
29789/usr/X11R4/include
29790
29791/usr/include/X11
29792/usr/include/X11R7
29793/usr/include/X11R6
29794/usr/include/X11R5
29795/usr/include/X11R4
29796
29797/usr/local/X11/include
29798/usr/local/X11R7/include
29799/usr/local/X11R6/include
29800/usr/local/X11R5/include
29801/usr/local/X11R4/include
29802
29803/usr/local/include/X11
29804/usr/local/include/X11R7
29805/usr/local/include/X11R6
29806/usr/local/include/X11R5
29807/usr/local/include/X11R4
29808
29809/usr/X386/include
29810/usr/x386/include
29811/usr/XFree86/include/X11
29812
29813/usr/include
29814/usr/local/include
29815/usr/unsupported/include
29816/usr/athena/include
29817/usr/local/x11r5/include
29818/usr/lpp/Xamples/include
29819
29820/usr/openwin/include
29821/usr/openwin/share/include'
29822
29823if test "$ac_x_includes" = no; then
29824  # Guess where to find include files, by looking for Xlib.h.
29825  # First, try using that file with no special directory specified.
29826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29827/* end confdefs.h.  */
29828#include <X11/Xlib.h>
29829_ACEOF
29830if ac_fn_cxx_try_cpp "$LINENO"; then :
29831  # We can compile using X headers with no special include directory.
29832ac_x_includes=
29833else
29834  for ac_dir in $ac_x_header_dirs; do
29835  if test -r "$ac_dir/X11/Xlib.h"; then
29836    ac_x_includes=$ac_dir
29837    break
29838  fi
29839done
29840fi
29841rm -f conftest.err conftest.i conftest.$ac_ext
29842fi # $ac_x_includes = no
29843
29844if test "$ac_x_libraries" = no; then
29845  # Check for the libraries.
29846  # See if we find them without any special options.
29847  # Don't add to $LIBS permanently.
29848  ac_save_LIBS=$LIBS
29849  LIBS="-lX11 $LIBS"
29850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29851/* end confdefs.h.  */
29852#include <X11/Xlib.h>
29853int
29854main ()
29855{
29856XrmInitialize ()
29857  ;
29858  return 0;
29859}
29860_ACEOF
29861if ac_fn_cxx_try_link "$LINENO"; then :
29862  LIBS=$ac_save_LIBS
29863# We can link X programs with no special library path.
29864ac_x_libraries=
29865else
29866  LIBS=$ac_save_LIBS
29867for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29868do
29869  # Don't even attempt the hair of trying to link an X program!
29870  for ac_extension in a so sl dylib la dll; do
29871    if test -r "$ac_dir/libX11.$ac_extension"; then
29872      ac_x_libraries=$ac_dir
29873      break 2
29874    fi
29875  done
29876done
29877fi
29878rm -f core conftest.err conftest.$ac_objext \
29879    conftest$ac_exeext conftest.$ac_ext
29880fi # $ac_x_libraries = no
29881
29882case $ac_x_includes,$ac_x_libraries in #(
29883  no,* | *,no | *\'*)
29884    # Didn't find X, or a directory has "'" in its name.
29885    ac_cv_have_x="have_x=no";; #(
29886  *)
29887    # Record where we found X for the cache.
29888    ac_cv_have_x="have_x=yes\
29889	ac_x_includes='$ac_x_includes'\
29890	ac_x_libraries='$ac_x_libraries'"
29891esac
29892fi
29893;; #(
29894    *) have_x=yes;;
29895  esac
29896  eval "$ac_cv_have_x"
29897fi # $with_x != no
29898
29899if test "$have_x" != yes; then
29900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29901$as_echo "$have_x" >&6; }
29902  no_x=yes
29903else
29904  # If each of the values was on the command line, it overrides each guess.
29905  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29906  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29907  # Update the cache value to reflect the command line values.
29908  ac_cv_have_x="have_x=yes\
29909	ac_x_includes='$x_includes'\
29910	ac_x_libraries='$x_libraries'"
29911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29912$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29913fi
29914
29915  if test "$no_x" = yes; then
29916  # Not all programs may use this symbol, but it does not hurt to define it.
29917
29918$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29919
29920  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29921else
29922  if test -n "$x_includes"; then
29923    X_CFLAGS="$X_CFLAGS -I$x_includes"
29924  fi
29925
29926  # It would also be nice to do this for all -L options, not just this one.
29927  if test -n "$x_libraries"; then
29928    X_LIBS="$X_LIBS -L$x_libraries"
29929    # For Solaris; some versions of Sun CC require a space after -R and
29930    # others require no space.  Words are not sufficient . . . .
29931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29932$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29933    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29934    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29935    ac_cxx_werror_flag=yes
29936    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29937/* end confdefs.h.  */
29938
29939int
29940main ()
29941{
29942
29943  ;
29944  return 0;
29945}
29946_ACEOF
29947if ac_fn_cxx_try_link "$LINENO"; then :
29948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29949$as_echo "no" >&6; }
29950       X_LIBS="$X_LIBS -R$x_libraries"
29951else
29952  LIBS="$ac_xsave_LIBS -R $x_libraries"
29953       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29954/* end confdefs.h.  */
29955
29956int
29957main ()
29958{
29959
29960  ;
29961  return 0;
29962}
29963_ACEOF
29964if ac_fn_cxx_try_link "$LINENO"; then :
29965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29966$as_echo "yes" >&6; }
29967	  X_LIBS="$X_LIBS -R $x_libraries"
29968else
29969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29970$as_echo "neither works" >&6; }
29971fi
29972rm -f core conftest.err conftest.$ac_objext \
29973    conftest$ac_exeext conftest.$ac_ext
29974fi
29975rm -f core conftest.err conftest.$ac_objext \
29976    conftest$ac_exeext conftest.$ac_ext
29977    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29978    LIBS=$ac_xsave_LIBS
29979  fi
29980
29981  # Check for system-dependent libraries X programs must link with.
29982  # Do this before checking for the system-independent R6 libraries
29983  # (-lICE), since we may need -lsocket or whatever for X linking.
29984
29985  if test "$ISC" = yes; then
29986    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29987  else
29988    # Martyn Johnson says this is needed for Ultrix, if the X
29989    # libraries were built with DECnet support.  And Karl Berry says
29990    # the Alpha needs dnet_stub (dnet does not exist).
29991    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29992    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29993/* end confdefs.h.  */
29994
29995/* Override any GCC internal prototype to avoid an error.
29996   Use char because int might match the return type of a GCC
29997   builtin and then its argument prototype would still apply.  */
29998#ifdef __cplusplus
29999extern "C"
30000#endif
30001char XOpenDisplay ();
30002int
30003main ()
30004{
30005return XOpenDisplay ();
30006  ;
30007  return 0;
30008}
30009_ACEOF
30010if ac_fn_cxx_try_link "$LINENO"; then :
30011
30012else
30013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30014$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30015if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30016  $as_echo_n "(cached) " >&6
30017else
30018  ac_check_lib_save_LIBS=$LIBS
30019LIBS="-ldnet  $LIBS"
30020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30021/* end confdefs.h.  */
30022
30023/* Override any GCC internal prototype to avoid an error.
30024   Use char because int might match the return type of a GCC
30025   builtin and then its argument prototype would still apply.  */
30026#ifdef __cplusplus
30027extern "C"
30028#endif
30029char dnet_ntoa ();
30030int
30031main ()
30032{
30033return dnet_ntoa ();
30034  ;
30035  return 0;
30036}
30037_ACEOF
30038if ac_fn_cxx_try_link "$LINENO"; then :
30039  ac_cv_lib_dnet_dnet_ntoa=yes
30040else
30041  ac_cv_lib_dnet_dnet_ntoa=no
30042fi
30043rm -f core conftest.err conftest.$ac_objext \
30044    conftest$ac_exeext conftest.$ac_ext
30045LIBS=$ac_check_lib_save_LIBS
30046fi
30047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30048$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30049if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30050  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30051fi
30052
30053    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30054      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30055$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30056if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30057  $as_echo_n "(cached) " >&6
30058else
30059  ac_check_lib_save_LIBS=$LIBS
30060LIBS="-ldnet_stub  $LIBS"
30061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30062/* end confdefs.h.  */
30063
30064/* Override any GCC internal prototype to avoid an error.
30065   Use char because int might match the return type of a GCC
30066   builtin and then its argument prototype would still apply.  */
30067#ifdef __cplusplus
30068extern "C"
30069#endif
30070char dnet_ntoa ();
30071int
30072main ()
30073{
30074return dnet_ntoa ();
30075  ;
30076  return 0;
30077}
30078_ACEOF
30079if ac_fn_cxx_try_link "$LINENO"; then :
30080  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30081else
30082  ac_cv_lib_dnet_stub_dnet_ntoa=no
30083fi
30084rm -f core conftest.err conftest.$ac_objext \
30085    conftest$ac_exeext conftest.$ac_ext
30086LIBS=$ac_check_lib_save_LIBS
30087fi
30088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30089$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30090if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30091  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30092fi
30093
30094    fi
30095fi
30096rm -f core conftest.err conftest.$ac_objext \
30097    conftest$ac_exeext conftest.$ac_ext
30098    LIBS="$ac_xsave_LIBS"
30099
30100    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30101    # to get the SysV transport functions.
30102    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30103    # needs -lnsl.
30104    # The nsl library prevents programs from opening the X display
30105    # on Irix 5.2, according to T.E. Dickey.
30106    # The functions gethostbyname, getservbyname, and inet_addr are
30107    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30108    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30109if test "x$ac_cv_func_gethostbyname" = xyes; then :
30110
30111fi
30112
30113    if test $ac_cv_func_gethostbyname = no; then
30114      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30115$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30116if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30117  $as_echo_n "(cached) " >&6
30118else
30119  ac_check_lib_save_LIBS=$LIBS
30120LIBS="-lnsl  $LIBS"
30121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30122/* end confdefs.h.  */
30123
30124/* Override any GCC internal prototype to avoid an error.
30125   Use char because int might match the return type of a GCC
30126   builtin and then its argument prototype would still apply.  */
30127#ifdef __cplusplus
30128extern "C"
30129#endif
30130char gethostbyname ();
30131int
30132main ()
30133{
30134return gethostbyname ();
30135  ;
30136  return 0;
30137}
30138_ACEOF
30139if ac_fn_cxx_try_link "$LINENO"; then :
30140  ac_cv_lib_nsl_gethostbyname=yes
30141else
30142  ac_cv_lib_nsl_gethostbyname=no
30143fi
30144rm -f core conftest.err conftest.$ac_objext \
30145    conftest$ac_exeext conftest.$ac_ext
30146LIBS=$ac_check_lib_save_LIBS
30147fi
30148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30149$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30150if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30151  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30152fi
30153
30154      if test $ac_cv_lib_nsl_gethostbyname = no; then
30155	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30156$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30157if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30158  $as_echo_n "(cached) " >&6
30159else
30160  ac_check_lib_save_LIBS=$LIBS
30161LIBS="-lbsd  $LIBS"
30162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30163/* end confdefs.h.  */
30164
30165/* Override any GCC internal prototype to avoid an error.
30166   Use char because int might match the return type of a GCC
30167   builtin and then its argument prototype would still apply.  */
30168#ifdef __cplusplus
30169extern "C"
30170#endif
30171char gethostbyname ();
30172int
30173main ()
30174{
30175return gethostbyname ();
30176  ;
30177  return 0;
30178}
30179_ACEOF
30180if ac_fn_cxx_try_link "$LINENO"; then :
30181  ac_cv_lib_bsd_gethostbyname=yes
30182else
30183  ac_cv_lib_bsd_gethostbyname=no
30184fi
30185rm -f core conftest.err conftest.$ac_objext \
30186    conftest$ac_exeext conftest.$ac_ext
30187LIBS=$ac_check_lib_save_LIBS
30188fi
30189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30190$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30191if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30192  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30193fi
30194
30195      fi
30196    fi
30197
30198    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30199    # socket/setsockopt and other routines are undefined under SCO ODT
30200    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30201    # on later versions), says Simon Leinen: it contains gethostby*
30202    # variants that don't use the name server (or something).  -lsocket
30203    # must be given before -lnsl if both are needed.  We assume that
30204    # if connect needs -lnsl, so does gethostbyname.
30205    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30206if test "x$ac_cv_func_connect" = xyes; then :
30207
30208fi
30209
30210    if test $ac_cv_func_connect = no; then
30211      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30212$as_echo_n "checking for connect in -lsocket... " >&6; }
30213if ${ac_cv_lib_socket_connect+:} false; then :
30214  $as_echo_n "(cached) " >&6
30215else
30216  ac_check_lib_save_LIBS=$LIBS
30217LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30219/* end confdefs.h.  */
30220
30221/* Override any GCC internal prototype to avoid an error.
30222   Use char because int might match the return type of a GCC
30223   builtin and then its argument prototype would still apply.  */
30224#ifdef __cplusplus
30225extern "C"
30226#endif
30227char connect ();
30228int
30229main ()
30230{
30231return connect ();
30232  ;
30233  return 0;
30234}
30235_ACEOF
30236if ac_fn_cxx_try_link "$LINENO"; then :
30237  ac_cv_lib_socket_connect=yes
30238else
30239  ac_cv_lib_socket_connect=no
30240fi
30241rm -f core conftest.err conftest.$ac_objext \
30242    conftest$ac_exeext conftest.$ac_ext
30243LIBS=$ac_check_lib_save_LIBS
30244fi
30245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30246$as_echo "$ac_cv_lib_socket_connect" >&6; }
30247if test "x$ac_cv_lib_socket_connect" = xyes; then :
30248  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30249fi
30250
30251    fi
30252
30253    # Guillermo Gomez says -lposix is necessary on A/UX.
30254    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30255if test "x$ac_cv_func_remove" = xyes; then :
30256
30257fi
30258
30259    if test $ac_cv_func_remove = no; then
30260      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30261$as_echo_n "checking for remove in -lposix... " >&6; }
30262if ${ac_cv_lib_posix_remove+:} false; then :
30263  $as_echo_n "(cached) " >&6
30264else
30265  ac_check_lib_save_LIBS=$LIBS
30266LIBS="-lposix  $LIBS"
30267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30268/* end confdefs.h.  */
30269
30270/* Override any GCC internal prototype to avoid an error.
30271   Use char because int might match the return type of a GCC
30272   builtin and then its argument prototype would still apply.  */
30273#ifdef __cplusplus
30274extern "C"
30275#endif
30276char remove ();
30277int
30278main ()
30279{
30280return remove ();
30281  ;
30282  return 0;
30283}
30284_ACEOF
30285if ac_fn_cxx_try_link "$LINENO"; then :
30286  ac_cv_lib_posix_remove=yes
30287else
30288  ac_cv_lib_posix_remove=no
30289fi
30290rm -f core conftest.err conftest.$ac_objext \
30291    conftest$ac_exeext conftest.$ac_ext
30292LIBS=$ac_check_lib_save_LIBS
30293fi
30294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30295$as_echo "$ac_cv_lib_posix_remove" >&6; }
30296if test "x$ac_cv_lib_posix_remove" = xyes; then :
30297  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30298fi
30299
30300    fi
30301
30302    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30303    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30304if test "x$ac_cv_func_shmat" = xyes; then :
30305
30306fi
30307
30308    if test $ac_cv_func_shmat = no; then
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30310$as_echo_n "checking for shmat in -lipc... " >&6; }
30311if ${ac_cv_lib_ipc_shmat+:} false; then :
30312  $as_echo_n "(cached) " >&6
30313else
30314  ac_check_lib_save_LIBS=$LIBS
30315LIBS="-lipc  $LIBS"
30316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30317/* end confdefs.h.  */
30318
30319/* Override any GCC internal prototype to avoid an error.
30320   Use char because int might match the return type of a GCC
30321   builtin and then its argument prototype would still apply.  */
30322#ifdef __cplusplus
30323extern "C"
30324#endif
30325char shmat ();
30326int
30327main ()
30328{
30329return shmat ();
30330  ;
30331  return 0;
30332}
30333_ACEOF
30334if ac_fn_cxx_try_link "$LINENO"; then :
30335  ac_cv_lib_ipc_shmat=yes
30336else
30337  ac_cv_lib_ipc_shmat=no
30338fi
30339rm -f core conftest.err conftest.$ac_objext \
30340    conftest$ac_exeext conftest.$ac_ext
30341LIBS=$ac_check_lib_save_LIBS
30342fi
30343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30344$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30345if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30346  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30347fi
30348
30349    fi
30350  fi
30351
30352  # Check for libraries that X11R6 Xt/Xaw programs need.
30353  ac_save_LDFLAGS=$LDFLAGS
30354  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30355  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30356  # check for ICE first), but we must link in the order -lSM -lICE or
30357  # we get undefined symbols.  So assume we have SM if we have ICE.
30358  # These have to be linked with before -lX11, unlike the other
30359  # libraries we check for below, so use a different variable.
30360  # John Interrante, Karl Berry
30361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30362$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30363if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30364  $as_echo_n "(cached) " >&6
30365else
30366  ac_check_lib_save_LIBS=$LIBS
30367LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30369/* end confdefs.h.  */
30370
30371/* Override any GCC internal prototype to avoid an error.
30372   Use char because int might match the return type of a GCC
30373   builtin and then its argument prototype would still apply.  */
30374#ifdef __cplusplus
30375extern "C"
30376#endif
30377char IceConnectionNumber ();
30378int
30379main ()
30380{
30381return IceConnectionNumber ();
30382  ;
30383  return 0;
30384}
30385_ACEOF
30386if ac_fn_cxx_try_link "$LINENO"; then :
30387  ac_cv_lib_ICE_IceConnectionNumber=yes
30388else
30389  ac_cv_lib_ICE_IceConnectionNumber=no
30390fi
30391rm -f core conftest.err conftest.$ac_objext \
30392    conftest$ac_exeext conftest.$ac_ext
30393LIBS=$ac_check_lib_save_LIBS
30394fi
30395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30396$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30397if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30398  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30399fi
30400
30401  LDFLAGS=$ac_save_LDFLAGS
30402
30403fi
30404
30405
30406  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30407  # this doesn't make sense so we remove it.
30408  if test "x$COMPILE_TYPE" = xcross; then
30409    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30410  fi
30411
30412  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30413
30414  # Print a helpful message on how to acquire the necessary build dependency.
30415  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30416  MISSING_DEPENDENCY=x11
30417  PKGHANDLER_COMMAND=
30418
30419  case $PKGHANDLER in
30420    apt-get)
30421      apt_help     $MISSING_DEPENDENCY ;;
30422    yum)
30423      yum_help     $MISSING_DEPENDENCY ;;
30424    port)
30425      port_help    $MISSING_DEPENDENCY ;;
30426    pkgutil)
30427      pkgutil_help $MISSING_DEPENDENCY ;;
30428    pkgadd)
30429      pkgadd_help  $MISSING_DEPENDENCY ;;
30430    * )
30431      break ;;
30432  esac
30433
30434  if test "x$PKGHANDLER_COMMAND" != x; then
30435    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30436  fi
30437
30438    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30439  fi
30440
30441  # Some of the old makefiles require a setting of OPENWIN_HOME
30442  # Since the X11R6 directory has disappeared on later Linuxes,
30443  # we need to probe for it.
30444  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30445    if test -d "$SYS_ROOT/usr/X11R6"; then
30446      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30447    elif test -d "$SYS_ROOT/usr/include/X11"; then
30448      OPENWIN_HOME="$SYS_ROOT/usr"
30449    fi
30450  fi
30451  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30452    OPENWIN_HOME="/usr/openwin"
30453  fi
30454
30455
30456
30457  #
30458  # Weird Sol10 something check...TODO change to try compile
30459  #
30460  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30461    if test "`uname -r`" = "5.10"; then
30462      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30463        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30464      fi
30465    fi
30466  fi
30467
30468  ac_ext=c
30469ac_cpp='$CPP $CPPFLAGS'
30470ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30471ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30472ac_compiler_gnu=$ac_cv_c_compiler_gnu
30473
30474  OLD_CFLAGS="$CFLAGS"
30475  CFLAGS="$CFLAGS $X_CFLAGS"
30476
30477  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30478  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30479do :
30480  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30481ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30482        # include <X11/Xlib.h>
30483        # include <X11/Xutil.h>
30484
30485
30486"
30487if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30488  cat >>confdefs.h <<_ACEOF
30489#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30490_ACEOF
30491 X11_A_OK=yes
30492else
30493  X11_A_OK=no; break
30494fi
30495
30496done
30497
30498
30499  CFLAGS="$OLD_CFLAGS"
30500  ac_ext=cpp
30501ac_cpp='$CXXCPP $CPPFLAGS'
30502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30505
30506
30507  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30508
30509  # Print a helpful message on how to acquire the necessary build dependency.
30510  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30511  MISSING_DEPENDENCY=x11
30512  PKGHANDLER_COMMAND=
30513
30514  case $PKGHANDLER in
30515    apt-get)
30516      apt_help     $MISSING_DEPENDENCY ;;
30517    yum)
30518      yum_help     $MISSING_DEPENDENCY ;;
30519    port)
30520      port_help    $MISSING_DEPENDENCY ;;
30521    pkgutil)
30522      pkgutil_help $MISSING_DEPENDENCY ;;
30523    pkgadd)
30524      pkgadd_help  $MISSING_DEPENDENCY ;;
30525    * )
30526      break ;;
30527  esac
30528
30529  if test "x$PKGHANDLER_COMMAND" != x; then
30530    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30531  fi
30532
30533    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30534  fi
30535
30536
30537
30538
30539
30540
30541  ###############################################################################
30542  #
30543  # The common unix printing system cups is used to print from java.
30544  #
30545
30546# Check whether --with-cups was given.
30547if test "${with_cups+set}" = set; then :
30548  withval=$with_cups;
30549fi
30550
30551
30552# Check whether --with-cups-include was given.
30553if test "${with_cups_include+set}" = set; then :
30554  withval=$with_cups_include;
30555fi
30556
30557
30558  if test "x$CUPS_NOT_NEEDED" = xyes; then
30559    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30560      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30561$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30562    fi
30563    CUPS_CFLAGS=
30564  else
30565    CUPS_FOUND=no
30566
30567    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30568      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30569    fi
30570
30571    if test "x${with_cups}" != x; then
30572      CUPS_CFLAGS="-I${with_cups}/include"
30573      CUPS_FOUND=yes
30574    fi
30575    if test "x${with_cups_include}" != x; then
30576      CUPS_CFLAGS="-I${with_cups_include}"
30577      CUPS_FOUND=yes
30578    fi
30579    if test "x$CUPS_FOUND" = xno; then
30580
30581
30582  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30583    # Source the builddeps file again, to make sure it uses the latest variables!
30584    . $builddepsfile
30585    # Look for a target and build machine specific resource!
30586    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30587    if test "x$resource" = x; then
30588      # Ok, lets instead look for a target specific resource
30589      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30590    fi
30591    if test "x$resource" = x; then
30592      # Ok, lets instead look for a build specific resource
30593      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30594    fi
30595    if test "x$resource" = x; then
30596      # Ok, lets instead look for a generic resource
30597      # (The cups comes from M4 and not the shell, thus no need for eval here.)
30598      resource=${builddep_cups}
30599    fi
30600    if test "x$resource" != x; then
30601      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30602$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30603      # If the resource in the builddeps.conf file is an existing directory,
30604      # for example /java/linux/cups
30605      if test -d ${resource}; then
30606        depdir=${resource}
30607      else
30608
30609  # cups is for example mymodule
30610  # $resource is for example libs/general/libmymod_1_2_3.zip
30611  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30612  # $with_builddeps_dir is for example /localhome/builddeps
30613  # depdir is the name of the variable into which we store the depdir, eg MYMOD
30614  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30615  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30616  filename=`basename $resource`
30617  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30618  filebase=${filename%%.*}
30619  extension=${filename#*.}
30620  installdir=$with_builddeps_dir/$filebase
30621  if test ! -f $installdir/$filename.unpacked; then
30622    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30623$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30624    if test ! -d $installdir; then
30625      mkdir -p $installdir
30626    fi
30627    if test ! -d $installdir; then
30628      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30629    fi
30630    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30631    touch $tmpfile
30632    if test ! -f $tmpfile; then
30633      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30634    fi
30635
30636  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30637  # $tmpfile is the local file name for the downloaded file.
30638  VALID_TOOL=no
30639  if test "x$BDEPS_FTP" = xwget; then
30640    VALID_TOOL=yes
30641    wget -O $tmpfile $with_builddeps_server/$resource
30642  fi
30643  if test "x$BDEPS_FTP" = xlftp; then
30644    VALID_TOOL=yes
30645    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30646  fi
30647  if test "x$BDEPS_FTP" = xftp; then
30648    VALID_TOOL=yes
30649    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30650    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30651    FTPUSERPWD=${FTPSERVER%%@*}
30652    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30653      FTPUSER=${userpwd%%:*}
30654      FTPPWD=${userpwd#*@}
30655      FTPSERVER=${FTPSERVER#*@}
30656    else
30657      FTPUSER=ftp
30658      FTPPWD=ftp
30659    fi
30660    # the "pass" command does not work on some
30661    # ftp clients (read ftp.exe) but if it works,
30662    # passive mode is better!
30663    ( \
30664        echo "user $FTPUSER $FTPPWD"        ; \
30665        echo "pass"                         ; \
30666        echo "bin"                          ; \
30667        echo "get $FTPPATH $tmpfile"              ; \
30668    ) | ftp -in $FTPSERVER
30669  fi
30670  if test "x$VALID_TOOL" != xyes; then
30671    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30672  fi
30673
30674    mv $tmpfile $installdir/$filename
30675    if test ! -s $installdir/$filename; then
30676      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30677    fi
30678    case "$extension" in
30679      zip)  echo "Unzipping $installdir/$filename..."
30680        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30681        ;;
30682      tar.gz) echo "Untaring $installdir/$filename..."
30683        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30684        ;;
30685      tgz) echo "Untaring $installdir/$filename..."
30686        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30687        ;;
30688      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30689        ;;
30690    esac
30691  fi
30692  if test -f $installdir/$filename.unpacked; then
30693    depdir=$installdir
30694  fi
30695
30696      fi
30697      # Source the builddeps file again, because in the previous command, the depdir
30698      # was updated to point at the current build dependency install directory.
30699      . $builddepsfile
30700      # Now extract variables from the builddeps.conf files.
30701      theroot=${builddep_cups_ROOT}
30702      thecflags=${builddep_cups_CFLAGS}
30703      thelibs=${builddep_cups_LIBS}
30704      if test "x$depdir" = x; then
30705        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30706      fi
30707      CUPS=$depdir
30708      if test "x$theroot" != x; then
30709        CUPS="$theroot"
30710      fi
30711      if test "x$thecflags" != x; then
30712        CUPS_CFLAGS="$thecflags"
30713      fi
30714      if test "x$thelibs" != x; then
30715        CUPS_LIBS="$thelibs"
30716      fi
30717      CUPS_FOUND=yes
30718
30719    fi
30720
30721  fi
30722
30723    fi
30724    if test "x$CUPS_FOUND" = xno; then
30725      # Are the cups headers installed in the default /usr/include location?
30726      for ac_header in cups/cups.h cups/ppd.h
30727do :
30728  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30729ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30730if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30731  cat >>confdefs.h <<_ACEOF
30732#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30733_ACEOF
30734
30735            CUPS_FOUND=yes
30736            CUPS_CFLAGS=
30737            DEFAULT_CUPS=yes
30738
30739
30740fi
30741
30742done
30743
30744    fi
30745    if test "x$CUPS_FOUND" = xno; then
30746      # Getting nervous now? Lets poke around for standard Solaris third-party
30747      # package installation locations.
30748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30749$as_echo_n "checking for cups headers... " >&6; }
30750      if test -s /opt/sfw/cups/include/cups/cups.h; then
30751        # An SFW package seems to be installed!
30752        CUPS_FOUND=yes
30753        CUPS_CFLAGS="-I/opt/sfw/cups/include"
30754      elif test -s /opt/csw/include/cups/cups.h; then
30755        # A CSW package seems to be installed!
30756        CUPS_FOUND=yes
30757        CUPS_CFLAGS="-I/opt/csw/include"
30758      fi
30759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30760$as_echo "$CUPS_FOUND" >&6; }
30761    fi
30762    if test "x$CUPS_FOUND" = xno; then
30763
30764  # Print a helpful message on how to acquire the necessary build dependency.
30765  # cups is the help tag: freetyp2, cups, pulse, alsa etc
30766  MISSING_DEPENDENCY=cups
30767  PKGHANDLER_COMMAND=
30768
30769  case $PKGHANDLER in
30770    apt-get)
30771      apt_help     $MISSING_DEPENDENCY ;;
30772    yum)
30773      yum_help     $MISSING_DEPENDENCY ;;
30774    port)
30775      port_help    $MISSING_DEPENDENCY ;;
30776    pkgutil)
30777      pkgutil_help $MISSING_DEPENDENCY ;;
30778    pkgadd)
30779      pkgadd_help  $MISSING_DEPENDENCY ;;
30780    * )
30781      break ;;
30782  esac
30783
30784  if test "x$PKGHANDLER_COMMAND" != x; then
30785    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30786  fi
30787
30788      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30789    fi
30790  fi
30791
30792
30793
30794
30795
30796
30797  ###############################################################################
30798  #
30799  # The ubiquitous freetype2 library is used to render fonts.
30800  #
30801
30802# Check whether --with-freetype was given.
30803if test "${with_freetype+set}" = set; then :
30804  withval=$with_freetype;
30805fi
30806
30807
30808  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30809  USING_SYSTEM_FT_LIB=false
30810
30811  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30812    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30813      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30814$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30815    fi
30816    FREETYPE2_CFLAGS=
30817    FREETYPE2_LIBS=
30818    FREETYPE2_LIB_PATH=
30819  else
30820    FREETYPE2_FOUND=no
30821
30822    if test "x$with_freetype" != x; then
30823
30824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30825
30826  # Input might be given as Windows format, start by converting to
30827  # unix format.
30828  path="$with_freetype"
30829  new_path=`$CYGPATH -u "$path"`
30830
30831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30834  # "foo.exe" is OK but "foo" is an error.
30835  #
30836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30837  # It is also a way to make sure we got the proper file name for the real test later on.
30838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30839  if test "x$test_shortpath" = x; then
30840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30841$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30842    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30843  fi
30844
30845  # Call helper function which possibly converts this using DOS-style short mode.
30846  # If so, the updated path is stored in $new_path.
30847
30848  input_path="$new_path"
30849  # Check if we need to convert this using DOS-style short mode. If the path
30850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30851  # take no chances and rewrite it.
30852  # Note: m4 eats our [], so we need to use [ and ] instead.
30853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30854  if test "x$has_forbidden_chars" != x; then
30855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30859      # Going to short mode and back again did indeed matter. Since short mode is
30860      # case insensitive, let's make it lowercase to improve readability.
30861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30862      # Now convert it back to Unix-stile (cygpath)
30863      input_path=`$CYGPATH -u "$shortmode_path"`
30864      new_path="$input_path"
30865    fi
30866  fi
30867
30868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30869  if test "x$test_cygdrive_prefix" = x; then
30870    # As a simple fix, exclude /usr/bin since it's not a real path.
30871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30873      # a path prefixed by /cygdrive for fixpath to work.
30874      new_path="$CYGWIN_ROOT_PATH$input_path"
30875    fi
30876  fi
30877
30878
30879  if test "x$path" != "x$new_path"; then
30880    with_freetype="$new_path"
30881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30882$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30883  fi
30884
30885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30886
30887  path="$with_freetype"
30888  has_colon=`$ECHO $path | $GREP ^.:`
30889  new_path="$path"
30890  if test "x$has_colon" = x; then
30891    # Not in mixed or Windows style, start by that.
30892    new_path=`cmd //c echo $path`
30893  fi
30894
30895
30896  input_path="$new_path"
30897  # Check if we need to convert this using DOS-style short mode. If the path
30898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30899  # take no chances and rewrite it.
30900  # Note: m4 eats our [], so we need to use [ and ] instead.
30901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30902  if test "x$has_forbidden_chars" != x; then
30903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30905  fi
30906
30907
30908  windows_path="$new_path"
30909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30910    unix_path=`$CYGPATH -u "$windows_path"`
30911    new_path="$unix_path"
30912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30914    new_path="$unix_path"
30915  fi
30916
30917  if test "x$path" != "x$new_path"; then
30918    with_freetype="$new_path"
30919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30920$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30921  fi
30922
30923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30925
30926  else
30927    # We're on a posix platform. Hooray! :)
30928    path="$with_freetype"
30929    has_space=`$ECHO "$path" | $GREP " "`
30930    if test "x$has_space" != x; then
30931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30932$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30933      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30934    fi
30935
30936    # Use eval to expand a potential ~
30937    eval path="$path"
30938    if test ! -f "$path" && test ! -d "$path"; then
30939      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30940    fi
30941
30942    with_freetype="`cd "$path"; $THEPWDCMD -L`"
30943  fi
30944
30945      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30946      FREETYPE2_LIB_PATH="$with_freetype/lib"
30947      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30948        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30949        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30950      fi
30951      if test "x$OPENJDK_TARGET_OS" = xwindows; then
30952        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30953      fi
30954      FREETYPE2_CFLAGS="-I$with_freetype/include"
30955      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30956        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30957      fi
30958      FREETYPE2_FOUND=yes
30959      if test "x$FREETYPE2_FOUND" = xyes; then
30960        # Verify that the directories exist
30961        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30962          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30963        fi
30964        # List the contents of the lib.
30965        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30966        if test "x$FREETYPELIB" = x; then
30967          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30968        fi
30969        # Check one h-file
30970        if ! test -s "$with_freetype/include/ft2build.h"; then
30971          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30972        fi
30973      fi
30974    fi
30975    if test "x$FREETYPE2_FOUND" = xno; then
30976
30977
30978  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30979    # Source the builddeps file again, to make sure it uses the latest variables!
30980    . $builddepsfile
30981    # Look for a target and build machine specific resource!
30982    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30983    if test "x$resource" = x; then
30984      # Ok, lets instead look for a target specific resource
30985      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30986    fi
30987    if test "x$resource" = x; then
30988      # Ok, lets instead look for a build specific resource
30989      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30990    fi
30991    if test "x$resource" = x; then
30992      # Ok, lets instead look for a generic resource
30993      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30994      resource=${builddep_freetype2}
30995    fi
30996    if test "x$resource" != x; then
30997      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30998$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30999      # If the resource in the builddeps.conf file is an existing directory,
31000      # for example /java/linux/cups
31001      if test -d ${resource}; then
31002        depdir=${resource}
31003      else
31004
31005  # freetype2 is for example mymodule
31006  # $resource is for example libs/general/libmymod_1_2_3.zip
31007  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31008  # $with_builddeps_dir is for example /localhome/builddeps
31009  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31010  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31011  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31012  filename=`basename $resource`
31013  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31014  filebase=${filename%%.*}
31015  extension=${filename#*.}
31016  installdir=$with_builddeps_dir/$filebase
31017  if test ! -f $installdir/$filename.unpacked; then
31018    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31019$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31020    if test ! -d $installdir; then
31021      mkdir -p $installdir
31022    fi
31023    if test ! -d $installdir; then
31024      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31025    fi
31026    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31027    touch $tmpfile
31028    if test ! -f $tmpfile; then
31029      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31030    fi
31031
31032  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31033  # $tmpfile is the local file name for the downloaded file.
31034  VALID_TOOL=no
31035  if test "x$BDEPS_FTP" = xwget; then
31036    VALID_TOOL=yes
31037    wget -O $tmpfile $with_builddeps_server/$resource
31038  fi
31039  if test "x$BDEPS_FTP" = xlftp; then
31040    VALID_TOOL=yes
31041    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31042  fi
31043  if test "x$BDEPS_FTP" = xftp; then
31044    VALID_TOOL=yes
31045    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31046    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31047    FTPUSERPWD=${FTPSERVER%%@*}
31048    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31049      FTPUSER=${userpwd%%:*}
31050      FTPPWD=${userpwd#*@}
31051      FTPSERVER=${FTPSERVER#*@}
31052    else
31053      FTPUSER=ftp
31054      FTPPWD=ftp
31055    fi
31056    # the "pass" command does not work on some
31057    # ftp clients (read ftp.exe) but if it works,
31058    # passive mode is better!
31059    ( \
31060        echo "user $FTPUSER $FTPPWD"        ; \
31061        echo "pass"                         ; \
31062        echo "bin"                          ; \
31063        echo "get $FTPPATH $tmpfile"              ; \
31064    ) | ftp -in $FTPSERVER
31065  fi
31066  if test "x$VALID_TOOL" != xyes; then
31067    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31068  fi
31069
31070    mv $tmpfile $installdir/$filename
31071    if test ! -s $installdir/$filename; then
31072      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31073    fi
31074    case "$extension" in
31075      zip)  echo "Unzipping $installdir/$filename..."
31076        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31077        ;;
31078      tar.gz) echo "Untaring $installdir/$filename..."
31079        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31080        ;;
31081      tgz) echo "Untaring $installdir/$filename..."
31082        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31083        ;;
31084      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31085        ;;
31086    esac
31087  fi
31088  if test -f $installdir/$filename.unpacked; then
31089    depdir=$installdir
31090  fi
31091
31092      fi
31093      # Source the builddeps file again, because in the previous command, the depdir
31094      # was updated to point at the current build dependency install directory.
31095      . $builddepsfile
31096      # Now extract variables from the builddeps.conf files.
31097      theroot=${builddep_freetype2_ROOT}
31098      thecflags=${builddep_freetype2_CFLAGS}
31099      thelibs=${builddep_freetype2_LIBS}
31100      if test "x$depdir" = x; then
31101        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31102      fi
31103      FREETYPE2=$depdir
31104      if test "x$theroot" != x; then
31105        FREETYPE2="$theroot"
31106      fi
31107      if test "x$thecflags" != x; then
31108        FREETYPE2_CFLAGS="$thecflags"
31109      fi
31110      if test "x$thelibs" != x; then
31111        FREETYPE2_LIBS="$thelibs"
31112      fi
31113      FREETYPE2_FOUND=yes
31114      else FREETYPE2_FOUND=no
31115
31116    fi
31117    else FREETYPE2_FOUND=no
31118
31119  fi
31120
31121      USING_SYSTEM_FT_LIB=true
31122    fi
31123    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31124      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31125
31126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31127
31128  # Input might be given as Windows format, start by converting to
31129  # unix format.
31130  path="$FREETYPELOCATION"
31131  new_path=`$CYGPATH -u "$path"`
31132
31133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31136  # "foo.exe" is OK but "foo" is an error.
31137  #
31138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31139  # It is also a way to make sure we got the proper file name for the real test later on.
31140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31141  if test "x$test_shortpath" = x; then
31142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31143$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31144    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31145  fi
31146
31147  # Call helper function which possibly converts this using DOS-style short mode.
31148  # If so, the updated path is stored in $new_path.
31149
31150  input_path="$new_path"
31151  # Check if we need to convert this using DOS-style short mode. If the path
31152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31153  # take no chances and rewrite it.
31154  # Note: m4 eats our [], so we need to use [ and ] instead.
31155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31156  if test "x$has_forbidden_chars" != x; then
31157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31161      # Going to short mode and back again did indeed matter. Since short mode is
31162      # case insensitive, let's make it lowercase to improve readability.
31163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31164      # Now convert it back to Unix-stile (cygpath)
31165      input_path=`$CYGPATH -u "$shortmode_path"`
31166      new_path="$input_path"
31167    fi
31168  fi
31169
31170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31171  if test "x$test_cygdrive_prefix" = x; then
31172    # As a simple fix, exclude /usr/bin since it's not a real path.
31173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31175      # a path prefixed by /cygdrive for fixpath to work.
31176      new_path="$CYGWIN_ROOT_PATH$input_path"
31177    fi
31178  fi
31179
31180
31181  if test "x$path" != "x$new_path"; then
31182    FREETYPELOCATION="$new_path"
31183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31184$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31185  fi
31186
31187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31188
31189  path="$FREETYPELOCATION"
31190  has_colon=`$ECHO $path | $GREP ^.:`
31191  new_path="$path"
31192  if test "x$has_colon" = x; then
31193    # Not in mixed or Windows style, start by that.
31194    new_path=`cmd //c echo $path`
31195  fi
31196
31197
31198  input_path="$new_path"
31199  # Check if we need to convert this using DOS-style short mode. If the path
31200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31201  # take no chances and rewrite it.
31202  # Note: m4 eats our [], so we need to use [ and ] instead.
31203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31204  if test "x$has_forbidden_chars" != x; then
31205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31207  fi
31208
31209
31210  windows_path="$new_path"
31211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31212    unix_path=`$CYGPATH -u "$windows_path"`
31213    new_path="$unix_path"
31214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31216    new_path="$unix_path"
31217  fi
31218
31219  if test "x$path" != "x$new_path"; then
31220    FREETYPELOCATION="$new_path"
31221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31222$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31223  fi
31224
31225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31227
31228  else
31229    # We're on a posix platform. Hooray! :)
31230    path="$FREETYPELOCATION"
31231    has_space=`$ECHO "$path" | $GREP " "`
31232    if test "x$has_space" != x; then
31233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31234$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31235      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31236    fi
31237
31238    # Use eval to expand a potential ~
31239    eval path="$path"
31240    if test ! -f "$path" && test ! -d "$path"; then
31241      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31242    fi
31243
31244    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31245  fi
31246
31247      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31248$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31249      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31250        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31251        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31252        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31253        if ! test -s "$FREETYPE2_LIBS"; then
31254          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31255        fi
31256        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31257          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31258        fi
31259        USING_SYSTEM_FT_LIB=true
31260        FREETYPE2_FOUND=yes
31261      fi
31262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31263$as_echo "$FREETYPE2_FOUND" >&6; }
31264    fi
31265    if test "x$FREETYPE2_FOUND" = xno; then
31266
31267pkg_failed=no
31268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31269$as_echo_n "checking for FREETYPE2... " >&6; }
31270
31271if test -n "$FREETYPE2_CFLAGS"; then
31272    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31273 elif test -n "$PKG_CONFIG"; then
31274    if test -n "$PKG_CONFIG" && \
31275    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31276  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31277  ac_status=$?
31278  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31279  test $ac_status = 0; }; then
31280  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31281else
31282  pkg_failed=yes
31283fi
31284 else
31285    pkg_failed=untried
31286fi
31287if test -n "$FREETYPE2_LIBS"; then
31288    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31289 elif test -n "$PKG_CONFIG"; then
31290    if test -n "$PKG_CONFIG" && \
31291    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31292  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31293  ac_status=$?
31294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31295  test $ac_status = 0; }; then
31296  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31297else
31298  pkg_failed=yes
31299fi
31300 else
31301    pkg_failed=untried
31302fi
31303
31304
31305
31306if test $pkg_failed = yes; then
31307
31308if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31309        _pkg_short_errors_supported=yes
31310else
31311        _pkg_short_errors_supported=no
31312fi
31313        if test $_pkg_short_errors_supported = yes; then
31314	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31315        else
31316	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31317        fi
31318	# Put the nasty error message in config.log where it belongs
31319	echo "$FREETYPE2_PKG_ERRORS" >&5
31320
31321	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31322$as_echo "no" >&6; }
31323                FREETYPE2_FOUND=no
31324elif test $pkg_failed = untried; then
31325	FREETYPE2_FOUND=no
31326else
31327	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31328	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31330$as_echo "yes" >&6; }
31331	FREETYPE2_FOUND=yes
31332fi
31333      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31334      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31335      USING_SYSTEM_FT_LIB=true
31336      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31337      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31338        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31339      fi
31340    fi
31341    if test "x$FREETYPE2_FOUND" = xno; then
31342      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31343$as_echo_n "checking for freetype in some standard locations... " >&6; }
31344
31345      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31346        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31347        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31348      fi
31349      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31350        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31351        DEFAULT_FREETYPE_LIBS="-lfreetype"
31352      fi
31353
31354      PREV_CXXCFLAGS="$CXXFLAGS"
31355      PREV_LDFLAGS="$LDFLAGS"
31356      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31357      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31358      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31359/* end confdefs.h.  */
31360
31361            #include<ft2build.h>
31362            #include FT_FREETYPE_H
31363            int main() { return 0; }
31364
31365_ACEOF
31366if ac_fn_cxx_try_link "$LINENO"; then :
31367
31368            # Yes, the default cflags and libs did the trick.
31369            FREETYPE2_FOUND=yes
31370            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31371            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31372
31373else
31374
31375            FREETYPE2_FOUND=no
31376
31377
31378fi
31379rm -f core conftest.err conftest.$ac_objext \
31380    conftest$ac_exeext conftest.$ac_ext
31381      CXXCFLAGS="$PREV_CXXFLAGS"
31382      LDFLAGS="$PREV_LDFLAGS"
31383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31384$as_echo "$FREETYPE2_FOUND" >&6; }
31385      USING_SYSTEM_FT_LIB=true
31386    fi
31387    if test "x$FREETYPE2_FOUND" = xno; then
31388
31389  # Print a helpful message on how to acquire the necessary build dependency.
31390  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31391  MISSING_DEPENDENCY=freetype2
31392  PKGHANDLER_COMMAND=
31393
31394  case $PKGHANDLER in
31395    apt-get)
31396      apt_help     $MISSING_DEPENDENCY ;;
31397    yum)
31398      yum_help     $MISSING_DEPENDENCY ;;
31399    port)
31400      port_help    $MISSING_DEPENDENCY ;;
31401    pkgutil)
31402      pkgutil_help $MISSING_DEPENDENCY ;;
31403    pkgadd)
31404      pkgadd_help  $MISSING_DEPENDENCY ;;
31405    * )
31406      break ;;
31407  esac
31408
31409  if test "x$PKGHANDLER_COMMAND" != x; then
31410    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31411  fi
31412
31413      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31414    fi
31415
31416    if test "x$OPENJDK_TARGET_OS" != xwindows; then
31417      # AC_CHECK_LIB does not support use of cl.exe
31418      PREV_LDFLAGS="$LDFLAGS"
31419      LDFLAGS="$FREETYPE2_LIBS"
31420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31421$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31422if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31423  $as_echo_n "(cached) " >&6
31424else
31425  ac_check_lib_save_LIBS=$LIBS
31426LIBS="-lfreetype  $LIBS"
31427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31428/* end confdefs.h.  */
31429
31430/* Override any GCC internal prototype to avoid an error.
31431   Use char because int might match the return type of a GCC
31432   builtin and then its argument prototype would still apply.  */
31433#ifdef __cplusplus
31434extern "C"
31435#endif
31436char FT_Init_FreeType ();
31437int
31438main ()
31439{
31440return FT_Init_FreeType ();
31441  ;
31442  return 0;
31443}
31444_ACEOF
31445if ac_fn_cxx_try_link "$LINENO"; then :
31446  ac_cv_lib_freetype_FT_Init_FreeType=yes
31447else
31448  ac_cv_lib_freetype_FT_Init_FreeType=no
31449fi
31450rm -f core conftest.err conftest.$ac_objext \
31451    conftest$ac_exeext conftest.$ac_ext
31452LIBS=$ac_check_lib_save_LIBS
31453fi
31454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31455$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31456if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31457  FREETYPE2_FOUND=true
31458else
31459  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31460fi
31461
31462      LDFLAGS="$PREV_LDFLAGS"
31463    fi
31464  fi
31465
31466
31467
31468
31469
31470
31471
31472
31473  ###############################################################################
31474  #
31475  # Check for alsa headers and libraries. Used on Linux/GNU systems.
31476  #
31477
31478# Check whether --with-alsa was given.
31479if test "${with_alsa+set}" = set; then :
31480  withval=$with_alsa;
31481fi
31482
31483
31484# Check whether --with-alsa-include was given.
31485if test "${with_alsa_include+set}" = set; then :
31486  withval=$with_alsa_include;
31487fi
31488
31489
31490# Check whether --with-alsa-lib was given.
31491if test "${with_alsa_lib+set}" = set; then :
31492  withval=$with_alsa_lib;
31493fi
31494
31495
31496  if test "x$ALSA_NOT_NEEDED" = xyes; then
31497    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31498      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31499$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31500    fi
31501    ALSA_CFLAGS=
31502    ALSA_LIBS=
31503  else
31504    ALSA_FOUND=no
31505
31506    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31507      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31508    fi
31509
31510    if test "x${with_alsa}" != x; then
31511      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31512      ALSA_CFLAGS="-I${with_alsa}/include"
31513      ALSA_FOUND=yes
31514    fi
31515    if test "x${with_alsa_include}" != x; then
31516      ALSA_CFLAGS="-I${with_alsa_include}"
31517      ALSA_FOUND=yes
31518    fi
31519    if test "x${with_alsa_lib}" != x; then
31520      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31521      ALSA_FOUND=yes
31522    fi
31523    if test "x$ALSA_FOUND" = xno; then
31524
31525
31526  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31527    # Source the builddeps file again, to make sure it uses the latest variables!
31528    . $builddepsfile
31529    # Look for a target and build machine specific resource!
31530    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31531    if test "x$resource" = x; then
31532      # Ok, lets instead look for a target specific resource
31533      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31534    fi
31535    if test "x$resource" = x; then
31536      # Ok, lets instead look for a build specific resource
31537      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31538    fi
31539    if test "x$resource" = x; then
31540      # Ok, lets instead look for a generic resource
31541      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31542      resource=${builddep_alsa}
31543    fi
31544    if test "x$resource" != x; then
31545      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31546$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31547      # If the resource in the builddeps.conf file is an existing directory,
31548      # for example /java/linux/cups
31549      if test -d ${resource}; then
31550        depdir=${resource}
31551      else
31552
31553  # alsa is for example mymodule
31554  # $resource is for example libs/general/libmymod_1_2_3.zip
31555  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31556  # $with_builddeps_dir is for example /localhome/builddeps
31557  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31558  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31559  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31560  filename=`basename $resource`
31561  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31562  filebase=${filename%%.*}
31563  extension=${filename#*.}
31564  installdir=$with_builddeps_dir/$filebase
31565  if test ! -f $installdir/$filename.unpacked; then
31566    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31567$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31568    if test ! -d $installdir; then
31569      mkdir -p $installdir
31570    fi
31571    if test ! -d $installdir; then
31572      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31573    fi
31574    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31575    touch $tmpfile
31576    if test ! -f $tmpfile; then
31577      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31578    fi
31579
31580  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31581  # $tmpfile is the local file name for the downloaded file.
31582  VALID_TOOL=no
31583  if test "x$BDEPS_FTP" = xwget; then
31584    VALID_TOOL=yes
31585    wget -O $tmpfile $with_builddeps_server/$resource
31586  fi
31587  if test "x$BDEPS_FTP" = xlftp; then
31588    VALID_TOOL=yes
31589    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31590  fi
31591  if test "x$BDEPS_FTP" = xftp; then
31592    VALID_TOOL=yes
31593    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31594    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31595    FTPUSERPWD=${FTPSERVER%%@*}
31596    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31597      FTPUSER=${userpwd%%:*}
31598      FTPPWD=${userpwd#*@}
31599      FTPSERVER=${FTPSERVER#*@}
31600    else
31601      FTPUSER=ftp
31602      FTPPWD=ftp
31603    fi
31604    # the "pass" command does not work on some
31605    # ftp clients (read ftp.exe) but if it works,
31606    # passive mode is better!
31607    ( \
31608        echo "user $FTPUSER $FTPPWD"        ; \
31609        echo "pass"                         ; \
31610        echo "bin"                          ; \
31611        echo "get $FTPPATH $tmpfile"              ; \
31612    ) | ftp -in $FTPSERVER
31613  fi
31614  if test "x$VALID_TOOL" != xyes; then
31615    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31616  fi
31617
31618    mv $tmpfile $installdir/$filename
31619    if test ! -s $installdir/$filename; then
31620      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31621    fi
31622    case "$extension" in
31623      zip)  echo "Unzipping $installdir/$filename..."
31624        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31625        ;;
31626      tar.gz) echo "Untaring $installdir/$filename..."
31627        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31628        ;;
31629      tgz) echo "Untaring $installdir/$filename..."
31630        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31631        ;;
31632      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31633        ;;
31634    esac
31635  fi
31636  if test -f $installdir/$filename.unpacked; then
31637    depdir=$installdir
31638  fi
31639
31640      fi
31641      # Source the builddeps file again, because in the previous command, the depdir
31642      # was updated to point at the current build dependency install directory.
31643      . $builddepsfile
31644      # Now extract variables from the builddeps.conf files.
31645      theroot=${builddep_alsa_ROOT}
31646      thecflags=${builddep_alsa_CFLAGS}
31647      thelibs=${builddep_alsa_LIBS}
31648      if test "x$depdir" = x; then
31649        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31650      fi
31651      ALSA=$depdir
31652      if test "x$theroot" != x; then
31653        ALSA="$theroot"
31654      fi
31655      if test "x$thecflags" != x; then
31656        ALSA_CFLAGS="$thecflags"
31657      fi
31658      if test "x$thelibs" != x; then
31659        ALSA_LIBS="$thelibs"
31660      fi
31661      ALSA_FOUND=yes
31662      else ALSA_FOUND=no
31663
31664    fi
31665    else ALSA_FOUND=no
31666
31667  fi
31668
31669    fi
31670    if test "x$ALSA_FOUND" = xno; then
31671
31672pkg_failed=no
31673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31674$as_echo_n "checking for ALSA... " >&6; }
31675
31676if test -n "$ALSA_CFLAGS"; then
31677    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31678 elif test -n "$PKG_CONFIG"; then
31679    if test -n "$PKG_CONFIG" && \
31680    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31681  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31682  ac_status=$?
31683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31684  test $ac_status = 0; }; then
31685  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31686else
31687  pkg_failed=yes
31688fi
31689 else
31690    pkg_failed=untried
31691fi
31692if test -n "$ALSA_LIBS"; then
31693    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31694 elif test -n "$PKG_CONFIG"; then
31695    if test -n "$PKG_CONFIG" && \
31696    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31697  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31698  ac_status=$?
31699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31700  test $ac_status = 0; }; then
31701  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31702else
31703  pkg_failed=yes
31704fi
31705 else
31706    pkg_failed=untried
31707fi
31708
31709
31710
31711if test $pkg_failed = yes; then
31712
31713if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31714        _pkg_short_errors_supported=yes
31715else
31716        _pkg_short_errors_supported=no
31717fi
31718        if test $_pkg_short_errors_supported = yes; then
31719	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31720        else
31721	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31722        fi
31723	# Put the nasty error message in config.log where it belongs
31724	echo "$ALSA_PKG_ERRORS" >&5
31725
31726	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31727$as_echo "no" >&6; }
31728                ALSA_FOUND=no
31729elif test $pkg_failed = untried; then
31730	ALSA_FOUND=no
31731else
31732	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31733	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31735$as_echo "yes" >&6; }
31736	ALSA_FOUND=yes
31737fi
31738    fi
31739    if test "x$ALSA_FOUND" = xno; then
31740      for ac_header in alsa/asoundlib.h
31741do :
31742  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31743if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31744  cat >>confdefs.h <<_ACEOF
31745#define HAVE_ALSA_ASOUNDLIB_H 1
31746_ACEOF
31747
31748            ALSA_FOUND=yes
31749            ALSA_CFLAGS=-Iignoreme
31750            ALSA_LIBS=-lasound
31751            DEFAULT_ALSA=yes
31752
31753else
31754  ALSA_FOUND=no
31755fi
31756
31757done
31758
31759    fi
31760    if test "x$ALSA_FOUND" = xno; then
31761
31762  # Print a helpful message on how to acquire the necessary build dependency.
31763  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31764  MISSING_DEPENDENCY=alsa
31765  PKGHANDLER_COMMAND=
31766
31767  case $PKGHANDLER in
31768    apt-get)
31769      apt_help     $MISSING_DEPENDENCY ;;
31770    yum)
31771      yum_help     $MISSING_DEPENDENCY ;;
31772    port)
31773      port_help    $MISSING_DEPENDENCY ;;
31774    pkgutil)
31775      pkgutil_help $MISSING_DEPENDENCY ;;
31776    pkgadd)
31777      pkgadd_help  $MISSING_DEPENDENCY ;;
31778    * )
31779      break ;;
31780  esac
31781
31782  if test "x$PKGHANDLER_COMMAND" != x; then
31783    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31784  fi
31785
31786      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31787    fi
31788  fi
31789
31790
31791
31792
31793
31794
31795  ###############################################################################
31796  #
31797  # Check for the jpeg library
31798  #
31799
31800  USE_EXTERNAL_LIBJPEG=true
31801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31802$as_echo_n "checking for main in -ljpeg... " >&6; }
31803if ${ac_cv_lib_jpeg_main+:} false; then :
31804  $as_echo_n "(cached) " >&6
31805else
31806  ac_check_lib_save_LIBS=$LIBS
31807LIBS="-ljpeg  $LIBS"
31808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31809/* end confdefs.h.  */
31810
31811
31812int
31813main ()
31814{
31815return main ();
31816  ;
31817  return 0;
31818}
31819_ACEOF
31820if ac_fn_cxx_try_link "$LINENO"; then :
31821  ac_cv_lib_jpeg_main=yes
31822else
31823  ac_cv_lib_jpeg_main=no
31824fi
31825rm -f core conftest.err conftest.$ac_objext \
31826    conftest$ac_exeext conftest.$ac_ext
31827LIBS=$ac_check_lib_save_LIBS
31828fi
31829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31830$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31831if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31832  cat >>confdefs.h <<_ACEOF
31833#define HAVE_LIBJPEG 1
31834_ACEOF
31835
31836  LIBS="-ljpeg $LIBS"
31837
31838else
31839   USE_EXTERNAL_LIBJPEG=false
31840      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31841$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31842
31843fi
31844
31845
31846
31847  ###############################################################################
31848  #
31849  # Check for the gif library
31850  #
31851
31852
31853# Check whether --with-giflib was given.
31854if test "${with_giflib+set}" = set; then :
31855  withval=$with_giflib;
31856fi
31857
31858
31859
31860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31861$as_echo_n "checking for which giflib to use... " >&6; }
31862
31863  # default is bundled
31864  DEFAULT_GIFLIB=bundled
31865
31866  #
31867  # if user didn't specify, use DEFAULT_GIFLIB
31868  #
31869  if test "x${with_giflib}" = "x"; then
31870    with_giflib=${DEFAULT_GIFLIB}
31871  fi
31872
31873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31874$as_echo "${with_giflib}" >&6; }
31875
31876  if test "x${with_giflib}" = "xbundled"; then
31877    USE_EXTERNAL_LIBGIF=false
31878  elif test "x${with_giflib}" = "xsystem"; then
31879    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31880if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31881
31882else
31883   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31884fi
31885
31886
31887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31888$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31889if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31890  $as_echo_n "(cached) " >&6
31891else
31892  ac_check_lib_save_LIBS=$LIBS
31893LIBS="-lgif  $LIBS"
31894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31895/* end confdefs.h.  */
31896
31897/* Override any GCC internal prototype to avoid an error.
31898   Use char because int might match the return type of a GCC
31899   builtin and then its argument prototype would still apply.  */
31900#ifdef __cplusplus
31901extern "C"
31902#endif
31903char DGifGetCode ();
31904int
31905main ()
31906{
31907return DGifGetCode ();
31908  ;
31909  return 0;
31910}
31911_ACEOF
31912if ac_fn_cxx_try_link "$LINENO"; then :
31913  ac_cv_lib_gif_DGifGetCode=yes
31914else
31915  ac_cv_lib_gif_DGifGetCode=no
31916fi
31917rm -f core conftest.err conftest.$ac_objext \
31918    conftest$ac_exeext conftest.$ac_ext
31919LIBS=$ac_check_lib_save_LIBS
31920fi
31921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31922$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31923if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31924  cat >>confdefs.h <<_ACEOF
31925#define HAVE_LIBGIF 1
31926_ACEOF
31927
31928  LIBS="-lgif $LIBS"
31929
31930else
31931   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31932fi
31933
31934
31935    USE_EXTERNAL_LIBGIF=true
31936  else
31937    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31938  fi
31939
31940
31941  ###############################################################################
31942  #
31943  # Check for the zlib library
31944  #
31945
31946
31947# Check whether --with-zlib was given.
31948if test "${with_zlib+set}" = set; then :
31949  withval=$with_zlib;
31950fi
31951
31952
31953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31954$as_echo_n "checking for compress in -lz... " >&6; }
31955if ${ac_cv_lib_z_compress+:} false; then :
31956  $as_echo_n "(cached) " >&6
31957else
31958  ac_check_lib_save_LIBS=$LIBS
31959LIBS="-lz  $LIBS"
31960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31961/* end confdefs.h.  */
31962
31963/* Override any GCC internal prototype to avoid an error.
31964   Use char because int might match the return type of a GCC
31965   builtin and then its argument prototype would still apply.  */
31966#ifdef __cplusplus
31967extern "C"
31968#endif
31969char compress ();
31970int
31971main ()
31972{
31973return compress ();
31974  ;
31975  return 0;
31976}
31977_ACEOF
31978if ac_fn_cxx_try_link "$LINENO"; then :
31979  ac_cv_lib_z_compress=yes
31980else
31981  ac_cv_lib_z_compress=no
31982fi
31983rm -f core conftest.err conftest.$ac_objext \
31984    conftest$ac_exeext conftest.$ac_ext
31985LIBS=$ac_check_lib_save_LIBS
31986fi
31987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31988$as_echo "$ac_cv_lib_z_compress" >&6; }
31989if test "x$ac_cv_lib_z_compress" = xyes; then :
31990   ZLIB_FOUND=yes
31991else
31992   ZLIB_FOUND=no
31993fi
31994
31995
31996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31997$as_echo_n "checking for which zlib to use... " >&6; }
31998
31999  DEFAULT_ZLIB=bundled
32000  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32001    #
32002    # On macosx default is system...on others default is
32003    #
32004    DEFAULT_ZLIB=system
32005  fi
32006
32007  if test "x${ZLIB_FOUND}" != "xyes"; then
32008    #
32009    # If we don't find any system...set default to bundled
32010    #
32011    DEFAULT_ZLIB=bundled
32012  fi
32013
32014  #
32015  # If user didn't specify, use DEFAULT_ZLIB
32016  #
32017  if test "x${with_zlib}" = "x"; then
32018    with_zlib=${DEFAULT_ZLIB}
32019  fi
32020
32021  if test "x${with_zlib}" = "xbundled"; then
32022    USE_EXTERNAL_LIBZ=false
32023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32024$as_echo "bundled" >&6; }
32025  elif test "x${with_zlib}" = "xsystem"; then
32026    if test "x${ZLIB_FOUND}" = "xyes"; then
32027      USE_EXTERNAL_LIBZ=true
32028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32029$as_echo "system" >&6; }
32030    else
32031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32032$as_echo "system not found" >&6; }
32033      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32034    fi
32035  else
32036    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32037  fi
32038
32039
32040
32041  ###############################################################################
32042  LIBZIP_CAN_USE_MMAP=true
32043
32044
32045
32046  ###############################################################################
32047  #
32048  # Check if altzone exists in time.h
32049  #
32050
32051  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32052/* end confdefs.h.  */
32053#include <time.h>
32054int
32055main ()
32056{
32057return (int)altzone;
32058  ;
32059  return 0;
32060}
32061_ACEOF
32062if ac_fn_cxx_try_link "$LINENO"; then :
32063  has_altzone=yes
32064else
32065  has_altzone=no
32066fi
32067rm -f core conftest.err conftest.$ac_objext \
32068    conftest$ac_exeext conftest.$ac_ext
32069  if test "x$has_altzone" = xyes; then
32070
32071$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32072
32073  fi
32074
32075  ###############################################################################
32076  #
32077  # Check the maths library
32078  #
32079
32080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32081$as_echo_n "checking for cos in -lm... " >&6; }
32082if ${ac_cv_lib_m_cos+:} false; then :
32083  $as_echo_n "(cached) " >&6
32084else
32085  ac_check_lib_save_LIBS=$LIBS
32086LIBS="-lm  $LIBS"
32087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32088/* end confdefs.h.  */
32089
32090/* Override any GCC internal prototype to avoid an error.
32091   Use char because int might match the return type of a GCC
32092   builtin and then its argument prototype would still apply.  */
32093#ifdef __cplusplus
32094extern "C"
32095#endif
32096char cos ();
32097int
32098main ()
32099{
32100return cos ();
32101  ;
32102  return 0;
32103}
32104_ACEOF
32105if ac_fn_cxx_try_link "$LINENO"; then :
32106  ac_cv_lib_m_cos=yes
32107else
32108  ac_cv_lib_m_cos=no
32109fi
32110rm -f core conftest.err conftest.$ac_objext \
32111    conftest$ac_exeext conftest.$ac_ext
32112LIBS=$ac_check_lib_save_LIBS
32113fi
32114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32115$as_echo "$ac_cv_lib_m_cos" >&6; }
32116if test "x$ac_cv_lib_m_cos" = xyes; then :
32117  cat >>confdefs.h <<_ACEOF
32118#define HAVE_LIBM 1
32119_ACEOF
32120
32121  LIBS="-lm $LIBS"
32122
32123else
32124
32125        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32126$as_echo "$as_me: Maths library was not found" >&6;}
32127
32128
32129fi
32130
32131
32132
32133  ###############################################################################
32134  #
32135  # Check for libdl.so
32136
32137  save_LIBS="$LIBS"
32138  LIBS=""
32139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32140$as_echo_n "checking for dlopen in -ldl... " >&6; }
32141if ${ac_cv_lib_dl_dlopen+:} false; then :
32142  $as_echo_n "(cached) " >&6
32143else
32144  ac_check_lib_save_LIBS=$LIBS
32145LIBS="-ldl  $LIBS"
32146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32147/* end confdefs.h.  */
32148
32149/* Override any GCC internal prototype to avoid an error.
32150   Use char because int might match the return type of a GCC
32151   builtin and then its argument prototype would still apply.  */
32152#ifdef __cplusplus
32153extern "C"
32154#endif
32155char dlopen ();
32156int
32157main ()
32158{
32159return dlopen ();
32160  ;
32161  return 0;
32162}
32163_ACEOF
32164if ac_fn_cxx_try_link "$LINENO"; then :
32165  ac_cv_lib_dl_dlopen=yes
32166else
32167  ac_cv_lib_dl_dlopen=no
32168fi
32169rm -f core conftest.err conftest.$ac_objext \
32170    conftest$ac_exeext conftest.$ac_ext
32171LIBS=$ac_check_lib_save_LIBS
32172fi
32173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32174$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32175if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32176  cat >>confdefs.h <<_ACEOF
32177#define HAVE_LIBDL 1
32178_ACEOF
32179
32180  LIBS="-ldl $LIBS"
32181
32182fi
32183
32184  LIBDL="$LIBS"
32185
32186  LIBS="$save_LIBS"
32187
32188
32189  ###############################################################################
32190  #
32191  # statically link libstdc++ before C++ ABI is stablized on Linux unless
32192  # dynamic build is configured on command line.
32193  #
32194
32195# Check whether --with-stdc++lib was given.
32196if test "${with_stdc__lib+set}" = set; then :
32197  withval=$with_stdc__lib;
32198        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32199                && test "x$with_stdc__lib" != xdefault; then
32200          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32201        fi
32202
32203else
32204  with_stdc__lib=default
32205
32206fi
32207
32208
32209  if test "x$OPENJDK_TARGET_OS" = xlinux; then
32210    # Test if -lstdc++ works.
32211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32212$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32213    ac_ext=cpp
32214ac_cpp='$CXXCPP $CPPFLAGS'
32215ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32216ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32217ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32218
32219    OLD_CXXFLAGS="$CXXFLAGS"
32220    CXXFLAGS="$CXXFLAGS -lstdc++"
32221    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32222/* end confdefs.h.  */
32223
32224int
32225main ()
32226{
32227return 0;
32228  ;
32229  return 0;
32230}
32231_ACEOF
32232if ac_fn_cxx_try_link "$LINENO"; then :
32233  has_dynamic_libstdcxx=yes
32234else
32235  has_dynamic_libstdcxx=no
32236fi
32237rm -f core conftest.err conftest.$ac_objext \
32238    conftest$ac_exeext conftest.$ac_ext
32239    CXXFLAGS="$OLD_CXXFLAGS"
32240    ac_ext=cpp
32241ac_cpp='$CXXCPP $CPPFLAGS'
32242ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32243ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32244ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32245
32246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32247$as_echo "$has_dynamic_libstdcxx" >&6; }
32248
32249    # Test if stdc++ can be linked statically.
32250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32251$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32252    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32253    ac_ext=cpp
32254ac_cpp='$CXXCPP $CPPFLAGS'
32255ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32256ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32257ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32258
32259    OLD_LIBS="$LIBS"
32260    OLD_CXX="$CXX"
32261    LIBS="$STATIC_STDCXX_FLAGS"
32262    CXX="$CC"
32263    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32264/* end confdefs.h.  */
32265
32266int
32267main ()
32268{
32269return 0;
32270  ;
32271  return 0;
32272}
32273_ACEOF
32274if ac_fn_cxx_try_link "$LINENO"; then :
32275  has_static_libstdcxx=yes
32276else
32277  has_static_libstdcxx=no
32278fi
32279rm -f core conftest.err conftest.$ac_objext \
32280    conftest$ac_exeext conftest.$ac_ext
32281    LIBS="$OLD_LIBS"
32282    CXX="$OLD_CXX"
32283    ac_ext=cpp
32284ac_cpp='$CXXCPP $CPPFLAGS'
32285ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32286ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32287ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32288
32289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32290$as_echo "$has_static_libstdcxx" >&6; }
32291
32292    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32293      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32294    fi
32295
32296    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32297      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32298    fi
32299
32300    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32301      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32302    fi
32303
32304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32305$as_echo_n "checking how to link with libstdc++... " >&6; }
32306    # If dynamic was requested, it's available since it would fail above otherwise.
32307    # If dynamic wasn't requested, go with static unless it isn't available.
32308    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32309      LIBCXX="$LIBCXX -lstdc++"
32310      LDCXX="$CXX"
32311      STATIC_CXX_SETTING="STATIC_CXX=false"
32312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32313$as_echo "dynamic" >&6; }
32314    else
32315      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32316      LDCXX="$CC"
32317      STATIC_CXX_SETTING="STATIC_CXX=true"
32318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32319$as_echo "static" >&6; }
32320    fi
32321  fi
32322
32323
32324  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32325    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32326
32327pkg_failed=no
32328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32329$as_echo_n "checking for LIBFFI... " >&6; }
32330
32331if test -n "$LIBFFI_CFLAGS"; then
32332    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32333 elif test -n "$PKG_CONFIG"; then
32334    if test -n "$PKG_CONFIG" && \
32335    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32336  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32337  ac_status=$?
32338  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32339  test $ac_status = 0; }; then
32340  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32341else
32342  pkg_failed=yes
32343fi
32344 else
32345    pkg_failed=untried
32346fi
32347if test -n "$LIBFFI_LIBS"; then
32348    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32349 elif test -n "$PKG_CONFIG"; then
32350    if test -n "$PKG_CONFIG" && \
32351    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32352  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32353  ac_status=$?
32354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32355  test $ac_status = 0; }; then
32356  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32357else
32358  pkg_failed=yes
32359fi
32360 else
32361    pkg_failed=untried
32362fi
32363
32364
32365
32366if test $pkg_failed = yes; then
32367
32368if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32369        _pkg_short_errors_supported=yes
32370else
32371        _pkg_short_errors_supported=no
32372fi
32373        if test $_pkg_short_errors_supported = yes; then
32374	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32375        else
32376	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32377        fi
32378	# Put the nasty error message in config.log where it belongs
32379	echo "$LIBFFI_PKG_ERRORS" >&5
32380
32381	as_fn_error $? "Package requirements (libffi) were not met:
32382
32383$LIBFFI_PKG_ERRORS
32384
32385Consider adjusting the PKG_CONFIG_PATH environment variable if you
32386installed software in a non-standard prefix.
32387
32388Alternatively, you may set the environment variables LIBFFI_CFLAGS
32389and LIBFFI_LIBS to avoid the need to call pkg-config.
32390See the pkg-config man page for more details.
32391" "$LINENO" 5
32392elif test $pkg_failed = untried; then
32393	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32394$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32395as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32396is in your PATH or set the PKG_CONFIG environment variable to the full
32397path to pkg-config.
32398
32399Alternatively, you may set the environment variables LIBFFI_CFLAGS
32400and LIBFFI_LIBS to avoid the need to call pkg-config.
32401See the pkg-config man page for more details.
32402
32403To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32404See \`config.log' for more details" "$LINENO" 5; }
32405else
32406	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32407	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32409$as_echo "yes" >&6; }
32410	:
32411fi
32412
32413  fi
32414
32415  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32416    # Extract the first word of "llvm-config", so it can be a program name with args.
32417set dummy llvm-config; ac_word=$2
32418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32419$as_echo_n "checking for $ac_word... " >&6; }
32420if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32421  $as_echo_n "(cached) " >&6
32422else
32423  if test -n "$LLVM_CONFIG"; then
32424  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32425else
32426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32427for as_dir in $PATH
32428do
32429  IFS=$as_save_IFS
32430  test -z "$as_dir" && as_dir=.
32431    for ac_exec_ext in '' $ac_executable_extensions; do
32432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32433    ac_cv_prog_LLVM_CONFIG="llvm-config"
32434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32435    break 2
32436  fi
32437done
32438  done
32439IFS=$as_save_IFS
32440
32441fi
32442fi
32443LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32444if test -n "$LLVM_CONFIG"; then
32445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32446$as_echo "$LLVM_CONFIG" >&6; }
32447else
32448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32449$as_echo "no" >&6; }
32450fi
32451
32452
32453
32454    if test "x$LLVM_CONFIG" != xllvm-config; then
32455      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32456    fi
32457
32458    llvm_components="jit mcjit engine nativecodegen native"
32459    unset LLVM_CFLAGS
32460    for flag in $("$LLVM_CONFIG" --cxxflags); do
32461      if echo "${flag}" | grep -q '^-[ID]'; then
32462        if test "${flag}" != "-D_DEBUG" ; then
32463          if test "${LLVM_CFLAGS}" != "" ; then
32464            LLVM_CFLAGS="${LLVM_CFLAGS} "
32465          fi
32466          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32467        fi
32468      fi
32469    done
32470    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32471    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32472
32473    unset LLVM_LDFLAGS
32474    for flag in $("${LLVM_CONFIG}" --ldflags); do
32475      if echo "${flag}" | grep -q '^-L'; then
32476        if test "${LLVM_LDFLAGS}" != ""; then
32477          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32478        fi
32479        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32480      fi
32481    done
32482
32483    unset LLVM_LIBS
32484    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32485      if echo "${flag}" | grep -q '^-l'; then
32486        if test "${LLVM_LIBS}" != ""; then
32487          LLVM_LIBS="${LLVM_LIBS} "
32488        fi
32489        LLVM_LIBS="${LLVM_LIBS}${flag}"
32490      fi
32491    done
32492
32493
32494
32495
32496  fi
32497
32498  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32499  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32500    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32501  fi
32502
32503  # TODO better (platform agnostic) test
32504  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32505    LIBCXX="-lstdc++"
32506  fi
32507
32508
32509
32510
32511# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32512
32513  # When using cygwin or msys, we need a wrapper binary that renames
32514  # /cygdrive/c/ arguments into c:/ arguments and peeks into
32515  # @files and rewrites these too! This wrapper binary is
32516  # called fixpath.
32517  FIXPATH=
32518  if test "x$OPENJDK_BUILD_OS" = xwindows; then
32519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32520$as_echo_n "checking if fixpath can be created... " >&6; }
32521    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32522    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32523    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32524      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32525      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32526      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32527      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32528    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32529      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32530      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32531
32532      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32533      # @ was chosen as separator to minimize risk of other tools messing around with it
32534      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32535      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32536
32537      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32538    fi
32539    rm -f $OUTPUT_ROOT/fixpath*
32540    cd $OUTPUT_ROOT
32541    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32542    cd $CURDIR
32543
32544    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32546$as_echo "no" >&6; }
32547      cat $OUTPUT_ROOT/fixpath1.log
32548      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32549    fi
32550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32551$as_echo "yes" >&6; }
32552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32553$as_echo_n "checking if fixpath.exe works... " >&6; }
32554    cd $OUTPUT_ROOT
32555    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32556    cd $CURDIR
32557    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32559$as_echo "no" >&6; }
32560      cat $OUTPUT_ROOT/fixpath2.log
32561      as_fn_error $? "fixpath did not work!" "$LINENO" 5
32562    fi
32563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32564$as_echo "yes" >&6; }
32565    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32566  fi
32567
32568
32569
32570
32571###############################################################################
32572#
32573# We need to do some final tweaking, when everything else is done.
32574#
32575###############################################################################
32576
32577
32578  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32579
32580
32581  # The name of the Service Agent jar.
32582  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32583  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32584    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32585  fi
32586
32587
32588
32589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32590$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32591
32592    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32593      ENABLE_INTREE_EC=yes
32594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32595$as_echo "yes" >&6; }
32596    else
32597      ENABLE_INTREE_EC=no
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32599$as_echo "no" >&6; }
32600    fi
32601
32602
32603
32604
32605###############################################################################
32606#
32607# Configure parts of the build that only affect the build performance,
32608# not the result.
32609#
32610###############################################################################
32611
32612
32613  # How many cores do we have on this build system?
32614
32615# Check whether --with-num-cores was given.
32616if test "${with_num_cores+set}" = set; then :
32617  withval=$with_num_cores;
32618fi
32619
32620  if test "x$with_num_cores" = x; then
32621    # The number of cores were not specified, try to probe them.
32622
32623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32624$as_echo_n "checking for number of cores... " >&6; }
32625  NUM_CORES=1
32626  FOUND_CORES=no
32627
32628  if test -f /proc/cpuinfo; then
32629    # Looks like a Linux (or cygwin) system
32630    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32631    FOUND_CORES=yes
32632  elif test -x /usr/sbin/psrinfo; then
32633    # Looks like a Solaris system
32634    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32635    FOUND_CORES=yes
32636  elif test -x /usr/sbin/system_profiler; then
32637    # Looks like a MacOSX system
32638    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32639    FOUND_CORES=yes
32640  elif test -n "$NUMBER_OF_PROCESSORS"; then
32641    # On windows, look in the env
32642    NUM_CORES=$NUMBER_OF_PROCESSORS
32643    FOUND_CORES=yes
32644  fi
32645
32646  if test "x$FOUND_CORES" = xyes; then
32647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32648$as_echo "$NUM_CORES" >&6; }
32649  else
32650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32651$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32653$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32654  fi
32655
32656  else
32657    NUM_CORES=$with_num_cores
32658  fi
32659
32660
32661
32662  # How much memory do we have on this build system?
32663
32664# Check whether --with-memory-size was given.
32665if test "${with_memory_size+set}" = set; then :
32666  withval=$with_memory_size;
32667fi
32668
32669  if test "x$with_memory_size" = x; then
32670    # The memory size was not specified, try to probe it.
32671
32672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32673$as_echo_n "checking for memory size... " >&6; }
32674  # Default to 1024 MB
32675  MEMORY_SIZE=1024
32676  FOUND_MEM=no
32677
32678  if test -f /proc/meminfo; then
32679    # Looks like a Linux (or cygwin) system
32680    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32681    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32682    FOUND_MEM=yes
32683  elif test -x /usr/sbin/prtconf; then
32684    # Looks like a Solaris system
32685    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32686    FOUND_MEM=yes
32687  elif test -x /usr/sbin/system_profiler; then
32688    # Looks like a MacOSX system
32689    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32690    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32691    FOUND_MEM=yes
32692  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32693    # Windows, but without cygwin
32694    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32695    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32696    FOUND_MEM=yes
32697  fi
32698
32699  if test "x$FOUND_MEM" = xyes; then
32700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32701$as_echo "$MEMORY_SIZE MB" >&6; }
32702  else
32703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32704$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32705    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32706$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32707  fi
32708
32709  else
32710    MEMORY_SIZE=$with_memory_size
32711  fi
32712
32713
32714
32715  # Provide a decent default number of parallel jobs for make depending on
32716  # number of cores, amount of memory and machine architecture.
32717
32718# Check whether --with-jobs was given.
32719if test "${with_jobs+set}" = set; then :
32720  withval=$with_jobs;
32721fi
32722
32723  if test "x$with_jobs" = x; then
32724    # Number of jobs was not specified, calculate.
32725    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32726$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32727    # Approximate memory in GB, rounding up a bit.
32728    memory_gb=`expr $MEMORY_SIZE / 1100`
32729    # Pick the lowest of memory in gb and number of cores.
32730    if test "$memory_gb" -lt "$NUM_CORES"; then
32731      JOBS="$memory_gb"
32732    else
32733      JOBS="$NUM_CORES"
32734      # On bigger machines, leave some room for other processes to run
32735      if test "$JOBS" -gt "4"; then
32736        JOBS=`expr $JOBS '*' 90 / 100`
32737      fi
32738    fi
32739    # Cap number of jobs to 16
32740    if test "$JOBS" -gt "16"; then
32741      JOBS=16
32742    fi
32743    if test "$JOBS" -eq "0"; then
32744      JOBS=1
32745    fi
32746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32747$as_echo "$JOBS" >&6; }
32748  else
32749    JOBS=$with_jobs
32750  fi
32751
32752
32753
32754# Setup smart javac (after cores and memory have been setup)
32755
32756
32757# Check whether --with-sjavac-server-java was given.
32758if test "${with_sjavac_server_java+set}" = set; then :
32759  withval=$with_sjavac_server_java;
32760fi
32761
32762
32763  if test "x$with_sjavac_server_java" != x; then
32764    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32765    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32766    if test "x$FOUND_VERSION" = x; then
32767      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32768    fi
32769  else
32770    SJAVAC_SERVER_JAVA=""
32771    # Hotspot specific options.
32772
32773  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32774  $ECHO "Command: $JAVA -verbosegc -version" >&5
32775  OUTPUT=`$JAVA -verbosegc -version 2>&1`
32776  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32777  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32778  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32779    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32780    JVM_ARG_OK=true
32781  else
32782    $ECHO "Arg failed:" >&5
32783    $ECHO "$OUTPUT" >&5
32784    JVM_ARG_OK=false
32785  fi
32786
32787    # JRockit specific options.
32788
32789  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32790  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32791  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32792  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32793  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32794  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32795    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32796    JVM_ARG_OK=true
32797  else
32798    $ECHO "Arg failed:" >&5
32799    $ECHO "$OUTPUT" >&5
32800    JVM_ARG_OK=false
32801  fi
32802
32803    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32804  fi
32805
32806
32807  if test "$MEMORY_SIZE" -gt "2500"; then
32808
32809  $ECHO "Check if jvm arg is ok: -d64" >&5
32810  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32811  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32812  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32813  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32814  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32815    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32816    JVM_ARG_OK=true
32817  else
32818    $ECHO "Arg failed:" >&5
32819    $ECHO "$OUTPUT" >&5
32820    JVM_ARG_OK=false
32821  fi
32822
32823    if test "$JVM_ARG_OK" = true; then
32824      JVM_64BIT=true
32825      JVM_ARG_OK=false
32826    fi
32827  fi
32828
32829  if test "$JVM_64BIT" = true; then
32830    if test "$MEMORY_SIZE" -gt "17000"; then
32831
32832  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32833  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32834  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32835  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32836  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32837  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32838    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32839    JVM_ARG_OK=true
32840  else
32841    $ECHO "Arg failed:" >&5
32842    $ECHO "$OUTPUT" >&5
32843    JVM_ARG_OK=false
32844  fi
32845
32846    fi
32847    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32848
32849  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32850  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32851  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32852  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32853  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32854  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32855    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32856    JVM_ARG_OK=true
32857  else
32858    $ECHO "Arg failed:" >&5
32859    $ECHO "$OUTPUT" >&5
32860    JVM_ARG_OK=false
32861  fi
32862
32863    fi
32864    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32865
32866  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32867  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32868  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32869  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32870  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32871  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32872    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32873    JVM_ARG_OK=true
32874  else
32875    $ECHO "Arg failed:" >&5
32876    $ECHO "$OUTPUT" >&5
32877    JVM_ARG_OK=false
32878  fi
32879
32880    fi
32881    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32882
32883  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32884  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32885  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32886  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32887  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32888  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32889    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32890    JVM_ARG_OK=true
32891  else
32892    $ECHO "Arg failed:" >&5
32893    $ECHO "$OUTPUT" >&5
32894    JVM_ARG_OK=false
32895  fi
32896
32897    fi
32898  fi
32899  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32900
32901  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32902  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32903  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32904  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32905  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32906  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32907    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32908    JVM_ARG_OK=true
32909  else
32910    $ECHO "Arg failed:" >&5
32911    $ECHO "$OUTPUT" >&5
32912    JVM_ARG_OK=false
32913  fi
32914
32915  fi
32916  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32917
32918  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32919  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32920  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32921  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32922  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32923  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32924    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32925    JVM_ARG_OK=true
32926  else
32927    $ECHO "Arg failed:" >&5
32928    $ECHO "$OUTPUT" >&5
32929    JVM_ARG_OK=false
32930  fi
32931
32932  fi
32933  if test "$JVM_ARG_OK" = false; then
32934
32935  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32936  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32937  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32938  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32939  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32940  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32941    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32942    JVM_ARG_OK=true
32943  else
32944    $ECHO "Arg failed:" >&5
32945    $ECHO "$OUTPUT" >&5
32946    JVM_ARG_OK=false
32947  fi
32948
32949  fi
32950
32951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32952$as_echo_n "checking whether to use sjavac... " >&6; }
32953  # Check whether --enable-sjavac was given.
32954if test "${enable_sjavac+set}" = set; then :
32955  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32956else
32957  ENABLE_SJAVAC='no'
32958fi
32959
32960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32961$as_echo "$ENABLE_SJAVAC" >&6; }
32962
32963
32964  if test "x$ENABLE_SJAVAC" = xyes; then
32965    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32966  else
32967    SJAVAC_SERVER_DIR=
32968  fi
32969
32970
32971
32972# Can the C/C++ compiler use precompiled headers?
32973
32974
32975  ###############################################################################
32976  #
32977  # Can the C/C++ compiler use precompiled headers?
32978  #
32979  # Check whether --enable-precompiled-headers was given.
32980if test "${enable_precompiled_headers+set}" = set; then :
32981  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32982else
32983  ENABLE_PRECOMPH=yes
32984fi
32985
32986
32987  USE_PRECOMPILED_HEADER=1
32988  if test "x$ENABLE_PRECOMPH" = xno; then
32989    USE_PRECOMPILED_HEADER=0
32990  fi
32991
32992  if test "x$ENABLE_PRECOMPH" = xyes; then
32993    # Check that the compiler actually supports precomp headers.
32994    if test "x$GCC" = xyes; then
32995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32996$as_echo_n "checking that precompiled headers work... " >&6; }
32997      echo "int alfa();" > conftest.h
32998      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32999      if test ! -f conftest.hpp.gch; then
33000        USE_PRECOMPILED_HEADER=0
33001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33002$as_echo "no" >&6; }
33003      else
33004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33005$as_echo "yes" >&6; }
33006      fi
33007      rm -f conftest.h conftest.hpp.gch
33008    fi
33009  fi
33010
33011
33012
33013
33014# Setup use of ccache, if available
33015
33016  # Check whether --enable-ccache was given.
33017if test "${enable_ccache+set}" = set; then :
33018  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33019else
33020  ENABLE_CCACHE=yes
33021fi
33022
33023  if test "x$ENABLE_CCACHE" = xyes; then
33024    OLD_PATH="$PATH"
33025    if test "x$TOOLS_DIR" != x; then
33026      PATH=$TOOLS_DIR:$PATH
33027    fi
33028    # Extract the first word of "ccache", so it can be a program name with args.
33029set dummy ccache; ac_word=$2
33030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33031$as_echo_n "checking for $ac_word... " >&6; }
33032if ${ac_cv_path_CCACHE+:} false; then :
33033  $as_echo_n "(cached) " >&6
33034else
33035  case $CCACHE in
33036  [\\/]* | ?:[\\/]*)
33037  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33038  ;;
33039  *)
33040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33041for as_dir in $PATH
33042do
33043  IFS=$as_save_IFS
33044  test -z "$as_dir" && as_dir=.
33045    for ac_exec_ext in '' $ac_executable_extensions; do
33046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33047    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33049    break 2
33050  fi
33051done
33052  done
33053IFS=$as_save_IFS
33054
33055  ;;
33056esac
33057fi
33058CCACHE=$ac_cv_path_CCACHE
33059if test -n "$CCACHE"; then
33060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33061$as_echo "$CCACHE" >&6; }
33062else
33063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33064$as_echo "no" >&6; }
33065fi
33066
33067
33068    PATH="$OLD_PATH"
33069  else
33070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33071$as_echo_n "checking for ccache... " >&6; }
33072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33073$as_echo "explicitly disabled" >&6; }
33074    CCACHE=
33075  fi
33076
33077
33078
33079# Check whether --with-ccache-dir was given.
33080if test "${with_ccache_dir+set}" = set; then :
33081  withval=$with_ccache_dir;
33082fi
33083
33084
33085  if test "x$with_ccache_dir" != x; then
33086    # When using a non home ccache directory, assume the use is to share ccache files
33087    # with other users. Thus change the umask.
33088    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33089  fi
33090  CCACHE_FOUND=""
33091  if test "x$CCACHE" != x; then
33092
33093  if test "x$CCACHE" != x; then
33094    CCACHE_FOUND="true"
33095    # Only use ccache if it is 3.1.4 or later, which supports
33096    # precompiled headers.
33097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33098$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33099    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33100    if test "x$HAS_GOOD_CCACHE" = x; then
33101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33102$as_echo "no, disabling ccache" >&6; }
33103      CCACHE=
33104    else
33105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33106$as_echo "yes" >&6; }
33107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33108$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33109      PUSHED_FLAGS="$CXXFLAGS"
33110      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33111      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33112/* end confdefs.h.  */
33113
33114int
33115main ()
33116{
33117
33118  ;
33119  return 0;
33120}
33121_ACEOF
33122if ac_fn_cxx_try_compile "$LINENO"; then :
33123  CC_KNOWS_CCACHE_TRICK=yes
33124else
33125  CC_KNOWS_CCACHE_TRICK=no
33126fi
33127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33128      CXXFLAGS="$PUSHED_FLAGS"
33129      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33131$as_echo "yes" >&6; }
33132      else
33133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33134$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33135        CCACHE=
33136      fi
33137    fi
33138  fi
33139
33140  if test "x$CCACHE" != x; then
33141    CCACHE_SLOPPINESS=time_macros
33142    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33143    CCACHE_FLAGS=-fpch-preprocess
33144
33145    if test "x$SET_CCACHE_DIR" != x; then
33146      mkdir -p $CCACHE_DIR > /dev/null 2>&1
33147      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33148    fi
33149  fi
33150
33151  fi
33152
33153
33154###############################################################################
33155#
33156# And now the finish...
33157#
33158###############################################################################
33159
33160# Check for some common pitfalls
33161
33162  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33163    file_to_test="$SRC_ROOT/LICENSE"
33164    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33165      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
33166    fi
33167  fi
33168
33169
33170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33171$as_echo_n "checking if build directory is on local disk... " >&6; }
33172
33173  # df -l lists only local disks; if the given directory is not found then
33174  # a non-zero exit code is given
33175  if test "x$DF" = x; then
33176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33177      # msys does not have df; use Windows "net use" instead.
33178      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33179      if test "x$IS_NETWORK_DISK" = x; then
33180        OUTPUT_DIR_IS_LOCAL="yes"
33181      else
33182        OUTPUT_DIR_IS_LOCAL="no"
33183      fi
33184    else
33185      # No df here, say it's local
33186      OUTPUT_DIR_IS_LOCAL="yes"
33187    fi
33188  else
33189    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33190      OUTPUT_DIR_IS_LOCAL="yes"
33191    else
33192      OUTPUT_DIR_IS_LOCAL="no"
33193    fi
33194  fi
33195
33196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33197$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33198
33199
33200
33201  # Check if the user has any old-style ALT_ variables set.
33202  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33203
33204  # Before generating output files, test if they exist. If they do, this is a reconfigure.
33205  # Since we can't properly handle the dependencies for this, warn the user about the situation
33206  if test -e $OUTPUT_ROOT/spec.gmk; then
33207    IS_RECONFIGURE=yes
33208  else
33209    IS_RECONFIGURE=no
33210  fi
33211
33212  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33213    HIDE_PERFORMANCE_HINTS=yes
33214  else
33215    HIDE_PERFORMANCE_HINTS=no
33216    # Hide it the next time around...
33217    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33218  fi
33219
33220
33221# At the end, call the custom hook. (Dummy macro if no custom sources available)
33222
33223
33224# We're messing a bit with internal autoconf variables to put the config.status
33225# in the output directory instead of the current directory.
33226CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33227
33228# Create the actual output files. Now the main work of configure is done.
33229cat >confcache <<\_ACEOF
33230# This file is a shell script that caches the results of configure
33231# tests run on this system so they can be shared between configure
33232# scripts and configure runs, see configure's option --config-cache.
33233# It is not useful on other systems.  If it contains results you don't
33234# want to keep, you may remove or edit it.
33235#
33236# config.status only pays attention to the cache file if you give it
33237# the --recheck option to rerun configure.
33238#
33239# `ac_cv_env_foo' variables (set or unset) will be overridden when
33240# loading this file, other *unset* `ac_cv_foo' will be assigned the
33241# following values.
33242
33243_ACEOF
33244
33245# The following way of writing the cache mishandles newlines in values,
33246# but we know of no workaround that is simple, portable, and efficient.
33247# So, we kill variables containing newlines.
33248# Ultrix sh set writes to stderr and can't be redirected directly,
33249# and sets the high bit in the cache file unless we assign to the vars.
33250(
33251  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33252    eval ac_val=\$$ac_var
33253    case $ac_val in #(
33254    *${as_nl}*)
33255      case $ac_var in #(
33256      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33257$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33258      esac
33259      case $ac_var in #(
33260      _ | IFS | as_nl) ;; #(
33261      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33262      *) { eval $ac_var=; unset $ac_var;} ;;
33263      esac ;;
33264    esac
33265  done
33266
33267  (set) 2>&1 |
33268    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33269    *${as_nl}ac_space=\ *)
33270      # `set' does not quote correctly, so add quotes: double-quote
33271      # substitution turns \\\\ into \\, and sed turns \\ into \.
33272      sed -n \
33273	"s/'/'\\\\''/g;
33274	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33275      ;; #(
33276    *)
33277      # `set' quotes correctly as required by POSIX, so do not add quotes.
33278      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33279      ;;
33280    esac |
33281    sort
33282) |
33283  sed '
33284     /^ac_cv_env_/b end
33285     t clear
33286     :clear
33287     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33288     t end
33289     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33290     :end' >>confcache
33291if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33292  if test -w "$cache_file"; then
33293    if test "x$cache_file" != "x/dev/null"; then
33294      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33295$as_echo "$as_me: updating cache $cache_file" >&6;}
33296      if test ! -f "$cache_file" || test -h "$cache_file"; then
33297	cat confcache >"$cache_file"
33298      else
33299        case $cache_file in #(
33300        */* | ?:*)
33301	  mv -f confcache "$cache_file"$$ &&
33302	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33303        *)
33304	  mv -f confcache "$cache_file" ;;
33305	esac
33306      fi
33307    fi
33308  else
33309    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33310$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33311  fi
33312fi
33313rm -f confcache
33314
33315test "x$prefix" = xNONE && prefix=$ac_default_prefix
33316# Let make expand exec_prefix.
33317test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33318
33319DEFS=-DHAVE_CONFIG_H
33320
33321ac_libobjs=
33322ac_ltlibobjs=
33323U=
33324for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33325  # 1. Remove the extension, and $U if already installed.
33326  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33327  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33328  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33329  #    will be set to the directory where LIBOBJS objects are built.
33330  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33331  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33332done
33333LIBOBJS=$ac_libobjs
33334
33335LTLIBOBJS=$ac_ltlibobjs
33336
33337
33338
33339: "${CONFIG_STATUS=./config.status}"
33340ac_write_fail=0
33341ac_clean_files_save=$ac_clean_files
33342ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33343{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33344$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33345as_write_fail=0
33346cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33347#! $SHELL
33348# Generated by $as_me.
33349# Run this file to recreate the current configuration.
33350# Compiler output produced by configure, useful for debugging
33351# configure, is in config.log if it exists.
33352
33353debug=false
33354ac_cs_recheck=false
33355ac_cs_silent=false
33356
33357SHELL=\${CONFIG_SHELL-$SHELL}
33358export SHELL
33359_ASEOF
33360cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33361## -------------------- ##
33362## M4sh Initialization. ##
33363## -------------------- ##
33364
33365# Be more Bourne compatible
33366DUALCASE=1; export DUALCASE # for MKS sh
33367if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33368  emulate sh
33369  NULLCMD=:
33370  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33371  # is contrary to our usage.  Disable this feature.
33372  alias -g '${1+"$@"}'='"$@"'
33373  setopt NO_GLOB_SUBST
33374else
33375  case `(set -o) 2>/dev/null` in #(
33376  *posix*) :
33377    set -o posix ;; #(
33378  *) :
33379     ;;
33380esac
33381fi
33382
33383
33384as_nl='
33385'
33386export as_nl
33387# Printing a long string crashes Solaris 7 /usr/bin/printf.
33388as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33389as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33390as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33391# Prefer a ksh shell builtin over an external printf program on Solaris,
33392# but without wasting forks for bash or zsh.
33393if test -z "$BASH_VERSION$ZSH_VERSION" \
33394    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33395  as_echo='print -r --'
33396  as_echo_n='print -rn --'
33397elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33398  as_echo='printf %s\n'
33399  as_echo_n='printf %s'
33400else
33401  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33402    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33403    as_echo_n='/usr/ucb/echo -n'
33404  else
33405    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33406    as_echo_n_body='eval
33407      arg=$1;
33408      case $arg in #(
33409      *"$as_nl"*)
33410	expr "X$arg" : "X\\(.*\\)$as_nl";
33411	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33412      esac;
33413      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33414    '
33415    export as_echo_n_body
33416    as_echo_n='sh -c $as_echo_n_body as_echo'
33417  fi
33418  export as_echo_body
33419  as_echo='sh -c $as_echo_body as_echo'
33420fi
33421
33422# The user is always right.
33423if test "${PATH_SEPARATOR+set}" != set; then
33424  PATH_SEPARATOR=:
33425  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33426    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33427      PATH_SEPARATOR=';'
33428  }
33429fi
33430
33431
33432# IFS
33433# We need space, tab and new line, in precisely that order.  Quoting is
33434# there to prevent editors from complaining about space-tab.
33435# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33436# splitting by setting IFS to empty value.)
33437IFS=" ""	$as_nl"
33438
33439# Find who we are.  Look in the path if we contain no directory separator.
33440as_myself=
33441case $0 in #((
33442  *[\\/]* ) as_myself=$0 ;;
33443  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33444for as_dir in $PATH
33445do
33446  IFS=$as_save_IFS
33447  test -z "$as_dir" && as_dir=.
33448    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33449  done
33450IFS=$as_save_IFS
33451
33452     ;;
33453esac
33454# We did not find ourselves, most probably we were run as `sh COMMAND'
33455# in which case we are not to be found in the path.
33456if test "x$as_myself" = x; then
33457  as_myself=$0
33458fi
33459if test ! -f "$as_myself"; then
33460  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33461  exit 1
33462fi
33463
33464# Unset variables that we do not need and which cause bugs (e.g. in
33465# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33466# suppresses any "Segmentation fault" message there.  '((' could
33467# trigger a bug in pdksh 5.2.14.
33468for as_var in BASH_ENV ENV MAIL MAILPATH
33469do eval test x\${$as_var+set} = xset \
33470  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33471done
33472PS1='$ '
33473PS2='> '
33474PS4='+ '
33475
33476# NLS nuisances.
33477LC_ALL=C
33478export LC_ALL
33479LANGUAGE=C
33480export LANGUAGE
33481
33482# CDPATH.
33483(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33484
33485
33486# as_fn_error STATUS ERROR [LINENO LOG_FD]
33487# ----------------------------------------
33488# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33489# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33490# script with STATUS, using 1 if that was 0.
33491as_fn_error ()
33492{
33493  as_status=$1; test $as_status -eq 0 && as_status=1
33494  if test "$4"; then
33495    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33496    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33497  fi
33498  $as_echo "$as_me: error: $2" >&2
33499  as_fn_exit $as_status
33500} # as_fn_error
33501
33502
33503# as_fn_set_status STATUS
33504# -----------------------
33505# Set $? to STATUS, without forking.
33506as_fn_set_status ()
33507{
33508  return $1
33509} # as_fn_set_status
33510
33511# as_fn_exit STATUS
33512# -----------------
33513# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33514as_fn_exit ()
33515{
33516  set +e
33517  as_fn_set_status $1
33518  exit $1
33519} # as_fn_exit
33520
33521# as_fn_unset VAR
33522# ---------------
33523# Portably unset VAR.
33524as_fn_unset ()
33525{
33526  { eval $1=; unset $1;}
33527}
33528as_unset=as_fn_unset
33529# as_fn_append VAR VALUE
33530# ----------------------
33531# Append the text in VALUE to the end of the definition contained in VAR. Take
33532# advantage of any shell optimizations that allow amortized linear growth over
33533# repeated appends, instead of the typical quadratic growth present in naive
33534# implementations.
33535if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33536  eval 'as_fn_append ()
33537  {
33538    eval $1+=\$2
33539  }'
33540else
33541  as_fn_append ()
33542  {
33543    eval $1=\$$1\$2
33544  }
33545fi # as_fn_append
33546
33547# as_fn_arith ARG...
33548# ------------------
33549# Perform arithmetic evaluation on the ARGs, and store the result in the
33550# global $as_val. Take advantage of shells that can avoid forks. The arguments
33551# must be portable across $(()) and expr.
33552if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33553  eval 'as_fn_arith ()
33554  {
33555    as_val=$(( $* ))
33556  }'
33557else
33558  as_fn_arith ()
33559  {
33560    as_val=`expr "$@" || test $? -eq 1`
33561  }
33562fi # as_fn_arith
33563
33564
33565if expr a : '\(a\)' >/dev/null 2>&1 &&
33566   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33567  as_expr=expr
33568else
33569  as_expr=false
33570fi
33571
33572if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33573  as_basename=basename
33574else
33575  as_basename=false
33576fi
33577
33578if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33579  as_dirname=dirname
33580else
33581  as_dirname=false
33582fi
33583
33584as_me=`$as_basename -- "$0" ||
33585$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33586	 X"$0" : 'X\(//\)$' \| \
33587	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33588$as_echo X/"$0" |
33589    sed '/^.*\/\([^/][^/]*\)\/*$/{
33590	    s//\1/
33591	    q
33592	  }
33593	  /^X\/\(\/\/\)$/{
33594	    s//\1/
33595	    q
33596	  }
33597	  /^X\/\(\/\).*/{
33598	    s//\1/
33599	    q
33600	  }
33601	  s/.*/./; q'`
33602
33603# Avoid depending upon Character Ranges.
33604as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33605as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33606as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33607as_cr_digits='0123456789'
33608as_cr_alnum=$as_cr_Letters$as_cr_digits
33609
33610ECHO_C= ECHO_N= ECHO_T=
33611case `echo -n x` in #(((((
33612-n*)
33613  case `echo 'xy\c'` in
33614  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33615  xy)  ECHO_C='\c';;
33616  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33617       ECHO_T='	';;
33618  esac;;
33619*)
33620  ECHO_N='-n';;
33621esac
33622
33623rm -f conf$$ conf$$.exe conf$$.file
33624if test -d conf$$.dir; then
33625  rm -f conf$$.dir/conf$$.file
33626else
33627  rm -f conf$$.dir
33628  mkdir conf$$.dir 2>/dev/null
33629fi
33630if (echo >conf$$.file) 2>/dev/null; then
33631  if ln -s conf$$.file conf$$ 2>/dev/null; then
33632    as_ln_s='ln -s'
33633    # ... but there are two gotchas:
33634    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33635    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33636    # In both cases, we have to default to `cp -pR'.
33637    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33638      as_ln_s='cp -pR'
33639  elif ln conf$$.file conf$$ 2>/dev/null; then
33640    as_ln_s=ln
33641  else
33642    as_ln_s='cp -pR'
33643  fi
33644else
33645  as_ln_s='cp -pR'
33646fi
33647rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33648rmdir conf$$.dir 2>/dev/null
33649
33650
33651# as_fn_mkdir_p
33652# -------------
33653# Create "$as_dir" as a directory, including parents if necessary.
33654as_fn_mkdir_p ()
33655{
33656
33657  case $as_dir in #(
33658  -*) as_dir=./$as_dir;;
33659  esac
33660  test -d "$as_dir" || eval $as_mkdir_p || {
33661    as_dirs=
33662    while :; do
33663      case $as_dir in #(
33664      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33665      *) as_qdir=$as_dir;;
33666      esac
33667      as_dirs="'$as_qdir' $as_dirs"
33668      as_dir=`$as_dirname -- "$as_dir" ||
33669$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33670	 X"$as_dir" : 'X\(//\)[^/]' \| \
33671	 X"$as_dir" : 'X\(//\)$' \| \
33672	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33673$as_echo X"$as_dir" |
33674    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33675	    s//\1/
33676	    q
33677	  }
33678	  /^X\(\/\/\)[^/].*/{
33679	    s//\1/
33680	    q
33681	  }
33682	  /^X\(\/\/\)$/{
33683	    s//\1/
33684	    q
33685	  }
33686	  /^X\(\/\).*/{
33687	    s//\1/
33688	    q
33689	  }
33690	  s/.*/./; q'`
33691      test -d "$as_dir" && break
33692    done
33693    test -z "$as_dirs" || eval "mkdir $as_dirs"
33694  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33695
33696
33697} # as_fn_mkdir_p
33698if mkdir -p . 2>/dev/null; then
33699  as_mkdir_p='mkdir -p "$as_dir"'
33700else
33701  test -d ./-p && rmdir ./-p
33702  as_mkdir_p=false
33703fi
33704
33705
33706# as_fn_executable_p FILE
33707# -----------------------
33708# Test if FILE is an executable regular file.
33709as_fn_executable_p ()
33710{
33711  test -f "$1" && test -x "$1"
33712} # as_fn_executable_p
33713as_test_x='test -x'
33714as_executable_p=as_fn_executable_p
33715
33716# Sed expression to map a string onto a valid CPP name.
33717as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33718
33719# Sed expression to map a string onto a valid variable name.
33720as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33721
33722
33723exec 6>&1
33724## ----------------------------------- ##
33725## Main body of $CONFIG_STATUS script. ##
33726## ----------------------------------- ##
33727_ASEOF
33728test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33729
33730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33731# Save the log message, to keep $0 and so on meaningful, and to
33732# report actual input values of CONFIG_FILES etc. instead of their
33733# values after options handling.
33734ac_log="
33735This file was extended by OpenJDK $as_me jdk8, which was
33736generated by GNU Autoconf 2.69.  Invocation command line was
33737
33738  CONFIG_FILES    = $CONFIG_FILES
33739  CONFIG_HEADERS  = $CONFIG_HEADERS
33740  CONFIG_LINKS    = $CONFIG_LINKS
33741  CONFIG_COMMANDS = $CONFIG_COMMANDS
33742  $ $0 $@
33743
33744on `(hostname || uname -n) 2>/dev/null | sed 1q`
33745"
33746
33747_ACEOF
33748
33749case $ac_config_files in *"
33750"*) set x $ac_config_files; shift; ac_config_files=$*;;
33751esac
33752
33753case $ac_config_headers in *"
33754"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33755esac
33756
33757
33758cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33759# Files that config.status was made for.
33760config_files="$ac_config_files"
33761config_headers="$ac_config_headers"
33762
33763_ACEOF
33764
33765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33766ac_cs_usage="\
33767\`$as_me' instantiates files and other configuration actions
33768from templates according to the current configuration.  Unless the files
33769and actions are specified as TAGs, all are instantiated by default.
33770
33771Usage: $0 [OPTION]... [TAG]...
33772
33773  -h, --help       print this help, then exit
33774  -V, --version    print version number and configuration settings, then exit
33775      --config     print configuration, then exit
33776  -q, --quiet, --silent
33777                   do not print progress messages
33778  -d, --debug      don't remove temporary files
33779      --recheck    update $as_me by reconfiguring in the same conditions
33780      --file=FILE[:TEMPLATE]
33781                   instantiate the configuration file FILE
33782      --header=FILE[:TEMPLATE]
33783                   instantiate the configuration header FILE
33784
33785Configuration files:
33786$config_files
33787
33788Configuration headers:
33789$config_headers
33790
33791Report bugs to <build-dev@openjdk.java.net>.
33792OpenJDK home page: <http://openjdk.java.net>."
33793
33794_ACEOF
33795cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33796ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33797ac_cs_version="\\
33798OpenJDK config.status jdk8
33799configured by $0, generated by GNU Autoconf 2.69,
33800  with options \\"\$ac_cs_config\\"
33801
33802Copyright (C) 2012 Free Software Foundation, Inc.
33803This config.status script is free software; the Free Software Foundation
33804gives unlimited permission to copy, distribute and modify it."
33805
33806ac_pwd='$ac_pwd'
33807srcdir='$srcdir'
33808AWK='$AWK'
33809test -n "\$AWK" || AWK=awk
33810_ACEOF
33811
33812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33813# The default lists apply if the user does not specify any file.
33814ac_need_defaults=:
33815while test $# != 0
33816do
33817  case $1 in
33818  --*=?*)
33819    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33820    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33821    ac_shift=:
33822    ;;
33823  --*=)
33824    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33825    ac_optarg=
33826    ac_shift=:
33827    ;;
33828  *)
33829    ac_option=$1
33830    ac_optarg=$2
33831    ac_shift=shift
33832    ;;
33833  esac
33834
33835  case $ac_option in
33836  # Handling of the options.
33837  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33838    ac_cs_recheck=: ;;
33839  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33840    $as_echo "$ac_cs_version"; exit ;;
33841  --config | --confi | --conf | --con | --co | --c )
33842    $as_echo "$ac_cs_config"; exit ;;
33843  --debug | --debu | --deb | --de | --d | -d )
33844    debug=: ;;
33845  --file | --fil | --fi | --f )
33846    $ac_shift
33847    case $ac_optarg in
33848    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33849    '') as_fn_error $? "missing file argument" ;;
33850    esac
33851    as_fn_append CONFIG_FILES " '$ac_optarg'"
33852    ac_need_defaults=false;;
33853  --header | --heade | --head | --hea )
33854    $ac_shift
33855    case $ac_optarg in
33856    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33857    esac
33858    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33859    ac_need_defaults=false;;
33860  --he | --h)
33861    # Conflict between --help and --header
33862    as_fn_error $? "ambiguous option: \`$1'
33863Try \`$0 --help' for more information.";;
33864  --help | --hel | -h )
33865    $as_echo "$ac_cs_usage"; exit ;;
33866  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33867  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33868    ac_cs_silent=: ;;
33869
33870  # This is an error.
33871  -*) as_fn_error $? "unrecognized option: \`$1'
33872Try \`$0 --help' for more information." ;;
33873
33874  *) as_fn_append ac_config_targets " $1"
33875     ac_need_defaults=false ;;
33876
33877  esac
33878  shift
33879done
33880
33881ac_configure_extra_args=
33882
33883if $ac_cs_silent; then
33884  exec 6>/dev/null
33885  ac_configure_extra_args="$ac_configure_extra_args --silent"
33886fi
33887
33888_ACEOF
33889cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33890if \$ac_cs_recheck; then
33891  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33892  shift
33893  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33894  CONFIG_SHELL='$SHELL'
33895  export CONFIG_SHELL
33896  exec "\$@"
33897fi
33898
33899_ACEOF
33900cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33901exec 5>>config.log
33902{
33903  echo
33904  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33905## Running $as_me. ##
33906_ASBOX
33907  $as_echo "$ac_log"
33908} >&5
33909
33910_ACEOF
33911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33912_ACEOF
33913
33914cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33915
33916# Handling of arguments.
33917for ac_config_target in $ac_config_targets
33918do
33919  case $ac_config_target in
33920    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33921    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33922    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33923    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33924    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33925    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33926    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33927
33928  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33929  esac
33930done
33931
33932
33933# If the user did not use the arguments to specify the items to instantiate,
33934# then the envvar interface is used.  Set only those that are not.
33935# We use the long form for the default assignment because of an extremely
33936# bizarre bug on SunOS 4.1.3.
33937if $ac_need_defaults; then
33938  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33939  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33940fi
33941
33942# Have a temporary directory for convenience.  Make it in the build tree
33943# simply because there is no reason against having it here, and in addition,
33944# creating and moving files from /tmp can sometimes cause problems.
33945# Hook for its removal unless debugging.
33946# Note that there is a small window in which the directory will not be cleaned:
33947# after its creation but before its name has been assigned to `$tmp'.
33948$debug ||
33949{
33950  tmp= ac_tmp=
33951  trap 'exit_status=$?
33952  : "${ac_tmp:=$tmp}"
33953  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33954' 0
33955  trap 'as_fn_exit 1' 1 2 13 15
33956}
33957# Create a (secure) tmp directory for tmp files.
33958
33959{
33960  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33961  test -d "$tmp"
33962}  ||
33963{
33964  tmp=./conf$$-$RANDOM
33965  (umask 077 && mkdir "$tmp")
33966} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33967ac_tmp=$tmp
33968
33969# Set up the scripts for CONFIG_FILES section.
33970# No need to generate them if there are no CONFIG_FILES.
33971# This happens for instance with `./config.status config.h'.
33972if test -n "$CONFIG_FILES"; then
33973
33974
33975ac_cr=`echo X | tr X '\015'`
33976# On cygwin, bash can eat \r inside `` if the user requested igncr.
33977# But we know of no other shell where ac_cr would be empty at this
33978# point, so we can use a bashism as a fallback.
33979if test "x$ac_cr" = x; then
33980  eval ac_cr=\$\'\\r\'
33981fi
33982ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33983if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33984  ac_cs_awk_cr='\\r'
33985else
33986  ac_cs_awk_cr=$ac_cr
33987fi
33988
33989echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33990_ACEOF
33991
33992
33993{
33994  echo "cat >conf$$subs.awk <<_ACEOF" &&
33995  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33996  echo "_ACEOF"
33997} >conf$$subs.sh ||
33998  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33999ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34000ac_delim='%!_!# '
34001for ac_last_try in false false false false false :; do
34002  . ./conf$$subs.sh ||
34003    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34004
34005  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34006  if test $ac_delim_n = $ac_delim_num; then
34007    break
34008  elif $ac_last_try; then
34009    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34010  else
34011    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34012  fi
34013done
34014rm -f conf$$subs.sh
34015
34016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34017cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34018_ACEOF
34019sed -n '
34020h
34021s/^/S["/; s/!.*/"]=/
34022p
34023g
34024s/^[^!]*!//
34025:repl
34026t repl
34027s/'"$ac_delim"'$//
34028t delim
34029:nl
34030h
34031s/\(.\{148\}\)..*/\1/
34032t more1
34033s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34034p
34035n
34036b repl
34037:more1
34038s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34039p
34040g
34041s/.\{148\}//
34042t nl
34043:delim
34044h
34045s/\(.\{148\}\)..*/\1/
34046t more2
34047s/["\\]/\\&/g; s/^/"/; s/$/"/
34048p
34049b
34050:more2
34051s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34052p
34053g
34054s/.\{148\}//
34055t delim
34056' <conf$$subs.awk | sed '
34057/^[^""]/{
34058  N
34059  s/\n//
34060}
34061' >>$CONFIG_STATUS || ac_write_fail=1
34062rm -f conf$$subs.awk
34063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34064_ACAWK
34065cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34066  for (key in S) S_is_set[key] = 1
34067  FS = ""
34068
34069}
34070{
34071  line = $ 0
34072  nfields = split(line, field, "@")
34073  substed = 0
34074  len = length(field[1])
34075  for (i = 2; i < nfields; i++) {
34076    key = field[i]
34077    keylen = length(key)
34078    if (S_is_set[key]) {
34079      value = S[key]
34080      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34081      len += length(value) + length(field[++i])
34082      substed = 1
34083    } else
34084      len += 1 + keylen
34085  }
34086
34087  print line
34088}
34089
34090_ACAWK
34091_ACEOF
34092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34093if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34094  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34095else
34096  cat
34097fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34098  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34099_ACEOF
34100
34101# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34102# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34103# trailing colons and then remove the whole line if VPATH becomes empty
34104# (actually we leave an empty line to preserve line numbers).
34105if test "x$srcdir" = x.; then
34106  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34107h
34108s///
34109s/^/:/
34110s/[	 ]*$/:/
34111s/:\$(srcdir):/:/g
34112s/:\${srcdir}:/:/g
34113s/:@srcdir@:/:/g
34114s/^:*//
34115s/:*$//
34116x
34117s/\(=[	 ]*\).*/\1/
34118G
34119s/\n//
34120s/^[^=]*=[	 ]*$//
34121}'
34122fi
34123
34124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34125fi # test -n "$CONFIG_FILES"
34126
34127# Set up the scripts for CONFIG_HEADERS section.
34128# No need to generate them if there are no CONFIG_HEADERS.
34129# This happens for instance with `./config.status Makefile'.
34130if test -n "$CONFIG_HEADERS"; then
34131cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34132BEGIN {
34133_ACEOF
34134
34135# Transform confdefs.h into an awk script `defines.awk', embedded as
34136# here-document in config.status, that substitutes the proper values into
34137# config.h.in to produce config.h.
34138
34139# Create a delimiter string that does not exist in confdefs.h, to ease
34140# handling of long lines.
34141ac_delim='%!_!# '
34142for ac_last_try in false false :; do
34143  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34144  if test -z "$ac_tt"; then
34145    break
34146  elif $ac_last_try; then
34147    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34148  else
34149    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34150  fi
34151done
34152
34153# For the awk script, D is an array of macro values keyed by name,
34154# likewise P contains macro parameters if any.  Preserve backslash
34155# newline sequences.
34156
34157ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34158sed -n '
34159s/.\{148\}/&'"$ac_delim"'/g
34160t rset
34161:rset
34162s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34163t def
34164d
34165:def
34166s/\\$//
34167t bsnl
34168s/["\\]/\\&/g
34169s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34170D["\1"]=" \3"/p
34171s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34172d
34173:bsnl
34174s/["\\]/\\&/g
34175s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34176D["\1"]=" \3\\\\\\n"\\/p
34177t cont
34178s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34179t cont
34180d
34181:cont
34182n
34183s/.\{148\}/&'"$ac_delim"'/g
34184t clear
34185:clear
34186s/\\$//
34187t bsnlc
34188s/["\\]/\\&/g; s/^/"/; s/$/"/p
34189d
34190:bsnlc
34191s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34192b cont
34193' <confdefs.h | sed '
34194s/'"$ac_delim"'/"\\\
34195"/g' >>$CONFIG_STATUS || ac_write_fail=1
34196
34197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34198  for (key in D) D_is_set[key] = 1
34199  FS = ""
34200}
34201/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34202  line = \$ 0
34203  split(line, arg, " ")
34204  if (arg[1] == "#") {
34205    defundef = arg[2]
34206    mac1 = arg[3]
34207  } else {
34208    defundef = substr(arg[1], 2)
34209    mac1 = arg[2]
34210  }
34211  split(mac1, mac2, "(") #)
34212  macro = mac2[1]
34213  prefix = substr(line, 1, index(line, defundef) - 1)
34214  if (D_is_set[macro]) {
34215    # Preserve the white space surrounding the "#".
34216    print prefix "define", macro P[macro] D[macro]
34217    next
34218  } else {
34219    # Replace #undef with comments.  This is necessary, for example,
34220    # in the case of _POSIX_SOURCE, which is predefined and required
34221    # on some systems where configure will not decide to define it.
34222    if (defundef == "undef") {
34223      print "/*", prefix defundef, macro, "*/"
34224      next
34225    }
34226  }
34227}
34228{ print }
34229_ACAWK
34230_ACEOF
34231cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34232  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34233fi # test -n "$CONFIG_HEADERS"
34234
34235
34236eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34237shift
34238for ac_tag
34239do
34240  case $ac_tag in
34241  :[FHLC]) ac_mode=$ac_tag; continue;;
34242  esac
34243  case $ac_mode$ac_tag in
34244  :[FHL]*:*);;
34245  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34246  :[FH]-) ac_tag=-:-;;
34247  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34248  esac
34249  ac_save_IFS=$IFS
34250  IFS=:
34251  set x $ac_tag
34252  IFS=$ac_save_IFS
34253  shift
34254  ac_file=$1
34255  shift
34256
34257  case $ac_mode in
34258  :L) ac_source=$1;;
34259  :[FH])
34260    ac_file_inputs=
34261    for ac_f
34262    do
34263      case $ac_f in
34264      -) ac_f="$ac_tmp/stdin";;
34265      *) # Look for the file first in the build tree, then in the source tree
34266	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34267	 # because $ac_f cannot contain `:'.
34268	 test -f "$ac_f" ||
34269	   case $ac_f in
34270	   [\\/$]*) false;;
34271	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34272	   esac ||
34273	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34274      esac
34275      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34276      as_fn_append ac_file_inputs " '$ac_f'"
34277    done
34278
34279    # Let's still pretend it is `configure' which instantiates (i.e., don't
34280    # use $as_me), people would be surprised to read:
34281    #    /* config.h.  Generated by config.status.  */
34282    configure_input='Generated from '`
34283	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34284	`' by configure.'
34285    if test x"$ac_file" != x-; then
34286      configure_input="$ac_file.  $configure_input"
34287      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34288$as_echo "$as_me: creating $ac_file" >&6;}
34289    fi
34290    # Neutralize special characters interpreted by sed in replacement strings.
34291    case $configure_input in #(
34292    *\&* | *\|* | *\\* )
34293       ac_sed_conf_input=`$as_echo "$configure_input" |
34294       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34295    *) ac_sed_conf_input=$configure_input;;
34296    esac
34297
34298    case $ac_tag in
34299    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34300      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34301    esac
34302    ;;
34303  esac
34304
34305  ac_dir=`$as_dirname -- "$ac_file" ||
34306$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34307	 X"$ac_file" : 'X\(//\)[^/]' \| \
34308	 X"$ac_file" : 'X\(//\)$' \| \
34309	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34310$as_echo X"$ac_file" |
34311    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34312	    s//\1/
34313	    q
34314	  }
34315	  /^X\(\/\/\)[^/].*/{
34316	    s//\1/
34317	    q
34318	  }
34319	  /^X\(\/\/\)$/{
34320	    s//\1/
34321	    q
34322	  }
34323	  /^X\(\/\).*/{
34324	    s//\1/
34325	    q
34326	  }
34327	  s/.*/./; q'`
34328  as_dir="$ac_dir"; as_fn_mkdir_p
34329  ac_builddir=.
34330
34331case "$ac_dir" in
34332.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34333*)
34334  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34335  # A ".." for each directory in $ac_dir_suffix.
34336  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34337  case $ac_top_builddir_sub in
34338  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34339  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34340  esac ;;
34341esac
34342ac_abs_top_builddir=$ac_pwd
34343ac_abs_builddir=$ac_pwd$ac_dir_suffix
34344# for backward compatibility:
34345ac_top_builddir=$ac_top_build_prefix
34346
34347case $srcdir in
34348  .)  # We are building in place.
34349    ac_srcdir=.
34350    ac_top_srcdir=$ac_top_builddir_sub
34351    ac_abs_top_srcdir=$ac_pwd ;;
34352  [\\/]* | ?:[\\/]* )  # Absolute name.
34353    ac_srcdir=$srcdir$ac_dir_suffix;
34354    ac_top_srcdir=$srcdir
34355    ac_abs_top_srcdir=$srcdir ;;
34356  *) # Relative name.
34357    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34358    ac_top_srcdir=$ac_top_build_prefix$srcdir
34359    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34360esac
34361ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34362
34363
34364  case $ac_mode in
34365  :F)
34366  #
34367  # CONFIG_FILE
34368  #
34369
34370_ACEOF
34371
34372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34373# If the template does not know about datarootdir, expand it.
34374# FIXME: This hack should be removed a few years after 2.60.
34375ac_datarootdir_hack=; ac_datarootdir_seen=
34376ac_sed_dataroot='
34377/datarootdir/ {
34378  p
34379  q
34380}
34381/@datadir@/p
34382/@docdir@/p
34383/@infodir@/p
34384/@localedir@/p
34385/@mandir@/p'
34386case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34387*datarootdir*) ac_datarootdir_seen=yes;;
34388*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34389  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34390$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34391_ACEOF
34392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34393  ac_datarootdir_hack='
34394  s&@datadir@&$datadir&g
34395  s&@docdir@&$docdir&g
34396  s&@infodir@&$infodir&g
34397  s&@localedir@&$localedir&g
34398  s&@mandir@&$mandir&g
34399  s&\\\${datarootdir}&$datarootdir&g' ;;
34400esac
34401_ACEOF
34402
34403# Neutralize VPATH when `$srcdir' = `.'.
34404# Shell code in configure.ac might set extrasub.
34405# FIXME: do we really want to maintain this feature?
34406cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34407ac_sed_extra="$ac_vpsub
34408$extrasub
34409_ACEOF
34410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34411:t
34412/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34413s|@configure_input@|$ac_sed_conf_input|;t t
34414s&@top_builddir@&$ac_top_builddir_sub&;t t
34415s&@top_build_prefix@&$ac_top_build_prefix&;t t
34416s&@srcdir@&$ac_srcdir&;t t
34417s&@abs_srcdir@&$ac_abs_srcdir&;t t
34418s&@top_srcdir@&$ac_top_srcdir&;t t
34419s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34420s&@builddir@&$ac_builddir&;t t
34421s&@abs_builddir@&$ac_abs_builddir&;t t
34422s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34423$ac_datarootdir_hack
34424"
34425eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34426  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34427
34428test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34429  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34430  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34431      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34432  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34433which seems to be undefined.  Please make sure it is defined" >&5
34434$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34435which seems to be undefined.  Please make sure it is defined" >&2;}
34436
34437  rm -f "$ac_tmp/stdin"
34438  case $ac_file in
34439  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34440  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34441  esac \
34442  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34443 ;;
34444  :H)
34445  #
34446  # CONFIG_HEADER
34447  #
34448  if test x"$ac_file" != x-; then
34449    {
34450      $as_echo "/* $configure_input  */" \
34451      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34452    } >"$ac_tmp/config.h" \
34453      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34454    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34455      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34456$as_echo "$as_me: $ac_file is unchanged" >&6;}
34457    else
34458      rm -f "$ac_file"
34459      mv "$ac_tmp/config.h" "$ac_file" \
34460	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34461    fi
34462  else
34463    $as_echo "/* $configure_input  */" \
34464      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34465      || as_fn_error $? "could not create -" "$LINENO" 5
34466  fi
34467 ;;
34468
34469
34470  esac
34471
34472done # for ac_tag
34473
34474
34475as_fn_exit 0
34476_ACEOF
34477ac_clean_files=$ac_clean_files_save
34478
34479test $ac_write_fail = 0 ||
34480  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34481
34482
34483# configure is writing to config.log, and then calls config.status.
34484# config.status does its own redirection, appending to config.log.
34485# Unfortunately, on DOS this fails, as config.log is still kept open
34486# by configure, so config.status won't be able to write to it; its
34487# output is simply discarded.  So we exec the FD to /dev/null,
34488# effectively closing config.log, so it can be properly (re)opened and
34489# appended to by config.status.  When coming back to configure, we
34490# need to make the FD available again.
34491if test "$no_create" != yes; then
34492  ac_cs_success=:
34493  ac_config_status_args=
34494  test "$silent" = yes &&
34495    ac_config_status_args="$ac_config_status_args --quiet"
34496  exec 5>/dev/null
34497  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34498  exec 5>>config.log
34499  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34500  # would make configure fail if this is the last instruction.
34501  $ac_cs_success || as_fn_exit 1
34502fi
34503if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34504  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34505$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34506fi
34507
34508
34509# Try to move the config.log file to the output directory.
34510if test -e ./config.log; then
34511  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34512fi
34513
34514# Make the compare script executable
34515$CHMOD +x $OUTPUT_ROOT/compare.sh
34516
34517# Finally output some useful information to the user
34518
34519  # Finally output some useful information to the user
34520
34521  if test "x$CCACHE_FOUND" != x; then
34522    if  test "x$HAS_GOOD_CCACHE" = x; then
34523      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34524      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34525    else
34526      CCACHE_STATUS="installed and in use"
34527    fi
34528  else
34529    if test "x$GCC" = xyes; then
34530      CCACHE_STATUS="not installed (consider installing)"
34531      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34532    else
34533      CCACHE_STATUS="not available for your system"
34534    fi
34535  fi
34536
34537  printf "\n"
34538  printf "====================================================\n"
34539  printf "A new configuration has been successfully created in\n"
34540  printf "$OUTPUT_ROOT\n"
34541  if test "x$CONFIGURE_COMMAND_LINE" != x; then
34542    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34543  else
34544    printf "using default settings.\n"
34545  fi
34546
34547  printf "\n"
34548  printf "Configuration summary:\n"
34549  printf "* Debug level:    $DEBUG_LEVEL\n"
34550  printf "* JDK variant:    $JDK_VARIANT\n"
34551  printf "* JVM variants:   $with_jvm_variants\n"
34552  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34553
34554  printf "\n"
34555  printf "Tools summary:\n"
34556  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34557    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34558  fi
34559  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34560  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34561  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34562
34563  printf "\n"
34564  printf "Build performance summary:\n"
34565  printf "* Cores to use:   $JOBS\n"
34566  printf "* Memory limit:   $MEMORY_SIZE MB\n"
34567  printf "* ccache status:  $CCACHE_STATUS\n"
34568  printf "\n"
34569
34570  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34571    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34572    printf "$CCACHE_HELP_MSG\n"
34573
34574  # Print a helpful message on how to acquire the necessary build dependency.
34575  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34576  MISSING_DEPENDENCY=ccache
34577  PKGHANDLER_COMMAND=
34578
34579  case $PKGHANDLER in
34580    apt-get)
34581      apt_help     $MISSING_DEPENDENCY ;;
34582    yum)
34583      yum_help     $MISSING_DEPENDENCY ;;
34584    port)
34585      port_help    $MISSING_DEPENDENCY ;;
34586    pkgutil)
34587      pkgutil_help $MISSING_DEPENDENCY ;;
34588    pkgadd)
34589      pkgadd_help  $MISSING_DEPENDENCY ;;
34590    * )
34591      break ;;
34592  esac
34593
34594  if test "x$PKGHANDLER_COMMAND" != x; then
34595    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34596  fi
34597
34598    printf "$HELP_MSG\n"
34599    printf "\n"
34600  fi
34601
34602  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34603    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34604    printf "will result in longer build times.\n"
34605    printf "\n"
34606  fi
34607
34608  if test "x$FOUND_ALT_VARIABLES" != "x"; then
34609    printf "WARNING: You have old-style ALT_ environment variables set.\n"
34610    printf "These are not respected, and will be ignored. It is recommended\n"
34611    printf "that you clean your environment. The following variables are set:\n"
34612    printf "$FOUND_ALT_VARIABLES\n"
34613    printf "\n"
34614  fi
34615
34616  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34617    printf "WARNING: Your build output directory is not on a local disk.\n"
34618    printf "This will severely degrade build performance!\n"
34619    printf "It is recommended that you create an output directory on a local disk,\n"
34620    printf "and run the configure script again from that directory.\n"
34621    printf "\n"
34622  fi
34623
34624  if test "x$IS_RECONFIGURE" = "xyes"; then
34625    printf "WARNING: The result of this configuration has overridden an older\n"
34626    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34627    printf "proper build. Failure to do so might result in strange build problems.\n"
34628    printf "\n"
34629  fi
34630
34631