generated-configure.sh revision 944:e885c762cedd
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
669USING_BROKEN_SUSE_LD
670COMPILER_SUPPORTS_TARGET_BITS_FLAG
671ZERO_ARCHFLAG
672LDFLAGS_CXX_JDK
673LDFLAGS_JDKEXE_SUFFIX
674LDFLAGS_JDKLIB_SUFFIX
675LDFLAGS_JDKEXE
676LDFLAGS_JDKLIB
677CXXFLAGS_JDKEXE
678CXXFLAGS_JDKLIB
679CFLAGS_JDKEXE
680CFLAGS_JDKLIB
681MACOSX_VERSION_MIN
682PACKAGE_PATH
683LEGACY_EXTRA_LDFLAGS
684LEGACY_EXTRA_CXXFLAGS
685LEGACY_EXTRA_CFLAGS
686CXX_FLAG_DEPS
687C_FLAG_DEPS
688CXX_O_FLAG_NONE
689CXX_O_FLAG_NORM
690CXX_O_FLAG_HI
691CXX_O_FLAG_HIGHEST
692C_O_FLAG_NONE
693C_O_FLAG_NORM
694C_O_FLAG_HI
695C_O_FLAG_HIGHEST
696POST_MCS_CMD
697POST_STRIP_CMD
698SET_EXECUTABLE_ORIGIN
699SET_SHARED_LIBRARY_ORIGIN
700CXX_FLAG_REORDER
701C_FLAG_REORDER
702SET_SHARED_LIBRARY_MAPFILE
703SET_SHARED_LIBRARY_NAME
704SHARED_LIBRARY_FLAGS
705EXE_SUFFIX
706STATIC_LIBRARY_SUFFIX
707SHARED_LIBRARY_SUFFIX
708LIBRARY_PREFIX
709STATIC_LIBRARY
710SHARED_LIBRARY
711OBJ_SUFFIX
712COMPILER_NAME
713TARGET_BITS_FLAG
714JT_HOME
715JTREGEXE
716LIPO
717ac_ct_OBJDUMP
718OBJDUMP
719ac_ct_OBJCOPY
720OBJCOPY
721MCS
722STRIP
723GNM
724NM
725AS
726CXXCPP
727CPP
728COMPILER_TYPE
729RC_FLAGS
730DUMPBIN
731WINAR
732HOTSPOT_RC
733HOTSPOT_MT
734RC
735MT
736WINLD
737HOTSPOT_LD
738HOTSPOT_CXX
739ARFLAGS
740AR
741LDEXECXX
742LDCXX
743LDEXE
744LD
745ac_ct_OBJC
746OBJCFLAGS
747OBJC
748ac_ct_CXX
749CXXFLAGS
750CXX
751ac_ct_PROPER_COMPILER_CXX
752PROPER_COMPILER_CXX
753POTENTIAL_CXX
754TOOLS_DIR_CXX
755OBJEXT
756EXEEXT
757ac_ct_CC
758CPPFLAGS
759LDFLAGS
760CFLAGS
761CC
762ac_ct_PROPER_COMPILER_CC
763PROPER_COMPILER_CC
764POTENTIAL_CC
765TOOLS_DIR_CC
766BUILD_LD
767BUILD_CXX
768BUILD_CC
769MSVCR_DLL
770DXSDK_INCLUDE_PATH
771DXSDK_LIB_PATH
772VS_PATH
773VS_LIB
774VS_INCLUDE
775CYGWIN_LINK
776AR_OUT_OPTION
777LD_OUT_OPTION
778EXE_OUT_OPTION
779CC_OUT_OPTION
780BUILD_HOTSPOT
781HOTSPOT_DIST
782BUILD_OUTPUT
783OVERRIDE_SRC_ROOT
784ADD_SRC_ROOT
785JDK_TOPDIR
786NASHORN_TOPDIR
787HOTSPOT_TOPDIR
788JAXWS_TOPDIR
789JAXP_TOPDIR
790CORBA_TOPDIR
791LANGTOOLS_TOPDIR
792BOOT_JDK_JVMARGS
793JAVAC_FLAGS
794BOOT_JDK_SOURCETARGET
795BOOT_JDK
796BOOT_TOOLSJAR
797BOOT_RTJAR
798JAVA_CHECK
799JAVAC_CHECK
800COOKED_BUILD_NUMBER
801JDK_VERSION
802COPYRIGHT_YEAR
803MACOSX_BUNDLE_ID_BASE
804MACOSX_BUNDLE_NAME_BASE
805COMPANY_NAME
806JDK_RC_PLATFORM_NAME
807PRODUCT_SUFFIX
808PRODUCT_NAME
809LAUNCHER_NAME
810MILESTONE
811JDK_BUILD_NUMBER
812JDK_UPDATE_VERSION
813JDK_MICRO_VERSION
814JDK_MINOR_VERSION
815JDK_MAJOR_VERSION
816USER_RELEASE_SUFFIX
817COMPRESS_JARS
818UNLIMITED_CRYPTO
819CACERTS_FILE
820TEST_IN_BUILD
821BUILD_HEADLESS
822SUPPORT_HEADFUL
823SUPPORT_HEADLESS
824BDEPS_FTP
825BDEPS_UNZIP
826OS_VERSION_MICRO
827OS_VERSION_MINOR
828OS_VERSION_MAJOR
829PKG_CONFIG
830CODESIGN
831XATTR
832IS_GNU_TIME
833TIME
834STAT
835HG
836READELF
837OTOOL
838LDD
839ZIP
840UNZIP
841FIND_DELETE
842MAKE
843CHECK_TOOLSDIR_MAKE
844CHECK_TOOLSDIR_GMAKE
845CHECK_MAKE
846CHECK_GMAKE
847PKGHANDLER
848OUTPUT_ROOT
849CONF_NAME
850SPEC
851BUILD_VARIANT_RELEASE
852DEBUG_CLASSFILES
853FASTDEBUG
854VARIANT
855DEBUG_LEVEL
856MACOSX_UNIVERSAL
857INCLUDE_SA
858JVM_VARIANT_CORE
859JVM_VARIANT_ZEROSHARK
860JVM_VARIANT_ZERO
861JVM_VARIANT_KERNEL
862JVM_VARIANT_MINIMAL1
863JVM_VARIANT_CLIENT
864JVM_VARIANT_SERVER
865JVM_VARIANTS
866JVM_INTERPRETER
867JDK_VARIANT
868SET_OPENJDK
869BUILD_LOG_WRAPPER
870BUILD_LOG_PREVIOUS
871BUILD_LOG
872SYS_ROOT
873PATH_SEP
874SRC_ROOT
875ZERO_ARCHDEF
876DEFINE_CROSS_COMPILE_ARCH
877LP64
878OPENJDK_TARGET_OS_API_DIR
879OPENJDK_TARGET_CPU_JLI_CFLAGS
880OPENJDK_TARGET_CPU_OSARCH
881OPENJDK_TARGET_CPU_ISADIR
882OPENJDK_TARGET_CPU_LIBDIR
883OPENJDK_TARGET_CPU_LEGACY_LIB
884OPENJDK_TARGET_CPU_LEGACY
885REQUIRED_OS_VERSION
886REQUIRED_OS_NAME
887COMPILE_TYPE
888OPENJDK_TARGET_CPU_ENDIAN
889OPENJDK_TARGET_CPU_BITS
890OPENJDK_TARGET_CPU_ARCH
891OPENJDK_TARGET_CPU
892OPENJDK_TARGET_OS_API
893OPENJDK_TARGET_OS
894OPENJDK_BUILD_CPU_ENDIAN
895OPENJDK_BUILD_CPU_BITS
896OPENJDK_BUILD_CPU_ARCH
897OPENJDK_BUILD_CPU
898OPENJDK_BUILD_OS_API
899OPENJDK_BUILD_OS
900OPENJDK_BUILD_AUTOCONF_NAME
901OPENJDK_TARGET_AUTOCONF_NAME
902target_os
903target_vendor
904target_cpu
905target
906host_os
907host_vendor
908host_cpu
909host
910build_os
911build_vendor
912build_cpu
913build
914SETFILE
915DF
916READLINK
917CYGPATH
918NAWK
919SED
920FGREP
921EGREP
922GREP
923AWK
924XARGS
925WHICH
926WC
927UNIQ
928UNAME
929TR
930TOUCH
931TEE
932TAR
933TAIL
934SORT
935SH
936RM
937PRINTF
938MV
939MKTEMP
940MKDIR
941LS
942LN
943HEAD
944FIND
945FILE
946EXPR
947ECHO
948DIRNAME
949DIFF
950DATE
951CUT
952CPIO
953CP
954COMM
955CMP
956CHMOD
957CAT
958BASH
959BASENAME
960DATE_WHEN_CONFIGURED
961CONFIGURE_COMMAND_LINE
962CUSTOM_MAKE_DIR
963target_alias
964host_alias
965build_alias
966LIBS
967ECHO_T
968ECHO_N
969ECHO_C
970DEFS
971mandir
972localedir
973libdir
974psdir
975pdfdir
976dvidir
977htmldir
978infodir
979docdir
980oldincludedir
981includedir
982localstatedir
983sharedstatedir
984sysconfdir
985datadir
986datarootdir
987libexecdir
988sbindir
989bindir
990program_transform_name
991prefix
992exec_prefix
993PACKAGE_URL
994PACKAGE_BUGREPORT
995PACKAGE_STRING
996PACKAGE_VERSION
997PACKAGE_TARNAME
998PACKAGE_NAME
999PATH_SEPARATOR
1000SHELL'
1001ac_subst_files=''
1002ac_user_opts='
1003enable_option_checking
1004with_custom_make_dir
1005with_target_bits
1006with_sys_root
1007with_tools_dir
1008with_devkit
1009enable_openjdk_only
1010with_jdk_variant
1011with_jvm_interpreter
1012with_jvm_variants
1013enable_debug
1014with_debug_level
1015with_conf_name
1016with_builddeps_conf
1017with_builddeps_server
1018with_builddeps_dir
1019with_builddeps_group
1020enable_headful
1021enable_hotspot_test_in_build
1022with_cacerts_file
1023enable_unlimited_crypto
1024with_milestone
1025with_update_version
1026with_build_number
1027with_user_release_suffix
1028with_boot_jdk
1029with_boot_jdk_jvmargs
1030with_add_source_root
1031with_override_source_root
1032with_adds_and_overrides
1033with_override_langtools
1034with_override_corba
1035with_override_jaxp
1036with_override_jaxws
1037with_override_hotspot
1038with_override_jdk
1039with_import_hotspot
1040with_msvcr_dll
1041with_dxsdk
1042with_dxsdk_lib
1043with_dxsdk_include
1044with_jtreg
1045with_extra_cflags
1046with_extra_cxxflags
1047with_extra_ldflags
1048enable_debug_symbols
1049enable_zip_debug_info
1050enable_macosx_runtime_support
1051with_x
1052with_cups
1053with_cups_include
1054with_freetype
1055with_alsa
1056with_alsa_include
1057with_alsa_lib
1058with_giflib
1059with_zlib
1060with_stdc__lib
1061with_num_cores
1062with_memory_size
1063with_jobs
1064with_sjavac_server_java
1065enable_sjavac
1066enable_precompiled_headers
1067enable_ccache
1068with_ccache_dir
1069'
1070      ac_precious_vars='build_alias
1071host_alias
1072target_alias
1073PKG_CONFIG
1074CC
1075CFLAGS
1076LDFLAGS
1077LIBS
1078CPPFLAGS
1079CXX
1080CXXFLAGS
1081CCC
1082OBJC
1083OBJCFLAGS
1084CPP
1085CXXCPP
1086XMKMF
1087FREETYPE2_CFLAGS
1088FREETYPE2_LIBS
1089ALSA_CFLAGS
1090ALSA_LIBS
1091LIBFFI_CFLAGS
1092LIBFFI_LIBS'
1093
1094
1095# Initialize some variables set by options.
1096ac_init_help=
1097ac_init_version=false
1098ac_unrecognized_opts=
1099ac_unrecognized_sep=
1100# The variables have the same names as the options, with
1101# dashes changed to underlines.
1102cache_file=/dev/null
1103exec_prefix=NONE
1104no_create=
1105no_recursion=
1106prefix=NONE
1107program_prefix=NONE
1108program_suffix=NONE
1109program_transform_name=s,x,x,
1110silent=
1111site=
1112srcdir=
1113verbose=
1114x_includes=NONE
1115x_libraries=NONE
1116
1117# Installation directory options.
1118# These are left unexpanded so users can "make install exec_prefix=/foo"
1119# and all the variables that are supposed to be based on exec_prefix
1120# by default will actually change.
1121# Use braces instead of parens because sh, perl, etc. also accept them.
1122# (The list follows the same order as the GNU Coding Standards.)
1123bindir='${exec_prefix}/bin'
1124sbindir='${exec_prefix}/sbin'
1125libexecdir='${exec_prefix}/libexec'
1126datarootdir='${prefix}/share'
1127datadir='${datarootdir}'
1128sysconfdir='${prefix}/etc'
1129sharedstatedir='${prefix}/com'
1130localstatedir='${prefix}/var'
1131includedir='${prefix}/include'
1132oldincludedir='/usr/include'
1133docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1134infodir='${datarootdir}/info'
1135htmldir='${docdir}'
1136dvidir='${docdir}'
1137pdfdir='${docdir}'
1138psdir='${docdir}'
1139libdir='${exec_prefix}/lib'
1140localedir='${datarootdir}/locale'
1141mandir='${datarootdir}/man'
1142
1143ac_prev=
1144ac_dashdash=
1145for ac_option
1146do
1147  # If the previous option needs an argument, assign it.
1148  if test -n "$ac_prev"; then
1149    eval $ac_prev=\$ac_option
1150    ac_prev=
1151    continue
1152  fi
1153
1154  case $ac_option in
1155  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1156  *=)   ac_optarg= ;;
1157  *)    ac_optarg=yes ;;
1158  esac
1159
1160  # Accept the important Cygnus configure options, so we can diagnose typos.
1161
1162  case $ac_dashdash$ac_option in
1163  --)
1164    ac_dashdash=yes ;;
1165
1166  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1167    ac_prev=bindir ;;
1168  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1169    bindir=$ac_optarg ;;
1170
1171  -build | --build | --buil | --bui | --bu)
1172    ac_prev=build_alias ;;
1173  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1174    build_alias=$ac_optarg ;;
1175
1176  -cache-file | --cache-file | --cache-fil | --cache-fi \
1177  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1178    ac_prev=cache_file ;;
1179  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1180  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1181    cache_file=$ac_optarg ;;
1182
1183  --config-cache | -C)
1184    cache_file=config.cache ;;
1185
1186  -datadir | --datadir | --datadi | --datad)
1187    ac_prev=datadir ;;
1188  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1189    datadir=$ac_optarg ;;
1190
1191  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1192  | --dataroo | --dataro | --datar)
1193    ac_prev=datarootdir ;;
1194  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1195  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1196    datarootdir=$ac_optarg ;;
1197
1198  -disable-* | --disable-*)
1199    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1200    # Reject names that are not valid shell variable names.
1201    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1202      as_fn_error $? "invalid feature name: $ac_useropt"
1203    ac_useropt_orig=$ac_useropt
1204    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205    case $ac_user_opts in
1206      *"
1207"enable_$ac_useropt"
1208"*) ;;
1209      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1210	 ac_unrecognized_sep=', ';;
1211    esac
1212    eval enable_$ac_useropt=no ;;
1213
1214  -docdir | --docdir | --docdi | --doc | --do)
1215    ac_prev=docdir ;;
1216  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1217    docdir=$ac_optarg ;;
1218
1219  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1220    ac_prev=dvidir ;;
1221  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1222    dvidir=$ac_optarg ;;
1223
1224  -enable-* | --enable-*)
1225    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1226    # Reject names that are not valid shell variable names.
1227    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1228      as_fn_error $? "invalid feature name: $ac_useropt"
1229    ac_useropt_orig=$ac_useropt
1230    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1231    case $ac_user_opts in
1232      *"
1233"enable_$ac_useropt"
1234"*) ;;
1235      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1236	 ac_unrecognized_sep=', ';;
1237    esac
1238    eval enable_$ac_useropt=\$ac_optarg ;;
1239
1240  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1241  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1242  | --exec | --exe | --ex)
1243    ac_prev=exec_prefix ;;
1244  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1245  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1246  | --exec=* | --exe=* | --ex=*)
1247    exec_prefix=$ac_optarg ;;
1248
1249  -gas | --gas | --ga | --g)
1250    # Obsolete; use --with-gas.
1251    with_gas=yes ;;
1252
1253  -help | --help | --hel | --he | -h)
1254    ac_init_help=long ;;
1255  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1256    ac_init_help=recursive ;;
1257  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1258    ac_init_help=short ;;
1259
1260  -host | --host | --hos | --ho)
1261    ac_prev=host_alias ;;
1262  -host=* | --host=* | --hos=* | --ho=*)
1263    host_alias=$ac_optarg ;;
1264
1265  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1266    ac_prev=htmldir ;;
1267  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1268  | --ht=*)
1269    htmldir=$ac_optarg ;;
1270
1271  -includedir | --includedir | --includedi | --included | --include \
1272  | --includ | --inclu | --incl | --inc)
1273    ac_prev=includedir ;;
1274  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1275  | --includ=* | --inclu=* | --incl=* | --inc=*)
1276    includedir=$ac_optarg ;;
1277
1278  -infodir | --infodir | --infodi | --infod | --info | --inf)
1279    ac_prev=infodir ;;
1280  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1281    infodir=$ac_optarg ;;
1282
1283  -libdir | --libdir | --libdi | --libd)
1284    ac_prev=libdir ;;
1285  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1286    libdir=$ac_optarg ;;
1287
1288  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1289  | --libexe | --libex | --libe)
1290    ac_prev=libexecdir ;;
1291  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1292  | --libexe=* | --libex=* | --libe=*)
1293    libexecdir=$ac_optarg ;;
1294
1295  -localedir | --localedir | --localedi | --localed | --locale)
1296    ac_prev=localedir ;;
1297  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1298    localedir=$ac_optarg ;;
1299
1300  -localstatedir | --localstatedir | --localstatedi | --localstated \
1301  | --localstate | --localstat | --localsta | --localst | --locals)
1302    ac_prev=localstatedir ;;
1303  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1304  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1305    localstatedir=$ac_optarg ;;
1306
1307  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1308    ac_prev=mandir ;;
1309  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1310    mandir=$ac_optarg ;;
1311
1312  -nfp | --nfp | --nf)
1313    # Obsolete; use --without-fp.
1314    with_fp=no ;;
1315
1316  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1317  | --no-cr | --no-c | -n)
1318    no_create=yes ;;
1319
1320  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1321  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1322    no_recursion=yes ;;
1323
1324  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1325  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1326  | --oldin | --oldi | --old | --ol | --o)
1327    ac_prev=oldincludedir ;;
1328  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1329  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1330  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1331    oldincludedir=$ac_optarg ;;
1332
1333  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1334    ac_prev=prefix ;;
1335  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1336    prefix=$ac_optarg ;;
1337
1338  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1339  | --program-pre | --program-pr | --program-p)
1340    ac_prev=program_prefix ;;
1341  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1342  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1343    program_prefix=$ac_optarg ;;
1344
1345  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1346  | --program-suf | --program-su | --program-s)
1347    ac_prev=program_suffix ;;
1348  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1349  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1350    program_suffix=$ac_optarg ;;
1351
1352  -program-transform-name | --program-transform-name \
1353  | --program-transform-nam | --program-transform-na \
1354  | --program-transform-n | --program-transform- \
1355  | --program-transform | --program-transfor \
1356  | --program-transfo | --program-transf \
1357  | --program-trans | --program-tran \
1358  | --progr-tra | --program-tr | --program-t)
1359    ac_prev=program_transform_name ;;
1360  -program-transform-name=* | --program-transform-name=* \
1361  | --program-transform-nam=* | --program-transform-na=* \
1362  | --program-transform-n=* | --program-transform-=* \
1363  | --program-transform=* | --program-transfor=* \
1364  | --program-transfo=* | --program-transf=* \
1365  | --program-trans=* | --program-tran=* \
1366  | --progr-tra=* | --program-tr=* | --program-t=*)
1367    program_transform_name=$ac_optarg ;;
1368
1369  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1370    ac_prev=pdfdir ;;
1371  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1372    pdfdir=$ac_optarg ;;
1373
1374  -psdir | --psdir | --psdi | --psd | --ps)
1375    ac_prev=psdir ;;
1376  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1377    psdir=$ac_optarg ;;
1378
1379  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1380  | -silent | --silent | --silen | --sile | --sil)
1381    silent=yes ;;
1382
1383  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1384    ac_prev=sbindir ;;
1385  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1386  | --sbi=* | --sb=*)
1387    sbindir=$ac_optarg ;;
1388
1389  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1390  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1391  | --sharedst | --shareds | --shared | --share | --shar \
1392  | --sha | --sh)
1393    ac_prev=sharedstatedir ;;
1394  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1395  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1396  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1397  | --sha=* | --sh=*)
1398    sharedstatedir=$ac_optarg ;;
1399
1400  -site | --site | --sit)
1401    ac_prev=site ;;
1402  -site=* | --site=* | --sit=*)
1403    site=$ac_optarg ;;
1404
1405  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1406    ac_prev=srcdir ;;
1407  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1408    srcdir=$ac_optarg ;;
1409
1410  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1411  | --syscon | --sysco | --sysc | --sys | --sy)
1412    ac_prev=sysconfdir ;;
1413  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1414  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1415    sysconfdir=$ac_optarg ;;
1416
1417  -target | --target | --targe | --targ | --tar | --ta | --t)
1418    ac_prev=target_alias ;;
1419  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1420    target_alias=$ac_optarg ;;
1421
1422  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1423    verbose=yes ;;
1424
1425  -version | --version | --versio | --versi | --vers | -V)
1426    ac_init_version=: ;;
1427
1428  -with-* | --with-*)
1429    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1430    # Reject names that are not valid shell variable names.
1431    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1432      as_fn_error $? "invalid package name: $ac_useropt"
1433    ac_useropt_orig=$ac_useropt
1434    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1435    case $ac_user_opts in
1436      *"
1437"with_$ac_useropt"
1438"*) ;;
1439      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1440	 ac_unrecognized_sep=', ';;
1441    esac
1442    eval with_$ac_useropt=\$ac_optarg ;;
1443
1444  -without-* | --without-*)
1445    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1446    # Reject names that are not valid shell variable names.
1447    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1448      as_fn_error $? "invalid package name: $ac_useropt"
1449    ac_useropt_orig=$ac_useropt
1450    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1451    case $ac_user_opts in
1452      *"
1453"with_$ac_useropt"
1454"*) ;;
1455      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1456	 ac_unrecognized_sep=', ';;
1457    esac
1458    eval with_$ac_useropt=no ;;
1459
1460  --x)
1461    # Obsolete; use --with-x.
1462    with_x=yes ;;
1463
1464  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1465  | --x-incl | --x-inc | --x-in | --x-i)
1466    ac_prev=x_includes ;;
1467  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1468  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1469    x_includes=$ac_optarg ;;
1470
1471  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1472  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1473    ac_prev=x_libraries ;;
1474  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1475  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1476    x_libraries=$ac_optarg ;;
1477
1478  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1479Try \`$0 --help' for more information"
1480    ;;
1481
1482  *=*)
1483    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1484    # Reject names that are not valid shell variable names.
1485    case $ac_envvar in #(
1486      '' | [0-9]* | *[!_$as_cr_alnum]* )
1487      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1488    esac
1489    eval $ac_envvar=\$ac_optarg
1490    export $ac_envvar ;;
1491
1492  *)
1493    # FIXME: should be removed in autoconf 3.0.
1494    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1495    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1496      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1497    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1498    ;;
1499
1500  esac
1501done
1502
1503if test -n "$ac_prev"; then
1504  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1505  as_fn_error $? "missing argument to $ac_option"
1506fi
1507
1508if test -n "$ac_unrecognized_opts"; then
1509  case $enable_option_checking in
1510    no) ;;
1511    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1512    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1513  esac
1514fi
1515
1516# Check all directory arguments for consistency.
1517for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1518		datadir sysconfdir sharedstatedir localstatedir includedir \
1519		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1520		libdir localedir mandir
1521do
1522  eval ac_val=\$$ac_var
1523  # Remove trailing slashes.
1524  case $ac_val in
1525    */ )
1526      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1527      eval $ac_var=\$ac_val;;
1528  esac
1529  # Be sure to have absolute directory names.
1530  case $ac_val in
1531    [\\/$]* | ?:[\\/]* )  continue;;
1532    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1533  esac
1534  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1535done
1536
1537# There might be people who depend on the old broken behavior: `$host'
1538# used to hold the argument of --host etc.
1539# FIXME: To remove some day.
1540build=$build_alias
1541host=$host_alias
1542target=$target_alias
1543
1544# FIXME: To remove some day.
1545if test "x$host_alias" != x; then
1546  if test "x$build_alias" = x; then
1547    cross_compiling=maybe
1548  elif test "x$build_alias" != "x$host_alias"; then
1549    cross_compiling=yes
1550  fi
1551fi
1552
1553ac_tool_prefix=
1554test -n "$host_alias" && ac_tool_prefix=$host_alias-
1555
1556test "$silent" = yes && exec 6>/dev/null
1557
1558
1559ac_pwd=`pwd` && test -n "$ac_pwd" &&
1560ac_ls_di=`ls -di .` &&
1561ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1562  as_fn_error $? "working directory cannot be determined"
1563test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1564  as_fn_error $? "pwd does not report name of working directory"
1565
1566
1567# Find the source files, if location was not specified.
1568if test -z "$srcdir"; then
1569  ac_srcdir_defaulted=yes
1570  # Try the directory containing this script, then the parent directory.
1571  ac_confdir=`$as_dirname -- "$as_myself" ||
1572$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1573	 X"$as_myself" : 'X\(//\)[^/]' \| \
1574	 X"$as_myself" : 'X\(//\)$' \| \
1575	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1576$as_echo X"$as_myself" |
1577    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1578	    s//\1/
1579	    q
1580	  }
1581	  /^X\(\/\/\)[^/].*/{
1582	    s//\1/
1583	    q
1584	  }
1585	  /^X\(\/\/\)$/{
1586	    s//\1/
1587	    q
1588	  }
1589	  /^X\(\/\).*/{
1590	    s//\1/
1591	    q
1592	  }
1593	  s/.*/./; q'`
1594  srcdir=$ac_confdir
1595  if test ! -r "$srcdir/$ac_unique_file"; then
1596    srcdir=..
1597  fi
1598else
1599  ac_srcdir_defaulted=no
1600fi
1601if test ! -r "$srcdir/$ac_unique_file"; then
1602  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1603  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1604fi
1605ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1606ac_abs_confdir=`(
1607	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1608	pwd)`
1609# When building in place, set srcdir=.
1610if test "$ac_abs_confdir" = "$ac_pwd"; then
1611  srcdir=.
1612fi
1613# Remove unnecessary trailing slashes from srcdir.
1614# Double slashes in file names in object file debugging info
1615# mess up M-x gdb in Emacs.
1616case $srcdir in
1617*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1618esac
1619for ac_var in $ac_precious_vars; do
1620  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1621  eval ac_env_${ac_var}_value=\$${ac_var}
1622  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1623  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1624done
1625
1626#
1627# Report the --help message.
1628#
1629if test "$ac_init_help" = "long"; then
1630  # Omit some internal or obsolete options to make the list less imposing.
1631  # This message is too long to be a string in the A/UX 3.1 sh.
1632  cat <<_ACEOF
1633\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1634
1635Usage: $0 [OPTION]... [VAR=VALUE]...
1636
1637To assign environment variables (e.g., CC, CFLAGS...), specify them as
1638VAR=VALUE.  See below for descriptions of some of the useful variables.
1639
1640Defaults for the options are specified in brackets.
1641
1642Configuration:
1643  -h, --help              display this help and exit
1644      --help=short        display options specific to this package
1645      --help=recursive    display the short help of all the included packages
1646  -V, --version           display version information and exit
1647  -q, --quiet, --silent   do not print \`checking ...' messages
1648      --cache-file=FILE   cache test results in FILE [disabled]
1649  -C, --config-cache      alias for \`--cache-file=config.cache'
1650  -n, --no-create         do not create output files
1651      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1652
1653Installation directories:
1654  --prefix=PREFIX         install architecture-independent files in PREFIX
1655                          [$ac_default_prefix]
1656  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1657                          [PREFIX]
1658
1659By default, \`make install' will install all the files in
1660\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1661an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1662for instance \`--prefix=\$HOME'.
1663
1664For better control, use the options below.
1665
1666Fine tuning of the installation directories:
1667  --bindir=DIR            user executables [EPREFIX/bin]
1668  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1669  --libexecdir=DIR        program executables [EPREFIX/libexec]
1670  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1671  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1672  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1673  --libdir=DIR            object code libraries [EPREFIX/lib]
1674  --includedir=DIR        C header files [PREFIX/include]
1675  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1676  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1677  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1678  --infodir=DIR           info documentation [DATAROOTDIR/info]
1679  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1680  --mandir=DIR            man documentation [DATAROOTDIR/man]
1681  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1682  --htmldir=DIR           html documentation [DOCDIR]
1683  --dvidir=DIR            dvi documentation [DOCDIR]
1684  --pdfdir=DIR            pdf documentation [DOCDIR]
1685  --psdir=DIR             ps documentation [DOCDIR]
1686_ACEOF
1687
1688  cat <<\_ACEOF
1689
1690X features:
1691  --x-includes=DIR    X include files are in DIR
1692  --x-libraries=DIR   X library files are in DIR
1693
1694System types:
1695  --build=BUILD     configure for building on BUILD [guessed]
1696  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1697  --target=TARGET   configure for building compilers for TARGET [HOST]
1698_ACEOF
1699fi
1700
1701if test -n "$ac_init_help"; then
1702  case $ac_init_help in
1703     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1704   esac
1705  cat <<\_ACEOF
1706
1707Optional Features:
1708  --disable-option-checking  ignore unrecognized --enable/--with options
1709  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1710  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1711  --enable-openjdk-only   suppress building custom source even if present
1712                          [disabled]
1713  --enable-debug          set the debug level to fastdebug (shorthand for
1714                          --with-debug-level=fastdebug) [disabled]
1715  --disable-headful       disable building headful support (graphical UI
1716                          support) [enabled]
1717  --enable-hotspot-test-in-build
1718                          run the Queens test after Hotspot build [disabled]
1719  --enable-unlimited-crypto
1720                          Enable unlimited crypto policy [disabled]
1721  --disable-debug-symbols disable generation of debug symbols [enabled]
1722  --disable-zip-debug-info
1723                          disable zipping of debug-info files [enabled]
1724  --disable-macosx-runtime-support
1725                          disable the use of MacOSX Java runtime support
1726                          framework [enabled]
1727  --enable-sjavac         use sjavac to do fast incremental compiles
1728                          [disabled]
1729  --disable-precompiled-headers
1730                          disable using precompiled headers when compiling C++
1731                          [enabled]
1732  --disable-ccache        disable using ccache to speed up recompilations
1733                          [enabled]
1734
1735Optional Packages:
1736  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1737  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1738  --with-custom-make-dir  use this directory for custom build/make files
1739  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1740                          support it), e.g. --with-target-bits=32 [guessed]
1741  --with-sys-root         pass this sys-root to the compilers and tools (for
1742                          cross-compiling)
1743  --with-tools-dir        search this directory for compilers and tools (for
1744                          cross-compiling)
1745  --with-devkit           use this directory as base for tools-dir and
1746                          sys-root (for cross-compiling)
1747  --with-jdk-variant      JDK variant to build (normal) [normal]
1748  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1749  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1750                          client, minimal1, kernel, zero, zeroshark, core)
1751                          [server]
1752  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1753                          [release]
1754  --with-conf-name        use this as the name of the configuration [generated
1755                          from important configuration options]
1756  --with-builddeps-conf   use this configuration file for the builddeps
1757  --with-builddeps-server download and use build dependencies from this server
1758                          url
1759  --with-builddeps-dir    store downloaded build dependencies here
1760                          [/localhome/builddeps]
1761  --with-builddeps-group  chgrp the downloaded build dependencies to this
1762                          group
1763  --with-cacerts-file     specify alternative cacerts file
1764  --with-milestone        Set milestone value for build [internal]
1765  --with-update-version   Set update version value for build [b00]
1766  --with-build-number     Set build number value for build [b00]
1767  --with-user-release-suffix
1768                          Add a custom string to the version string if build
1769                          number isn't set.[username_builddateb00]
1770  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1771  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1772                          invocations of the Boot JDK, overriding the default
1773                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1774                          -enableassertions"
1775  --with-add-source-root  for each and every source directory, look in this
1776                          additional source root for the same directory; if it
1777                          exists and have files in it, include it in the build
1778  --with-override-source-root
1779                          for each and every source directory, look in this
1780                          override source root for the same directory; if it
1781                          exists, use that directory instead and ignore the
1782                          directory in the original source root
1783  --with-adds-and-overrides
1784                          use the subdirs 'adds' and 'overrides' in the
1785                          specified directory as add-source-root and
1786                          override-source-root
1787  --with-override-langtools
1788                          use this langtools dir for the build
1789  --with-override-corba   use this corba dir for the build
1790  --with-override-jaxp    use this jaxp dir for the build
1791  --with-override-jaxws   use this jaxws dir for the build
1792  --with-override-hotspot use this hotspot dir for the build
1793  --with-override-jdk     use this jdk dir for the build
1794  --with-import-hotspot   import hotspot binaries from this jdk image or
1795                          hotspot build dist dir instead of building from
1796                          source
1797  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1798                          only) [probed]
1799  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1800  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1801                          [probed]
1802  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1803                          [probed]
1804  --with-jtreg            Regression Test Harness [probed]
1805  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1806  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1807  --with-extra-ldflags    extra flags to be used when linking jdk
1808  --with-x                use the X Window System
1809  --with-cups             specify prefix directory for the cups package
1810                          (expecting the headers under PATH/include)
1811  --with-cups-include     specify directory for the cups include files
1812  --with-freetype         specify prefix directory for the freetype2 package
1813                          (expecting the libraries under PATH/lib and the
1814                          headers under PATH/include)
1815  --with-alsa             specify prefix directory for the alsa package
1816                          (expecting the libraries under PATH/lib and the
1817                          headers under PATH/include)
1818  --with-alsa-include     specify directory for the alsa include files
1819  --with-alsa-lib         specify directory for the alsa library
1820  --with-giflib           use giflib from build system or OpenJDK source
1821                          (system, bundled) [bundled]
1822  --with-zlib             use zlib from build system or OpenJDK source
1823                          (system, bundled) [bundled]
1824  --with-stdc++lib=<static>,<dynamic>,<default>
1825                          force linking of the C++ runtime on Linux to either
1826                          static or dynamic, default is static with dynamic as
1827                          fallback
1828  --with-num-cores        number of cores in the build system, e.g.
1829                          --with-num-cores=8 [probed]
1830  --with-memory-size      memory (in MB) available in the build system, e.g.
1831                          --with-memory-size=1024 [probed]
1832  --with-jobs             number of parallel jobs to let make run [calculated
1833                          based on cores and memory]
1834  --with-sjavac-server-java
1835                          use this java binary for running the sjavac
1836                          background server [Boot JDK java]
1837  --with-ccache-dir       where to store ccache files [~/.ccache]
1838
1839Some influential environment variables:
1840  PKG_CONFIG  path to pkg-config utility
1841  CC          C compiler command
1842  CFLAGS      C compiler flags
1843  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1844              nonstandard directory <lib dir>
1845  LIBS        libraries to pass to the linker, e.g. -l<library>
1846  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1847              you have headers in a nonstandard directory <include dir>
1848  CXX         C++ compiler command
1849  CXXFLAGS    C++ compiler flags
1850  OBJC        Objective C compiler command
1851  OBJCFLAGS   Objective C compiler flags
1852  CPP         C preprocessor
1853  CXXCPP      C++ preprocessor
1854  XMKMF       Path to xmkmf, Makefile generator for X Window System
1855  FREETYPE2_CFLAGS
1856              C compiler flags for FREETYPE2, overriding pkg-config
1857  FREETYPE2_LIBS
1858              linker flags for FREETYPE2, overriding pkg-config
1859  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1860  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1861  LIBFFI_CFLAGS
1862              C compiler flags for LIBFFI, overriding pkg-config
1863  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1864
1865Use these variables to override the choices made by `configure' or to help
1866it to find libraries and programs with nonstandard names/locations.
1867
1868Report bugs to <build-dev@openjdk.java.net>.
1869OpenJDK home page: <http://openjdk.java.net>.
1870_ACEOF
1871ac_status=$?
1872fi
1873
1874if test "$ac_init_help" = "recursive"; then
1875  # If there are subdirs, report their specific --help.
1876  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1877    test -d "$ac_dir" ||
1878      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1879      continue
1880    ac_builddir=.
1881
1882case "$ac_dir" in
1883.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884*)
1885  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1886  # A ".." for each directory in $ac_dir_suffix.
1887  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1888  case $ac_top_builddir_sub in
1889  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1890  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1891  esac ;;
1892esac
1893ac_abs_top_builddir=$ac_pwd
1894ac_abs_builddir=$ac_pwd$ac_dir_suffix
1895# for backward compatibility:
1896ac_top_builddir=$ac_top_build_prefix
1897
1898case $srcdir in
1899  .)  # We are building in place.
1900    ac_srcdir=.
1901    ac_top_srcdir=$ac_top_builddir_sub
1902    ac_abs_top_srcdir=$ac_pwd ;;
1903  [\\/]* | ?:[\\/]* )  # Absolute name.
1904    ac_srcdir=$srcdir$ac_dir_suffix;
1905    ac_top_srcdir=$srcdir
1906    ac_abs_top_srcdir=$srcdir ;;
1907  *) # Relative name.
1908    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1909    ac_top_srcdir=$ac_top_build_prefix$srcdir
1910    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1911esac
1912ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1913
1914    cd "$ac_dir" || { ac_status=$?; continue; }
1915    # Check for guested configure.
1916    if test -f "$ac_srcdir/configure.gnu"; then
1917      echo &&
1918      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1919    elif test -f "$ac_srcdir/configure"; then
1920      echo &&
1921      $SHELL "$ac_srcdir/configure" --help=recursive
1922    else
1923      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1924    fi || ac_status=$?
1925    cd "$ac_pwd" || { ac_status=$?; break; }
1926  done
1927fi
1928
1929test -n "$ac_init_help" && exit $ac_status
1930if $ac_init_version; then
1931  cat <<\_ACEOF
1932OpenJDK configure jdk8
1933generated by GNU Autoconf 2.69
1934
1935Copyright (C) 2012 Free Software Foundation, Inc.
1936This configure script is free software; the Free Software Foundation
1937gives unlimited permission to copy, distribute and modify it.
1938_ACEOF
1939  exit
1940fi
1941
1942## ------------------------ ##
1943## Autoconf initialization. ##
1944## ------------------------ ##
1945
1946# ac_fn_c_try_compile LINENO
1947# --------------------------
1948# Try to compile conftest.$ac_ext, and return whether this succeeded.
1949ac_fn_c_try_compile ()
1950{
1951  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952  rm -f conftest.$ac_objext
1953  if { { ac_try="$ac_compile"
1954case "(($ac_try" in
1955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956  *) ac_try_echo=$ac_try;;
1957esac
1958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959$as_echo "$ac_try_echo"; } >&5
1960  (eval "$ac_compile") 2>conftest.err
1961  ac_status=$?
1962  if test -s conftest.err; then
1963    grep -v '^ *+' conftest.err >conftest.er1
1964    cat conftest.er1 >&5
1965    mv -f conftest.er1 conftest.err
1966  fi
1967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968  test $ac_status = 0; } && {
1969	 test -z "$ac_c_werror_flag" ||
1970	 test ! -s conftest.err
1971       } && test -s conftest.$ac_objext; then :
1972  ac_retval=0
1973else
1974  $as_echo "$as_me: failed program was:" >&5
1975sed 's/^/| /' conftest.$ac_ext >&5
1976
1977	ac_retval=1
1978fi
1979  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1980  as_fn_set_status $ac_retval
1981
1982} # ac_fn_c_try_compile
1983
1984# ac_fn_cxx_try_compile LINENO
1985# ----------------------------
1986# Try to compile conftest.$ac_ext, and return whether this succeeded.
1987ac_fn_cxx_try_compile ()
1988{
1989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990  rm -f conftest.$ac_objext
1991  if { { ac_try="$ac_compile"
1992case "(($ac_try" in
1993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1994  *) ac_try_echo=$ac_try;;
1995esac
1996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1997$as_echo "$ac_try_echo"; } >&5
1998  (eval "$ac_compile") 2>conftest.err
1999  ac_status=$?
2000  if test -s conftest.err; then
2001    grep -v '^ *+' conftest.err >conftest.er1
2002    cat conftest.er1 >&5
2003    mv -f conftest.er1 conftest.err
2004  fi
2005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2006  test $ac_status = 0; } && {
2007	 test -z "$ac_cxx_werror_flag" ||
2008	 test ! -s conftest.err
2009       } && test -s conftest.$ac_objext; then :
2010  ac_retval=0
2011else
2012  $as_echo "$as_me: failed program was:" >&5
2013sed 's/^/| /' conftest.$ac_ext >&5
2014
2015	ac_retval=1
2016fi
2017  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2018  as_fn_set_status $ac_retval
2019
2020} # ac_fn_cxx_try_compile
2021
2022# ac_fn_objc_try_compile LINENO
2023# -----------------------------
2024# Try to compile conftest.$ac_ext, and return whether this succeeded.
2025ac_fn_objc_try_compile ()
2026{
2027  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028  rm -f conftest.$ac_objext
2029  if { { ac_try="$ac_compile"
2030case "(($ac_try" in
2031  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2032  *) ac_try_echo=$ac_try;;
2033esac
2034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2035$as_echo "$ac_try_echo"; } >&5
2036  (eval "$ac_compile") 2>conftest.err
2037  ac_status=$?
2038  if test -s conftest.err; then
2039    grep -v '^ *+' conftest.err >conftest.er1
2040    cat conftest.er1 >&5
2041    mv -f conftest.er1 conftest.err
2042  fi
2043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2044  test $ac_status = 0; } && {
2045	 test -z "$ac_objc_werror_flag" ||
2046	 test ! -s conftest.err
2047       } && test -s conftest.$ac_objext; then :
2048  ac_retval=0
2049else
2050  $as_echo "$as_me: failed program was:" >&5
2051sed 's/^/| /' conftest.$ac_ext >&5
2052
2053	ac_retval=1
2054fi
2055  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2056  as_fn_set_status $ac_retval
2057
2058} # ac_fn_objc_try_compile
2059
2060# ac_fn_c_try_cpp LINENO
2061# ----------------------
2062# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2063ac_fn_c_try_cpp ()
2064{
2065  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066  if { { ac_try="$ac_cpp conftest.$ac_ext"
2067case "(($ac_try" in
2068  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2069  *) ac_try_echo=$ac_try;;
2070esac
2071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2072$as_echo "$ac_try_echo"; } >&5
2073  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2074  ac_status=$?
2075  if test -s conftest.err; then
2076    grep -v '^ *+' conftest.err >conftest.er1
2077    cat conftest.er1 >&5
2078    mv -f conftest.er1 conftest.err
2079  fi
2080  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2081  test $ac_status = 0; } > conftest.i && {
2082	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2083	 test ! -s conftest.err
2084       }; then :
2085  ac_retval=0
2086else
2087  $as_echo "$as_me: failed program was:" >&5
2088sed 's/^/| /' conftest.$ac_ext >&5
2089
2090    ac_retval=1
2091fi
2092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2093  as_fn_set_status $ac_retval
2094
2095} # ac_fn_c_try_cpp
2096
2097# ac_fn_cxx_try_cpp LINENO
2098# ------------------------
2099# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2100ac_fn_cxx_try_cpp ()
2101{
2102  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103  if { { ac_try="$ac_cpp conftest.$ac_ext"
2104case "(($ac_try" in
2105  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2106  *) ac_try_echo=$ac_try;;
2107esac
2108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2109$as_echo "$ac_try_echo"; } >&5
2110  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2111  ac_status=$?
2112  if test -s conftest.err; then
2113    grep -v '^ *+' conftest.err >conftest.er1
2114    cat conftest.er1 >&5
2115    mv -f conftest.er1 conftest.err
2116  fi
2117  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2118  test $ac_status = 0; } > conftest.i && {
2119	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2120	 test ! -s conftest.err
2121       }; then :
2122  ac_retval=0
2123else
2124  $as_echo "$as_me: failed program was:" >&5
2125sed 's/^/| /' conftest.$ac_ext >&5
2126
2127    ac_retval=1
2128fi
2129  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2130  as_fn_set_status $ac_retval
2131
2132} # ac_fn_cxx_try_cpp
2133
2134# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2135# ---------------------------------------------------------
2136# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2137# the include files in INCLUDES and setting the cache variable VAR
2138# accordingly.
2139ac_fn_cxx_check_header_mongrel ()
2140{
2141  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2142  if eval \${$3+:} false; then :
2143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2144$as_echo_n "checking for $2... " >&6; }
2145if eval \${$3+:} false; then :
2146  $as_echo_n "(cached) " >&6
2147fi
2148eval ac_res=\$$3
2149	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2150$as_echo "$ac_res" >&6; }
2151else
2152  # Is the header compilable?
2153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2154$as_echo_n "checking $2 usability... " >&6; }
2155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h.  */
2157$4
2158#include <$2>
2159_ACEOF
2160if ac_fn_cxx_try_compile "$LINENO"; then :
2161  ac_header_compiler=yes
2162else
2163  ac_header_compiler=no
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2167$as_echo "$ac_header_compiler" >&6; }
2168
2169# Is the header present?
2170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2171$as_echo_n "checking $2 presence... " >&6; }
2172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h.  */
2174#include <$2>
2175_ACEOF
2176if ac_fn_cxx_try_cpp "$LINENO"; then :
2177  ac_header_preproc=yes
2178else
2179  ac_header_preproc=no
2180fi
2181rm -f conftest.err conftest.i conftest.$ac_ext
2182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2183$as_echo "$ac_header_preproc" >&6; }
2184
2185# So?  What about this header?
2186case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2187  yes:no: )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2189$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2191$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2192    ;;
2193  no:yes:* )
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2195$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2197$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2199$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2201$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2202    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2203$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2204( $as_echo "## ----------------------------------------- ##
2205## Report this to build-dev@openjdk.java.net ##
2206## ----------------------------------------- ##"
2207     ) | sed "s/^/$as_me: WARNING:     /" >&2
2208    ;;
2209esac
2210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2211$as_echo_n "checking for $2... " >&6; }
2212if eval \${$3+:} false; then :
2213  $as_echo_n "(cached) " >&6
2214else
2215  eval "$3=\$ac_header_compiler"
2216fi
2217eval ac_res=\$$3
2218	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2219$as_echo "$ac_res" >&6; }
2220fi
2221  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2222
2223} # ac_fn_cxx_check_header_mongrel
2224
2225# ac_fn_cxx_try_run LINENO
2226# ------------------------
2227# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2228# that executables *can* be run.
2229ac_fn_cxx_try_run ()
2230{
2231  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2232  if { { ac_try="$ac_link"
2233case "(($ac_try" in
2234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2235  *) ac_try_echo=$ac_try;;
2236esac
2237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2238$as_echo "$ac_try_echo"; } >&5
2239  (eval "$ac_link") 2>&5
2240  ac_status=$?
2241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2243  { { case "(($ac_try" in
2244  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2245  *) ac_try_echo=$ac_try;;
2246esac
2247eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2248$as_echo "$ac_try_echo"; } >&5
2249  (eval "$ac_try") 2>&5
2250  ac_status=$?
2251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2252  test $ac_status = 0; }; }; then :
2253  ac_retval=0
2254else
2255  $as_echo "$as_me: program exited with status $ac_status" >&5
2256       $as_echo "$as_me: failed program was:" >&5
2257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259       ac_retval=$ac_status
2260fi
2261  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2262  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263  as_fn_set_status $ac_retval
2264
2265} # ac_fn_cxx_try_run
2266
2267# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2268# ---------------------------------------------------------
2269# Tests whether HEADER exists and can be compiled using the include files in
2270# INCLUDES, setting the cache variable VAR accordingly.
2271ac_fn_cxx_check_header_compile ()
2272{
2273  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2275$as_echo_n "checking for $2... " >&6; }
2276if eval \${$3+:} false; then :
2277  $as_echo_n "(cached) " >&6
2278else
2279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282#include <$2>
2283_ACEOF
2284if ac_fn_cxx_try_compile "$LINENO"; then :
2285  eval "$3=yes"
2286else
2287  eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291eval ac_res=\$$3
2292	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
2294  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2295
2296} # ac_fn_cxx_check_header_compile
2297
2298# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2299# ----------------------------------------------
2300# Tries to find the compile-time value of EXPR in a program that includes
2301# INCLUDES, setting VAR accordingly. Returns whether the value could be
2302# computed
2303ac_fn_cxx_compute_int ()
2304{
2305  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306  if test "$cross_compiling" = yes; then
2307    # Depending upon the size, compute the lo and hi bounds.
2308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h.  */
2310$4
2311int
2312main ()
2313{
2314static int test_array [1 - 2 * !(($2) >= 0)];
2315test_array [0] = 0;
2316return test_array [0];
2317
2318  ;
2319  return 0;
2320}
2321_ACEOF
2322if ac_fn_cxx_try_compile "$LINENO"; then :
2323  ac_lo=0 ac_mid=0
2324  while :; do
2325    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h.  */
2327$4
2328int
2329main ()
2330{
2331static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2332test_array [0] = 0;
2333return test_array [0];
2334
2335  ;
2336  return 0;
2337}
2338_ACEOF
2339if ac_fn_cxx_try_compile "$LINENO"; then :
2340  ac_hi=$ac_mid; break
2341else
2342  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2343			if test $ac_lo -le $ac_mid; then
2344			  ac_lo= ac_hi=
2345			  break
2346			fi
2347			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2348fi
2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2350  done
2351else
2352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h.  */
2354$4
2355int
2356main ()
2357{
2358static int test_array [1 - 2 * !(($2) < 0)];
2359test_array [0] = 0;
2360return test_array [0];
2361
2362  ;
2363  return 0;
2364}
2365_ACEOF
2366if ac_fn_cxx_try_compile "$LINENO"; then :
2367  ac_hi=-1 ac_mid=-1
2368  while :; do
2369    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h.  */
2371$4
2372int
2373main ()
2374{
2375static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2376test_array [0] = 0;
2377return test_array [0];
2378
2379  ;
2380  return 0;
2381}
2382_ACEOF
2383if ac_fn_cxx_try_compile "$LINENO"; then :
2384  ac_lo=$ac_mid; break
2385else
2386  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2387			if test $ac_mid -le $ac_hi; then
2388			  ac_lo= ac_hi=
2389			  break
2390			fi
2391			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394  done
2395else
2396  ac_lo= ac_hi=
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401# Binary search between lo and hi bounds.
2402while test "x$ac_lo" != "x$ac_hi"; do
2403  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h.  */
2406$4
2407int
2408main ()
2409{
2410static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2411test_array [0] = 0;
2412return test_array [0];
2413
2414  ;
2415  return 0;
2416}
2417_ACEOF
2418if ac_fn_cxx_try_compile "$LINENO"; then :
2419  ac_hi=$ac_mid
2420else
2421  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2422fi
2423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2424done
2425case $ac_lo in #((
2426?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2427'') ac_retval=1 ;;
2428esac
2429  else
2430    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431/* end confdefs.h.  */
2432$4
2433static long int longval () { return $2; }
2434static unsigned long int ulongval () { return $2; }
2435#include <stdio.h>
2436#include <stdlib.h>
2437int
2438main ()
2439{
2440
2441  FILE *f = fopen ("conftest.val", "w");
2442  if (! f)
2443    return 1;
2444  if (($2) < 0)
2445    {
2446      long int i = longval ();
2447      if (i != ($2))
2448	return 1;
2449      fprintf (f, "%ld", i);
2450    }
2451  else
2452    {
2453      unsigned long int i = ulongval ();
2454      if (i != ($2))
2455	return 1;
2456      fprintf (f, "%lu", i);
2457    }
2458  /* Do not output a trailing newline, as this causes \r\n confusion
2459     on some platforms.  */
2460  return ferror (f) || fclose (f) != 0;
2461
2462  ;
2463  return 0;
2464}
2465_ACEOF
2466if ac_fn_cxx_try_run "$LINENO"; then :
2467  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2468else
2469  ac_retval=1
2470fi
2471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2472  conftest.$ac_objext conftest.beam conftest.$ac_ext
2473rm -f conftest.val
2474
2475  fi
2476  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477  as_fn_set_status $ac_retval
2478
2479} # ac_fn_cxx_compute_int
2480
2481# ac_fn_cxx_try_link LINENO
2482# -------------------------
2483# Try to link conftest.$ac_ext, and return whether this succeeded.
2484ac_fn_cxx_try_link ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  rm -f conftest.$ac_objext conftest$ac_exeext
2488  if { { ac_try="$ac_link"
2489case "(($ac_try" in
2490  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2491  *) ac_try_echo=$ac_try;;
2492esac
2493eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2494$as_echo "$ac_try_echo"; } >&5
2495  (eval "$ac_link") 2>conftest.err
2496  ac_status=$?
2497  if test -s conftest.err; then
2498    grep -v '^ *+' conftest.err >conftest.er1
2499    cat conftest.er1 >&5
2500    mv -f conftest.er1 conftest.err
2501  fi
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; } && {
2504	 test -z "$ac_cxx_werror_flag" ||
2505	 test ! -s conftest.err
2506       } && test -s conftest$ac_exeext && {
2507	 test "$cross_compiling" = yes ||
2508	 test -x conftest$ac_exeext
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515	ac_retval=1
2516fi
2517  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2518  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2519  # interfere with the next link command; also delete a directory that is
2520  # left behind by Apple's compiler.  We do this before executing the actions.
2521  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2522  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523  as_fn_set_status $ac_retval
2524
2525} # ac_fn_cxx_try_link
2526
2527# ac_fn_cxx_check_func LINENO FUNC VAR
2528# ------------------------------------
2529# Tests whether FUNC exists, setting the cache variable VAR accordingly
2530ac_fn_cxx_check_func ()
2531{
2532  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2534$as_echo_n "checking for $2... " >&6; }
2535if eval \${$3+:} false; then :
2536  $as_echo_n "(cached) " >&6
2537else
2538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2539/* end confdefs.h.  */
2540/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2541   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2542#define $2 innocuous_$2
2543
2544/* System header to define __stub macros and hopefully few prototypes,
2545    which can conflict with char $2 (); below.
2546    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2547    <limits.h> exists even on freestanding compilers.  */
2548
2549#ifdef __STDC__
2550# include <limits.h>
2551#else
2552# include <assert.h>
2553#endif
2554
2555#undef $2
2556
2557/* Override any GCC internal prototype to avoid an error.
2558   Use char because int might match the return type of a GCC
2559   builtin and then its argument prototype would still apply.  */
2560#ifdef __cplusplus
2561extern "C"
2562#endif
2563char $2 ();
2564/* The GNU C library defines this for functions which it implements
2565    to always fail with ENOSYS.  Some functions are actually named
2566    something starting with __ and the normal name is an alias.  */
2567#if defined __stub_$2 || defined __stub___$2
2568choke me
2569#endif
2570
2571int
2572main ()
2573{
2574return $2 ();
2575  ;
2576  return 0;
2577}
2578_ACEOF
2579if ac_fn_cxx_try_link "$LINENO"; then :
2580  eval "$3=yes"
2581else
2582  eval "$3=no"
2583fi
2584rm -f core conftest.err conftest.$ac_objext \
2585    conftest$ac_exeext conftest.$ac_ext
2586fi
2587eval ac_res=\$$3
2588	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2589$as_echo "$ac_res" >&6; }
2590  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2591
2592} # ac_fn_cxx_check_func
2593
2594# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2595# -------------------------------------------------------
2596# Tests whether HEADER exists and can be compiled using the include files in
2597# INCLUDES, setting the cache variable VAR accordingly.
2598ac_fn_c_check_header_compile ()
2599{
2600  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2602$as_echo_n "checking for $2... " >&6; }
2603if eval \${$3+:} false; then :
2604  $as_echo_n "(cached) " >&6
2605else
2606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609#include <$2>
2610_ACEOF
2611if ac_fn_c_try_compile "$LINENO"; then :
2612  eval "$3=yes"
2613else
2614  eval "$3=no"
2615fi
2616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2617fi
2618eval ac_res=\$$3
2619	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2620$as_echo "$ac_res" >&6; }
2621  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2622
2623} # ac_fn_c_check_header_compile
2624cat >config.log <<_ACEOF
2625This file contains any messages produced by compilers while
2626running configure, to aid debugging if configure makes a mistake.
2627
2628It was created by OpenJDK $as_me jdk8, which was
2629generated by GNU Autoconf 2.69.  Invocation command line was
2630
2631  $ $0 $@
2632
2633_ACEOF
2634exec 5>>config.log
2635{
2636cat <<_ASUNAME
2637## --------- ##
2638## Platform. ##
2639## --------- ##
2640
2641hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2642uname -m = `(uname -m) 2>/dev/null || echo unknown`
2643uname -r = `(uname -r) 2>/dev/null || echo unknown`
2644uname -s = `(uname -s) 2>/dev/null || echo unknown`
2645uname -v = `(uname -v) 2>/dev/null || echo unknown`
2646
2647/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2648/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2649
2650/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2651/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2652/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2653/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2654/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2655/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2656/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2657
2658_ASUNAME
2659
2660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2661for as_dir in $PATH
2662do
2663  IFS=$as_save_IFS
2664  test -z "$as_dir" && as_dir=.
2665    $as_echo "PATH: $as_dir"
2666  done
2667IFS=$as_save_IFS
2668
2669} >&5
2670
2671cat >&5 <<_ACEOF
2672
2673
2674## ----------- ##
2675## Core tests. ##
2676## ----------- ##
2677
2678_ACEOF
2679
2680
2681# Keep a trace of the command line.
2682# Strip out --no-create and --no-recursion so they do not pile up.
2683# Strip out --silent because we don't want to record it for future runs.
2684# Also quote any args containing shell meta-characters.
2685# Make two passes to allow for proper duplicate-argument suppression.
2686ac_configure_args=
2687ac_configure_args0=
2688ac_configure_args1=
2689ac_must_keep_next=false
2690for ac_pass in 1 2
2691do
2692  for ac_arg
2693  do
2694    case $ac_arg in
2695    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2696    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2697    | -silent | --silent | --silen | --sile | --sil)
2698      continue ;;
2699    *\'*)
2700      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2701    esac
2702    case $ac_pass in
2703    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2704    2)
2705      as_fn_append ac_configure_args1 " '$ac_arg'"
2706      if test $ac_must_keep_next = true; then
2707	ac_must_keep_next=false # Got value, back to normal.
2708      else
2709	case $ac_arg in
2710	  *=* | --config-cache | -C | -disable-* | --disable-* \
2711	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2712	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2713	  | -with-* | --with-* | -without-* | --without-* | --x)
2714	    case "$ac_configure_args0 " in
2715	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2716	    esac
2717	    ;;
2718	  -* ) ac_must_keep_next=true ;;
2719	esac
2720      fi
2721      as_fn_append ac_configure_args " '$ac_arg'"
2722      ;;
2723    esac
2724  done
2725done
2726{ ac_configure_args0=; unset ac_configure_args0;}
2727{ ac_configure_args1=; unset ac_configure_args1;}
2728
2729# When interrupted or exit'd, cleanup temporary files, and complete
2730# config.log.  We remove comments because anyway the quotes in there
2731# would cause problems or look ugly.
2732# WARNING: Use '\'' to represent an apostrophe within the trap.
2733# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2734trap 'exit_status=$?
2735  # Save into config.log some information that might help in debugging.
2736  {
2737    echo
2738
2739    $as_echo "## ---------------- ##
2740## Cache variables. ##
2741## ---------------- ##"
2742    echo
2743    # The following way of writing the cache mishandles newlines in values,
2744(
2745  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2746    eval ac_val=\$$ac_var
2747    case $ac_val in #(
2748    *${as_nl}*)
2749      case $ac_var in #(
2750      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2751$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2752      esac
2753      case $ac_var in #(
2754      _ | IFS | as_nl) ;; #(
2755      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2756      *) { eval $ac_var=; unset $ac_var;} ;;
2757      esac ;;
2758    esac
2759  done
2760  (set) 2>&1 |
2761    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2762    *${as_nl}ac_space=\ *)
2763      sed -n \
2764	"s/'\''/'\''\\\\'\'''\''/g;
2765	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2766      ;; #(
2767    *)
2768      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2769      ;;
2770    esac |
2771    sort
2772)
2773    echo
2774
2775    $as_echo "## ----------------- ##
2776## Output variables. ##
2777## ----------------- ##"
2778    echo
2779    for ac_var in $ac_subst_vars
2780    do
2781      eval ac_val=\$$ac_var
2782      case $ac_val in
2783      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2784      esac
2785      $as_echo "$ac_var='\''$ac_val'\''"
2786    done | sort
2787    echo
2788
2789    if test -n "$ac_subst_files"; then
2790      $as_echo "## ------------------- ##
2791## File substitutions. ##
2792## ------------------- ##"
2793      echo
2794      for ac_var in $ac_subst_files
2795      do
2796	eval ac_val=\$$ac_var
2797	case $ac_val in
2798	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2799	esac
2800	$as_echo "$ac_var='\''$ac_val'\''"
2801      done | sort
2802      echo
2803    fi
2804
2805    if test -s confdefs.h; then
2806      $as_echo "## ----------- ##
2807## confdefs.h. ##
2808## ----------- ##"
2809      echo
2810      cat confdefs.h
2811      echo
2812    fi
2813    test "$ac_signal" != 0 &&
2814      $as_echo "$as_me: caught signal $ac_signal"
2815    $as_echo "$as_me: exit $exit_status"
2816  } >&5
2817  rm -f core *.core core.conftest.* &&
2818    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2819    exit $exit_status
2820' 0
2821for ac_signal in 1 2 13 15; do
2822  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2823done
2824ac_signal=0
2825
2826# confdefs.h avoids OS command line length limits that DEFS can exceed.
2827rm -f -r conftest* confdefs.h
2828
2829$as_echo "/* confdefs.h */" > confdefs.h
2830
2831# Predefined preprocessor variables.
2832
2833cat >>confdefs.h <<_ACEOF
2834#define PACKAGE_NAME "$PACKAGE_NAME"
2835_ACEOF
2836
2837cat >>confdefs.h <<_ACEOF
2838#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2839_ACEOF
2840
2841cat >>confdefs.h <<_ACEOF
2842#define PACKAGE_VERSION "$PACKAGE_VERSION"
2843_ACEOF
2844
2845cat >>confdefs.h <<_ACEOF
2846#define PACKAGE_STRING "$PACKAGE_STRING"
2847_ACEOF
2848
2849cat >>confdefs.h <<_ACEOF
2850#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2851_ACEOF
2852
2853cat >>confdefs.h <<_ACEOF
2854#define PACKAGE_URL "$PACKAGE_URL"
2855_ACEOF
2856
2857
2858# Let the site file select an alternate cache file if it wants to.
2859# Prefer an explicitly selected file to automatically selected ones.
2860ac_site_file1=NONE
2861ac_site_file2=NONE
2862if test -n "$CONFIG_SITE"; then
2863  # We do not want a PATH search for config.site.
2864  case $CONFIG_SITE in #((
2865    -*)  ac_site_file1=./$CONFIG_SITE;;
2866    */*) ac_site_file1=$CONFIG_SITE;;
2867    *)   ac_site_file1=./$CONFIG_SITE;;
2868  esac
2869elif test "x$prefix" != xNONE; then
2870  ac_site_file1=$prefix/share/config.site
2871  ac_site_file2=$prefix/etc/config.site
2872else
2873  ac_site_file1=$ac_default_prefix/share/config.site
2874  ac_site_file2=$ac_default_prefix/etc/config.site
2875fi
2876for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2877do
2878  test "x$ac_site_file" = xNONE && continue
2879  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2880    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2881$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2882    sed 's/^/| /' "$ac_site_file" >&5
2883    . "$ac_site_file" \
2884      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2886as_fn_error $? "failed to load site script $ac_site_file
2887See \`config.log' for more details" "$LINENO" 5; }
2888  fi
2889done
2890
2891if test -r "$cache_file"; then
2892  # Some versions of bash will fail to source /dev/null (special files
2893  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2894  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2895    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2896$as_echo "$as_me: loading cache $cache_file" >&6;}
2897    case $cache_file in
2898      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2899      *)                      . "./$cache_file";;
2900    esac
2901  fi
2902else
2903  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2904$as_echo "$as_me: creating cache $cache_file" >&6;}
2905  >$cache_file
2906fi
2907
2908# Check that the precious variables saved in the cache have kept the same
2909# value.
2910ac_cache_corrupted=false
2911for ac_var in $ac_precious_vars; do
2912  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2913  eval ac_new_set=\$ac_env_${ac_var}_set
2914  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2915  eval ac_new_val=\$ac_env_${ac_var}_value
2916  case $ac_old_set,$ac_new_set in
2917    set,)
2918      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2919$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2920      ac_cache_corrupted=: ;;
2921    ,set)
2922      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2923$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2924      ac_cache_corrupted=: ;;
2925    ,);;
2926    *)
2927      if test "x$ac_old_val" != "x$ac_new_val"; then
2928	# differences in whitespace do not lead to failure.
2929	ac_old_val_w=`echo x $ac_old_val`
2930	ac_new_val_w=`echo x $ac_new_val`
2931	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2932	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2933$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2934	  ac_cache_corrupted=:
2935	else
2936	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2937$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2938	  eval $ac_var=\$ac_old_val
2939	fi
2940	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2941$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2942	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2943$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2944      fi;;
2945  esac
2946  # Pass precious variables to config.status.
2947  if test "$ac_new_set" = set; then
2948    case $ac_new_val in
2949    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2950    *) ac_arg=$ac_var=$ac_new_val ;;
2951    esac
2952    case " $ac_configure_args " in
2953      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2954      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2955    esac
2956  fi
2957done
2958if $ac_cache_corrupted; then
2959  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2961  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2962$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2963  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2964fi
2965## -------------------- ##
2966## Main body of script. ##
2967## -------------------- ##
2968
2969ac_ext=c
2970ac_cpp='$CPP $CPPFLAGS'
2971ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2972ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2973ac_compiler_gnu=$ac_cv_c_compiler_gnu
2974
2975
2976
2977ac_aux_dir=
2978for ac_dir in build-aux "$srcdir"/build-aux; do
2979  if test -f "$ac_dir/install-sh"; then
2980    ac_aux_dir=$ac_dir
2981    ac_install_sh="$ac_aux_dir/install-sh -c"
2982    break
2983  elif test -f "$ac_dir/install.sh"; then
2984    ac_aux_dir=$ac_dir
2985    ac_install_sh="$ac_aux_dir/install.sh -c"
2986    break
2987  elif test -f "$ac_dir/shtool"; then
2988    ac_aux_dir=$ac_dir
2989    ac_install_sh="$ac_aux_dir/shtool install -c"
2990    break
2991  fi
2992done
2993if test -z "$ac_aux_dir"; then
2994  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2995fi
2996
2997# These three variables are undocumented and unsupported,
2998# and are intended to be withdrawn in a future Autoconf release.
2999# They can cause serious problems if a builder's source tree is in a directory
3000# whose full name contains unusual characters.
3001ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3002ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3003ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3004
3005
3006# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3007
3008#
3009# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3010# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3011#
3012# This code is free software; you can redistribute it and/or modify it
3013# under the terms of the GNU General Public License version 2 only, as
3014# published by the Free Software Foundation.  Oracle designates this
3015# particular file as subject to the "Classpath" exception as provided
3016# by Oracle in the LICENSE file that accompanied this code.
3017#
3018# This code is distributed in the hope that it will be useful, but WITHOUT
3019# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3020# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3021# version 2 for more details (a copy is included in the LICENSE file that
3022# accompanied this code).
3023#
3024# You should have received a copy of the GNU General Public License version
3025# 2 along with this work; if not, write to the Free Software Foundation,
3026# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3027#
3028# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3029# or visit www.oracle.com if you need additional information or have any
3030# questions.
3031#
3032
3033#
3034# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3035#
3036# This program is free software; you can redistribute it and/or modify
3037# it under the terms of the GNU General Public License as published by
3038# the Free Software Foundation; either version 2 of the License, or
3039# (at your option) any later version.
3040#
3041# This program is distributed in the hope that it will be useful, but
3042# WITHOUT ANY WARRANTY; without even the implied warranty of
3043# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3044# General Public License for more details.
3045#
3046# You should have received a copy of the GNU General Public License
3047# along with this program; if not, write to the Free Software
3048# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3049#
3050# As a special exception to the GNU General Public License, if you
3051# distribute this file as part of a program that contains a
3052# configuration script generated by Autoconf, you may include it under
3053# the same distribution terms that you use for the rest of that program.
3054
3055# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3056# ----------------------------------
3057# PKG_PROG_PKG_CONFIG
3058
3059# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3060#
3061# Check to see whether a particular set of modules exists.  Similar
3062# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3063#
3064#
3065# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3066# this or PKG_CHECK_MODULES is called, or make sure to call
3067# PKG_CHECK_EXISTS manually
3068# --------------------------------------------------------------
3069
3070
3071
3072# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3073# ---------------------------------------------
3074# _PKG_CONFIG
3075
3076# _PKG_SHORT_ERRORS_SUPPORTED
3077# -----------------------------
3078# _PKG_SHORT_ERRORS_SUPPORTED
3079
3080
3081# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3082# [ACTION-IF-NOT-FOUND])
3083#
3084#
3085# Note that if there is a possibility the first call to
3086# PKG_CHECK_MODULES might not happen, you should be sure to include an
3087# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3088#
3089#
3090# --------------------------------------------------------------
3091# PKG_CHECK_MODULES
3092
3093
3094# Include these first...
3095#
3096# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3097# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3098#
3099# This code is free software; you can redistribute it and/or modify it
3100# under the terms of the GNU General Public License version 2 only, as
3101# published by the Free Software Foundation.  Oracle designates this
3102# particular file as subject to the "Classpath" exception as provided
3103# by Oracle in the LICENSE file that accompanied this code.
3104#
3105# This code is distributed in the hope that it will be useful, but WITHOUT
3106# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3107# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3108# version 2 for more details (a copy is included in the LICENSE file that
3109# accompanied this code).
3110#
3111# You should have received a copy of the GNU General Public License version
3112# 2 along with this work; if not, write to the Free Software Foundation,
3113# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3114#
3115# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3116# or visit www.oracle.com if you need additional information or have any
3117# questions.
3118#
3119
3120# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3121# If so, then append $1 to $2\
3122# Also set JVM_ARG_OK to true/false depending on outcome.
3123
3124
3125# Appends a string to a path variable, only adding the : when needed.
3126
3127
3128# This will make sure the given variable points to a full and proper
3129# path. This means:
3130# 1) There will be no spaces in the path. On posix platforms,
3131#    spaces in the path will result in an error. On Windows,
3132#    the path will be rewritten using short-style to be space-free.
3133# 2) The path will be absolute, and it will be in unix-style (on
3134#     cygwin).
3135# $1: The name of the variable to fix
3136
3137
3138# This will make sure the given variable points to a executable
3139# with a full and proper path. This means:
3140# 1) There will be no spaces in the path. On posix platforms,
3141#    spaces in the path will result in an error. On Windows,
3142#    the path will be rewritten using short-style to be space-free.
3143# 2) The path will be absolute, and it will be in unix-style (on
3144#     cygwin).
3145# Any arguments given to the executable is preserved.
3146# If the input variable does not have a directory specification, then
3147# it need to be in the PATH.
3148# $1: The name of the variable to fix
3149
3150
3151
3152
3153
3154
3155# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3156# $1: variable to check
3157# $2: executable name to print in warning (optional)
3158
3159
3160# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3161# Arguments as AC_PATH_PROG:
3162# $1: variable to set
3163# $2: executable name to look for
3164
3165
3166# Setup the most fundamental tools that relies on not much else to set up,
3167# but is used by much of the early bootstrap code.
3168
3169
3170# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3171
3172
3173
3174
3175
3176
3177
3178#%%% Simple tools %%%
3179
3180# Check if we have found a usable version of make
3181# $1: the path to a potential make binary (or empty)
3182# $2: the description on how we found this
3183
3184
3185# Goes looking for a usable version of GNU make.
3186
3187
3188
3189
3190
3191
3192# Check if build directory is on local disk. If not possible to determine,
3193# we prefer to claim it's local.
3194# Argument 1: directory to test
3195# Argument 2: what to do if it is on local disk
3196# Argument 3: what to do otherwise (remote disk or failure)
3197
3198
3199# Check that source files have basic read permissions set. This might
3200# not be the case in cygwin in certain conditions.
3201
3202
3203
3204
3205#
3206# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3207# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3208#
3209# This code is free software; you can redistribute it and/or modify it
3210# under the terms of the GNU General Public License version 2 only, as
3211# published by the Free Software Foundation.  Oracle designates this
3212# particular file as subject to the "Classpath" exception as provided
3213# by Oracle in the LICENSE file that accompanied this code.
3214#
3215# This code is distributed in the hope that it will be useful, but WITHOUT
3216# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3217# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3218# version 2 for more details (a copy is included in the LICENSE file that
3219# accompanied this code).
3220#
3221# You should have received a copy of the GNU General Public License version
3222# 2 along with this work; if not, write to the Free Software Foundation,
3223# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3224#
3225# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3226# or visit www.oracle.com if you need additional information or have any
3227# questions.
3228#
3229
3230
3231
3232
3233
3234# Helper function which possibly converts a path using DOS-style short mode.
3235# If so, the updated path is stored in $new_path.
3236# $1: The path to check
3237
3238
3239# Helper function which possibly converts a path using DOS-style short mode.
3240# If so, the updated path is stored in $new_path.
3241# $1: The path to check
3242
3243
3244# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3245# and could probably be heavily simplified. However, all changes in this
3246# area tend to need lot of testing in different scenarios, and in lack of
3247# proper unit testing, cleaning this up has not been deemed worth the effort
3248# at the moment.
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3259
3260
3261
3262
3263#
3264# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3265# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3266#
3267# This code is free software; you can redistribute it and/or modify it
3268# under the terms of the GNU General Public License version 2 only, as
3269# published by the Free Software Foundation.  Oracle designates this
3270# particular file as subject to the "Classpath" exception as provided
3271# by Oracle in the LICENSE file that accompanied this code.
3272#
3273# This code is distributed in the hope that it will be useful, but WITHOUT
3274# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3275# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3276# version 2 for more details (a copy is included in the LICENSE file that
3277# accompanied this code).
3278#
3279# You should have received a copy of the GNU General Public License version
3280# 2 along with this work; if not, write to the Free Software Foundation,
3281# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3282#
3283# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3284# or visit www.oracle.com if you need additional information or have any
3285# questions.
3286#
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298# ... then the rest
3299#
3300# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3301# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3302#
3303# This code is free software; you can redistribute it and/or modify it
3304# under the terms of the GNU General Public License version 2 only, as
3305# published by the Free Software Foundation.  Oracle designates this
3306# particular file as subject to the "Classpath" exception as provided
3307# by Oracle in the LICENSE file that accompanied this code.
3308#
3309# This code is distributed in the hope that it will be useful, but WITHOUT
3310# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3311# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3312# version 2 for more details (a copy is included in the LICENSE file that
3313# accompanied this code).
3314#
3315# You should have received a copy of the GNU General Public License version
3316# 2 along with this work; if not, write to the Free Software Foundation,
3317# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3318#
3319# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3320# or visit www.oracle.com if you need additional information or have any
3321# questions.
3322#
3323
3324# Execute the check given as argument, and verify the result
3325# If the Boot JDK was previously found, do nothing
3326# $1 A command line (typically autoconf macro) to execute
3327
3328
3329# Test: Is bootjdk explicitely set by command line arguments?
3330
3331
3332# Test: Is bootjdk available from builddeps?
3333
3334
3335# Test: Is $JAVA_HOME set?
3336
3337
3338# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3339
3340
3341# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3342
3343
3344# Look for a jdk in the given path. If there are multiple, try to select the newest.
3345# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3346# $1 = Path to directory containing jdk installations.
3347# $2 = String to append to the found JDK directory to get the proper JDK home
3348
3349
3350# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3351# environmental variable as base for where to look.
3352# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3353
3354
3355# Test: Is there a JDK installed in default, well-known locations?
3356
3357
3358# Check that a command-line tool in the Boot JDK is correct
3359# $1 = name of variable to assign
3360# $2 = name of binary
3361
3362
3363###############################################################################
3364#
3365# We need a Boot JDK to bootstrap the build.
3366#
3367
3368
3369
3370
3371
3372#
3373# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3374# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3375#
3376# This code is free software; you can redistribute it and/or modify it
3377# under the terms of the GNU General Public License version 2 only, as
3378# published by the Free Software Foundation.  Oracle designates this
3379# particular file as subject to the "Classpath" exception as provided
3380# by Oracle in the LICENSE file that accompanied this code.
3381#
3382# This code is distributed in the hope that it will be useful, but WITHOUT
3383# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3384# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3385# version 2 for more details (a copy is included in the LICENSE file that
3386# accompanied this code).
3387#
3388# You should have received a copy of the GNU General Public License version
3389# 2 along with this work; if not, write to the Free Software Foundation,
3390# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3391#
3392# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3393# or visit www.oracle.com if you need additional information or have any
3394# questions.
3395#
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416#
3417# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3418# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3419#
3420# This code is free software; you can redistribute it and/or modify it
3421# under the terms of the GNU General Public License version 2 only, as
3422# published by the Free Software Foundation.  Oracle designates this
3423# particular file as subject to the "Classpath" exception as provided
3424# by Oracle in the LICENSE file that accompanied this code.
3425#
3426# This code is distributed in the hope that it will be useful, but WITHOUT
3427# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3428# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3429# version 2 for more details (a copy is included in the LICENSE file that
3430# accompanied this code).
3431#
3432# You should have received a copy of the GNU General Public License version
3433# 2 along with this work; if not, write to the Free Software Foundation,
3434# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3435#
3436# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3437# or visit www.oracle.com if you need additional information or have any
3438# questions.
3439#
3440
3441
3442
3443
3444
3445cygwin_help() {
3446    case $1 in
3447    unzip)
3448        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3449    zip)
3450        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3451    make)
3452        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3453    * )
3454       break ;;
3455    esac
3456}
3457
3458apt_help() {
3459    case $1 in
3460    devkit)
3461        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3462    openjdk)
3463        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3464    alsa)
3465        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3466    cups)
3467        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3468    freetype2)
3469        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3470    pulse)
3471        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3472    x11)
3473        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3474    ccache)
3475        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3476    * )
3477       break ;;
3478    esac
3479}
3480
3481yum_help() {
3482    case $1 in
3483    devkit)
3484        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3485    openjdk)
3486        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3487    alsa)
3488        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3489    cups)
3490        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3491    freetype2)
3492        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3493    pulse)
3494        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3495    x11)
3496        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3497    ccache)
3498        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3499    * )
3500       break ;;
3501    esac
3502}
3503
3504port_help() {
3505    PKGHANDLER_COMMAND=""
3506}
3507
3508pkgutil_help() {
3509    PKGHANDLER_COMMAND=""
3510}
3511
3512pkgadd_help() {
3513    PKGHANDLER_COMMAND=""
3514}
3515
3516
3517
3518#
3519# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3520# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3521#
3522# This code is free software; you can redistribute it and/or modify it
3523# under the terms of the GNU General Public License version 2 only, as
3524# published by the Free Software Foundation.  Oracle designates this
3525# particular file as subject to the "Classpath" exception as provided
3526# by Oracle in the LICENSE file that accompanied this code.
3527#
3528# This code is distributed in the hope that it will be useful, but WITHOUT
3529# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3530# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3531# version 2 for more details (a copy is included in the LICENSE file that
3532# accompanied this code).
3533#
3534# You should have received a copy of the GNU General Public License version
3535# 2 along with this work; if not, write to the Free Software Foundation,
3536# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3537#
3538# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3539# or visit www.oracle.com if you need additional information or have any
3540# questions.
3541#
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552###############################################################################
3553#
3554# Should we build only OpenJDK even if closed sources are present?
3555#
3556
3557
3558
3559
3560###############################################################################
3561#
3562# Setup version numbers
3563#
3564
3565
3566
3567
3568
3569
3570# Support for customization of the build process. Some build files
3571# will include counterparts from this location, if they exist. This allows
3572# for a degree of customization of the build targets and the rules/recipes
3573# to create them
3574
3575# Check whether --with-custom-make-dir was given.
3576if test "${with_custom_make_dir+set}" = set; then :
3577  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3578fi
3579
3580
3581
3582#
3583# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3584# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3585#
3586# This code is free software; you can redistribute it and/or modify it
3587# under the terms of the GNU General Public License version 2 only, as
3588# published by the Free Software Foundation.  Oracle designates this
3589# particular file as subject to the "Classpath" exception as provided
3590# by Oracle in the LICENSE file that accompanied this code.
3591#
3592# This code is distributed in the hope that it will be useful, but WITHOUT
3593# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3594# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3595# version 2 for more details (a copy is included in the LICENSE file that
3596# accompanied this code).
3597#
3598# You should have received a copy of the GNU General Public License version
3599# 2 along with this work; if not, write to the Free Software Foundation,
3600# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3601#
3602# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3603# or visit www.oracle.com if you need additional information or have any
3604# questions.
3605#
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621#
3622# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3624#
3625# This code is free software; you can redistribute it and/or modify it
3626# under the terms of the GNU General Public License version 2 only, as
3627# published by the Free Software Foundation.  Oracle designates this
3628# particular file as subject to the "Classpath" exception as provided
3629# by Oracle in the LICENSE file that accompanied this code.
3630#
3631# This code is distributed in the hope that it will be useful, but WITHOUT
3632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3634# version 2 for more details (a copy is included in the LICENSE file that
3635# accompanied this code).
3636#
3637# You should have received a copy of the GNU General Public License version
3638# 2 along with this work; if not, write to the Free Software Foundation,
3639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3640#
3641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3642# or visit www.oracle.com if you need additional information or have any
3643# questions.
3644#
3645
3646# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3647# Converts autoconf style CPU name to OpenJDK style, into
3648# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3649
3650
3651# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3652# Converts autoconf style OS name to OpenJDK style, into
3653# VAR_OS and VAR_OS_API.
3654
3655
3656# Expects $host_os $host_cpu $build_os and $build_cpu
3657# and $with_target_bits to have been setup!
3658#
3659# Translate the standard triplet(quadruplet) definition
3660# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3661# OPENJDK_BUILD_OS, etc.
3662
3663
3664# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3665# accordingly. Must be done after setting up build and target system, but before
3666# doing anything else with these values.
3667
3668
3669    # Setup the legacy variables, for controlling the old makefiles.
3670    #
3671
3672
3673
3674
3675#%%% Build and target systems %%%
3676
3677
3678
3679
3680# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3681# Add -mX to various FLAGS variables.
3682
3683
3684
3685
3686
3687
3688#
3689# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3690# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3691#
3692# This code is free software; you can redistribute it and/or modify it
3693# under the terms of the GNU General Public License version 2 only, as
3694# published by the Free Software Foundation.  Oracle designates this
3695# particular file as subject to the "Classpath" exception as provided
3696# by Oracle in the LICENSE file that accompanied this code.
3697#
3698# This code is distributed in the hope that it will be useful, but WITHOUT
3699# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3700# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3701# version 2 for more details (a copy is included in the LICENSE file that
3702# accompanied this code).
3703#
3704# You should have received a copy of the GNU General Public License version
3705# 2 along with this work; if not, write to the Free Software Foundation,
3706# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3707#
3708# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3709# or visit www.oracle.com if you need additional information or have any
3710# questions.
3711#
3712
3713
3714
3715
3716
3717
3718
3719
3720#
3721# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3722# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3723#
3724# This code is free software; you can redistribute it and/or modify it
3725# under the terms of the GNU General Public License version 2 only, as
3726# published by the Free Software Foundation.  Oracle designates this
3727# particular file as subject to the "Classpath" exception as provided
3728# by Oracle in the LICENSE file that accompanied this code.
3729#
3730# This code is distributed in the hope that it will be useful, but WITHOUT
3731# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3732# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3733# version 2 for more details (a copy is included in the LICENSE file that
3734# accompanied this code).
3735#
3736# You should have received a copy of the GNU General Public License version
3737# 2 along with this work; if not, write to the Free Software Foundation,
3738# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3739#
3740# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3741# or visit www.oracle.com if you need additional information or have any
3742# questions.
3743#
3744
3745# $1 = compiler to test (CC or CXX)
3746# $2 = human readable name of compiler (C or C++)
3747
3748
3749
3750
3751
3752# $1 = compiler to test (CC or CXX)
3753# $2 = human readable name of compiler (C or C++)
3754# $3 = list of compiler names to search for
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3769#                                   [RUN-IF-FALSE])
3770# ------------------------------------------------------------
3771# Check that the c and c++ compilers support an argument
3772
3773
3774
3775
3776# Setup the JTREG paths
3777
3778
3779#
3780# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3781# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3782#
3783# This code is free software; you can redistribute it and/or modify it
3784# under the terms of the GNU General Public License version 2 only, as
3785# published by the Free Software Foundation.  Oracle designates this
3786# particular file as subject to the "Classpath" exception as provided
3787# by Oracle in the LICENSE file that accompanied this code.
3788#
3789# This code is distributed in the hope that it will be useful, but WITHOUT
3790# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3791# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3792# version 2 for more details (a copy is included in the LICENSE file that
3793# accompanied this code).
3794#
3795# You should have received a copy of the GNU General Public License version
3796# 2 along with this work; if not, write to the Free Software Foundation,
3797# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3798#
3799# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3800# or visit www.oracle.com if you need additional information or have any
3801# questions.
3802#
3803
3804
3805
3806
3807
3808
3809
3810# Check if the VS env variables were setup prior to running configure.
3811# If not, then find vcvarsall.bat and run it automatically, and integrate
3812# the set env variables into the spec file.
3813
3814
3815
3816# Setup the DXSDK paths
3817
3818
3819
3820
3821
3822
3823# This line needs to be here, verbatim, after all includes and the dummy hook
3824# definitions. It is replaced with custom functionality when building
3825# custom sources.
3826#CUSTOM_AUTOCONF_INCLUDE
3827
3828# Do not change or remove the following line, it is needed for consistency checks:
3829DATE_WHEN_GENERATED=1378403883
3830
3831###############################################################################
3832#
3833# Initialization / Boot-strapping
3834#
3835# The bootstrapping process needs to solve the "chicken or the egg" problem,
3836# thus it jumps back and forth, each time gaining something needed later on.
3837#
3838###############################################################################
3839
3840# Basic initialization that must happen first of all
3841
3842# Save the original command line. This is passed to us by the wrapper configure script.
3843
3844DATE_WHEN_CONFIGURED=`LANG=C date`
3845
3846{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3847$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3848{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3849$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3850
3851
3852
3853# Start with tools that do not need have cross compilation support
3854# and can be expected to be found in the default PATH. These tools are
3855# used by configure. Nor are these tools expected to be found in the
3856# devkit from the builddeps server either, since they are
3857# needed to download the devkit.
3858
3859# First are all the simple required tools.
3860
3861    for ac_prog in basename
3862do
3863  # Extract the first word of "$ac_prog", so it can be a program name with args.
3864set dummy $ac_prog; ac_word=$2
3865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3866$as_echo_n "checking for $ac_word... " >&6; }
3867if ${ac_cv_path_BASENAME+:} false; then :
3868  $as_echo_n "(cached) " >&6
3869else
3870  case $BASENAME in
3871  [\\/]* | ?:[\\/]*)
3872  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3873  ;;
3874  *)
3875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3876for as_dir in $PATH
3877do
3878  IFS=$as_save_IFS
3879  test -z "$as_dir" && as_dir=.
3880    for ac_exec_ext in '' $ac_executable_extensions; do
3881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3882    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3884    break 2
3885  fi
3886done
3887  done
3888IFS=$as_save_IFS
3889
3890  ;;
3891esac
3892fi
3893BASENAME=$ac_cv_path_BASENAME
3894if test -n "$BASENAME"; then
3895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3896$as_echo "$BASENAME" >&6; }
3897else
3898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3899$as_echo "no" >&6; }
3900fi
3901
3902
3903  test -n "$BASENAME" && break
3904done
3905
3906
3907    if test "x$BASENAME" = x; then
3908        if test "xbasename" = x; then
3909          PROG_NAME=basename
3910        else
3911          PROG_NAME=basename
3912        fi
3913        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3914$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3915        as_fn_error $? "Cannot continue" "$LINENO" 5
3916    fi
3917
3918
3919
3920    for ac_prog in bash
3921do
3922  # Extract the first word of "$ac_prog", so it can be a program name with args.
3923set dummy $ac_prog; ac_word=$2
3924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3925$as_echo_n "checking for $ac_word... " >&6; }
3926if ${ac_cv_path_BASH+:} false; then :
3927  $as_echo_n "(cached) " >&6
3928else
3929  case $BASH in
3930  [\\/]* | ?:[\\/]*)
3931  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3932  ;;
3933  *)
3934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3935for as_dir in $PATH
3936do
3937  IFS=$as_save_IFS
3938  test -z "$as_dir" && as_dir=.
3939    for ac_exec_ext in '' $ac_executable_extensions; do
3940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3941    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3943    break 2
3944  fi
3945done
3946  done
3947IFS=$as_save_IFS
3948
3949  ;;
3950esac
3951fi
3952BASH=$ac_cv_path_BASH
3953if test -n "$BASH"; then
3954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3955$as_echo "$BASH" >&6; }
3956else
3957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3958$as_echo "no" >&6; }
3959fi
3960
3961
3962  test -n "$BASH" && break
3963done
3964
3965
3966    if test "x$BASH" = x; then
3967        if test "xbash" = x; then
3968          PROG_NAME=bash
3969        else
3970          PROG_NAME=bash
3971        fi
3972        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3973$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3974        as_fn_error $? "Cannot continue" "$LINENO" 5
3975    fi
3976
3977
3978
3979    for ac_prog in cat
3980do
3981  # Extract the first word of "$ac_prog", so it can be a program name with args.
3982set dummy $ac_prog; ac_word=$2
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3984$as_echo_n "checking for $ac_word... " >&6; }
3985if ${ac_cv_path_CAT+:} false; then :
3986  $as_echo_n "(cached) " >&6
3987else
3988  case $CAT in
3989  [\\/]* | ?:[\\/]*)
3990  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3991  ;;
3992  *)
3993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3994for as_dir in $PATH
3995do
3996  IFS=$as_save_IFS
3997  test -z "$as_dir" && as_dir=.
3998    for ac_exec_ext in '' $ac_executable_extensions; do
3999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4000    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4002    break 2
4003  fi
4004done
4005  done
4006IFS=$as_save_IFS
4007
4008  ;;
4009esac
4010fi
4011CAT=$ac_cv_path_CAT
4012if test -n "$CAT"; then
4013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4014$as_echo "$CAT" >&6; }
4015else
4016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4017$as_echo "no" >&6; }
4018fi
4019
4020
4021  test -n "$CAT" && break
4022done
4023
4024
4025    if test "x$CAT" = x; then
4026        if test "xcat" = x; then
4027          PROG_NAME=cat
4028        else
4029          PROG_NAME=cat
4030        fi
4031        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4032$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4033        as_fn_error $? "Cannot continue" "$LINENO" 5
4034    fi
4035
4036
4037
4038    for ac_prog in chmod
4039do
4040  # Extract the first word of "$ac_prog", so it can be a program name with args.
4041set dummy $ac_prog; ac_word=$2
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4043$as_echo_n "checking for $ac_word... " >&6; }
4044if ${ac_cv_path_CHMOD+:} false; then :
4045  $as_echo_n "(cached) " >&6
4046else
4047  case $CHMOD in
4048  [\\/]* | ?:[\\/]*)
4049  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4050  ;;
4051  *)
4052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4053for as_dir in $PATH
4054do
4055  IFS=$as_save_IFS
4056  test -z "$as_dir" && as_dir=.
4057    for ac_exec_ext in '' $ac_executable_extensions; do
4058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4059    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4061    break 2
4062  fi
4063done
4064  done
4065IFS=$as_save_IFS
4066
4067  ;;
4068esac
4069fi
4070CHMOD=$ac_cv_path_CHMOD
4071if test -n "$CHMOD"; then
4072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4073$as_echo "$CHMOD" >&6; }
4074else
4075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4076$as_echo "no" >&6; }
4077fi
4078
4079
4080  test -n "$CHMOD" && break
4081done
4082
4083
4084    if test "x$CHMOD" = x; then
4085        if test "xchmod" = x; then
4086          PROG_NAME=chmod
4087        else
4088          PROG_NAME=chmod
4089        fi
4090        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4091$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4092        as_fn_error $? "Cannot continue" "$LINENO" 5
4093    fi
4094
4095
4096
4097    for ac_prog in cmp
4098do
4099  # Extract the first word of "$ac_prog", so it can be a program name with args.
4100set dummy $ac_prog; ac_word=$2
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4102$as_echo_n "checking for $ac_word... " >&6; }
4103if ${ac_cv_path_CMP+:} false; then :
4104  $as_echo_n "(cached) " >&6
4105else
4106  case $CMP in
4107  [\\/]* | ?:[\\/]*)
4108  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4109  ;;
4110  *)
4111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4112for as_dir in $PATH
4113do
4114  IFS=$as_save_IFS
4115  test -z "$as_dir" && as_dir=.
4116    for ac_exec_ext in '' $ac_executable_extensions; do
4117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4118    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4120    break 2
4121  fi
4122done
4123  done
4124IFS=$as_save_IFS
4125
4126  ;;
4127esac
4128fi
4129CMP=$ac_cv_path_CMP
4130if test -n "$CMP"; then
4131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4132$as_echo "$CMP" >&6; }
4133else
4134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4135$as_echo "no" >&6; }
4136fi
4137
4138
4139  test -n "$CMP" && break
4140done
4141
4142
4143    if test "x$CMP" = x; then
4144        if test "xcmp" = x; then
4145          PROG_NAME=cmp
4146        else
4147          PROG_NAME=cmp
4148        fi
4149        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4150$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4151        as_fn_error $? "Cannot continue" "$LINENO" 5
4152    fi
4153
4154
4155
4156    for ac_prog in comm
4157do
4158  # Extract the first word of "$ac_prog", so it can be a program name with args.
4159set dummy $ac_prog; ac_word=$2
4160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4161$as_echo_n "checking for $ac_word... " >&6; }
4162if ${ac_cv_path_COMM+:} false; then :
4163  $as_echo_n "(cached) " >&6
4164else
4165  case $COMM in
4166  [\\/]* | ?:[\\/]*)
4167  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4168  ;;
4169  *)
4170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4171for as_dir in $PATH
4172do
4173  IFS=$as_save_IFS
4174  test -z "$as_dir" && as_dir=.
4175    for ac_exec_ext in '' $ac_executable_extensions; do
4176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4177    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4179    break 2
4180  fi
4181done
4182  done
4183IFS=$as_save_IFS
4184
4185  ;;
4186esac
4187fi
4188COMM=$ac_cv_path_COMM
4189if test -n "$COMM"; then
4190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4191$as_echo "$COMM" >&6; }
4192else
4193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4194$as_echo "no" >&6; }
4195fi
4196
4197
4198  test -n "$COMM" && break
4199done
4200
4201
4202    if test "x$COMM" = x; then
4203        if test "xcomm" = x; then
4204          PROG_NAME=comm
4205        else
4206          PROG_NAME=comm
4207        fi
4208        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4209$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4210        as_fn_error $? "Cannot continue" "$LINENO" 5
4211    fi
4212
4213
4214
4215    for ac_prog in cp
4216do
4217  # Extract the first word of "$ac_prog", so it can be a program name with args.
4218set dummy $ac_prog; ac_word=$2
4219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4220$as_echo_n "checking for $ac_word... " >&6; }
4221if ${ac_cv_path_CP+:} false; then :
4222  $as_echo_n "(cached) " >&6
4223else
4224  case $CP in
4225  [\\/]* | ?:[\\/]*)
4226  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4227  ;;
4228  *)
4229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4230for as_dir in $PATH
4231do
4232  IFS=$as_save_IFS
4233  test -z "$as_dir" && as_dir=.
4234    for ac_exec_ext in '' $ac_executable_extensions; do
4235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4236    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4238    break 2
4239  fi
4240done
4241  done
4242IFS=$as_save_IFS
4243
4244  ;;
4245esac
4246fi
4247CP=$ac_cv_path_CP
4248if test -n "$CP"; then
4249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4250$as_echo "$CP" >&6; }
4251else
4252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4253$as_echo "no" >&6; }
4254fi
4255
4256
4257  test -n "$CP" && break
4258done
4259
4260
4261    if test "x$CP" = x; then
4262        if test "xcp" = x; then
4263          PROG_NAME=cp
4264        else
4265          PROG_NAME=cp
4266        fi
4267        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4268$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4269        as_fn_error $? "Cannot continue" "$LINENO" 5
4270    fi
4271
4272
4273
4274    for ac_prog in cpio
4275do
4276  # Extract the first word of "$ac_prog", so it can be a program name with args.
4277set dummy $ac_prog; ac_word=$2
4278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4279$as_echo_n "checking for $ac_word... " >&6; }
4280if ${ac_cv_path_CPIO+:} false; then :
4281  $as_echo_n "(cached) " >&6
4282else
4283  case $CPIO in
4284  [\\/]* | ?:[\\/]*)
4285  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4286  ;;
4287  *)
4288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4289for as_dir in $PATH
4290do
4291  IFS=$as_save_IFS
4292  test -z "$as_dir" && as_dir=.
4293    for ac_exec_ext in '' $ac_executable_extensions; do
4294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4295    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4297    break 2
4298  fi
4299done
4300  done
4301IFS=$as_save_IFS
4302
4303  ;;
4304esac
4305fi
4306CPIO=$ac_cv_path_CPIO
4307if test -n "$CPIO"; then
4308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4309$as_echo "$CPIO" >&6; }
4310else
4311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4312$as_echo "no" >&6; }
4313fi
4314
4315
4316  test -n "$CPIO" && break
4317done
4318
4319
4320    if test "x$CPIO" = x; then
4321        if test "xcpio" = x; then
4322          PROG_NAME=cpio
4323        else
4324          PROG_NAME=cpio
4325        fi
4326        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4327$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4328        as_fn_error $? "Cannot continue" "$LINENO" 5
4329    fi
4330
4331
4332
4333    for ac_prog in cut
4334do
4335  # Extract the first word of "$ac_prog", so it can be a program name with args.
4336set dummy $ac_prog; ac_word=$2
4337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4338$as_echo_n "checking for $ac_word... " >&6; }
4339if ${ac_cv_path_CUT+:} false; then :
4340  $as_echo_n "(cached) " >&6
4341else
4342  case $CUT in
4343  [\\/]* | ?:[\\/]*)
4344  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4345  ;;
4346  *)
4347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4348for as_dir in $PATH
4349do
4350  IFS=$as_save_IFS
4351  test -z "$as_dir" && as_dir=.
4352    for ac_exec_ext in '' $ac_executable_extensions; do
4353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4354    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4356    break 2
4357  fi
4358done
4359  done
4360IFS=$as_save_IFS
4361
4362  ;;
4363esac
4364fi
4365CUT=$ac_cv_path_CUT
4366if test -n "$CUT"; then
4367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4368$as_echo "$CUT" >&6; }
4369else
4370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4371$as_echo "no" >&6; }
4372fi
4373
4374
4375  test -n "$CUT" && break
4376done
4377
4378
4379    if test "x$CUT" = x; then
4380        if test "xcut" = x; then
4381          PROG_NAME=cut
4382        else
4383          PROG_NAME=cut
4384        fi
4385        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4386$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4387        as_fn_error $? "Cannot continue" "$LINENO" 5
4388    fi
4389
4390
4391
4392    for ac_prog in date
4393do
4394  # Extract the first word of "$ac_prog", so it can be a program name with args.
4395set dummy $ac_prog; ac_word=$2
4396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4397$as_echo_n "checking for $ac_word... " >&6; }
4398if ${ac_cv_path_DATE+:} false; then :
4399  $as_echo_n "(cached) " >&6
4400else
4401  case $DATE in
4402  [\\/]* | ?:[\\/]*)
4403  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4404  ;;
4405  *)
4406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4407for as_dir in $PATH
4408do
4409  IFS=$as_save_IFS
4410  test -z "$as_dir" && as_dir=.
4411    for ac_exec_ext in '' $ac_executable_extensions; do
4412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4413    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4415    break 2
4416  fi
4417done
4418  done
4419IFS=$as_save_IFS
4420
4421  ;;
4422esac
4423fi
4424DATE=$ac_cv_path_DATE
4425if test -n "$DATE"; then
4426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4427$as_echo "$DATE" >&6; }
4428else
4429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4430$as_echo "no" >&6; }
4431fi
4432
4433
4434  test -n "$DATE" && break
4435done
4436
4437
4438    if test "x$DATE" = x; then
4439        if test "xdate" = x; then
4440          PROG_NAME=date
4441        else
4442          PROG_NAME=date
4443        fi
4444        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4445$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4446        as_fn_error $? "Cannot continue" "$LINENO" 5
4447    fi
4448
4449
4450
4451    for ac_prog in gdiff diff
4452do
4453  # Extract the first word of "$ac_prog", so it can be a program name with args.
4454set dummy $ac_prog; ac_word=$2
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4456$as_echo_n "checking for $ac_word... " >&6; }
4457if ${ac_cv_path_DIFF+:} false; then :
4458  $as_echo_n "(cached) " >&6
4459else
4460  case $DIFF in
4461  [\\/]* | ?:[\\/]*)
4462  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4463  ;;
4464  *)
4465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4466for as_dir in $PATH
4467do
4468  IFS=$as_save_IFS
4469  test -z "$as_dir" && as_dir=.
4470    for ac_exec_ext in '' $ac_executable_extensions; do
4471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4472    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4474    break 2
4475  fi
4476done
4477  done
4478IFS=$as_save_IFS
4479
4480  ;;
4481esac
4482fi
4483DIFF=$ac_cv_path_DIFF
4484if test -n "$DIFF"; then
4485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4486$as_echo "$DIFF" >&6; }
4487else
4488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4489$as_echo "no" >&6; }
4490fi
4491
4492
4493  test -n "$DIFF" && break
4494done
4495
4496
4497    if test "x$DIFF" = x; then
4498        if test "xgdiff diff" = x; then
4499          PROG_NAME=diff
4500        else
4501          PROG_NAME=gdiff diff
4502        fi
4503        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4504$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4505        as_fn_error $? "Cannot continue" "$LINENO" 5
4506    fi
4507
4508
4509
4510    for ac_prog in dirname
4511do
4512  # Extract the first word of "$ac_prog", so it can be a program name with args.
4513set dummy $ac_prog; ac_word=$2
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4515$as_echo_n "checking for $ac_word... " >&6; }
4516if ${ac_cv_path_DIRNAME+:} false; then :
4517  $as_echo_n "(cached) " >&6
4518else
4519  case $DIRNAME in
4520  [\\/]* | ?:[\\/]*)
4521  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4522  ;;
4523  *)
4524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH
4526do
4527  IFS=$as_save_IFS
4528  test -z "$as_dir" && as_dir=.
4529    for ac_exec_ext in '' $ac_executable_extensions; do
4530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4531    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4533    break 2
4534  fi
4535done
4536  done
4537IFS=$as_save_IFS
4538
4539  ;;
4540esac
4541fi
4542DIRNAME=$ac_cv_path_DIRNAME
4543if test -n "$DIRNAME"; then
4544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4545$as_echo "$DIRNAME" >&6; }
4546else
4547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4548$as_echo "no" >&6; }
4549fi
4550
4551
4552  test -n "$DIRNAME" && break
4553done
4554
4555
4556    if test "x$DIRNAME" = x; then
4557        if test "xdirname" = x; then
4558          PROG_NAME=dirname
4559        else
4560          PROG_NAME=dirname
4561        fi
4562        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4563$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4564        as_fn_error $? "Cannot continue" "$LINENO" 5
4565    fi
4566
4567
4568
4569    for ac_prog in echo
4570do
4571  # Extract the first word of "$ac_prog", so it can be a program name with args.
4572set dummy $ac_prog; ac_word=$2
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4574$as_echo_n "checking for $ac_word... " >&6; }
4575if ${ac_cv_path_ECHO+:} false; then :
4576  $as_echo_n "(cached) " >&6
4577else
4578  case $ECHO in
4579  [\\/]* | ?:[\\/]*)
4580  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4581  ;;
4582  *)
4583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4584for as_dir in $PATH
4585do
4586  IFS=$as_save_IFS
4587  test -z "$as_dir" && as_dir=.
4588    for ac_exec_ext in '' $ac_executable_extensions; do
4589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4590    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4592    break 2
4593  fi
4594done
4595  done
4596IFS=$as_save_IFS
4597
4598  ;;
4599esac
4600fi
4601ECHO=$ac_cv_path_ECHO
4602if test -n "$ECHO"; then
4603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4604$as_echo "$ECHO" >&6; }
4605else
4606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4607$as_echo "no" >&6; }
4608fi
4609
4610
4611  test -n "$ECHO" && break
4612done
4613
4614
4615    if test "x$ECHO" = x; then
4616        if test "xecho" = x; then
4617          PROG_NAME=echo
4618        else
4619          PROG_NAME=echo
4620        fi
4621        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4622$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4623        as_fn_error $? "Cannot continue" "$LINENO" 5
4624    fi
4625
4626
4627
4628    for ac_prog in expr
4629do
4630  # Extract the first word of "$ac_prog", so it can be a program name with args.
4631set dummy $ac_prog; ac_word=$2
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4633$as_echo_n "checking for $ac_word... " >&6; }
4634if ${ac_cv_path_EXPR+:} false; then :
4635  $as_echo_n "(cached) " >&6
4636else
4637  case $EXPR in
4638  [\\/]* | ?:[\\/]*)
4639  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4640  ;;
4641  *)
4642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643for as_dir in $PATH
4644do
4645  IFS=$as_save_IFS
4646  test -z "$as_dir" && as_dir=.
4647    for ac_exec_ext in '' $ac_executable_extensions; do
4648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4651    break 2
4652  fi
4653done
4654  done
4655IFS=$as_save_IFS
4656
4657  ;;
4658esac
4659fi
4660EXPR=$ac_cv_path_EXPR
4661if test -n "$EXPR"; then
4662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4663$as_echo "$EXPR" >&6; }
4664else
4665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4666$as_echo "no" >&6; }
4667fi
4668
4669
4670  test -n "$EXPR" && break
4671done
4672
4673
4674    if test "x$EXPR" = x; then
4675        if test "xexpr" = x; then
4676          PROG_NAME=expr
4677        else
4678          PROG_NAME=expr
4679        fi
4680        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4681$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4682        as_fn_error $? "Cannot continue" "$LINENO" 5
4683    fi
4684
4685
4686
4687    for ac_prog in file
4688do
4689  # Extract the first word of "$ac_prog", so it can be a program name with args.
4690set dummy $ac_prog; ac_word=$2
4691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4692$as_echo_n "checking for $ac_word... " >&6; }
4693if ${ac_cv_path_FILE+:} false; then :
4694  $as_echo_n "(cached) " >&6
4695else
4696  case $FILE in
4697  [\\/]* | ?:[\\/]*)
4698  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4699  ;;
4700  *)
4701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702for as_dir in $PATH
4703do
4704  IFS=$as_save_IFS
4705  test -z "$as_dir" && as_dir=.
4706    for ac_exec_ext in '' $ac_executable_extensions; do
4707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4708    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4710    break 2
4711  fi
4712done
4713  done
4714IFS=$as_save_IFS
4715
4716  ;;
4717esac
4718fi
4719FILE=$ac_cv_path_FILE
4720if test -n "$FILE"; then
4721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4722$as_echo "$FILE" >&6; }
4723else
4724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4725$as_echo "no" >&6; }
4726fi
4727
4728
4729  test -n "$FILE" && break
4730done
4731
4732
4733    if test "x$FILE" = x; then
4734        if test "xfile" = x; then
4735          PROG_NAME=file
4736        else
4737          PROG_NAME=file
4738        fi
4739        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4740$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4741        as_fn_error $? "Cannot continue" "$LINENO" 5
4742    fi
4743
4744
4745
4746    for ac_prog in find
4747do
4748  # Extract the first word of "$ac_prog", so it can be a program name with args.
4749set dummy $ac_prog; ac_word=$2
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
4752if ${ac_cv_path_FIND+:} false; then :
4753  $as_echo_n "(cached) " >&6
4754else
4755  case $FIND in
4756  [\\/]* | ?:[\\/]*)
4757  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4758  ;;
4759  *)
4760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763  IFS=$as_save_IFS
4764  test -z "$as_dir" && as_dir=.
4765    for ac_exec_ext in '' $ac_executable_extensions; do
4766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4767    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769    break 2
4770  fi
4771done
4772  done
4773IFS=$as_save_IFS
4774
4775  ;;
4776esac
4777fi
4778FIND=$ac_cv_path_FIND
4779if test -n "$FIND"; then
4780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4781$as_echo "$FIND" >&6; }
4782else
4783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787
4788  test -n "$FIND" && break
4789done
4790
4791
4792    if test "x$FIND" = x; then
4793        if test "xfind" = x; then
4794          PROG_NAME=find
4795        else
4796          PROG_NAME=find
4797        fi
4798        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4799$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4800        as_fn_error $? "Cannot continue" "$LINENO" 5
4801    fi
4802
4803
4804
4805    for ac_prog in head
4806do
4807  # Extract the first word of "$ac_prog", so it can be a program name with args.
4808set dummy $ac_prog; ac_word=$2
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810$as_echo_n "checking for $ac_word... " >&6; }
4811if ${ac_cv_path_HEAD+:} false; then :
4812  $as_echo_n "(cached) " >&6
4813else
4814  case $HEAD in
4815  [\\/]* | ?:[\\/]*)
4816  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4817  ;;
4818  *)
4819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4820for as_dir in $PATH
4821do
4822  IFS=$as_save_IFS
4823  test -z "$as_dir" && as_dir=.
4824    for ac_exec_ext in '' $ac_executable_extensions; do
4825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4826    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4828    break 2
4829  fi
4830done
4831  done
4832IFS=$as_save_IFS
4833
4834  ;;
4835esac
4836fi
4837HEAD=$ac_cv_path_HEAD
4838if test -n "$HEAD"; then
4839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4840$as_echo "$HEAD" >&6; }
4841else
4842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843$as_echo "no" >&6; }
4844fi
4845
4846
4847  test -n "$HEAD" && break
4848done
4849
4850
4851    if test "x$HEAD" = x; then
4852        if test "xhead" = x; then
4853          PROG_NAME=head
4854        else
4855          PROG_NAME=head
4856        fi
4857        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4858$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4859        as_fn_error $? "Cannot continue" "$LINENO" 5
4860    fi
4861
4862
4863
4864    for ac_prog in ln
4865do
4866  # Extract the first word of "$ac_prog", so it can be a program name with args.
4867set dummy $ac_prog; ac_word=$2
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4869$as_echo_n "checking for $ac_word... " >&6; }
4870if ${ac_cv_path_LN+:} false; then :
4871  $as_echo_n "(cached) " >&6
4872else
4873  case $LN in
4874  [\\/]* | ?:[\\/]*)
4875  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4876  ;;
4877  *)
4878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in $PATH
4880do
4881  IFS=$as_save_IFS
4882  test -z "$as_dir" && as_dir=.
4883    for ac_exec_ext in '' $ac_executable_extensions; do
4884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4885    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4887    break 2
4888  fi
4889done
4890  done
4891IFS=$as_save_IFS
4892
4893  ;;
4894esac
4895fi
4896LN=$ac_cv_path_LN
4897if test -n "$LN"; then
4898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4899$as_echo "$LN" >&6; }
4900else
4901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
4903fi
4904
4905
4906  test -n "$LN" && break
4907done
4908
4909
4910    if test "x$LN" = x; then
4911        if test "xln" = x; then
4912          PROG_NAME=ln
4913        else
4914          PROG_NAME=ln
4915        fi
4916        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4917$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4918        as_fn_error $? "Cannot continue" "$LINENO" 5
4919    fi
4920
4921
4922
4923    for ac_prog in ls
4924do
4925  # Extract the first word of "$ac_prog", so it can be a program name with args.
4926set dummy $ac_prog; ac_word=$2
4927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4928$as_echo_n "checking for $ac_word... " >&6; }
4929if ${ac_cv_path_LS+:} false; then :
4930  $as_echo_n "(cached) " >&6
4931else
4932  case $LS in
4933  [\\/]* | ?:[\\/]*)
4934  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4935  ;;
4936  *)
4937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4938for as_dir in $PATH
4939do
4940  IFS=$as_save_IFS
4941  test -z "$as_dir" && as_dir=.
4942    for ac_exec_ext in '' $ac_executable_extensions; do
4943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4944    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4946    break 2
4947  fi
4948done
4949  done
4950IFS=$as_save_IFS
4951
4952  ;;
4953esac
4954fi
4955LS=$ac_cv_path_LS
4956if test -n "$LS"; then
4957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4958$as_echo "$LS" >&6; }
4959else
4960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4961$as_echo "no" >&6; }
4962fi
4963
4964
4965  test -n "$LS" && break
4966done
4967
4968
4969    if test "x$LS" = x; then
4970        if test "xls" = x; then
4971          PROG_NAME=ls
4972        else
4973          PROG_NAME=ls
4974        fi
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4976$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4977        as_fn_error $? "Cannot continue" "$LINENO" 5
4978    fi
4979
4980
4981
4982    for ac_prog in mkdir
4983do
4984  # Extract the first word of "$ac_prog", so it can be a program name with args.
4985set dummy $ac_prog; ac_word=$2
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
4988if ${ac_cv_path_MKDIR+:} false; then :
4989  $as_echo_n "(cached) " >&6
4990else
4991  case $MKDIR in
4992  [\\/]* | ?:[\\/]*)
4993  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4994  ;;
4995  *)
4996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4997for as_dir in $PATH
4998do
4999  IFS=$as_save_IFS
5000  test -z "$as_dir" && as_dir=.
5001    for ac_exec_ext in '' $ac_executable_extensions; do
5002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5003    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5005    break 2
5006  fi
5007done
5008  done
5009IFS=$as_save_IFS
5010
5011  ;;
5012esac
5013fi
5014MKDIR=$ac_cv_path_MKDIR
5015if test -n "$MKDIR"; then
5016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5017$as_echo "$MKDIR" >&6; }
5018else
5019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020$as_echo "no" >&6; }
5021fi
5022
5023
5024  test -n "$MKDIR" && break
5025done
5026
5027
5028    if test "x$MKDIR" = x; then
5029        if test "xmkdir" = x; then
5030          PROG_NAME=mkdir
5031        else
5032          PROG_NAME=mkdir
5033        fi
5034        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5035$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5036        as_fn_error $? "Cannot continue" "$LINENO" 5
5037    fi
5038
5039
5040
5041    for ac_prog in mktemp
5042do
5043  # Extract the first word of "$ac_prog", so it can be a program name with args.
5044set dummy $ac_prog; ac_word=$2
5045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
5047if ${ac_cv_path_MKTEMP+:} false; then :
5048  $as_echo_n "(cached) " >&6
5049else
5050  case $MKTEMP in
5051  [\\/]* | ?:[\\/]*)
5052  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5053  ;;
5054  *)
5055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056for as_dir in $PATH
5057do
5058  IFS=$as_save_IFS
5059  test -z "$as_dir" && as_dir=.
5060    for ac_exec_ext in '' $ac_executable_extensions; do
5061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5062    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5064    break 2
5065  fi
5066done
5067  done
5068IFS=$as_save_IFS
5069
5070  ;;
5071esac
5072fi
5073MKTEMP=$ac_cv_path_MKTEMP
5074if test -n "$MKTEMP"; then
5075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5076$as_echo "$MKTEMP" >&6; }
5077else
5078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079$as_echo "no" >&6; }
5080fi
5081
5082
5083  test -n "$MKTEMP" && break
5084done
5085
5086
5087    if test "x$MKTEMP" = x; then
5088        if test "xmktemp" = x; then
5089          PROG_NAME=mktemp
5090        else
5091          PROG_NAME=mktemp
5092        fi
5093        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5094$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5095        as_fn_error $? "Cannot continue" "$LINENO" 5
5096    fi
5097
5098
5099
5100    for ac_prog in mv
5101do
5102  # Extract the first word of "$ac_prog", so it can be a program name with args.
5103set dummy $ac_prog; ac_word=$2
5104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5105$as_echo_n "checking for $ac_word... " >&6; }
5106if ${ac_cv_path_MV+:} false; then :
5107  $as_echo_n "(cached) " >&6
5108else
5109  case $MV in
5110  [\\/]* | ?:[\\/]*)
5111  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5112  ;;
5113  *)
5114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5115for as_dir in $PATH
5116do
5117  IFS=$as_save_IFS
5118  test -z "$as_dir" && as_dir=.
5119    for ac_exec_ext in '' $ac_executable_extensions; do
5120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5121    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5123    break 2
5124  fi
5125done
5126  done
5127IFS=$as_save_IFS
5128
5129  ;;
5130esac
5131fi
5132MV=$ac_cv_path_MV
5133if test -n "$MV"; then
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5135$as_echo "$MV" >&6; }
5136else
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5138$as_echo "no" >&6; }
5139fi
5140
5141
5142  test -n "$MV" && break
5143done
5144
5145
5146    if test "x$MV" = x; then
5147        if test "xmv" = x; then
5148          PROG_NAME=mv
5149        else
5150          PROG_NAME=mv
5151        fi
5152        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5153$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5154        as_fn_error $? "Cannot continue" "$LINENO" 5
5155    fi
5156
5157
5158
5159    for ac_prog in printf
5160do
5161  # Extract the first word of "$ac_prog", so it can be a program name with args.
5162set dummy $ac_prog; ac_word=$2
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5164$as_echo_n "checking for $ac_word... " >&6; }
5165if ${ac_cv_path_PRINTF+:} false; then :
5166  $as_echo_n "(cached) " >&6
5167else
5168  case $PRINTF in
5169  [\\/]* | ?:[\\/]*)
5170  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5171  ;;
5172  *)
5173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5174for as_dir in $PATH
5175do
5176  IFS=$as_save_IFS
5177  test -z "$as_dir" && as_dir=.
5178    for ac_exec_ext in '' $ac_executable_extensions; do
5179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5180    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5182    break 2
5183  fi
5184done
5185  done
5186IFS=$as_save_IFS
5187
5188  ;;
5189esac
5190fi
5191PRINTF=$ac_cv_path_PRINTF
5192if test -n "$PRINTF"; then
5193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5194$as_echo "$PRINTF" >&6; }
5195else
5196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5197$as_echo "no" >&6; }
5198fi
5199
5200
5201  test -n "$PRINTF" && break
5202done
5203
5204
5205    if test "x$PRINTF" = x; then
5206        if test "xprintf" = x; then
5207          PROG_NAME=printf
5208        else
5209          PROG_NAME=printf
5210        fi
5211        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5212$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5213        as_fn_error $? "Cannot continue" "$LINENO" 5
5214    fi
5215
5216
5217
5218    for ac_prog in rm
5219do
5220  # Extract the first word of "$ac_prog", so it can be a program name with args.
5221set dummy $ac_prog; ac_word=$2
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223$as_echo_n "checking for $ac_word... " >&6; }
5224if ${ac_cv_path_RM+:} false; then :
5225  $as_echo_n "(cached) " >&6
5226else
5227  case $RM in
5228  [\\/]* | ?:[\\/]*)
5229  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5230  ;;
5231  *)
5232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233for as_dir in $PATH
5234do
5235  IFS=$as_save_IFS
5236  test -z "$as_dir" && as_dir=.
5237    for ac_exec_ext in '' $ac_executable_extensions; do
5238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241    break 2
5242  fi
5243done
5244  done
5245IFS=$as_save_IFS
5246
5247  ;;
5248esac
5249fi
5250RM=$ac_cv_path_RM
5251if test -n "$RM"; then
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5253$as_echo "$RM" >&6; }
5254else
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256$as_echo "no" >&6; }
5257fi
5258
5259
5260  test -n "$RM" && break
5261done
5262
5263
5264    if test "x$RM" = x; then
5265        if test "xrm" = x; then
5266          PROG_NAME=rm
5267        else
5268          PROG_NAME=rm
5269        fi
5270        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5271$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5272        as_fn_error $? "Cannot continue" "$LINENO" 5
5273    fi
5274
5275
5276
5277    for ac_prog in sh
5278do
5279  # Extract the first word of "$ac_prog", so it can be a program name with args.
5280set dummy $ac_prog; ac_word=$2
5281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5282$as_echo_n "checking for $ac_word... " >&6; }
5283if ${ac_cv_path_SH+:} false; then :
5284  $as_echo_n "(cached) " >&6
5285else
5286  case $SH in
5287  [\\/]* | ?:[\\/]*)
5288  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5289  ;;
5290  *)
5291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5292for as_dir in $PATH
5293do
5294  IFS=$as_save_IFS
5295  test -z "$as_dir" && as_dir=.
5296    for ac_exec_ext in '' $ac_executable_extensions; do
5297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5298    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5300    break 2
5301  fi
5302done
5303  done
5304IFS=$as_save_IFS
5305
5306  ;;
5307esac
5308fi
5309SH=$ac_cv_path_SH
5310if test -n "$SH"; then
5311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5312$as_echo "$SH" >&6; }
5313else
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5315$as_echo "no" >&6; }
5316fi
5317
5318
5319  test -n "$SH" && break
5320done
5321
5322
5323    if test "x$SH" = x; then
5324        if test "xsh" = x; then
5325          PROG_NAME=sh
5326        else
5327          PROG_NAME=sh
5328        fi
5329        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5330$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5331        as_fn_error $? "Cannot continue" "$LINENO" 5
5332    fi
5333
5334
5335
5336    for ac_prog in sort
5337do
5338  # Extract the first word of "$ac_prog", so it can be a program name with args.
5339set dummy $ac_prog; ac_word=$2
5340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5341$as_echo_n "checking for $ac_word... " >&6; }
5342if ${ac_cv_path_SORT+:} false; then :
5343  $as_echo_n "(cached) " >&6
5344else
5345  case $SORT in
5346  [\\/]* | ?:[\\/]*)
5347  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5348  ;;
5349  *)
5350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5351for as_dir in $PATH
5352do
5353  IFS=$as_save_IFS
5354  test -z "$as_dir" && as_dir=.
5355    for ac_exec_ext in '' $ac_executable_extensions; do
5356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5357    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5359    break 2
5360  fi
5361done
5362  done
5363IFS=$as_save_IFS
5364
5365  ;;
5366esac
5367fi
5368SORT=$ac_cv_path_SORT
5369if test -n "$SORT"; then
5370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5371$as_echo "$SORT" >&6; }
5372else
5373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5374$as_echo "no" >&6; }
5375fi
5376
5377
5378  test -n "$SORT" && break
5379done
5380
5381
5382    if test "x$SORT" = x; then
5383        if test "xsort" = x; then
5384          PROG_NAME=sort
5385        else
5386          PROG_NAME=sort
5387        fi
5388        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5389$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5390        as_fn_error $? "Cannot continue" "$LINENO" 5
5391    fi
5392
5393
5394
5395    for ac_prog in tail
5396do
5397  # Extract the first word of "$ac_prog", so it can be a program name with args.
5398set dummy $ac_prog; ac_word=$2
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400$as_echo_n "checking for $ac_word... " >&6; }
5401if ${ac_cv_path_TAIL+:} false; then :
5402  $as_echo_n "(cached) " >&6
5403else
5404  case $TAIL in
5405  [\\/]* | ?:[\\/]*)
5406  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5407  ;;
5408  *)
5409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5410for as_dir in $PATH
5411do
5412  IFS=$as_save_IFS
5413  test -z "$as_dir" && as_dir=.
5414    for ac_exec_ext in '' $ac_executable_extensions; do
5415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5416    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5418    break 2
5419  fi
5420done
5421  done
5422IFS=$as_save_IFS
5423
5424  ;;
5425esac
5426fi
5427TAIL=$ac_cv_path_TAIL
5428if test -n "$TAIL"; then
5429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5430$as_echo "$TAIL" >&6; }
5431else
5432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5433$as_echo "no" >&6; }
5434fi
5435
5436
5437  test -n "$TAIL" && break
5438done
5439
5440
5441    if test "x$TAIL" = x; then
5442        if test "xtail" = x; then
5443          PROG_NAME=tail
5444        else
5445          PROG_NAME=tail
5446        fi
5447        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5448$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5449        as_fn_error $? "Cannot continue" "$LINENO" 5
5450    fi
5451
5452
5453
5454    for ac_prog in tar
5455do
5456  # Extract the first word of "$ac_prog", so it can be a program name with args.
5457set dummy $ac_prog; ac_word=$2
5458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5459$as_echo_n "checking for $ac_word... " >&6; }
5460if ${ac_cv_path_TAR+:} false; then :
5461  $as_echo_n "(cached) " >&6
5462else
5463  case $TAR in
5464  [\\/]* | ?:[\\/]*)
5465  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5466  ;;
5467  *)
5468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH
5470do
5471  IFS=$as_save_IFS
5472  test -z "$as_dir" && as_dir=.
5473    for ac_exec_ext in '' $ac_executable_extensions; do
5474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5475    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5477    break 2
5478  fi
5479done
5480  done
5481IFS=$as_save_IFS
5482
5483  ;;
5484esac
5485fi
5486TAR=$ac_cv_path_TAR
5487if test -n "$TAR"; then
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5489$as_echo "$TAR" >&6; }
5490else
5491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5492$as_echo "no" >&6; }
5493fi
5494
5495
5496  test -n "$TAR" && break
5497done
5498
5499
5500    if test "x$TAR" = x; then
5501        if test "xtar" = x; then
5502          PROG_NAME=tar
5503        else
5504          PROG_NAME=tar
5505        fi
5506        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5507$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5508        as_fn_error $? "Cannot continue" "$LINENO" 5
5509    fi
5510
5511
5512
5513    for ac_prog in tee
5514do
5515  # Extract the first word of "$ac_prog", so it can be a program name with args.
5516set dummy $ac_prog; ac_word=$2
5517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5518$as_echo_n "checking for $ac_word... " >&6; }
5519if ${ac_cv_path_TEE+:} false; then :
5520  $as_echo_n "(cached) " >&6
5521else
5522  case $TEE in
5523  [\\/]* | ?:[\\/]*)
5524  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5525  ;;
5526  *)
5527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5528for as_dir in $PATH
5529do
5530  IFS=$as_save_IFS
5531  test -z "$as_dir" && as_dir=.
5532    for ac_exec_ext in '' $ac_executable_extensions; do
5533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5534    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5536    break 2
5537  fi
5538done
5539  done
5540IFS=$as_save_IFS
5541
5542  ;;
5543esac
5544fi
5545TEE=$ac_cv_path_TEE
5546if test -n "$TEE"; then
5547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5548$as_echo "$TEE" >&6; }
5549else
5550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5551$as_echo "no" >&6; }
5552fi
5553
5554
5555  test -n "$TEE" && break
5556done
5557
5558
5559    if test "x$TEE" = x; then
5560        if test "xtee" = x; then
5561          PROG_NAME=tee
5562        else
5563          PROG_NAME=tee
5564        fi
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5566$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5567        as_fn_error $? "Cannot continue" "$LINENO" 5
5568    fi
5569
5570
5571
5572    for ac_prog in touch
5573do
5574  # Extract the first word of "$ac_prog", so it can be a program name with args.
5575set dummy $ac_prog; ac_word=$2
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5577$as_echo_n "checking for $ac_word... " >&6; }
5578if ${ac_cv_path_TOUCH+:} false; then :
5579  $as_echo_n "(cached) " >&6
5580else
5581  case $TOUCH in
5582  [\\/]* | ?:[\\/]*)
5583  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5584  ;;
5585  *)
5586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5587for as_dir in $PATH
5588do
5589  IFS=$as_save_IFS
5590  test -z "$as_dir" && as_dir=.
5591    for ac_exec_ext in '' $ac_executable_extensions; do
5592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5593    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5595    break 2
5596  fi
5597done
5598  done
5599IFS=$as_save_IFS
5600
5601  ;;
5602esac
5603fi
5604TOUCH=$ac_cv_path_TOUCH
5605if test -n "$TOUCH"; then
5606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5607$as_echo "$TOUCH" >&6; }
5608else
5609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5610$as_echo "no" >&6; }
5611fi
5612
5613
5614  test -n "$TOUCH" && break
5615done
5616
5617
5618    if test "x$TOUCH" = x; then
5619        if test "xtouch" = x; then
5620          PROG_NAME=touch
5621        else
5622          PROG_NAME=touch
5623        fi
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5625$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5626        as_fn_error $? "Cannot continue" "$LINENO" 5
5627    fi
5628
5629
5630
5631    for ac_prog in tr
5632do
5633  # Extract the first word of "$ac_prog", so it can be a program name with args.
5634set dummy $ac_prog; ac_word=$2
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5636$as_echo_n "checking for $ac_word... " >&6; }
5637if ${ac_cv_path_TR+:} false; then :
5638  $as_echo_n "(cached) " >&6
5639else
5640  case $TR in
5641  [\\/]* | ?:[\\/]*)
5642  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5643  ;;
5644  *)
5645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5646for as_dir in $PATH
5647do
5648  IFS=$as_save_IFS
5649  test -z "$as_dir" && as_dir=.
5650    for ac_exec_ext in '' $ac_executable_extensions; do
5651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5652    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5654    break 2
5655  fi
5656done
5657  done
5658IFS=$as_save_IFS
5659
5660  ;;
5661esac
5662fi
5663TR=$ac_cv_path_TR
5664if test -n "$TR"; then
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5666$as_echo "$TR" >&6; }
5667else
5668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669$as_echo "no" >&6; }
5670fi
5671
5672
5673  test -n "$TR" && break
5674done
5675
5676
5677    if test "x$TR" = x; then
5678        if test "xtr" = x; then
5679          PROG_NAME=tr
5680        else
5681          PROG_NAME=tr
5682        fi
5683        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5684$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5685        as_fn_error $? "Cannot continue" "$LINENO" 5
5686    fi
5687
5688
5689
5690    for ac_prog in uname
5691do
5692  # Extract the first word of "$ac_prog", so it can be a program name with args.
5693set dummy $ac_prog; ac_word=$2
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
5696if ${ac_cv_path_UNAME+:} false; then :
5697  $as_echo_n "(cached) " >&6
5698else
5699  case $UNAME in
5700  [\\/]* | ?:[\\/]*)
5701  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5702  ;;
5703  *)
5704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707  IFS=$as_save_IFS
5708  test -z "$as_dir" && as_dir=.
5709    for ac_exec_ext in '' $ac_executable_extensions; do
5710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5711    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5713    break 2
5714  fi
5715done
5716  done
5717IFS=$as_save_IFS
5718
5719  ;;
5720esac
5721fi
5722UNAME=$ac_cv_path_UNAME
5723if test -n "$UNAME"; then
5724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5725$as_echo "$UNAME" >&6; }
5726else
5727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
5729fi
5730
5731
5732  test -n "$UNAME" && break
5733done
5734
5735
5736    if test "x$UNAME" = x; then
5737        if test "xuname" = x; then
5738          PROG_NAME=uname
5739        else
5740          PROG_NAME=uname
5741        fi
5742        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5743$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5744        as_fn_error $? "Cannot continue" "$LINENO" 5
5745    fi
5746
5747
5748
5749    for ac_prog in uniq
5750do
5751  # Extract the first word of "$ac_prog", so it can be a program name with args.
5752set dummy $ac_prog; ac_word=$2
5753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5754$as_echo_n "checking for $ac_word... " >&6; }
5755if ${ac_cv_path_UNIQ+:} false; then :
5756  $as_echo_n "(cached) " >&6
5757else
5758  case $UNIQ in
5759  [\\/]* | ?:[\\/]*)
5760  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5761  ;;
5762  *)
5763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5764for as_dir in $PATH
5765do
5766  IFS=$as_save_IFS
5767  test -z "$as_dir" && as_dir=.
5768    for ac_exec_ext in '' $ac_executable_extensions; do
5769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5770    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5772    break 2
5773  fi
5774done
5775  done
5776IFS=$as_save_IFS
5777
5778  ;;
5779esac
5780fi
5781UNIQ=$ac_cv_path_UNIQ
5782if test -n "$UNIQ"; then
5783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5784$as_echo "$UNIQ" >&6; }
5785else
5786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5787$as_echo "no" >&6; }
5788fi
5789
5790
5791  test -n "$UNIQ" && break
5792done
5793
5794
5795    if test "x$UNIQ" = x; then
5796        if test "xuniq" = x; then
5797          PROG_NAME=uniq
5798        else
5799          PROG_NAME=uniq
5800        fi
5801        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5802$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5803        as_fn_error $? "Cannot continue" "$LINENO" 5
5804    fi
5805
5806
5807
5808    for ac_prog in wc
5809do
5810  # Extract the first word of "$ac_prog", so it can be a program name with args.
5811set dummy $ac_prog; ac_word=$2
5812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5813$as_echo_n "checking for $ac_word... " >&6; }
5814if ${ac_cv_path_WC+:} false; then :
5815  $as_echo_n "(cached) " >&6
5816else
5817  case $WC in
5818  [\\/]* | ?:[\\/]*)
5819  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5820  ;;
5821  *)
5822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5823for as_dir in $PATH
5824do
5825  IFS=$as_save_IFS
5826  test -z "$as_dir" && as_dir=.
5827    for ac_exec_ext in '' $ac_executable_extensions; do
5828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5829    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5831    break 2
5832  fi
5833done
5834  done
5835IFS=$as_save_IFS
5836
5837  ;;
5838esac
5839fi
5840WC=$ac_cv_path_WC
5841if test -n "$WC"; then
5842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5843$as_echo "$WC" >&6; }
5844else
5845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5846$as_echo "no" >&6; }
5847fi
5848
5849
5850  test -n "$WC" && break
5851done
5852
5853
5854    if test "x$WC" = x; then
5855        if test "xwc" = x; then
5856          PROG_NAME=wc
5857        else
5858          PROG_NAME=wc
5859        fi
5860        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5861$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5862        as_fn_error $? "Cannot continue" "$LINENO" 5
5863    fi
5864
5865
5866
5867    for ac_prog in which
5868do
5869  # Extract the first word of "$ac_prog", so it can be a program name with args.
5870set dummy $ac_prog; ac_word=$2
5871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5872$as_echo_n "checking for $ac_word... " >&6; }
5873if ${ac_cv_path_WHICH+:} false; then :
5874  $as_echo_n "(cached) " >&6
5875else
5876  case $WHICH in
5877  [\\/]* | ?:[\\/]*)
5878  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5879  ;;
5880  *)
5881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5882for as_dir in $PATH
5883do
5884  IFS=$as_save_IFS
5885  test -z "$as_dir" && as_dir=.
5886    for ac_exec_ext in '' $ac_executable_extensions; do
5887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5888    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5890    break 2
5891  fi
5892done
5893  done
5894IFS=$as_save_IFS
5895
5896  ;;
5897esac
5898fi
5899WHICH=$ac_cv_path_WHICH
5900if test -n "$WHICH"; then
5901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5902$as_echo "$WHICH" >&6; }
5903else
5904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5905$as_echo "no" >&6; }
5906fi
5907
5908
5909  test -n "$WHICH" && break
5910done
5911
5912
5913    if test "x$WHICH" = x; then
5914        if test "xwhich" = x; then
5915          PROG_NAME=which
5916        else
5917          PROG_NAME=which
5918        fi
5919        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5920$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5921        as_fn_error $? "Cannot continue" "$LINENO" 5
5922    fi
5923
5924
5925
5926    for ac_prog in xargs
5927do
5928  # Extract the first word of "$ac_prog", so it can be a program name with args.
5929set dummy $ac_prog; ac_word=$2
5930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5931$as_echo_n "checking for $ac_word... " >&6; }
5932if ${ac_cv_path_XARGS+:} false; then :
5933  $as_echo_n "(cached) " >&6
5934else
5935  case $XARGS in
5936  [\\/]* | ?:[\\/]*)
5937  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5938  ;;
5939  *)
5940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941for as_dir in $PATH
5942do
5943  IFS=$as_save_IFS
5944  test -z "$as_dir" && as_dir=.
5945    for ac_exec_ext in '' $ac_executable_extensions; do
5946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5947    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5949    break 2
5950  fi
5951done
5952  done
5953IFS=$as_save_IFS
5954
5955  ;;
5956esac
5957fi
5958XARGS=$ac_cv_path_XARGS
5959if test -n "$XARGS"; then
5960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5961$as_echo "$XARGS" >&6; }
5962else
5963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964$as_echo "no" >&6; }
5965fi
5966
5967
5968  test -n "$XARGS" && break
5969done
5970
5971
5972    if test "x$XARGS" = x; then
5973        if test "xxargs" = x; then
5974          PROG_NAME=xargs
5975        else
5976          PROG_NAME=xargs
5977        fi
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5979$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5980        as_fn_error $? "Cannot continue" "$LINENO" 5
5981    fi
5982
5983
5984
5985# Then required tools that require some special treatment.
5986for ac_prog in gawk mawk nawk awk
5987do
5988  # Extract the first word of "$ac_prog", so it can be a program name with args.
5989set dummy $ac_prog; ac_word=$2
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
5992if ${ac_cv_prog_AWK+:} false; then :
5993  $as_echo_n "(cached) " >&6
5994else
5995  if test -n "$AWK"; then
5996  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5997else
5998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001  IFS=$as_save_IFS
6002  test -z "$as_dir" && as_dir=.
6003    for ac_exec_ext in '' $ac_executable_extensions; do
6004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6005    ac_cv_prog_AWK="$ac_prog"
6006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6007    break 2
6008  fi
6009done
6010  done
6011IFS=$as_save_IFS
6012
6013fi
6014fi
6015AWK=$ac_cv_prog_AWK
6016if test -n "$AWK"; then
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6018$as_echo "$AWK" >&6; }
6019else
6020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
6022fi
6023
6024
6025  test -n "$AWK" && break
6026done
6027
6028
6029    if test "x$AWK" = x; then
6030        if test "x" = x; then
6031          PROG_NAME=awk
6032        else
6033          PROG_NAME=
6034        fi
6035        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6036$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6037        as_fn_error $? "Cannot continue" "$LINENO" 5
6038    fi
6039
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6041$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6042if ${ac_cv_path_GREP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  if test -z "$GREP"; then
6046  ac_path_GREP_found=false
6047  # Loop through the user's path and test for each of PROGNAME-LIST
6048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6050do
6051  IFS=$as_save_IFS
6052  test -z "$as_dir" && as_dir=.
6053    for ac_prog in grep ggrep; do
6054    for ac_exec_ext in '' $ac_executable_extensions; do
6055      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6056      as_fn_executable_p "$ac_path_GREP" || continue
6057# Check for GNU ac_path_GREP and select it if it is found.
6058  # Check for GNU $ac_path_GREP
6059case `"$ac_path_GREP" --version 2>&1` in
6060*GNU*)
6061  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6062*)
6063  ac_count=0
6064  $as_echo_n 0123456789 >"conftest.in"
6065  while :
6066  do
6067    cat "conftest.in" "conftest.in" >"conftest.tmp"
6068    mv "conftest.tmp" "conftest.in"
6069    cp "conftest.in" "conftest.nl"
6070    $as_echo 'GREP' >> "conftest.nl"
6071    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6072    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6073    as_fn_arith $ac_count + 1 && ac_count=$as_val
6074    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6075      # Best one so far, save it but keep looking for a better one
6076      ac_cv_path_GREP="$ac_path_GREP"
6077      ac_path_GREP_max=$ac_count
6078    fi
6079    # 10*(2^10) chars as input seems more than enough
6080    test $ac_count -gt 10 && break
6081  done
6082  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6083esac
6084
6085      $ac_path_GREP_found && break 3
6086    done
6087  done
6088  done
6089IFS=$as_save_IFS
6090  if test -z "$ac_cv_path_GREP"; then
6091    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6092  fi
6093else
6094  ac_cv_path_GREP=$GREP
6095fi
6096
6097fi
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6099$as_echo "$ac_cv_path_GREP" >&6; }
6100 GREP="$ac_cv_path_GREP"
6101
6102
6103
6104    if test "x$GREP" = x; then
6105        if test "x" = x; then
6106          PROG_NAME=grep
6107        else
6108          PROG_NAME=
6109        fi
6110        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6111$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6112        as_fn_error $? "Cannot continue" "$LINENO" 5
6113    fi
6114
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6116$as_echo_n "checking for egrep... " >&6; }
6117if ${ac_cv_path_EGREP+:} false; then :
6118  $as_echo_n "(cached) " >&6
6119else
6120  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6121   then ac_cv_path_EGREP="$GREP -E"
6122   else
6123     if test -z "$EGREP"; then
6124  ac_path_EGREP_found=false
6125  # Loop through the user's path and test for each of PROGNAME-LIST
6126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6127for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6128do
6129  IFS=$as_save_IFS
6130  test -z "$as_dir" && as_dir=.
6131    for ac_prog in egrep; do
6132    for ac_exec_ext in '' $ac_executable_extensions; do
6133      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6134      as_fn_executable_p "$ac_path_EGREP" || continue
6135# Check for GNU ac_path_EGREP and select it if it is found.
6136  # Check for GNU $ac_path_EGREP
6137case `"$ac_path_EGREP" --version 2>&1` in
6138*GNU*)
6139  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6140*)
6141  ac_count=0
6142  $as_echo_n 0123456789 >"conftest.in"
6143  while :
6144  do
6145    cat "conftest.in" "conftest.in" >"conftest.tmp"
6146    mv "conftest.tmp" "conftest.in"
6147    cp "conftest.in" "conftest.nl"
6148    $as_echo 'EGREP' >> "conftest.nl"
6149    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6150    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6151    as_fn_arith $ac_count + 1 && ac_count=$as_val
6152    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6153      # Best one so far, save it but keep looking for a better one
6154      ac_cv_path_EGREP="$ac_path_EGREP"
6155      ac_path_EGREP_max=$ac_count
6156    fi
6157    # 10*(2^10) chars as input seems more than enough
6158    test $ac_count -gt 10 && break
6159  done
6160  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6161esac
6162
6163      $ac_path_EGREP_found && break 3
6164    done
6165  done
6166  done
6167IFS=$as_save_IFS
6168  if test -z "$ac_cv_path_EGREP"; then
6169    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6170  fi
6171else
6172  ac_cv_path_EGREP=$EGREP
6173fi
6174
6175   fi
6176fi
6177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6178$as_echo "$ac_cv_path_EGREP" >&6; }
6179 EGREP="$ac_cv_path_EGREP"
6180
6181
6182
6183    if test "x$EGREP" = x; then
6184        if test "x" = x; then
6185          PROG_NAME=egrep
6186        else
6187          PROG_NAME=
6188        fi
6189        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6190$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6191        as_fn_error $? "Cannot continue" "$LINENO" 5
6192    fi
6193
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6195$as_echo_n "checking for fgrep... " >&6; }
6196if ${ac_cv_path_FGREP+:} false; then :
6197  $as_echo_n "(cached) " >&6
6198else
6199  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6200   then ac_cv_path_FGREP="$GREP -F"
6201   else
6202     if test -z "$FGREP"; then
6203  ac_path_FGREP_found=false
6204  # Loop through the user's path and test for each of PROGNAME-LIST
6205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6207do
6208  IFS=$as_save_IFS
6209  test -z "$as_dir" && as_dir=.
6210    for ac_prog in fgrep; do
6211    for ac_exec_ext in '' $ac_executable_extensions; do
6212      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6213      as_fn_executable_p "$ac_path_FGREP" || continue
6214# Check for GNU ac_path_FGREP and select it if it is found.
6215  # Check for GNU $ac_path_FGREP
6216case `"$ac_path_FGREP" --version 2>&1` in
6217*GNU*)
6218  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6219*)
6220  ac_count=0
6221  $as_echo_n 0123456789 >"conftest.in"
6222  while :
6223  do
6224    cat "conftest.in" "conftest.in" >"conftest.tmp"
6225    mv "conftest.tmp" "conftest.in"
6226    cp "conftest.in" "conftest.nl"
6227    $as_echo 'FGREP' >> "conftest.nl"
6228    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6229    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6230    as_fn_arith $ac_count + 1 && ac_count=$as_val
6231    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6232      # Best one so far, save it but keep looking for a better one
6233      ac_cv_path_FGREP="$ac_path_FGREP"
6234      ac_path_FGREP_max=$ac_count
6235    fi
6236    # 10*(2^10) chars as input seems more than enough
6237    test $ac_count -gt 10 && break
6238  done
6239  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6240esac
6241
6242      $ac_path_FGREP_found && break 3
6243    done
6244  done
6245  done
6246IFS=$as_save_IFS
6247  if test -z "$ac_cv_path_FGREP"; then
6248    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6249  fi
6250else
6251  ac_cv_path_FGREP=$FGREP
6252fi
6253
6254   fi
6255fi
6256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6257$as_echo "$ac_cv_path_FGREP" >&6; }
6258 FGREP="$ac_cv_path_FGREP"
6259
6260
6261
6262    if test "x$FGREP" = x; then
6263        if test "x" = x; then
6264          PROG_NAME=fgrep
6265        else
6266          PROG_NAME=
6267        fi
6268        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6269$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6270        as_fn_error $? "Cannot continue" "$LINENO" 5
6271    fi
6272
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6274$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6275if ${ac_cv_path_SED+:} false; then :
6276  $as_echo_n "(cached) " >&6
6277else
6278            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6279     for ac_i in 1 2 3 4 5 6 7; do
6280       ac_script="$ac_script$as_nl$ac_script"
6281     done
6282     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6283     { ac_script=; unset ac_script;}
6284     if test -z "$SED"; then
6285  ac_path_SED_found=false
6286  # Loop through the user's path and test for each of PROGNAME-LIST
6287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288for as_dir in $PATH
6289do
6290  IFS=$as_save_IFS
6291  test -z "$as_dir" && as_dir=.
6292    for ac_prog in sed gsed; do
6293    for ac_exec_ext in '' $ac_executable_extensions; do
6294      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6295      as_fn_executable_p "$ac_path_SED" || continue
6296# Check for GNU ac_path_SED and select it if it is found.
6297  # Check for GNU $ac_path_SED
6298case `"$ac_path_SED" --version 2>&1` in
6299*GNU*)
6300  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6301*)
6302  ac_count=0
6303  $as_echo_n 0123456789 >"conftest.in"
6304  while :
6305  do
6306    cat "conftest.in" "conftest.in" >"conftest.tmp"
6307    mv "conftest.tmp" "conftest.in"
6308    cp "conftest.in" "conftest.nl"
6309    $as_echo '' >> "conftest.nl"
6310    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6311    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6312    as_fn_arith $ac_count + 1 && ac_count=$as_val
6313    if test $ac_count -gt ${ac_path_SED_max-0}; then
6314      # Best one so far, save it but keep looking for a better one
6315      ac_cv_path_SED="$ac_path_SED"
6316      ac_path_SED_max=$ac_count
6317    fi
6318    # 10*(2^10) chars as input seems more than enough
6319    test $ac_count -gt 10 && break
6320  done
6321  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6322esac
6323
6324      $ac_path_SED_found && break 3
6325    done
6326  done
6327  done
6328IFS=$as_save_IFS
6329  if test -z "$ac_cv_path_SED"; then
6330    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6331  fi
6332else
6333  ac_cv_path_SED=$SED
6334fi
6335
6336fi
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6338$as_echo "$ac_cv_path_SED" >&6; }
6339 SED="$ac_cv_path_SED"
6340  rm -f conftest.sed
6341
6342
6343    if test "x$SED" = x; then
6344        if test "x" = x; then
6345          PROG_NAME=sed
6346        else
6347          PROG_NAME=
6348        fi
6349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6351        as_fn_error $? "Cannot continue" "$LINENO" 5
6352    fi
6353
6354
6355for ac_prog in nawk gawk awk
6356do
6357  # Extract the first word of "$ac_prog", so it can be a program name with args.
6358set dummy $ac_prog; ac_word=$2
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360$as_echo_n "checking for $ac_word... " >&6; }
6361if ${ac_cv_path_NAWK+:} false; then :
6362  $as_echo_n "(cached) " >&6
6363else
6364  case $NAWK in
6365  [\\/]* | ?:[\\/]*)
6366  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6367  ;;
6368  *)
6369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372  IFS=$as_save_IFS
6373  test -z "$as_dir" && as_dir=.
6374    for ac_exec_ext in '' $ac_executable_extensions; do
6375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6376    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6378    break 2
6379  fi
6380done
6381  done
6382IFS=$as_save_IFS
6383
6384  ;;
6385esac
6386fi
6387NAWK=$ac_cv_path_NAWK
6388if test -n "$NAWK"; then
6389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6390$as_echo "$NAWK" >&6; }
6391else
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396
6397  test -n "$NAWK" && break
6398done
6399
6400
6401    if test "x$NAWK" = x; then
6402        if test "x" = x; then
6403          PROG_NAME=nawk
6404        else
6405          PROG_NAME=
6406        fi
6407        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6408$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6409        as_fn_error $? "Cannot continue" "$LINENO" 5
6410    fi
6411
6412
6413# Always force rm.
6414RM="$RM -f"
6415
6416# pwd behaves differently on various platforms and some don't support the -L flag.
6417# Always use the bash builtin pwd to get uniform behavior.
6418THEPWDCMD=pwd
6419
6420# These are not required on all platforms
6421# Extract the first word of "cygpath", so it can be a program name with args.
6422set dummy cygpath; ac_word=$2
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6424$as_echo_n "checking for $ac_word... " >&6; }
6425if ${ac_cv_path_CYGPATH+:} false; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  case $CYGPATH in
6429  [\\/]* | ?:[\\/]*)
6430  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6431  ;;
6432  *)
6433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH
6435do
6436  IFS=$as_save_IFS
6437  test -z "$as_dir" && as_dir=.
6438    for ac_exec_ext in '' $ac_executable_extensions; do
6439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6440    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442    break 2
6443  fi
6444done
6445  done
6446IFS=$as_save_IFS
6447
6448  ;;
6449esac
6450fi
6451CYGPATH=$ac_cv_path_CYGPATH
6452if test -n "$CYGPATH"; then
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6454$as_echo "$CYGPATH" >&6; }
6455else
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460
6461# Extract the first word of "readlink", so it can be a program name with args.
6462set dummy readlink; ac_word=$2
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464$as_echo_n "checking for $ac_word... " >&6; }
6465if ${ac_cv_path_READLINK+:} false; then :
6466  $as_echo_n "(cached) " >&6
6467else
6468  case $READLINK in
6469  [\\/]* | ?:[\\/]*)
6470  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6471  ;;
6472  *)
6473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474for as_dir in $PATH
6475do
6476  IFS=$as_save_IFS
6477  test -z "$as_dir" && as_dir=.
6478    for ac_exec_ext in '' $ac_executable_extensions; do
6479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6480    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6482    break 2
6483  fi
6484done
6485  done
6486IFS=$as_save_IFS
6487
6488  ;;
6489esac
6490fi
6491READLINK=$ac_cv_path_READLINK
6492if test -n "$READLINK"; then
6493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6494$as_echo "$READLINK" >&6; }
6495else
6496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500
6501# Extract the first word of "df", so it can be a program name with args.
6502set dummy df; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if ${ac_cv_path_DF+:} false; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  case $DF in
6509  [\\/]* | ?:[\\/]*)
6510  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6511  ;;
6512  *)
6513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6514for as_dir in $PATH
6515do
6516  IFS=$as_save_IFS
6517  test -z "$as_dir" && as_dir=.
6518    for ac_exec_ext in '' $ac_executable_extensions; do
6519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6520    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6522    break 2
6523  fi
6524done
6525  done
6526IFS=$as_save_IFS
6527
6528  ;;
6529esac
6530fi
6531DF=$ac_cv_path_DF
6532if test -n "$DF"; then
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6534$as_echo "$DF" >&6; }
6535else
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; }
6538fi
6539
6540
6541# Extract the first word of "SetFile", so it can be a program name with args.
6542set dummy SetFile; ac_word=$2
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6544$as_echo_n "checking for $ac_word... " >&6; }
6545if ${ac_cv_path_SETFILE+:} false; then :
6546  $as_echo_n "(cached) " >&6
6547else
6548  case $SETFILE in
6549  [\\/]* | ?:[\\/]*)
6550  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6551  ;;
6552  *)
6553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6554for as_dir in $PATH
6555do
6556  IFS=$as_save_IFS
6557  test -z "$as_dir" && as_dir=.
6558    for ac_exec_ext in '' $ac_executable_extensions; do
6559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6560    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6562    break 2
6563  fi
6564done
6565  done
6566IFS=$as_save_IFS
6567
6568  ;;
6569esac
6570fi
6571SETFILE=$ac_cv_path_SETFILE
6572if test -n "$SETFILE"; then
6573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6574$as_echo "$SETFILE" >&6; }
6575else
6576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577$as_echo "no" >&6; }
6578fi
6579
6580
6581
6582
6583# Now we can determine OpenJDK build and target platforms. This is required to
6584# have early on.
6585# Make sure we can run config.sub.
6586$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6587  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6588
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6590$as_echo_n "checking build system type... " >&6; }
6591if ${ac_cv_build+:} false; then :
6592  $as_echo_n "(cached) " >&6
6593else
6594  ac_build_alias=$build_alias
6595test "x$ac_build_alias" = x &&
6596  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6597test "x$ac_build_alias" = x &&
6598  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6599ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6600  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6601
6602fi
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6604$as_echo "$ac_cv_build" >&6; }
6605case $ac_cv_build in
6606*-*-*) ;;
6607*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6608esac
6609build=$ac_cv_build
6610ac_save_IFS=$IFS; IFS='-'
6611set x $ac_cv_build
6612shift
6613build_cpu=$1
6614build_vendor=$2
6615shift; shift
6616# Remember, the first character of IFS is used to create $*,
6617# except with old shells:
6618build_os=$*
6619IFS=$ac_save_IFS
6620case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6621
6622
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6624$as_echo_n "checking host system type... " >&6; }
6625if ${ac_cv_host+:} false; then :
6626  $as_echo_n "(cached) " >&6
6627else
6628  if test "x$host_alias" = x; then
6629  ac_cv_host=$ac_cv_build
6630else
6631  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6632    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6633fi
6634
6635fi
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6637$as_echo "$ac_cv_host" >&6; }
6638case $ac_cv_host in
6639*-*-*) ;;
6640*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6641esac
6642host=$ac_cv_host
6643ac_save_IFS=$IFS; IFS='-'
6644set x $ac_cv_host
6645shift
6646host_cpu=$1
6647host_vendor=$2
6648shift; shift
6649# Remember, the first character of IFS is used to create $*,
6650# except with old shells:
6651host_os=$*
6652IFS=$ac_save_IFS
6653case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6654
6655
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6657$as_echo_n "checking target system type... " >&6; }
6658if ${ac_cv_target+:} false; then :
6659  $as_echo_n "(cached) " >&6
6660else
6661  if test "x$target_alias" = x; then
6662  ac_cv_target=$ac_cv_host
6663else
6664  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6665    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6666fi
6667
6668fi
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6670$as_echo "$ac_cv_target" >&6; }
6671case $ac_cv_target in
6672*-*-*) ;;
6673*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6674esac
6675target=$ac_cv_target
6676ac_save_IFS=$IFS; IFS='-'
6677set x $ac_cv_target
6678shift
6679target_cpu=$1
6680target_vendor=$2
6681shift; shift
6682# Remember, the first character of IFS is used to create $*,
6683# except with old shells:
6684target_os=$*
6685IFS=$ac_save_IFS
6686case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6687
6688
6689# The aliases save the names the user supplied, while $host etc.
6690# will get canonicalized.
6691test -n "$target_alias" &&
6692  test "$program_prefix$program_suffix$program_transform_name" = \
6693    NONENONEs,x,x, &&
6694  program_prefix=${target_alias}-
6695
6696# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6697# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6698# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6699# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6700# to use the configure naming style.
6701
6702
6703
6704
6705
6706    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6707    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6708    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6709    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6710    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6711    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6712
6713
6714
6715    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6716
6717  case "$build_os" in
6718    *linux*)
6719      VAR_OS=linux
6720      VAR_OS_API=posix
6721      VAR_OS_ENV=linux
6722      ;;
6723    *solaris*)
6724      VAR_OS=solaris
6725      VAR_OS_API=posix
6726      VAR_OS_ENV=solaris
6727      ;;
6728    *darwin*)
6729      VAR_OS=macosx
6730      VAR_OS_API=posix
6731      VAR_OS_ENV=macosx
6732      ;;
6733    *bsd*)
6734      VAR_OS=bsd
6735      VAR_OS_API=posix
6736      VAR_OS_ENV=bsd
6737      ;;
6738    *cygwin*)
6739      VAR_OS=windows
6740      VAR_OS_API=winapi
6741      VAR_OS_ENV=windows.cygwin
6742      ;;
6743    *mingw*)
6744      VAR_OS=windows
6745      VAR_OS_API=winapi
6746      VAR_OS_ENV=windows.msys
6747      ;;
6748    *)
6749      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6750      ;;
6751  esac
6752
6753
6754  # First argument is the cpu name from the trip/quad
6755  case "$build_cpu" in
6756    x86_64)
6757      VAR_CPU=x86_64
6758      VAR_CPU_ARCH=x86
6759      VAR_CPU_BITS=64
6760      VAR_CPU_ENDIAN=little
6761      ;;
6762    i?86)
6763      VAR_CPU=x86
6764      VAR_CPU_ARCH=x86
6765      VAR_CPU_BITS=32
6766      VAR_CPU_ENDIAN=little
6767      ;;
6768    arm*)
6769      VAR_CPU=arm
6770      VAR_CPU_ARCH=arm
6771      VAR_CPU_BITS=32
6772      VAR_CPU_ENDIAN=little
6773      ;;
6774    powerpc)
6775      VAR_CPU=ppc
6776      VAR_CPU_ARCH=ppc
6777      VAR_CPU_BITS=32
6778      VAR_CPU_ENDIAN=big
6779       ;;
6780    powerpc64)
6781      VAR_CPU=ppc64
6782      VAR_CPU_ARCH=ppc
6783      VAR_CPU_BITS=64
6784      VAR_CPU_ENDIAN=big
6785       ;;
6786    sparc)
6787      VAR_CPU=sparc
6788      VAR_CPU_ARCH=sparc
6789      VAR_CPU_BITS=32
6790      VAR_CPU_ENDIAN=big
6791       ;;
6792    sparcv9)
6793      VAR_CPU=sparcv9
6794      VAR_CPU_ARCH=sparc
6795      VAR_CPU_BITS=64
6796      VAR_CPU_ENDIAN=big
6797       ;;
6798    *)
6799      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6800      ;;
6801  esac
6802
6803    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6804    OPENJDK_BUILD_OS="$VAR_OS"
6805    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6806    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6807    OPENJDK_BUILD_CPU="$VAR_CPU"
6808    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6809    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6810    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6811
6812
6813
6814
6815
6816
6817
6818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6819$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6821$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6822
6823    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6824
6825  case "$host_os" in
6826    *linux*)
6827      VAR_OS=linux
6828      VAR_OS_API=posix
6829      VAR_OS_ENV=linux
6830      ;;
6831    *solaris*)
6832      VAR_OS=solaris
6833      VAR_OS_API=posix
6834      VAR_OS_ENV=solaris
6835      ;;
6836    *darwin*)
6837      VAR_OS=macosx
6838      VAR_OS_API=posix
6839      VAR_OS_ENV=macosx
6840      ;;
6841    *bsd*)
6842      VAR_OS=bsd
6843      VAR_OS_API=posix
6844      VAR_OS_ENV=bsd
6845      ;;
6846    *cygwin*)
6847      VAR_OS=windows
6848      VAR_OS_API=winapi
6849      VAR_OS_ENV=windows.cygwin
6850      ;;
6851    *mingw*)
6852      VAR_OS=windows
6853      VAR_OS_API=winapi
6854      VAR_OS_ENV=windows.msys
6855      ;;
6856    *)
6857      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6858      ;;
6859  esac
6860
6861
6862  # First argument is the cpu name from the trip/quad
6863  case "$host_cpu" in
6864    x86_64)
6865      VAR_CPU=x86_64
6866      VAR_CPU_ARCH=x86
6867      VAR_CPU_BITS=64
6868      VAR_CPU_ENDIAN=little
6869      ;;
6870    i?86)
6871      VAR_CPU=x86
6872      VAR_CPU_ARCH=x86
6873      VAR_CPU_BITS=32
6874      VAR_CPU_ENDIAN=little
6875      ;;
6876    arm*)
6877      VAR_CPU=arm
6878      VAR_CPU_ARCH=arm
6879      VAR_CPU_BITS=32
6880      VAR_CPU_ENDIAN=little
6881      ;;
6882    powerpc)
6883      VAR_CPU=ppc
6884      VAR_CPU_ARCH=ppc
6885      VAR_CPU_BITS=32
6886      VAR_CPU_ENDIAN=big
6887       ;;
6888    powerpc64)
6889      VAR_CPU=ppc64
6890      VAR_CPU_ARCH=ppc
6891      VAR_CPU_BITS=64
6892      VAR_CPU_ENDIAN=big
6893       ;;
6894    sparc)
6895      VAR_CPU=sparc
6896      VAR_CPU_ARCH=sparc
6897      VAR_CPU_BITS=32
6898      VAR_CPU_ENDIAN=big
6899       ;;
6900    sparcv9)
6901      VAR_CPU=sparcv9
6902      VAR_CPU_ARCH=sparc
6903      VAR_CPU_BITS=64
6904      VAR_CPU_ENDIAN=big
6905       ;;
6906    *)
6907      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6908      ;;
6909  esac
6910
6911    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6912    OPENJDK_TARGET_OS="$VAR_OS"
6913    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6914    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6915    OPENJDK_TARGET_CPU="$VAR_CPU"
6916    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6917    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6918    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6919
6920
6921
6922
6923
6924
6925
6926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6927$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6929$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6930
6931
6932
6933# Check whether --with-target-bits was given.
6934if test "${with_target_bits+set}" = set; then :
6935  withval=$with_target_bits;
6936fi
6937
6938
6939  # We have three types of compiles:
6940  # native  == normal compilation, target system == build system
6941  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6942  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6943  #
6944  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6945    # We're doing a proper cross-compilation
6946    COMPILE_TYPE="cross"
6947  else
6948    COMPILE_TYPE="native"
6949  fi
6950
6951  if test "x$with_target_bits" != x; then
6952    if test "x$COMPILE_TYPE" = "xcross"; then
6953      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6954    fi
6955
6956    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6957      # A reduced build is requested
6958      COMPILE_TYPE="reduced"
6959      OPENJDK_TARGET_CPU_BITS=32
6960      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6961        OPENJDK_TARGET_CPU=x86
6962      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6963        OPENJDK_TARGET_CPU=sparc
6964      else
6965        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6966      fi
6967    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6968      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
6969    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6970      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6971$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6972    else
6973      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6974    fi
6975  fi
6976
6977
6978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6979$as_echo_n "checking compilation type... " >&6; }
6980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6981$as_echo "$COMPILE_TYPE" >&6; }
6982
6983
6984    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6985       REQUIRED_OS_NAME=SunOS
6986       REQUIRED_OS_VERSION=5.10
6987    fi
6988    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6989       REQUIRED_OS_NAME=Linux
6990       REQUIRED_OS_VERSION=2.6
6991    fi
6992    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6993        REQUIRED_OS_NAME=Windows
6994        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6995            REQUIRED_OS_VERSION=5.2
6996        else
6997            REQUIRED_OS_VERSION=5.1
6998        fi
6999    fi
7000    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7001        REQUIRED_OS_NAME=Darwin
7002        REQUIRED_OS_VERSION=11.2
7003    fi
7004
7005
7006
7007
7008
7009    # Also store the legacy naming of the cpu.
7010    # Ie i586 and amd64 instead of x86 and x86_64
7011    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7012    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7013      OPENJDK_TARGET_CPU_LEGACY="i586"
7014    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7015      # On all platforms except MacOSX replace x86_64 with amd64.
7016      OPENJDK_TARGET_CPU_LEGACY="amd64"
7017    fi
7018
7019
7020    # And the second legacy naming of the cpu.
7021    # Ie i386 and amd64 instead of x86 and x86_64.
7022    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7023    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7024      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7025    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7026      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7027    fi
7028
7029
7030    # This is the name of the cpu (but using i386 and amd64 instead of
7031    # x86 and x86_64, respectively), preceeded by a /, to be used when
7032    # locating libraries. On macosx, it's empty, though.
7033    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7034    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7035        OPENJDK_TARGET_CPU_LIBDIR=""
7036    fi
7037
7038
7039    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7040    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7041    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7042    OPENJDK_TARGET_CPU_ISADIR=""
7043    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7044      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7045          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7046      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7047          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7048      fi
7049    fi
7050
7051
7052    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7053    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7054    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7055      # On linux only, we replace x86 with i386.
7056      OPENJDK_TARGET_CPU_OSARCH="i386"
7057    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7058      # On all platforms except macosx, we replace x86_64 with amd64.
7059      OPENJDK_TARGET_CPU_OSARCH="amd64"
7060    fi
7061
7062
7063    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7064    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7065      OPENJDK_TARGET_CPU_JLI="i386"
7066    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7067      # On all platforms except macosx, we replace x86_64 with amd64.
7068      OPENJDK_TARGET_CPU_JLI="amd64"
7069    fi
7070    # Now setup the -D flags for building libjli.
7071    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7072    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7073      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7074        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7075      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7076        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7077      fi
7078    fi
7079
7080
7081    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7082    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7083        OPENJDK_TARGET_OS_API_DIR="solaris"
7084    fi
7085    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7086        OPENJDK_TARGET_OS_API_DIR="windows"
7087    fi
7088
7089
7090    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7091        A_LP64="LP64:="
7092        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7093        # unpack200.exe
7094        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7095            ADD_LP64="-D_LP64=1"
7096        fi
7097    fi
7098    LP64=$A_LP64
7099
7100
7101    if test "x$COMPILE_TYPE" = "xcross"; then
7102      # FIXME: ... or should this include reduced builds..?
7103      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7104    else
7105      DEFINE_CROSS_COMPILE_ARCH=""
7106    fi
7107
7108
7109    # ZERO_ARCHDEF is used to enable architecture-specific code
7110    case "${OPENJDK_TARGET_CPU}" in
7111      ppc*)    ZERO_ARCHDEF=PPC   ;;
7112      s390*)   ZERO_ARCHDEF=S390  ;;
7113      sparc*)  ZERO_ARCHDEF=SPARC ;;
7114      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7115      x86)     ZERO_ARCHDEF=IA32  ;;
7116      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7117    esac
7118
7119
7120
7121
7122
7123# Continue setting up basic stuff. Most remaining code require fundamental tools.
7124
7125# Locate the directory of this script.
7126SCRIPT="$0"
7127AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7128
7129# Where is the source? It is located two levels above the configure script.
7130CURDIR="$PWD"
7131cd "$AUTOCONF_DIR/../.."
7132SRC_ROOT="`$THEPWDCMD -L`"
7133
7134if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7135  PATH_SEP=";"
7136
7137  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7138  if test $SRC_ROOT_LENGTH -gt 100; then
7139      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7140  fi
7141
7142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7144$as_echo_n "checking cygwin release... " >&6; }
7145    CYGWIN_VERSION=`$UNAME -r`
7146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7147$as_echo "$CYGWIN_VERSION" >&6; }
7148    WINDOWS_ENV_VENDOR='cygwin'
7149    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7150
7151    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7152    if test "x$CYGWIN_VERSION_OK" = x; then
7153      { $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
7154$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;}
7155      as_fn_error $? "Cannot continue" "$LINENO" 5
7156    fi
7157    if test "x$CYGPATH" = x; then
7158        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7159    fi
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7161$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7162    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7163    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7164    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7165    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7167$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7168    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7169    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7170    if test "x$test_cygdrive_prefix" = x; then
7171        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7172    fi
7173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7175$as_echo_n "checking msys release... " >&6; }
7176    MSYS_VERSION=`$UNAME -r`
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7178$as_echo "$MSYS_VERSION" >&6; }
7179
7180    WINDOWS_ENV_VENDOR='msys'
7181    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7182
7183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7184$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7185    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7186    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7187
7188  windows_path="$MSYS_ROOT_PATH"
7189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7190    unix_path=`$CYGPATH -u "$windows_path"`
7191    MSYS_ROOT_PATH="$unix_path"
7192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7194    MSYS_ROOT_PATH="$unix_path"
7195  fi
7196
7197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7198$as_echo "$MSYS_ROOT_PATH" >&6; }
7199    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7200  else
7201    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7202  fi
7203
7204  # Test if windows or unix (cygwin/msys) find is first in path.
7205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7206$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7207  FIND_BINARY_OUTPUT=`find --version 2>&1`
7208  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7210$as_echo "unix style" >&6; }
7211  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7213$as_echo "Windows" >&6; }
7214    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7215$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7216    { $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
7217$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7218    as_fn_error $? "Cannot continue" "$LINENO" 5
7219  else
7220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7221$as_echo "unknown" >&6; }
7222    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7223$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7224  fi
7225
7226else
7227  PATH_SEP=":"
7228fi
7229
7230
7231
7232cd "$CURDIR"
7233
7234
7235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7236
7237  # Input might be given as Windows format, start by converting to
7238  # unix format.
7239  path="$SRC_ROOT"
7240  new_path=`$CYGPATH -u "$path"`
7241
7242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7245  # "foo.exe" is OK but "foo" is an error.
7246  #
7247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7248  # It is also a way to make sure we got the proper file name for the real test later on.
7249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7250  if test "x$test_shortpath" = x; then
7251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7252$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7253    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7254  fi
7255
7256  # Call helper function which possibly converts this using DOS-style short mode.
7257  # If so, the updated path is stored in $new_path.
7258
7259  input_path="$new_path"
7260  # Check if we need to convert this using DOS-style short mode. If the path
7261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7262  # take no chances and rewrite it.
7263  # Note: m4 eats our [], so we need to use [ and ] instead.
7264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7265  if test "x$has_forbidden_chars" != x; then
7266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7270      # Going to short mode and back again did indeed matter. Since short mode is
7271      # case insensitive, let's make it lowercase to improve readability.
7272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7273      # Now convert it back to Unix-stile (cygpath)
7274      input_path=`$CYGPATH -u "$shortmode_path"`
7275      new_path="$input_path"
7276    fi
7277  fi
7278
7279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7280  if test "x$test_cygdrive_prefix" = x; then
7281    # As a simple fix, exclude /usr/bin since it's not a real path.
7282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7284      # a path prefixed by /cygdrive for fixpath to work.
7285      new_path="$CYGWIN_ROOT_PATH$input_path"
7286    fi
7287  fi
7288
7289
7290  if test "x$path" != "x$new_path"; then
7291    SRC_ROOT="$new_path"
7292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7293$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7294  fi
7295
7296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7297
7298  path="$SRC_ROOT"
7299  has_colon=`$ECHO $path | $GREP ^.:`
7300  new_path="$path"
7301  if test "x$has_colon" = x; then
7302    # Not in mixed or Windows style, start by that.
7303    new_path=`cmd //c echo $path`
7304  fi
7305
7306
7307  input_path="$new_path"
7308  # Check if we need to convert this using DOS-style short mode. If the path
7309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7310  # take no chances and rewrite it.
7311  # Note: m4 eats our [], so we need to use [ and ] instead.
7312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7313  if test "x$has_forbidden_chars" != x; then
7314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7316  fi
7317
7318
7319  windows_path="$new_path"
7320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7321    unix_path=`$CYGPATH -u "$windows_path"`
7322    new_path="$unix_path"
7323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7325    new_path="$unix_path"
7326  fi
7327
7328  if test "x$path" != "x$new_path"; then
7329    SRC_ROOT="$new_path"
7330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7331$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7332  fi
7333
7334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7336
7337  else
7338    # We're on a posix platform. Hooray! :)
7339    path="$SRC_ROOT"
7340    has_space=`$ECHO "$path" | $GREP " "`
7341    if test "x$has_space" != x; then
7342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7343$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7344      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7345    fi
7346
7347    # Use eval to expand a potential ~
7348    eval path="$path"
7349    if test ! -f "$path" && test ! -d "$path"; then
7350      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7351    fi
7352
7353    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7354  fi
7355
7356
7357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7358
7359  # Input might be given as Windows format, start by converting to
7360  # unix format.
7361  path="$CURDIR"
7362  new_path=`$CYGPATH -u "$path"`
7363
7364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7367  # "foo.exe" is OK but "foo" is an error.
7368  #
7369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7370  # It is also a way to make sure we got the proper file name for the real test later on.
7371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7372  if test "x$test_shortpath" = x; then
7373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7374$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7375    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7376  fi
7377
7378  # Call helper function which possibly converts this using DOS-style short mode.
7379  # If so, the updated path is stored in $new_path.
7380
7381  input_path="$new_path"
7382  # Check if we need to convert this using DOS-style short mode. If the path
7383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7384  # take no chances and rewrite it.
7385  # Note: m4 eats our [], so we need to use [ and ] instead.
7386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7387  if test "x$has_forbidden_chars" != x; then
7388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7392      # Going to short mode and back again did indeed matter. Since short mode is
7393      # case insensitive, let's make it lowercase to improve readability.
7394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7395      # Now convert it back to Unix-stile (cygpath)
7396      input_path=`$CYGPATH -u "$shortmode_path"`
7397      new_path="$input_path"
7398    fi
7399  fi
7400
7401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7402  if test "x$test_cygdrive_prefix" = x; then
7403    # As a simple fix, exclude /usr/bin since it's not a real path.
7404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7406      # a path prefixed by /cygdrive for fixpath to work.
7407      new_path="$CYGWIN_ROOT_PATH$input_path"
7408    fi
7409  fi
7410
7411
7412  if test "x$path" != "x$new_path"; then
7413    CURDIR="$new_path"
7414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7415$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7416  fi
7417
7418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7419
7420  path="$CURDIR"
7421  has_colon=`$ECHO $path | $GREP ^.:`
7422  new_path="$path"
7423  if test "x$has_colon" = x; then
7424    # Not in mixed or Windows style, start by that.
7425    new_path=`cmd //c echo $path`
7426  fi
7427
7428
7429  input_path="$new_path"
7430  # Check if we need to convert this using DOS-style short mode. If the path
7431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7432  # take no chances and rewrite it.
7433  # Note: m4 eats our [], so we need to use [ and ] instead.
7434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7435  if test "x$has_forbidden_chars" != x; then
7436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7438  fi
7439
7440
7441  windows_path="$new_path"
7442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7443    unix_path=`$CYGPATH -u "$windows_path"`
7444    new_path="$unix_path"
7445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7447    new_path="$unix_path"
7448  fi
7449
7450  if test "x$path" != "x$new_path"; then
7451    CURDIR="$new_path"
7452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7453$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7454  fi
7455
7456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7458
7459  else
7460    # We're on a posix platform. Hooray! :)
7461    path="$CURDIR"
7462    has_space=`$ECHO "$path" | $GREP " "`
7463    if test "x$has_space" != x; then
7464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7465$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7466      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7467    fi
7468
7469    # Use eval to expand a potential ~
7470    eval path="$path"
7471    if test ! -f "$path" && test ! -d "$path"; then
7472      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7473    fi
7474
7475    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7476  fi
7477
7478
7479if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7480    # Add extra search paths on solaris for utilities like ar and as etc...
7481    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7482fi
7483
7484# You can force the sys-root if the sys-root encoded into the cross compiler tools
7485# is not correct.
7486
7487# Check whether --with-sys-root was given.
7488if test "${with_sys_root+set}" = set; then :
7489  withval=$with_sys_root;
7490fi
7491
7492
7493if test "x$with_sys_root" != x; then
7494  SYS_ROOT=$with_sys_root
7495else
7496  SYS_ROOT=/
7497fi
7498
7499
7500
7501# Check whether --with-tools-dir was given.
7502if test "${with_tools_dir+set}" = set; then :
7503  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7504
7505fi
7506
7507
7508
7509# Check whether --with-devkit was given.
7510if test "${with_devkit+set}" = set; then :
7511  withval=$with_devkit;
7512    if test "x$with_sys_root" != x; then
7513      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7514    fi
7515
7516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7517
7518  # Input might be given as Windows format, start by converting to
7519  # unix format.
7520  path="$with_devkit"
7521  new_path=`$CYGPATH -u "$path"`
7522
7523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7526  # "foo.exe" is OK but "foo" is an error.
7527  #
7528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7529  # It is also a way to make sure we got the proper file name for the real test later on.
7530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7531  if test "x$test_shortpath" = x; then
7532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7533$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7534    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7535  fi
7536
7537  # Call helper function which possibly converts this using DOS-style short mode.
7538  # If so, the updated path is stored in $new_path.
7539
7540  input_path="$new_path"
7541  # Check if we need to convert this using DOS-style short mode. If the path
7542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7543  # take no chances and rewrite it.
7544  # Note: m4 eats our [], so we need to use [ and ] instead.
7545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7546  if test "x$has_forbidden_chars" != x; then
7547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7551      # Going to short mode and back again did indeed matter. Since short mode is
7552      # case insensitive, let's make it lowercase to improve readability.
7553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7554      # Now convert it back to Unix-stile (cygpath)
7555      input_path=`$CYGPATH -u "$shortmode_path"`
7556      new_path="$input_path"
7557    fi
7558  fi
7559
7560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7561  if test "x$test_cygdrive_prefix" = x; then
7562    # As a simple fix, exclude /usr/bin since it's not a real path.
7563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7565      # a path prefixed by /cygdrive for fixpath to work.
7566      new_path="$CYGWIN_ROOT_PATH$input_path"
7567    fi
7568  fi
7569
7570
7571  if test "x$path" != "x$new_path"; then
7572    with_devkit="$new_path"
7573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7574$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7575  fi
7576
7577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7578
7579  path="$with_devkit"
7580  has_colon=`$ECHO $path | $GREP ^.:`
7581  new_path="$path"
7582  if test "x$has_colon" = x; then
7583    # Not in mixed or Windows style, start by that.
7584    new_path=`cmd //c echo $path`
7585  fi
7586
7587
7588  input_path="$new_path"
7589  # Check if we need to convert this using DOS-style short mode. If the path
7590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7591  # take no chances and rewrite it.
7592  # Note: m4 eats our [], so we need to use [ and ] instead.
7593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7594  if test "x$has_forbidden_chars" != x; then
7595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7597  fi
7598
7599
7600  windows_path="$new_path"
7601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7602    unix_path=`$CYGPATH -u "$windows_path"`
7603    new_path="$unix_path"
7604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7606    new_path="$unix_path"
7607  fi
7608
7609  if test "x$path" != "x$new_path"; then
7610    with_devkit="$new_path"
7611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7612$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7613  fi
7614
7615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7617
7618  else
7619    # We're on a posix platform. Hooray! :)
7620    path="$with_devkit"
7621    has_space=`$ECHO "$path" | $GREP " "`
7622    if test "x$has_space" != x; then
7623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7624$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7625      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7626    fi
7627
7628    # Use eval to expand a potential ~
7629    eval path="$path"
7630    if test ! -f "$path" && test ! -d "$path"; then
7631      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7632    fi
7633
7634    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7635  fi
7636
7637
7638  if test "x$TOOLS_DIR" = x; then
7639    TOOLS_DIR="$with_devkit/bin"
7640  else
7641    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7642  fi
7643
7644    if test -d "$with_devkit/$host_alias/libc"; then
7645      SYS_ROOT=$with_devkit/$host_alias/libc
7646    elif test -d "$with_devkit/$host/sys-root"; then
7647      SYS_ROOT=$with_devkit/$host/sys-root
7648    fi
7649
7650fi
7651
7652
7653
7654# Setup default logging of stdout and stderr to build.log in the output root.
7655BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7656BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7657BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7658
7659
7660
7661
7662
7663# Check if it's a pure open build or if custom sources are to be used.
7664
7665  # Check whether --enable-openjdk-only was given.
7666if test "${enable_openjdk_only+set}" = set; then :
7667  enableval=$enable_openjdk_only;
7668else
7669  enable_openjdk_only="no"
7670fi
7671
7672
7673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7674$as_echo_n "checking for presence of closed sources... " >&6; }
7675  if test -d "$SRC_ROOT/jdk/src/closed"; then
7676    CLOSED_SOURCE_PRESENT=yes
7677  else
7678    CLOSED_SOURCE_PRESENT=no
7679  fi
7680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7681$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7682
7683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7684$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7685  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7687$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7688
7689  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7690    OPENJDK=true
7691    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7692      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7693$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7694    fi
7695  else
7696    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7697      OPENJDK=true
7698    else
7699      OPENJDK=false
7700    fi
7701  fi
7702
7703  if test "x$OPENJDK" = "xtrue"; then
7704    SET_OPENJDK="OPENJDK=true"
7705  fi
7706
7707
7708
7709
7710# These are needed to be able to create a configuration name (and thus the output directory)
7711
7712###############################################################################
7713#
7714# Check which variant of the JDK that we want to build.
7715# Currently we have:
7716#    normal:   standard edition
7717# but the custom make system may add other variants
7718#
7719# Effectively the JDK variant gives a name to a specific set of
7720# modules to compile into the JDK. In the future, these modules
7721# might even be Jigsaw modules.
7722#
7723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7724$as_echo_n "checking which variant of the JDK to build... " >&6; }
7725
7726# Check whether --with-jdk-variant was given.
7727if test "${with_jdk_variant+set}" = set; then :
7728  withval=$with_jdk_variant;
7729fi
7730
7731
7732if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7733    JDK_VARIANT="normal"
7734else
7735    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7736fi
7737
7738
7739
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7741$as_echo "$JDK_VARIANT" >&6; }
7742
7743
7744###############################################################################
7745#
7746# Check which interpreter of the JVM we want to build.
7747# Currently we have:
7748#    template: Template interpreter (the default)
7749#    cpp     : C++ interpreter
7750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7751$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7752
7753# Check whether --with-jvm-interpreter was given.
7754if test "${with_jvm_interpreter+set}" = set; then :
7755  withval=$with_jvm_interpreter;
7756fi
7757
7758
7759if test "x$with_jvm_interpreter" = x; then
7760     with_jvm_interpreter="template"
7761fi
7762
7763JVM_INTERPRETER="$with_jvm_interpreter"
7764
7765if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7766   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7767fi
7768
7769
7770
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7772$as_echo "$with_jvm_interpreter" >&6; }
7773
7774
7775
7776###############################################################################
7777#
7778# Check which variants of the JVM that we want to build.
7779# Currently we have:
7780#    server: normal interpreter and a tiered C1/C2 compiler
7781#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7782#    minimal1: reduced form of client with optional VM services and features stripped out
7783#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7784#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7785#    zero: no machine code interpreter, no compiler
7786#    zeroshark: zero interpreter and shark/llvm compiler backend
7787#    core: interpreter only, no compiler (only works on some platforms)
7788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7789$as_echo_n "checking which variants of the JVM to build... " >&6; }
7790
7791# Check whether --with-jvm-variants was given.
7792if test "${with_jvm_variants+set}" = set; then :
7793  withval=$with_jvm_variants;
7794fi
7795
7796
7797if test "x$with_jvm_variants" = x; then
7798     with_jvm_variants="server"
7799fi
7800
7801JVM_VARIANTS=",$with_jvm_variants,"
7802TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7803
7804if test "x$TEST_VARIANTS" != "x,"; then
7805   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7806fi
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7808$as_echo "$with_jvm_variants" >&6; }
7809
7810JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7811JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7812JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7813JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7814JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7815JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7816JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7817
7818if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7819    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7820        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7821    fi
7822fi
7823if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7824    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7825        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7826    fi
7827fi
7828if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7829    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7830        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7831    fi
7832fi
7833
7834# Replace the commas with AND for use in the build directory name.
7835ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7836COUNT_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/' -e 's/core,/1/'`
7837if test "x$COUNT_VARIANTS" != "x,1"; then
7838    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7839else
7840    BUILDING_MULTIPLE_JVM_VARIANTS=no
7841fi
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852INCLUDE_SA=true
7853if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7854    INCLUDE_SA=false
7855fi
7856if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7857    INCLUDE_SA=false
7858fi
7859if test "x$VAR_CPU" = xppc64 ; then
7860    INCLUDE_SA=false
7861fi
7862
7863
7864if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7865   MACOSX_UNIVERSAL="true"
7866fi
7867
7868
7869
7870
7871
7872###############################################################################
7873#
7874# Set the debug level
7875#    release: no debug information, all optimizations, no asserts.
7876#    fastdebug: debug information (-g), all optimizations, all asserts
7877#    slowdebug: debug information (-g), no optimizations, all asserts
7878#
7879DEBUG_LEVEL="release"
7880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7881$as_echo_n "checking which debug level to use... " >&6; }
7882# Check whether --enable-debug was given.
7883if test "${enable_debug+set}" = set; then :
7884  enableval=$enable_debug;
7885        ENABLE_DEBUG="${enableval}"
7886        DEBUG_LEVEL="fastdebug"
7887
7888else
7889  ENABLE_DEBUG="no"
7890fi
7891
7892
7893
7894# Check whether --with-debug-level was given.
7895if test "${with_debug_level+set}" = set; then :
7896  withval=$with_debug_level;
7897        DEBUG_LEVEL="${withval}"
7898        if test "x$ENABLE_DEBUG" = xyes; then
7899			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7900        fi
7901
7902fi
7903
7904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7905$as_echo "$DEBUG_LEVEL" >&6; }
7906
7907if test "x$DEBUG_LEVEL" != xrelease && \
7908   test "x$DEBUG_LEVEL" != xfastdebug && \
7909   test "x$DEBUG_LEVEL" != xslowdebug; then
7910   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7911fi
7912
7913
7914###############################################################################
7915#
7916# Setup legacy vars/targets and new vars to deal with different debug levels.
7917#
7918
7919case $DEBUG_LEVEL in
7920      release )
7921          VARIANT="OPT"
7922          FASTDEBUG="false"
7923          DEBUG_CLASSFILES="false"
7924          BUILD_VARIANT_RELEASE=""
7925          HOTSPOT_DEBUG_LEVEL="product"
7926          HOTSPOT_EXPORT="product"
7927           ;;
7928      fastdebug )
7929          VARIANT="DBG"
7930          FASTDEBUG="true"
7931          DEBUG_CLASSFILES="true"
7932          BUILD_VARIANT_RELEASE="-fastdebug"
7933          HOTSPOT_DEBUG_LEVEL="fastdebug"
7934          HOTSPOT_EXPORT="fastdebug"
7935           ;;
7936      slowdebug )
7937          VARIANT="DBG"
7938          FASTDEBUG="false"
7939          DEBUG_CLASSFILES="true"
7940          BUILD_VARIANT_RELEASE="-debug"
7941          HOTSPOT_DEBUG_LEVEL="jvmg"
7942          HOTSPOT_EXPORT="debug"
7943           ;;
7944esac
7945
7946#####
7947# Generate the legacy makefile targets for hotspot.
7948# The hotspot api for selecting the build artifacts, really, needs to be improved.
7949# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7950# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7951# But until then ...
7952HOTSPOT_TARGET=""
7953
7954if test "x$JVM_VARIANT_SERVER" = xtrue; then
7955    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7956fi
7957
7958if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7959    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7960fi
7961
7962if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7963    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7964fi
7965
7966if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7967    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7968fi
7969
7970if test "x$JVM_VARIANT_ZERO" = xtrue; then
7971    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7972fi
7973
7974if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7975    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7976fi
7977
7978if test "x$JVM_VARIANT_CORE" = xtrue; then
7979    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
7980fi
7981
7982HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7983
7984# On Macosx universal binaries are produced, but they only contain
7985# 64 bit intel. This invalidates control of which jvms are built
7986# from configure, but only server is valid anyway. Fix this
7987# when hotspot makefiles are rewritten.
7988if test "x$MACOSX_UNIVERSAL" = xtrue; then
7989    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7990fi
7991
7992#####
7993
7994
7995
7996
7997
7998
7999
8000
8001# With basic setup done, call the custom early hook.
8002
8003
8004# To properly create a configuration name, we need to have the OpenJDK target
8005# and options (variants and debug level) parsed.
8006
8007
8008
8009# Check whether --with-conf-name was given.
8010if test "${with_conf_name+set}" = set; then :
8011  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8012fi
8013
8014
8015# Test from where we are running configure, in or outside of src root.
8016if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8017        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8018        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8019    # We are running configure from the src root.
8020    # Create a default ./build/target-variant-debuglevel output root.
8021    if test "x${CONF_NAME}" = x; then
8022        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8023    fi
8024    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8025    $MKDIR -p "$OUTPUT_ROOT"
8026    if test ! -d "$OUTPUT_ROOT"; then
8027        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8028    fi
8029else
8030    # We are running configure from outside of the src dir.
8031    # Then use the current directory as output dir!
8032    # If configuration is situated in normal build directory, just use the build
8033    # directory name as configuration name, otherwise use the complete path.
8034    if test "x${CONF_NAME}" = x; then
8035        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8036    fi
8037    OUTPUT_ROOT="$CURDIR"
8038
8039    # WARNING: This might be a bad thing to do. You need to be sure you want to
8040    # have a configuration in this directory. Do some sanity checks!
8041
8042    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8043      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8044      # other files
8045      files_present=`$LS $OUTPUT_ROOT`
8046      # Configure has already touched config.log and confdefs.h in the current dir when this check
8047      # is performed.
8048      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8049                                             | $TR -d '\n'`
8050      if test "x$filtered_files" != x; then
8051        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8052$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8053        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8054$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8055        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8056$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8057        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8058$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8059        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8060$as_echo "$as_me: seriously mess up just about everything." >&6;}
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8062$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8064$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8065        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8066      fi
8067    fi
8068fi
8069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8070$as_echo_n "checking what configuration name to use... " >&6; }
8071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8072$as_echo "$CONF_NAME" >&6; }
8073
8074
8075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8076
8077  # Input might be given as Windows format, start by converting to
8078  # unix format.
8079  path="$OUTPUT_ROOT"
8080  new_path=`$CYGPATH -u "$path"`
8081
8082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8085  # "foo.exe" is OK but "foo" is an error.
8086  #
8087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8088  # It is also a way to make sure we got the proper file name for the real test later on.
8089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8090  if test "x$test_shortpath" = x; then
8091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8092$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8093    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8094  fi
8095
8096  # Call helper function which possibly converts this using DOS-style short mode.
8097  # If so, the updated path is stored in $new_path.
8098
8099  input_path="$new_path"
8100  # Check if we need to convert this using DOS-style short mode. If the path
8101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8102  # take no chances and rewrite it.
8103  # Note: m4 eats our [], so we need to use [ and ] instead.
8104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8105  if test "x$has_forbidden_chars" != x; then
8106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8110      # Going to short mode and back again did indeed matter. Since short mode is
8111      # case insensitive, let's make it lowercase to improve readability.
8112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8113      # Now convert it back to Unix-stile (cygpath)
8114      input_path=`$CYGPATH -u "$shortmode_path"`
8115      new_path="$input_path"
8116    fi
8117  fi
8118
8119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8120  if test "x$test_cygdrive_prefix" = x; then
8121    # As a simple fix, exclude /usr/bin since it's not a real path.
8122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8124      # a path prefixed by /cygdrive for fixpath to work.
8125      new_path="$CYGWIN_ROOT_PATH$input_path"
8126    fi
8127  fi
8128
8129
8130  if test "x$path" != "x$new_path"; then
8131    OUTPUT_ROOT="$new_path"
8132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8133$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8134  fi
8135
8136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8137
8138  path="$OUTPUT_ROOT"
8139  has_colon=`$ECHO $path | $GREP ^.:`
8140  new_path="$path"
8141  if test "x$has_colon" = x; then
8142    # Not in mixed or Windows style, start by that.
8143    new_path=`cmd //c echo $path`
8144  fi
8145
8146
8147  input_path="$new_path"
8148  # Check if we need to convert this using DOS-style short mode. If the path
8149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8150  # take no chances and rewrite it.
8151  # Note: m4 eats our [], so we need to use [ and ] instead.
8152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8153  if test "x$has_forbidden_chars" != x; then
8154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8156  fi
8157
8158
8159  windows_path="$new_path"
8160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8161    unix_path=`$CYGPATH -u "$windows_path"`
8162    new_path="$unix_path"
8163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8165    new_path="$unix_path"
8166  fi
8167
8168  if test "x$path" != "x$new_path"; then
8169    OUTPUT_ROOT="$new_path"
8170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8171$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8172  fi
8173
8174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8176
8177  else
8178    # We're on a posix platform. Hooray! :)
8179    path="$OUTPUT_ROOT"
8180    has_space=`$ECHO "$path" | $GREP " "`
8181    if test "x$has_space" != x; then
8182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8183$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8184      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8185    fi
8186
8187    # Use eval to expand a potential ~
8188    eval path="$path"
8189    if test ! -f "$path" && test ! -d "$path"; then
8190      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8191    fi
8192
8193    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8194  fi
8195
8196
8197SPEC=$OUTPUT_ROOT/spec.gmk
8198
8199CONF_NAME=$CONF_NAME
8200
8201OUTPUT_ROOT=$OUTPUT_ROOT
8202
8203
8204# Most of the probed defines are put into config.h
8205ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8206
8207# The spec.gmk file contains all variables for the make system.
8208ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8209
8210# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8211ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8212
8213# The bootcycle-spec.gmk file contains support for boot cycle builds.
8214ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8215
8216# The compare.sh is used to compare the build output to other builds.
8217ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8218
8219# Spec.sh is currently used by compare-objects.sh
8220ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8221
8222# The generated Makefile knows where the spec.gmk is and where the source is.
8223# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8224# which will look for generated configurations
8225ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8226
8227
8228# Save the arguments given to us
8229echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8230
8231
8232# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8233
8234    for ac_prog in apt-get yum port pkgutil pkgadd
8235do
8236  # Extract the first word of "$ac_prog", so it can be a program name with args.
8237set dummy $ac_prog; ac_word=$2
8238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8239$as_echo_n "checking for $ac_word... " >&6; }
8240if ${ac_cv_prog_PKGHANDLER+:} false; then :
8241  $as_echo_n "(cached) " >&6
8242else
8243  if test -n "$PKGHANDLER"; then
8244  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8245else
8246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8247for as_dir in $PATH
8248do
8249  IFS=$as_save_IFS
8250  test -z "$as_dir" && as_dir=.
8251    for ac_exec_ext in '' $ac_executable_extensions; do
8252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8253    ac_cv_prog_PKGHANDLER="$ac_prog"
8254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8255    break 2
8256  fi
8257done
8258  done
8259IFS=$as_save_IFS
8260
8261fi
8262fi
8263PKGHANDLER=$ac_cv_prog_PKGHANDLER
8264if test -n "$PKGHANDLER"; then
8265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8266$as_echo "$PKGHANDLER" >&6; }
8267else
8268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8269$as_echo "no" >&6; }
8270fi
8271
8272
8273  test -n "$PKGHANDLER" && break
8274done
8275
8276
8277
8278# Setup tools that requires more complex handling, or that is not needed by the configure script.
8279
8280
8281  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8282  if test "x$MAKE" != x; then
8283    # User has supplied a make, test it.
8284    if test ! -f "$MAKE"; then
8285      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8286    fi
8287
8288  MAKE_CANDIDATE=""$MAKE""
8289  DESCRIPTION="user supplied MAKE=$MAKE"
8290  if test "x$MAKE_CANDIDATE" != x; then
8291    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8292$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8293    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8294    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8295    if test "x$IS_GNU_MAKE" = x; then
8296      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8297$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8298    else
8299      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8300      if test "x$IS_MODERN_MAKE" = x; then
8301        { $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
8302$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;}
8303      else
8304        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8305          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8306            MAKE_EXPECTED_ENV='cygwin'
8307          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8308            MAKE_EXPECTED_ENV='msys'
8309          else
8310            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8311          fi
8312          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8313          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8314        else
8315          # Not relevant for non-Windows
8316          IS_MAKE_CORRECT_ENV=true
8317        fi
8318        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8319          { $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
8320$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;}
8321        else
8322          FOUND_MAKE=$MAKE_CANDIDATE
8323
8324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8325
8326  # First separate the path from the arguments. This will split at the first
8327  # space.
8328  complete="$FOUND_MAKE"
8329  path="${complete%% *}"
8330  tmp="$complete EOL"
8331  arguments="${tmp#* }"
8332
8333  # Input might be given as Windows format, start by converting to
8334  # unix format.
8335  new_path=`$CYGPATH -u "$path"`
8336
8337  # Now try to locate executable using which
8338  new_path=`$WHICH "$new_path" 2> /dev/null`
8339  # bat and cmd files are not always considered executable in cygwin causing which
8340  # to not find them
8341  if test "x$new_path" = x \
8342           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8343           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8344    new_path=`$CYGPATH -u "$path"`
8345  fi
8346  if test "x$new_path" = x; then
8347    # Oops. Which didn't find the executable.
8348    # The splitting of arguments from the executable at a space might have been incorrect,
8349    # since paths with space are more likely in Windows. Give it another try with the whole
8350    # argument.
8351    path="$complete"
8352    arguments="EOL"
8353    new_path=`$CYGPATH -u "$path"`
8354    new_path=`$WHICH "$new_path" 2> /dev/null`
8355    # bat and cmd files are not always considered executable in cygwin causing which
8356    # to not find them
8357    if test "x$new_path" = x \
8358             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8359             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8360      new_path=`$CYGPATH -u "$path"`
8361    fi
8362    if test "x$new_path" = x; then
8363      # It's still not found. Now this is an unrecoverable error.
8364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8366      has_space=`$ECHO "$complete" | $GREP " "`
8367      if test "x$has_space" != x; then
8368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8370      fi
8371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8372    fi
8373  fi
8374
8375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8378  # "foo.exe" is OK but "foo" is an error.
8379  #
8380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8381  # It is also a way to make sure we got the proper file name for the real test later on.
8382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8383  if test "x$test_shortpath" = x; then
8384    # Short path failed, file does not exist as specified.
8385    # Try adding .exe or .cmd
8386    if test -f "${new_path}.exe"; then
8387       input_to_shortpath="${new_path}.exe"
8388    elif test -f "${new_path}.cmd"; then
8389       input_to_shortpath="${new_path}.cmd"
8390    else
8391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8393      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8394$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8395      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8396    fi
8397  else
8398    input_to_shortpath="$new_path"
8399  fi
8400
8401  # Call helper function which possibly converts this using DOS-style short mode.
8402  # If so, the updated path is stored in $new_path.
8403  new_path="$input_to_shortpath"
8404
8405  input_path="$input_to_shortpath"
8406  # Check if we need to convert this using DOS-style short mode. If the path
8407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8408  # take no chances and rewrite it.
8409  # Note: m4 eats our [], so we need to use [ and ] instead.
8410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8411  if test "x$has_forbidden_chars" != x; then
8412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8416      # Going to short mode and back again did indeed matter. Since short mode is
8417      # case insensitive, let's make it lowercase to improve readability.
8418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8419      # Now convert it back to Unix-stile (cygpath)
8420      input_path=`$CYGPATH -u "$shortmode_path"`
8421      new_path="$input_path"
8422    fi
8423  fi
8424
8425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8426  if test "x$test_cygdrive_prefix" = x; then
8427    # As a simple fix, exclude /usr/bin since it's not a real path.
8428    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8430      # a path prefixed by /cygdrive for fixpath to work.
8431      new_path="$CYGWIN_ROOT_PATH$input_path"
8432    fi
8433  fi
8434
8435  # remove trailing .exe if any
8436  new_path="${new_path/%.exe/}"
8437
8438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8439
8440  # First separate the path from the arguments. This will split at the first
8441  # space.
8442  complete="$FOUND_MAKE"
8443  path="${complete%% *}"
8444  tmp="$complete EOL"
8445  arguments="${tmp#* }"
8446
8447  # Input might be given as Windows format, start by converting to
8448  # unix format.
8449  new_path="$path"
8450
8451  windows_path="$new_path"
8452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8453    unix_path=`$CYGPATH -u "$windows_path"`
8454    new_path="$unix_path"
8455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8457    new_path="$unix_path"
8458  fi
8459
8460
8461  # Now try to locate executable using which
8462  new_path=`$WHICH "$new_path" 2> /dev/null`
8463
8464  if test "x$new_path" = x; then
8465    # Oops. Which didn't find the executable.
8466    # The splitting of arguments from the executable at a space might have been incorrect,
8467    # since paths with space are more likely in Windows. Give it another try with the whole
8468    # argument.
8469    path="$complete"
8470    arguments="EOL"
8471    new_path="$path"
8472
8473  windows_path="$new_path"
8474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8475    unix_path=`$CYGPATH -u "$windows_path"`
8476    new_path="$unix_path"
8477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8479    new_path="$unix_path"
8480  fi
8481
8482
8483    new_path=`$WHICH "$new_path" 2> /dev/null`
8484
8485    if test "x$new_path" = x; then
8486      # It's still not found. Now this is an unrecoverable error.
8487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8489      has_space=`$ECHO "$complete" | $GREP " "`
8490      if test "x$has_space" != x; then
8491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8493      fi
8494      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8495    fi
8496  fi
8497
8498  # Now new_path has a complete unix path to the binary
8499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8500    # Keep paths in /bin as-is, but remove trailing .exe if any
8501    new_path="${new_path/%.exe/}"
8502    # Do not save /bin paths to all_fixpath_prefixes!
8503  else
8504    # Not in mixed or Windows style, start by that.
8505    new_path=`cmd //c echo $new_path`
8506
8507  input_path="$new_path"
8508  # Check if we need to convert this using DOS-style short mode. If the path
8509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8510  # take no chances and rewrite it.
8511  # Note: m4 eats our [], so we need to use [ and ] instead.
8512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8513  if test "x$has_forbidden_chars" != x; then
8514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8516  fi
8517
8518    # Output is in $new_path
8519
8520  windows_path="$new_path"
8521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8522    unix_path=`$CYGPATH -u "$windows_path"`
8523    new_path="$unix_path"
8524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8526    new_path="$unix_path"
8527  fi
8528
8529    # remove trailing .exe if any
8530    new_path="${new_path/%.exe/}"
8531
8532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8534  fi
8535
8536  else
8537    # We're on a posix platform. Hooray! :)
8538    # First separate the path from the arguments. This will split at the first
8539    # space.
8540    complete="$FOUND_MAKE"
8541    path="${complete%% *}"
8542    tmp="$complete EOL"
8543    arguments="${tmp#* }"
8544
8545    # Cannot rely on the command "which" here since it doesn't always work.
8546    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8547    if test -z "$is_absolute_path"; then
8548      # Path to executable is not absolute. Find it.
8549      IFS_save="$IFS"
8550      IFS=:
8551      for p in $PATH; do
8552        if test -f "$p/$path" && test -x "$p/$path"; then
8553          new_path="$p/$path"
8554          break
8555        fi
8556      done
8557      IFS="$IFS_save"
8558    else
8559      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8560$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8561      new_path="$path"
8562    fi
8563
8564    if test "x$new_path" = x; then
8565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8566$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8567        has_space=`$ECHO "$complete" | $GREP " "`
8568        if test "x$has_space" != x; then
8569          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8570$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8571        fi
8572        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8573      fi
8574  fi
8575
8576      # Now join together the path and the arguments once again
8577      if test "x$arguments" != xEOL; then
8578        new_complete="$new_path ${arguments% *}"
8579      else
8580        new_complete="$new_path"
8581      fi
8582
8583  if test "x$complete" != "x$new_complete"; then
8584      FOUND_MAKE="$new_complete"
8585      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8586$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8587    fi
8588
8589        fi
8590      fi
8591    fi
8592  fi
8593
8594    if test "x$FOUND_MAKE" = x; then
8595      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8596    fi
8597  else
8598    # Try our hardest to locate a correct version of GNU make
8599    for ac_prog in gmake
8600do
8601  # Extract the first word of "$ac_prog", so it can be a program name with args.
8602set dummy $ac_prog; ac_word=$2
8603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8604$as_echo_n "checking for $ac_word... " >&6; }
8605if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8606  $as_echo_n "(cached) " >&6
8607else
8608  case $CHECK_GMAKE in
8609  [\\/]* | ?:[\\/]*)
8610  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8611  ;;
8612  *)
8613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8614for as_dir in $PATH
8615do
8616  IFS=$as_save_IFS
8617  test -z "$as_dir" && as_dir=.
8618    for ac_exec_ext in '' $ac_executable_extensions; do
8619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8620    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8622    break 2
8623  fi
8624done
8625  done
8626IFS=$as_save_IFS
8627
8628  ;;
8629esac
8630fi
8631CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8632if test -n "$CHECK_GMAKE"; then
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8634$as_echo "$CHECK_GMAKE" >&6; }
8635else
8636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8637$as_echo "no" >&6; }
8638fi
8639
8640
8641  test -n "$CHECK_GMAKE" && break
8642done
8643
8644
8645  MAKE_CANDIDATE=""$CHECK_GMAKE""
8646  DESCRIPTION="gmake in PATH"
8647  if test "x$MAKE_CANDIDATE" != x; then
8648    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8649$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8650    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8651    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8652    if test "x$IS_GNU_MAKE" = x; then
8653      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8654$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8655    else
8656      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8657      if test "x$IS_MODERN_MAKE" = x; then
8658        { $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
8659$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;}
8660      else
8661        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8662          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8663            MAKE_EXPECTED_ENV='cygwin'
8664          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8665            MAKE_EXPECTED_ENV='msys'
8666          else
8667            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8668          fi
8669          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8670          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8671        else
8672          # Not relevant for non-Windows
8673          IS_MAKE_CORRECT_ENV=true
8674        fi
8675        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8676          { $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
8677$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;}
8678        else
8679          FOUND_MAKE=$MAKE_CANDIDATE
8680
8681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8682
8683  # First separate the path from the arguments. This will split at the first
8684  # space.
8685  complete="$FOUND_MAKE"
8686  path="${complete%% *}"
8687  tmp="$complete EOL"
8688  arguments="${tmp#* }"
8689
8690  # Input might be given as Windows format, start by converting to
8691  # unix format.
8692  new_path=`$CYGPATH -u "$path"`
8693
8694  # Now try to locate executable using which
8695  new_path=`$WHICH "$new_path" 2> /dev/null`
8696  # bat and cmd files are not always considered executable in cygwin causing which
8697  # to not find them
8698  if test "x$new_path" = x \
8699           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8700           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8701    new_path=`$CYGPATH -u "$path"`
8702  fi
8703  if test "x$new_path" = x; then
8704    # Oops. Which didn't find the executable.
8705    # The splitting of arguments from the executable at a space might have been incorrect,
8706    # since paths with space are more likely in Windows. Give it another try with the whole
8707    # argument.
8708    path="$complete"
8709    arguments="EOL"
8710    new_path=`$CYGPATH -u "$path"`
8711    new_path=`$WHICH "$new_path" 2> /dev/null`
8712    # bat and cmd files are not always considered executable in cygwin causing which
8713    # to not find them
8714    if test "x$new_path" = x \
8715             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8716             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8717      new_path=`$CYGPATH -u "$path"`
8718    fi
8719    if test "x$new_path" = x; then
8720      # It's still not found. Now this is an unrecoverable error.
8721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8723      has_space=`$ECHO "$complete" | $GREP " "`
8724      if test "x$has_space" != x; then
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8727      fi
8728      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8729    fi
8730  fi
8731
8732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8735  # "foo.exe" is OK but "foo" is an error.
8736  #
8737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8738  # It is also a way to make sure we got the proper file name for the real test later on.
8739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8740  if test "x$test_shortpath" = x; then
8741    # Short path failed, file does not exist as specified.
8742    # Try adding .exe or .cmd
8743    if test -f "${new_path}.exe"; then
8744       input_to_shortpath="${new_path}.exe"
8745    elif test -f "${new_path}.cmd"; then
8746       input_to_shortpath="${new_path}.cmd"
8747    else
8748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8752      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8753    fi
8754  else
8755    input_to_shortpath="$new_path"
8756  fi
8757
8758  # Call helper function which possibly converts this using DOS-style short mode.
8759  # If so, the updated path is stored in $new_path.
8760  new_path="$input_to_shortpath"
8761
8762  input_path="$input_to_shortpath"
8763  # Check if we need to convert this using DOS-style short mode. If the path
8764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8765  # take no chances and rewrite it.
8766  # Note: m4 eats our [], so we need to use [ and ] instead.
8767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8768  if test "x$has_forbidden_chars" != x; then
8769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8773      # Going to short mode and back again did indeed matter. Since short mode is
8774      # case insensitive, let's make it lowercase to improve readability.
8775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8776      # Now convert it back to Unix-stile (cygpath)
8777      input_path=`$CYGPATH -u "$shortmode_path"`
8778      new_path="$input_path"
8779    fi
8780  fi
8781
8782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8783  if test "x$test_cygdrive_prefix" = x; then
8784    # As a simple fix, exclude /usr/bin since it's not a real path.
8785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8787      # a path prefixed by /cygdrive for fixpath to work.
8788      new_path="$CYGWIN_ROOT_PATH$input_path"
8789    fi
8790  fi
8791
8792  # remove trailing .exe if any
8793  new_path="${new_path/%.exe/}"
8794
8795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8796
8797  # First separate the path from the arguments. This will split at the first
8798  # space.
8799  complete="$FOUND_MAKE"
8800  path="${complete%% *}"
8801  tmp="$complete EOL"
8802  arguments="${tmp#* }"
8803
8804  # Input might be given as Windows format, start by converting to
8805  # unix format.
8806  new_path="$path"
8807
8808  windows_path="$new_path"
8809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8810    unix_path=`$CYGPATH -u "$windows_path"`
8811    new_path="$unix_path"
8812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8814    new_path="$unix_path"
8815  fi
8816
8817
8818  # Now try to locate executable using which
8819  new_path=`$WHICH "$new_path" 2> /dev/null`
8820
8821  if test "x$new_path" = x; then
8822    # Oops. Which didn't find the executable.
8823    # The splitting of arguments from the executable at a space might have been incorrect,
8824    # since paths with space are more likely in Windows. Give it another try with the whole
8825    # argument.
8826    path="$complete"
8827    arguments="EOL"
8828    new_path="$path"
8829
8830  windows_path="$new_path"
8831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8832    unix_path=`$CYGPATH -u "$windows_path"`
8833    new_path="$unix_path"
8834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8836    new_path="$unix_path"
8837  fi
8838
8839
8840    new_path=`$WHICH "$new_path" 2> /dev/null`
8841
8842    if test "x$new_path" = x; then
8843      # It's still not found. Now this is an unrecoverable error.
8844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8846      has_space=`$ECHO "$complete" | $GREP " "`
8847      if test "x$has_space" != x; then
8848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8850      fi
8851      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8852    fi
8853  fi
8854
8855  # Now new_path has a complete unix path to the binary
8856  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8857    # Keep paths in /bin as-is, but remove trailing .exe if any
8858    new_path="${new_path/%.exe/}"
8859    # Do not save /bin paths to all_fixpath_prefixes!
8860  else
8861    # Not in mixed or Windows style, start by that.
8862    new_path=`cmd //c echo $new_path`
8863
8864  input_path="$new_path"
8865  # Check if we need to convert this using DOS-style short mode. If the path
8866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8867  # take no chances and rewrite it.
8868  # Note: m4 eats our [], so we need to use [ and ] instead.
8869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8870  if test "x$has_forbidden_chars" != x; then
8871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8873  fi
8874
8875    # Output is in $new_path
8876
8877  windows_path="$new_path"
8878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8879    unix_path=`$CYGPATH -u "$windows_path"`
8880    new_path="$unix_path"
8881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8883    new_path="$unix_path"
8884  fi
8885
8886    # remove trailing .exe if any
8887    new_path="${new_path/%.exe/}"
8888
8889    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8890    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8891  fi
8892
8893  else
8894    # We're on a posix platform. Hooray! :)
8895    # First separate the path from the arguments. This will split at the first
8896    # space.
8897    complete="$FOUND_MAKE"
8898    path="${complete%% *}"
8899    tmp="$complete EOL"
8900    arguments="${tmp#* }"
8901
8902    # Cannot rely on the command "which" here since it doesn't always work.
8903    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8904    if test -z "$is_absolute_path"; then
8905      # Path to executable is not absolute. Find it.
8906      IFS_save="$IFS"
8907      IFS=:
8908      for p in $PATH; do
8909        if test -f "$p/$path" && test -x "$p/$path"; then
8910          new_path="$p/$path"
8911          break
8912        fi
8913      done
8914      IFS="$IFS_save"
8915    else
8916      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8917$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8918      new_path="$path"
8919    fi
8920
8921    if test "x$new_path" = x; then
8922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8923$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8924        has_space=`$ECHO "$complete" | $GREP " "`
8925        if test "x$has_space" != x; then
8926          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8928        fi
8929        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8930      fi
8931  fi
8932
8933      # Now join together the path and the arguments once again
8934      if test "x$arguments" != xEOL; then
8935        new_complete="$new_path ${arguments% *}"
8936      else
8937        new_complete="$new_path"
8938      fi
8939
8940  if test "x$complete" != "x$new_complete"; then
8941      FOUND_MAKE="$new_complete"
8942      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8943$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8944    fi
8945
8946        fi
8947      fi
8948    fi
8949  fi
8950
8951
8952    if test "x$FOUND_MAKE" = x; then
8953      for ac_prog in make
8954do
8955  # Extract the first word of "$ac_prog", so it can be a program name with args.
8956set dummy $ac_prog; ac_word=$2
8957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8958$as_echo_n "checking for $ac_word... " >&6; }
8959if ${ac_cv_path_CHECK_MAKE+:} false; then :
8960  $as_echo_n "(cached) " >&6
8961else
8962  case $CHECK_MAKE in
8963  [\\/]* | ?:[\\/]*)
8964  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8965  ;;
8966  *)
8967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8968for as_dir in $PATH
8969do
8970  IFS=$as_save_IFS
8971  test -z "$as_dir" && as_dir=.
8972    for ac_exec_ext in '' $ac_executable_extensions; do
8973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8974    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8976    break 2
8977  fi
8978done
8979  done
8980IFS=$as_save_IFS
8981
8982  ;;
8983esac
8984fi
8985CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8986if test -n "$CHECK_MAKE"; then
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8988$as_echo "$CHECK_MAKE" >&6; }
8989else
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
8992fi
8993
8994
8995  test -n "$CHECK_MAKE" && break
8996done
8997
8998
8999  MAKE_CANDIDATE=""$CHECK_MAKE""
9000  DESCRIPTION="make in PATH"
9001  if test "x$MAKE_CANDIDATE" != x; then
9002    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9003$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9004    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9005    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9006    if test "x$IS_GNU_MAKE" = x; then
9007      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9008$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9009    else
9010      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9011      if test "x$IS_MODERN_MAKE" = x; then
9012        { $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
9013$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;}
9014      else
9015        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9016          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9017            MAKE_EXPECTED_ENV='cygwin'
9018          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9019            MAKE_EXPECTED_ENV='msys'
9020          else
9021            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9022          fi
9023          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9024          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9025        else
9026          # Not relevant for non-Windows
9027          IS_MAKE_CORRECT_ENV=true
9028        fi
9029        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9030          { $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
9031$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;}
9032        else
9033          FOUND_MAKE=$MAKE_CANDIDATE
9034
9035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9036
9037  # First separate the path from the arguments. This will split at the first
9038  # space.
9039  complete="$FOUND_MAKE"
9040  path="${complete%% *}"
9041  tmp="$complete EOL"
9042  arguments="${tmp#* }"
9043
9044  # Input might be given as Windows format, start by converting to
9045  # unix format.
9046  new_path=`$CYGPATH -u "$path"`
9047
9048  # Now try to locate executable using which
9049  new_path=`$WHICH "$new_path" 2> /dev/null`
9050  # bat and cmd files are not always considered executable in cygwin causing which
9051  # to not find them
9052  if test "x$new_path" = x \
9053           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9054           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9055    new_path=`$CYGPATH -u "$path"`
9056  fi
9057  if test "x$new_path" = x; then
9058    # Oops. Which didn't find the executable.
9059    # The splitting of arguments from the executable at a space might have been incorrect,
9060    # since paths with space are more likely in Windows. Give it another try with the whole
9061    # argument.
9062    path="$complete"
9063    arguments="EOL"
9064    new_path=`$CYGPATH -u "$path"`
9065    new_path=`$WHICH "$new_path" 2> /dev/null`
9066    # bat and cmd files are not always considered executable in cygwin causing which
9067    # to not find them
9068    if test "x$new_path" = x \
9069             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9070             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9071      new_path=`$CYGPATH -u "$path"`
9072    fi
9073    if test "x$new_path" = x; then
9074      # It's still not found. Now this is an unrecoverable error.
9075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9076$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9077      has_space=`$ECHO "$complete" | $GREP " "`
9078      if test "x$has_space" != x; then
9079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9081      fi
9082      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9083    fi
9084  fi
9085
9086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9089  # "foo.exe" is OK but "foo" is an error.
9090  #
9091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9092  # It is also a way to make sure we got the proper file name for the real test later on.
9093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9094  if test "x$test_shortpath" = x; then
9095    # Short path failed, file does not exist as specified.
9096    # Try adding .exe or .cmd
9097    if test -f "${new_path}.exe"; then
9098       input_to_shortpath="${new_path}.exe"
9099    elif test -f "${new_path}.cmd"; then
9100       input_to_shortpath="${new_path}.cmd"
9101    else
9102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9106      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9107    fi
9108  else
9109    input_to_shortpath="$new_path"
9110  fi
9111
9112  # Call helper function which possibly converts this using DOS-style short mode.
9113  # If so, the updated path is stored in $new_path.
9114  new_path="$input_to_shortpath"
9115
9116  input_path="$input_to_shortpath"
9117  # Check if we need to convert this using DOS-style short mode. If the path
9118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9119  # take no chances and rewrite it.
9120  # Note: m4 eats our [], so we need to use [ and ] instead.
9121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9122  if test "x$has_forbidden_chars" != x; then
9123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9127      # Going to short mode and back again did indeed matter. Since short mode is
9128      # case insensitive, let's make it lowercase to improve readability.
9129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9130      # Now convert it back to Unix-stile (cygpath)
9131      input_path=`$CYGPATH -u "$shortmode_path"`
9132      new_path="$input_path"
9133    fi
9134  fi
9135
9136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9137  if test "x$test_cygdrive_prefix" = x; then
9138    # As a simple fix, exclude /usr/bin since it's not a real path.
9139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9141      # a path prefixed by /cygdrive for fixpath to work.
9142      new_path="$CYGWIN_ROOT_PATH$input_path"
9143    fi
9144  fi
9145
9146  # remove trailing .exe if any
9147  new_path="${new_path/%.exe/}"
9148
9149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9150
9151  # First separate the path from the arguments. This will split at the first
9152  # space.
9153  complete="$FOUND_MAKE"
9154  path="${complete%% *}"
9155  tmp="$complete EOL"
9156  arguments="${tmp#* }"
9157
9158  # Input might be given as Windows format, start by converting to
9159  # unix format.
9160  new_path="$path"
9161
9162  windows_path="$new_path"
9163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9164    unix_path=`$CYGPATH -u "$windows_path"`
9165    new_path="$unix_path"
9166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9168    new_path="$unix_path"
9169  fi
9170
9171
9172  # Now try to locate executable using which
9173  new_path=`$WHICH "$new_path" 2> /dev/null`
9174
9175  if test "x$new_path" = x; then
9176    # Oops. Which didn't find the executable.
9177    # The splitting of arguments from the executable at a space might have been incorrect,
9178    # since paths with space are more likely in Windows. Give it another try with the whole
9179    # argument.
9180    path="$complete"
9181    arguments="EOL"
9182    new_path="$path"
9183
9184  windows_path="$new_path"
9185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9186    unix_path=`$CYGPATH -u "$windows_path"`
9187    new_path="$unix_path"
9188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9190    new_path="$unix_path"
9191  fi
9192
9193
9194    new_path=`$WHICH "$new_path" 2> /dev/null`
9195
9196    if test "x$new_path" = x; then
9197      # It's still not found. Now this is an unrecoverable error.
9198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9199$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9200      has_space=`$ECHO "$complete" | $GREP " "`
9201      if test "x$has_space" != x; then
9202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9204      fi
9205      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9206    fi
9207  fi
9208
9209  # Now new_path has a complete unix path to the binary
9210  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9211    # Keep paths in /bin as-is, but remove trailing .exe if any
9212    new_path="${new_path/%.exe/}"
9213    # Do not save /bin paths to all_fixpath_prefixes!
9214  else
9215    # Not in mixed or Windows style, start by that.
9216    new_path=`cmd //c echo $new_path`
9217
9218  input_path="$new_path"
9219  # Check if we need to convert this using DOS-style short mode. If the path
9220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9221  # take no chances and rewrite it.
9222  # Note: m4 eats our [], so we need to use [ and ] instead.
9223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9224  if test "x$has_forbidden_chars" != x; then
9225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9227  fi
9228
9229    # Output is in $new_path
9230
9231  windows_path="$new_path"
9232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9233    unix_path=`$CYGPATH -u "$windows_path"`
9234    new_path="$unix_path"
9235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9237    new_path="$unix_path"
9238  fi
9239
9240    # remove trailing .exe if any
9241    new_path="${new_path/%.exe/}"
9242
9243    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9244    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9245  fi
9246
9247  else
9248    # We're on a posix platform. Hooray! :)
9249    # First separate the path from the arguments. This will split at the first
9250    # space.
9251    complete="$FOUND_MAKE"
9252    path="${complete%% *}"
9253    tmp="$complete EOL"
9254    arguments="${tmp#* }"
9255
9256    # Cannot rely on the command "which" here since it doesn't always work.
9257    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9258    if test -z "$is_absolute_path"; then
9259      # Path to executable is not absolute. Find it.
9260      IFS_save="$IFS"
9261      IFS=:
9262      for p in $PATH; do
9263        if test -f "$p/$path" && test -x "$p/$path"; then
9264          new_path="$p/$path"
9265          break
9266        fi
9267      done
9268      IFS="$IFS_save"
9269    else
9270      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9271$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9272      new_path="$path"
9273    fi
9274
9275    if test "x$new_path" = x; then
9276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9278        has_space=`$ECHO "$complete" | $GREP " "`
9279        if test "x$has_space" != x; then
9280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9282        fi
9283        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9284      fi
9285  fi
9286
9287      # Now join together the path and the arguments once again
9288      if test "x$arguments" != xEOL; then
9289        new_complete="$new_path ${arguments% *}"
9290      else
9291        new_complete="$new_path"
9292      fi
9293
9294  if test "x$complete" != "x$new_complete"; then
9295      FOUND_MAKE="$new_complete"
9296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9298    fi
9299
9300        fi
9301      fi
9302    fi
9303  fi
9304
9305    fi
9306
9307    if test "x$FOUND_MAKE" = x; then
9308      if test "x$TOOLS_DIR" != x; then
9309        # We have a tools-dir, check that as well before giving up.
9310        OLD_PATH=$PATH
9311        PATH=$TOOLS_DIR:$PATH
9312        for ac_prog in gmake
9313do
9314  # Extract the first word of "$ac_prog", so it can be a program name with args.
9315set dummy $ac_prog; ac_word=$2
9316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9317$as_echo_n "checking for $ac_word... " >&6; }
9318if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9319  $as_echo_n "(cached) " >&6
9320else
9321  case $CHECK_TOOLSDIR_GMAKE in
9322  [\\/]* | ?:[\\/]*)
9323  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9324  ;;
9325  *)
9326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9327for as_dir in $PATH
9328do
9329  IFS=$as_save_IFS
9330  test -z "$as_dir" && as_dir=.
9331    for ac_exec_ext in '' $ac_executable_extensions; do
9332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9333    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9335    break 2
9336  fi
9337done
9338  done
9339IFS=$as_save_IFS
9340
9341  ;;
9342esac
9343fi
9344CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9345if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9347$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9348else
9349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350$as_echo "no" >&6; }
9351fi
9352
9353
9354  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9355done
9356
9357
9358  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9359  DESCRIPTION="gmake in tools-dir"
9360  if test "x$MAKE_CANDIDATE" != x; then
9361    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9362$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9363    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9364    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9365    if test "x$IS_GNU_MAKE" = x; then
9366      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9367$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9368    else
9369      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9370      if test "x$IS_MODERN_MAKE" = x; then
9371        { $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
9372$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;}
9373      else
9374        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9375          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9376            MAKE_EXPECTED_ENV='cygwin'
9377          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9378            MAKE_EXPECTED_ENV='msys'
9379          else
9380            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9381          fi
9382          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9383          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9384        else
9385          # Not relevant for non-Windows
9386          IS_MAKE_CORRECT_ENV=true
9387        fi
9388        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9389          { $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
9390$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;}
9391        else
9392          FOUND_MAKE=$MAKE_CANDIDATE
9393
9394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9395
9396  # First separate the path from the arguments. This will split at the first
9397  # space.
9398  complete="$FOUND_MAKE"
9399  path="${complete%% *}"
9400  tmp="$complete EOL"
9401  arguments="${tmp#* }"
9402
9403  # Input might be given as Windows format, start by converting to
9404  # unix format.
9405  new_path=`$CYGPATH -u "$path"`
9406
9407  # Now try to locate executable using which
9408  new_path=`$WHICH "$new_path" 2> /dev/null`
9409  # bat and cmd files are not always considered executable in cygwin causing which
9410  # to not find them
9411  if test "x$new_path" = x \
9412           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9413           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9414    new_path=`$CYGPATH -u "$path"`
9415  fi
9416  if test "x$new_path" = x; then
9417    # Oops. Which didn't find the executable.
9418    # The splitting of arguments from the executable at a space might have been incorrect,
9419    # since paths with space are more likely in Windows. Give it another try with the whole
9420    # argument.
9421    path="$complete"
9422    arguments="EOL"
9423    new_path=`$CYGPATH -u "$path"`
9424    new_path=`$WHICH "$new_path" 2> /dev/null`
9425    # bat and cmd files are not always considered executable in cygwin causing which
9426    # to not find them
9427    if test "x$new_path" = x \
9428             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9429             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9430      new_path=`$CYGPATH -u "$path"`
9431    fi
9432    if test "x$new_path" = x; then
9433      # It's still not found. Now this is an unrecoverable error.
9434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9436      has_space=`$ECHO "$complete" | $GREP " "`
9437      if test "x$has_space" != x; then
9438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9440      fi
9441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9442    fi
9443  fi
9444
9445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9448  # "foo.exe" is OK but "foo" is an error.
9449  #
9450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9451  # It is also a way to make sure we got the proper file name for the real test later on.
9452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9453  if test "x$test_shortpath" = x; then
9454    # Short path failed, file does not exist as specified.
9455    # Try adding .exe or .cmd
9456    if test -f "${new_path}.exe"; then
9457       input_to_shortpath="${new_path}.exe"
9458    elif test -f "${new_path}.cmd"; then
9459       input_to_shortpath="${new_path}.cmd"
9460    else
9461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9465      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9466    fi
9467  else
9468    input_to_shortpath="$new_path"
9469  fi
9470
9471  # Call helper function which possibly converts this using DOS-style short mode.
9472  # If so, the updated path is stored in $new_path.
9473  new_path="$input_to_shortpath"
9474
9475  input_path="$input_to_shortpath"
9476  # Check if we need to convert this using DOS-style short mode. If the path
9477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9478  # take no chances and rewrite it.
9479  # Note: m4 eats our [], so we need to use [ and ] instead.
9480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9481  if test "x$has_forbidden_chars" != x; then
9482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9486      # Going to short mode and back again did indeed matter. Since short mode is
9487      # case insensitive, let's make it lowercase to improve readability.
9488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9489      # Now convert it back to Unix-stile (cygpath)
9490      input_path=`$CYGPATH -u "$shortmode_path"`
9491      new_path="$input_path"
9492    fi
9493  fi
9494
9495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9496  if test "x$test_cygdrive_prefix" = x; then
9497    # As a simple fix, exclude /usr/bin since it's not a real path.
9498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9500      # a path prefixed by /cygdrive for fixpath to work.
9501      new_path="$CYGWIN_ROOT_PATH$input_path"
9502    fi
9503  fi
9504
9505  # remove trailing .exe if any
9506  new_path="${new_path/%.exe/}"
9507
9508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9509
9510  # First separate the path from the arguments. This will split at the first
9511  # space.
9512  complete="$FOUND_MAKE"
9513  path="${complete%% *}"
9514  tmp="$complete EOL"
9515  arguments="${tmp#* }"
9516
9517  # Input might be given as Windows format, start by converting to
9518  # unix format.
9519  new_path="$path"
9520
9521  windows_path="$new_path"
9522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9523    unix_path=`$CYGPATH -u "$windows_path"`
9524    new_path="$unix_path"
9525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9527    new_path="$unix_path"
9528  fi
9529
9530
9531  # Now try to locate executable using which
9532  new_path=`$WHICH "$new_path" 2> /dev/null`
9533
9534  if test "x$new_path" = x; then
9535    # Oops. Which didn't find the executable.
9536    # The splitting of arguments from the executable at a space might have been incorrect,
9537    # since paths with space are more likely in Windows. Give it another try with the whole
9538    # argument.
9539    path="$complete"
9540    arguments="EOL"
9541    new_path="$path"
9542
9543  windows_path="$new_path"
9544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9545    unix_path=`$CYGPATH -u "$windows_path"`
9546    new_path="$unix_path"
9547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9549    new_path="$unix_path"
9550  fi
9551
9552
9553    new_path=`$WHICH "$new_path" 2> /dev/null`
9554
9555    if test "x$new_path" = x; then
9556      # It's still not found. Now this is an unrecoverable error.
9557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9558$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9559      has_space=`$ECHO "$complete" | $GREP " "`
9560      if test "x$has_space" != x; then
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9563      fi
9564      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9565    fi
9566  fi
9567
9568  # Now new_path has a complete unix path to the binary
9569  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9570    # Keep paths in /bin as-is, but remove trailing .exe if any
9571    new_path="${new_path/%.exe/}"
9572    # Do not save /bin paths to all_fixpath_prefixes!
9573  else
9574    # Not in mixed or Windows style, start by that.
9575    new_path=`cmd //c echo $new_path`
9576
9577  input_path="$new_path"
9578  # Check if we need to convert this using DOS-style short mode. If the path
9579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9580  # take no chances and rewrite it.
9581  # Note: m4 eats our [], so we need to use [ and ] instead.
9582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9583  if test "x$has_forbidden_chars" != x; then
9584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9586  fi
9587
9588    # Output is in $new_path
9589
9590  windows_path="$new_path"
9591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9592    unix_path=`$CYGPATH -u "$windows_path"`
9593    new_path="$unix_path"
9594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9596    new_path="$unix_path"
9597  fi
9598
9599    # remove trailing .exe if any
9600    new_path="${new_path/%.exe/}"
9601
9602    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9603    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9604  fi
9605
9606  else
9607    # We're on a posix platform. Hooray! :)
9608    # First separate the path from the arguments. This will split at the first
9609    # space.
9610    complete="$FOUND_MAKE"
9611    path="${complete%% *}"
9612    tmp="$complete EOL"
9613    arguments="${tmp#* }"
9614
9615    # Cannot rely on the command "which" here since it doesn't always work.
9616    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9617    if test -z "$is_absolute_path"; then
9618      # Path to executable is not absolute. Find it.
9619      IFS_save="$IFS"
9620      IFS=:
9621      for p in $PATH; do
9622        if test -f "$p/$path" && test -x "$p/$path"; then
9623          new_path="$p/$path"
9624          break
9625        fi
9626      done
9627      IFS="$IFS_save"
9628    else
9629      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9630$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9631      new_path="$path"
9632    fi
9633
9634    if test "x$new_path" = x; then
9635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9636$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9637        has_space=`$ECHO "$complete" | $GREP " "`
9638        if test "x$has_space" != x; then
9639          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9640$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9641        fi
9642        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9643      fi
9644  fi
9645
9646      # Now join together the path and the arguments once again
9647      if test "x$arguments" != xEOL; then
9648        new_complete="$new_path ${arguments% *}"
9649      else
9650        new_complete="$new_path"
9651      fi
9652
9653  if test "x$complete" != "x$new_complete"; then
9654      FOUND_MAKE="$new_complete"
9655      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9656$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9657    fi
9658
9659        fi
9660      fi
9661    fi
9662  fi
9663
9664        if test "x$FOUND_MAKE" = x; then
9665          for ac_prog in make
9666do
9667  # Extract the first word of "$ac_prog", so it can be a program name with args.
9668set dummy $ac_prog; ac_word=$2
9669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670$as_echo_n "checking for $ac_word... " >&6; }
9671if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9672  $as_echo_n "(cached) " >&6
9673else
9674  case $CHECK_TOOLSDIR_MAKE in
9675  [\\/]* | ?:[\\/]*)
9676  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9677  ;;
9678  *)
9679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9680for as_dir in $PATH
9681do
9682  IFS=$as_save_IFS
9683  test -z "$as_dir" && as_dir=.
9684    for ac_exec_ext in '' $ac_executable_extensions; do
9685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9686    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9688    break 2
9689  fi
9690done
9691  done
9692IFS=$as_save_IFS
9693
9694  ;;
9695esac
9696fi
9697CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9698if test -n "$CHECK_TOOLSDIR_MAKE"; then
9699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9700$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9701else
9702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703$as_echo "no" >&6; }
9704fi
9705
9706
9707  test -n "$CHECK_TOOLSDIR_MAKE" && break
9708done
9709
9710
9711  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9712  DESCRIPTION="make in tools-dir"
9713  if test "x$MAKE_CANDIDATE" != x; then
9714    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9715$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9716    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9717    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9718    if test "x$IS_GNU_MAKE" = x; then
9719      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9720$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9721    else
9722      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9723      if test "x$IS_MODERN_MAKE" = x; then
9724        { $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
9725$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;}
9726      else
9727        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9728          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9729            MAKE_EXPECTED_ENV='cygwin'
9730          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9731            MAKE_EXPECTED_ENV='msys'
9732          else
9733            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9734          fi
9735          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9736          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9737        else
9738          # Not relevant for non-Windows
9739          IS_MAKE_CORRECT_ENV=true
9740        fi
9741        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9742          { $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
9743$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;}
9744        else
9745          FOUND_MAKE=$MAKE_CANDIDATE
9746
9747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9748
9749  # First separate the path from the arguments. This will split at the first
9750  # space.
9751  complete="$FOUND_MAKE"
9752  path="${complete%% *}"
9753  tmp="$complete EOL"
9754  arguments="${tmp#* }"
9755
9756  # Input might be given as Windows format, start by converting to
9757  # unix format.
9758  new_path=`$CYGPATH -u "$path"`
9759
9760  # Now try to locate executable using which
9761  new_path=`$WHICH "$new_path" 2> /dev/null`
9762  # bat and cmd files are not always considered executable in cygwin causing which
9763  # to not find them
9764  if test "x$new_path" = x \
9765           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9766           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9767    new_path=`$CYGPATH -u "$path"`
9768  fi
9769  if test "x$new_path" = x; then
9770    # Oops. Which didn't find the executable.
9771    # The splitting of arguments from the executable at a space might have been incorrect,
9772    # since paths with space are more likely in Windows. Give it another try with the whole
9773    # argument.
9774    path="$complete"
9775    arguments="EOL"
9776    new_path=`$CYGPATH -u "$path"`
9777    new_path=`$WHICH "$new_path" 2> /dev/null`
9778    # bat and cmd files are not always considered executable in cygwin causing which
9779    # to not find them
9780    if test "x$new_path" = x \
9781             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9782             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9783      new_path=`$CYGPATH -u "$path"`
9784    fi
9785    if test "x$new_path" = x; then
9786      # It's still not found. Now this is an unrecoverable error.
9787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9788$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9789      has_space=`$ECHO "$complete" | $GREP " "`
9790      if test "x$has_space" != x; then
9791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9793      fi
9794      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9795    fi
9796  fi
9797
9798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9801  # "foo.exe" is OK but "foo" is an error.
9802  #
9803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9804  # It is also a way to make sure we got the proper file name for the real test later on.
9805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9806  if test "x$test_shortpath" = x; then
9807    # Short path failed, file does not exist as specified.
9808    # Try adding .exe or .cmd
9809    if test -f "${new_path}.exe"; then
9810       input_to_shortpath="${new_path}.exe"
9811    elif test -f "${new_path}.cmd"; then
9812       input_to_shortpath="${new_path}.cmd"
9813    else
9814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9816      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9817$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9818      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9819    fi
9820  else
9821    input_to_shortpath="$new_path"
9822  fi
9823
9824  # Call helper function which possibly converts this using DOS-style short mode.
9825  # If so, the updated path is stored in $new_path.
9826  new_path="$input_to_shortpath"
9827
9828  input_path="$input_to_shortpath"
9829  # Check if we need to convert this using DOS-style short mode. If the path
9830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9831  # take no chances and rewrite it.
9832  # Note: m4 eats our [], so we need to use [ and ] instead.
9833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9834  if test "x$has_forbidden_chars" != x; then
9835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9839      # Going to short mode and back again did indeed matter. Since short mode is
9840      # case insensitive, let's make it lowercase to improve readability.
9841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9842      # Now convert it back to Unix-stile (cygpath)
9843      input_path=`$CYGPATH -u "$shortmode_path"`
9844      new_path="$input_path"
9845    fi
9846  fi
9847
9848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9849  if test "x$test_cygdrive_prefix" = x; then
9850    # As a simple fix, exclude /usr/bin since it's not a real path.
9851    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9853      # a path prefixed by /cygdrive for fixpath to work.
9854      new_path="$CYGWIN_ROOT_PATH$input_path"
9855    fi
9856  fi
9857
9858  # remove trailing .exe if any
9859  new_path="${new_path/%.exe/}"
9860
9861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9862
9863  # First separate the path from the arguments. This will split at the first
9864  # space.
9865  complete="$FOUND_MAKE"
9866  path="${complete%% *}"
9867  tmp="$complete EOL"
9868  arguments="${tmp#* }"
9869
9870  # Input might be given as Windows format, start by converting to
9871  # unix format.
9872  new_path="$path"
9873
9874  windows_path="$new_path"
9875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9876    unix_path=`$CYGPATH -u "$windows_path"`
9877    new_path="$unix_path"
9878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9880    new_path="$unix_path"
9881  fi
9882
9883
9884  # Now try to locate executable using which
9885  new_path=`$WHICH "$new_path" 2> /dev/null`
9886
9887  if test "x$new_path" = x; then
9888    # Oops. Which didn't find the executable.
9889    # The splitting of arguments from the executable at a space might have been incorrect,
9890    # since paths with space are more likely in Windows. Give it another try with the whole
9891    # argument.
9892    path="$complete"
9893    arguments="EOL"
9894    new_path="$path"
9895
9896  windows_path="$new_path"
9897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9898    unix_path=`$CYGPATH -u "$windows_path"`
9899    new_path="$unix_path"
9900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9902    new_path="$unix_path"
9903  fi
9904
9905
9906    new_path=`$WHICH "$new_path" 2> /dev/null`
9907
9908    if test "x$new_path" = x; then
9909      # It's still not found. Now this is an unrecoverable error.
9910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9912      has_space=`$ECHO "$complete" | $GREP " "`
9913      if test "x$has_space" != x; then
9914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9916      fi
9917      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9918    fi
9919  fi
9920
9921  # Now new_path has a complete unix path to the binary
9922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9923    # Keep paths in /bin as-is, but remove trailing .exe if any
9924    new_path="${new_path/%.exe/}"
9925    # Do not save /bin paths to all_fixpath_prefixes!
9926  else
9927    # Not in mixed or Windows style, start by that.
9928    new_path=`cmd //c echo $new_path`
9929
9930  input_path="$new_path"
9931  # Check if we need to convert this using DOS-style short mode. If the path
9932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9933  # take no chances and rewrite it.
9934  # Note: m4 eats our [], so we need to use [ and ] instead.
9935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9936  if test "x$has_forbidden_chars" != x; then
9937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9939  fi
9940
9941    # Output is in $new_path
9942
9943  windows_path="$new_path"
9944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9945    unix_path=`$CYGPATH -u "$windows_path"`
9946    new_path="$unix_path"
9947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9949    new_path="$unix_path"
9950  fi
9951
9952    # remove trailing .exe if any
9953    new_path="${new_path/%.exe/}"
9954
9955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9957  fi
9958
9959  else
9960    # We're on a posix platform. Hooray! :)
9961    # First separate the path from the arguments. This will split at the first
9962    # space.
9963    complete="$FOUND_MAKE"
9964    path="${complete%% *}"
9965    tmp="$complete EOL"
9966    arguments="${tmp#* }"
9967
9968    # Cannot rely on the command "which" here since it doesn't always work.
9969    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9970    if test -z "$is_absolute_path"; then
9971      # Path to executable is not absolute. Find it.
9972      IFS_save="$IFS"
9973      IFS=:
9974      for p in $PATH; do
9975        if test -f "$p/$path" && test -x "$p/$path"; then
9976          new_path="$p/$path"
9977          break
9978        fi
9979      done
9980      IFS="$IFS_save"
9981    else
9982      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9983$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9984      new_path="$path"
9985    fi
9986
9987    if test "x$new_path" = x; then
9988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9989$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9990        has_space=`$ECHO "$complete" | $GREP " "`
9991        if test "x$has_space" != x; then
9992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9994        fi
9995        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9996      fi
9997  fi
9998
9999      # Now join together the path and the arguments once again
10000      if test "x$arguments" != xEOL; then
10001        new_complete="$new_path ${arguments% *}"
10002      else
10003        new_complete="$new_path"
10004      fi
10005
10006  if test "x$complete" != "x$new_complete"; then
10007      FOUND_MAKE="$new_complete"
10008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10009$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10010    fi
10011
10012        fi
10013      fi
10014    fi
10015  fi
10016
10017        fi
10018        PATH=$OLD_PATH
10019      fi
10020    fi
10021
10022    if test "x$FOUND_MAKE" = x; then
10023      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
10024    fi
10025  fi
10026
10027  MAKE=$FOUND_MAKE
10028
10029  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10030$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10031
10032
10033
10034    # Test if find supports -delete
10035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10036$as_echo_n "checking if find supports -delete... " >&6; }
10037    FIND_DELETE="-delete"
10038
10039    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10040
10041    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10042
10043    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10044    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10045        # No, it does not.
10046        rm $DELETEDIR/TestIfFindSupportsDelete
10047        FIND_DELETE="-exec rm \{\} \+"
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10049$as_echo "no" >&6; }
10050    else
10051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10052$as_echo "yes" >&6; }
10053    fi
10054    rmdir $DELETEDIR
10055
10056
10057
10058# These tools might not be installed by default,
10059# need hint on how to install them.
10060
10061    for ac_prog in unzip
10062do
10063  # Extract the first word of "$ac_prog", so it can be a program name with args.
10064set dummy $ac_prog; ac_word=$2
10065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10066$as_echo_n "checking for $ac_word... " >&6; }
10067if ${ac_cv_path_UNZIP+:} false; then :
10068  $as_echo_n "(cached) " >&6
10069else
10070  case $UNZIP in
10071  [\\/]* | ?:[\\/]*)
10072  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10073  ;;
10074  *)
10075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10076for as_dir in $PATH
10077do
10078  IFS=$as_save_IFS
10079  test -z "$as_dir" && as_dir=.
10080    for ac_exec_ext in '' $ac_executable_extensions; do
10081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10082    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10084    break 2
10085  fi
10086done
10087  done
10088IFS=$as_save_IFS
10089
10090  ;;
10091esac
10092fi
10093UNZIP=$ac_cv_path_UNZIP
10094if test -n "$UNZIP"; then
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10096$as_echo "$UNZIP" >&6; }
10097else
10098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
10100fi
10101
10102
10103  test -n "$UNZIP" && break
10104done
10105
10106
10107    if test "x$UNZIP" = x; then
10108        if test "xunzip" = x; then
10109          PROG_NAME=unzip
10110        else
10111          PROG_NAME=unzip
10112        fi
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10115        as_fn_error $? "Cannot continue" "$LINENO" 5
10116    fi
10117
10118
10119
10120    for ac_prog in zip
10121do
10122  # Extract the first word of "$ac_prog", so it can be a program name with args.
10123set dummy $ac_prog; ac_word=$2
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10125$as_echo_n "checking for $ac_word... " >&6; }
10126if ${ac_cv_path_ZIP+:} false; then :
10127  $as_echo_n "(cached) " >&6
10128else
10129  case $ZIP in
10130  [\\/]* | ?:[\\/]*)
10131  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10132  ;;
10133  *)
10134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10135for as_dir in $PATH
10136do
10137  IFS=$as_save_IFS
10138  test -z "$as_dir" && as_dir=.
10139    for ac_exec_ext in '' $ac_executable_extensions; do
10140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10141    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10143    break 2
10144  fi
10145done
10146  done
10147IFS=$as_save_IFS
10148
10149  ;;
10150esac
10151fi
10152ZIP=$ac_cv_path_ZIP
10153if test -n "$ZIP"; then
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10155$as_echo "$ZIP" >&6; }
10156else
10157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10158$as_echo "no" >&6; }
10159fi
10160
10161
10162  test -n "$ZIP" && break
10163done
10164
10165
10166    if test "x$ZIP" = x; then
10167        if test "xzip" = x; then
10168          PROG_NAME=zip
10169        else
10170          PROG_NAME=zip
10171        fi
10172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10174        as_fn_error $? "Cannot continue" "$LINENO" 5
10175    fi
10176
10177
10178
10179# Non-required basic tools
10180
10181# Extract the first word of "ldd", so it can be a program name with args.
10182set dummy ldd; ac_word=$2
10183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184$as_echo_n "checking for $ac_word... " >&6; }
10185if ${ac_cv_path_LDD+:} false; then :
10186  $as_echo_n "(cached) " >&6
10187else
10188  case $LDD in
10189  [\\/]* | ?:[\\/]*)
10190  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10191  ;;
10192  *)
10193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194for as_dir in $PATH
10195do
10196  IFS=$as_save_IFS
10197  test -z "$as_dir" && as_dir=.
10198    for ac_exec_ext in '' $ac_executable_extensions; do
10199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10200    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202    break 2
10203  fi
10204done
10205  done
10206IFS=$as_save_IFS
10207
10208  ;;
10209esac
10210fi
10211LDD=$ac_cv_path_LDD
10212if test -n "$LDD"; then
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10214$as_echo "$LDD" >&6; }
10215else
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217$as_echo "no" >&6; }
10218fi
10219
10220
10221if test "x$LDD" = "x"; then
10222    # List shared lib dependencies is used for
10223    # debug output and checking for forbidden dependencies.
10224    # We can build without it.
10225    LDD="true"
10226fi
10227# Extract the first word of "otool", so it can be a program name with args.
10228set dummy otool; ac_word=$2
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10230$as_echo_n "checking for $ac_word... " >&6; }
10231if ${ac_cv_path_OTOOL+:} false; then :
10232  $as_echo_n "(cached) " >&6
10233else
10234  case $OTOOL in
10235  [\\/]* | ?:[\\/]*)
10236  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10237  ;;
10238  *)
10239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10240for as_dir in $PATH
10241do
10242  IFS=$as_save_IFS
10243  test -z "$as_dir" && as_dir=.
10244    for ac_exec_ext in '' $ac_executable_extensions; do
10245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10246    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10248    break 2
10249  fi
10250done
10251  done
10252IFS=$as_save_IFS
10253
10254  ;;
10255esac
10256fi
10257OTOOL=$ac_cv_path_OTOOL
10258if test -n "$OTOOL"; then
10259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10260$as_echo "$OTOOL" >&6; }
10261else
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10263$as_echo "no" >&6; }
10264fi
10265
10266
10267if test "x$OTOOL" = "x"; then
10268   OTOOL="true"
10269fi
10270for ac_prog in readelf greadelf
10271do
10272  # Extract the first word of "$ac_prog", so it can be a program name with args.
10273set dummy $ac_prog; ac_word=$2
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10275$as_echo_n "checking for $ac_word... " >&6; }
10276if ${ac_cv_path_READELF+:} false; then :
10277  $as_echo_n "(cached) " >&6
10278else
10279  case $READELF in
10280  [\\/]* | ?:[\\/]*)
10281  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10282  ;;
10283  *)
10284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10285for as_dir in $PATH
10286do
10287  IFS=$as_save_IFS
10288  test -z "$as_dir" && as_dir=.
10289    for ac_exec_ext in '' $ac_executable_extensions; do
10290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10291    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10293    break 2
10294  fi
10295done
10296  done
10297IFS=$as_save_IFS
10298
10299  ;;
10300esac
10301fi
10302READELF=$ac_cv_path_READELF
10303if test -n "$READELF"; then
10304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10305$as_echo "$READELF" >&6; }
10306else
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308$as_echo "no" >&6; }
10309fi
10310
10311
10312  test -n "$READELF" && break
10313done
10314
10315# Extract the first word of "hg", so it can be a program name with args.
10316set dummy hg; ac_word=$2
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318$as_echo_n "checking for $ac_word... " >&6; }
10319if ${ac_cv_path_HG+:} false; then :
10320  $as_echo_n "(cached) " >&6
10321else
10322  case $HG in
10323  [\\/]* | ?:[\\/]*)
10324  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10325  ;;
10326  *)
10327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330  IFS=$as_save_IFS
10331  test -z "$as_dir" && as_dir=.
10332    for ac_exec_ext in '' $ac_executable_extensions; do
10333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10334    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336    break 2
10337  fi
10338done
10339  done
10340IFS=$as_save_IFS
10341
10342  ;;
10343esac
10344fi
10345HG=$ac_cv_path_HG
10346if test -n "$HG"; then
10347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10348$as_echo "$HG" >&6; }
10349else
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
10352fi
10353
10354
10355# Extract the first word of "stat", so it can be a program name with args.
10356set dummy stat; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if ${ac_cv_path_STAT+:} false; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $STAT in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10374    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385STAT=$ac_cv_path_STAT
10386if test -n "$STAT"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10388$as_echo "$STAT" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395# Extract the first word of "time", so it can be a program name with args.
10396set dummy time; ac_word=$2
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10398$as_echo_n "checking for $ac_word... " >&6; }
10399if ${ac_cv_path_TIME+:} false; then :
10400  $as_echo_n "(cached) " >&6
10401else
10402  case $TIME in
10403  [\\/]* | ?:[\\/]*)
10404  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10405  ;;
10406  *)
10407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10408for as_dir in $PATH
10409do
10410  IFS=$as_save_IFS
10411  test -z "$as_dir" && as_dir=.
10412    for ac_exec_ext in '' $ac_executable_extensions; do
10413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10414    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10416    break 2
10417  fi
10418done
10419  done
10420IFS=$as_save_IFS
10421
10422  ;;
10423esac
10424fi
10425TIME=$ac_cv_path_TIME
10426if test -n "$TIME"; then
10427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10428$as_echo "$TIME" >&6; }
10429else
10430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10431$as_echo "no" >&6; }
10432fi
10433
10434
10435# Check if it's GNU time
10436IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10437if test "x$IS_GNU_TIME" != x; then
10438  IS_GNU_TIME=yes
10439else
10440  IS_GNU_TIME=no
10441fi
10442
10443
10444if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10445
10446    for ac_prog in comm
10447do
10448  # Extract the first word of "$ac_prog", so it can be a program name with args.
10449set dummy $ac_prog; ac_word=$2
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10451$as_echo_n "checking for $ac_word... " >&6; }
10452if ${ac_cv_path_COMM+:} false; then :
10453  $as_echo_n "(cached) " >&6
10454else
10455  case $COMM in
10456  [\\/]* | ?:[\\/]*)
10457  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10458  ;;
10459  *)
10460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10461for as_dir in $PATH
10462do
10463  IFS=$as_save_IFS
10464  test -z "$as_dir" && as_dir=.
10465    for ac_exec_ext in '' $ac_executable_extensions; do
10466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10467    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10469    break 2
10470  fi
10471done
10472  done
10473IFS=$as_save_IFS
10474
10475  ;;
10476esac
10477fi
10478COMM=$ac_cv_path_COMM
10479if test -n "$COMM"; then
10480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10481$as_echo "$COMM" >&6; }
10482else
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10484$as_echo "no" >&6; }
10485fi
10486
10487
10488  test -n "$COMM" && break
10489done
10490
10491
10492    if test "x$COMM" = x; then
10493        if test "xcomm" = x; then
10494          PROG_NAME=comm
10495        else
10496          PROG_NAME=comm
10497        fi
10498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10499$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10500        as_fn_error $? "Cannot continue" "$LINENO" 5
10501    fi
10502
10503
10504fi
10505
10506if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10507
10508    for ac_prog in xattr
10509do
10510  # Extract the first word of "$ac_prog", so it can be a program name with args.
10511set dummy $ac_prog; ac_word=$2
10512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10513$as_echo_n "checking for $ac_word... " >&6; }
10514if ${ac_cv_path_XATTR+:} false; then :
10515  $as_echo_n "(cached) " >&6
10516else
10517  case $XATTR in
10518  [\\/]* | ?:[\\/]*)
10519  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10520  ;;
10521  *)
10522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10523for as_dir in $PATH
10524do
10525  IFS=$as_save_IFS
10526  test -z "$as_dir" && as_dir=.
10527    for ac_exec_ext in '' $ac_executable_extensions; do
10528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10529    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10531    break 2
10532  fi
10533done
10534  done
10535IFS=$as_save_IFS
10536
10537  ;;
10538esac
10539fi
10540XATTR=$ac_cv_path_XATTR
10541if test -n "$XATTR"; then
10542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10543$as_echo "$XATTR" >&6; }
10544else
10545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10546$as_echo "no" >&6; }
10547fi
10548
10549
10550  test -n "$XATTR" && break
10551done
10552
10553
10554    if test "x$XATTR" = x; then
10555        if test "xxattr" = x; then
10556          PROG_NAME=xattr
10557        else
10558          PROG_NAME=xattr
10559        fi
10560        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10561$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10562        as_fn_error $? "Cannot continue" "$LINENO" 5
10563    fi
10564
10565
10566  # Extract the first word of "codesign", so it can be a program name with args.
10567set dummy codesign; ac_word=$2
10568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10569$as_echo_n "checking for $ac_word... " >&6; }
10570if ${ac_cv_path_CODESIGN+:} false; then :
10571  $as_echo_n "(cached) " >&6
10572else
10573  case $CODESIGN in
10574  [\\/]* | ?:[\\/]*)
10575  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10576  ;;
10577  *)
10578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10579for as_dir in $PATH
10580do
10581  IFS=$as_save_IFS
10582  test -z "$as_dir" && as_dir=.
10583    for ac_exec_ext in '' $ac_executable_extensions; do
10584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10585    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10587    break 2
10588  fi
10589done
10590  done
10591IFS=$as_save_IFS
10592
10593  ;;
10594esac
10595fi
10596CODESIGN=$ac_cv_path_CODESIGN
10597if test -n "$CODESIGN"; then
10598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10599$as_echo "$CODESIGN" >&6; }
10600else
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602$as_echo "no" >&6; }
10603fi
10604
10605
10606  if test "x$CODESIGN" != "x"; then
10607    # Verify that the openjdk_codesign certificate is present
10608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10609$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10610    rm -f codesign-testfile
10611    touch codesign-testfile
10612    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10613    rm -f codesign-testfile
10614    if test "x$CODESIGN" = x; then
10615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10616$as_echo "no" >&6; }
10617    else
10618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10619$as_echo "yes" >&6; }
10620    fi
10621  fi
10622fi
10623
10624
10625# Check if pkg-config is available.
10626
10627
10628if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10629	if test -n "$ac_tool_prefix"; then
10630  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10631set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10633$as_echo_n "checking for $ac_word... " >&6; }
10634if ${ac_cv_path_PKG_CONFIG+:} false; then :
10635  $as_echo_n "(cached) " >&6
10636else
10637  case $PKG_CONFIG in
10638  [\\/]* | ?:[\\/]*)
10639  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10640  ;;
10641  *)
10642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10643for as_dir in $PATH
10644do
10645  IFS=$as_save_IFS
10646  test -z "$as_dir" && as_dir=.
10647    for ac_exec_ext in '' $ac_executable_extensions; do
10648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10649    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10651    break 2
10652  fi
10653done
10654  done
10655IFS=$as_save_IFS
10656
10657  ;;
10658esac
10659fi
10660PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10661if test -n "$PKG_CONFIG"; then
10662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10663$as_echo "$PKG_CONFIG" >&6; }
10664else
10665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10666$as_echo "no" >&6; }
10667fi
10668
10669
10670fi
10671if test -z "$ac_cv_path_PKG_CONFIG"; then
10672  ac_pt_PKG_CONFIG=$PKG_CONFIG
10673  # Extract the first word of "pkg-config", so it can be a program name with args.
10674set dummy pkg-config; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $ac_pt_PKG_CONFIG in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10704if test -n "$ac_pt_PKG_CONFIG"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10706$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712  if test "x$ac_pt_PKG_CONFIG" = x; then
10713    PKG_CONFIG=""
10714  else
10715    case $cross_compiling:$ac_tool_warned in
10716yes:)
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10719ac_tool_warned=yes ;;
10720esac
10721    PKG_CONFIG=$ac_pt_PKG_CONFIG
10722  fi
10723else
10724  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10725fi
10726
10727fi
10728if test -n "$PKG_CONFIG"; then
10729	_pkg_min_version=0.9.0
10730	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10731$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10732	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10733		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10734$as_echo "yes" >&6; }
10735	else
10736		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
10738		PKG_CONFIG=""
10739	fi
10740
10741fi
10742
10743# After basic tools have been setup, we can check build os specific details.
10744
10745###############################################################################
10746
10747# Note that this is the build platform OS version!
10748
10749OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10750OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10751OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10752OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10753
10754
10755
10756
10757
10758# Setup builddeps, for automatic downloading of tools we need.
10759# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10760# boot-jdk setup, but we need to have basic tools setup first.
10761
10762
10763# Check whether --with-builddeps-conf was given.
10764if test "${with_builddeps_conf+set}" = set; then :
10765  withval=$with_builddeps_conf;
10766fi
10767
10768
10769
10770# Check whether --with-builddeps-server was given.
10771if test "${with_builddeps_server+set}" = set; then :
10772  withval=$with_builddeps_server;
10773fi
10774
10775
10776
10777# Check whether --with-builddeps-dir was given.
10778if test "${with_builddeps_dir+set}" = set; then :
10779  withval=$with_builddeps_dir;
10780else
10781  with_builddeps_dir=/localhome/builddeps
10782fi
10783
10784
10785
10786# Check whether --with-builddeps-group was given.
10787if test "${with_builddeps_group+set}" = set; then :
10788  withval=$with_builddeps_group;
10789fi
10790
10791
10792
10793
10794    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10795        if test "x$with_builddeps_conf" != x; then
10796            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10797$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10798            builddepsfile=$with_builddeps_conf
10799            if test -s $builddepsfile; then
10800                . $builddepsfile
10801                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10802$as_echo "loaded!" >&6; }
10803            else
10804               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10805           fi
10806        else
10807            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10808$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10809            builddepsfile=`mktemp`
10810            touch $builddepsfile
10811            # Put all found confs into a single file.
10812            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10813            # Source the file to acquire the variables
10814            if test -s $builddepsfile; then
10815                . $builddepsfile
10816                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10817$as_echo "found at least one!" >&6; }
10818            else
10819               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10820           fi
10821        fi
10822        # Create build and target names that use _ instead of "-" and ".".
10823        # This is necessary to use them in variable names.
10824        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10825        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10826        # Extract rewrite information for build and target
10827        eval rewritten_build=\${REWRITE_${build_var}}
10828        if test "x$rewritten_build" = x; then
10829            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10830            echo Build stays the same $rewritten_build
10831        else
10832            echo Rewriting build for builddeps into $rewritten_build
10833        fi
10834        eval rewritten_target=\${REWRITE_${target_var}}
10835        if test "x$rewritten_target" = x; then
10836            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10837            echo Target stays the same $rewritten_target
10838        else
10839            echo Rewriting target for builddeps into $rewritten_target
10840        fi
10841        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10842        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10843    fi
10844    for ac_prog in 7z unzip
10845do
10846  # Extract the first word of "$ac_prog", so it can be a program name with args.
10847set dummy $ac_prog; ac_word=$2
10848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10849$as_echo_n "checking for $ac_word... " >&6; }
10850if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10851  $as_echo_n "(cached) " >&6
10852else
10853  if test -n "$BDEPS_UNZIP"; then
10854  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10855else
10856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10857for as_dir in $PATH
10858do
10859  IFS=$as_save_IFS
10860  test -z "$as_dir" && as_dir=.
10861    for ac_exec_ext in '' $ac_executable_extensions; do
10862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10863    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10865    break 2
10866  fi
10867done
10868  done
10869IFS=$as_save_IFS
10870
10871fi
10872fi
10873BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10874if test -n "$BDEPS_UNZIP"; then
10875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10876$as_echo "$BDEPS_UNZIP" >&6; }
10877else
10878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10879$as_echo "no" >&6; }
10880fi
10881
10882
10883  test -n "$BDEPS_UNZIP" && break
10884done
10885
10886    if test "x$BDEPS_UNZIP" = x7z; then
10887        BDEPS_UNZIP="7z x"
10888    fi
10889
10890    for ac_prog in wget lftp ftp
10891do
10892  # Extract the first word of "$ac_prog", so it can be a program name with args.
10893set dummy $ac_prog; ac_word=$2
10894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10895$as_echo_n "checking for $ac_word... " >&6; }
10896if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10897  $as_echo_n "(cached) " >&6
10898else
10899  if test -n "$BDEPS_FTP"; then
10900  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10901else
10902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10903for as_dir in $PATH
10904do
10905  IFS=$as_save_IFS
10906  test -z "$as_dir" && as_dir=.
10907    for ac_exec_ext in '' $ac_executable_extensions; do
10908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10909    ac_cv_prog_BDEPS_FTP="$ac_prog"
10910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10911    break 2
10912  fi
10913done
10914  done
10915IFS=$as_save_IFS
10916
10917fi
10918fi
10919BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10920if test -n "$BDEPS_FTP"; then
10921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10922$as_echo "$BDEPS_FTP" >&6; }
10923else
10924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10925$as_echo "no" >&6; }
10926fi
10927
10928
10929  test -n "$BDEPS_FTP" && break
10930done
10931
10932
10933
10934###############################################################################
10935#
10936# Determine OpenJDK variants, options and version numbers.
10937#
10938###############################################################################
10939
10940# We need build & target for this.
10941
10942
10943###############################################################################
10944#
10945# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10946# We always build headless support.
10947#
10948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10949$as_echo_n "checking headful support... " >&6; }
10950# Check whether --enable-headful was given.
10951if test "${enable_headful+set}" = set; then :
10952  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10953else
10954  SUPPORT_HEADFUL=yes
10955fi
10956
10957
10958SUPPORT_HEADLESS=yes
10959BUILD_HEADLESS="BUILD_HEADLESS:=true"
10960
10961if test "x$SUPPORT_HEADFUL" = xyes; then
10962    # We are building both headful and headless.
10963    headful_msg="inlude support for both headful and headless"
10964fi
10965
10966if test "x$SUPPORT_HEADFUL" = xno; then
10967    # Thus we are building headless only.
10968    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10969    headful_msg="headless only"
10970fi
10971
10972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10973$as_echo "$headful_msg" >&6; }
10974
10975
10976
10977
10978
10979# Control wether Hotspot runs Queens test after build.
10980# Check whether --enable-hotspot-test-in-build was given.
10981if test "${enable_hotspot_test_in_build+set}" = set; then :
10982  enableval=$enable_hotspot_test_in_build;
10983else
10984  enable_hotspot_test_in_build=no
10985fi
10986
10987if test "x$enable_hotspot_test_in_build" = "xyes"; then
10988    TEST_IN_BUILD=true
10989else
10990    TEST_IN_BUILD=false
10991fi
10992
10993
10994###############################################################################
10995#
10996# Choose cacerts source file
10997#
10998
10999# Check whether --with-cacerts-file was given.
11000if test "${with_cacerts_file+set}" = set; then :
11001  withval=$with_cacerts_file;
11002fi
11003
11004if test "x$with_cacerts_file" != x; then
11005    CACERTS_FILE=$with_cacerts_file
11006else
11007    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11008fi
11009
11010
11011###############################################################################
11012#
11013# Enable or disable unlimited crypto
11014#
11015# Check whether --enable-unlimited-crypto was given.
11016if test "${enable_unlimited_crypto+set}" = set; then :
11017  enableval=$enable_unlimited_crypto;
11018else
11019  enable_unlimited_crypto=no
11020fi
11021
11022if test "x$enable_unlimited_crypto" = "xyes"; then
11023    UNLIMITED_CRYPTO=true
11024else
11025    UNLIMITED_CRYPTO=false
11026fi
11027
11028
11029###############################################################################
11030#
11031# Enable or disable the elliptic curve crypto implementation
11032#
11033
11034
11035###############################################################################
11036#
11037# Compress jars
11038#
11039COMPRESS_JARS=false
11040
11041
11042
11043
11044# Source the version numbers
11045. $AUTOCONF_DIR/version-numbers
11046
11047# Get the settings from parameters
11048
11049# Check whether --with-milestone was given.
11050if test "${with_milestone+set}" = set; then :
11051  withval=$with_milestone;
11052fi
11053
11054if test "x$with_milestone" = xyes; then
11055  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11056elif test "x$with_milestone" != x; then
11057    MILESTONE="$with_milestone"
11058fi
11059if test "x$MILESTONE" = x; then
11060  MILESTONE=internal
11061fi
11062
11063
11064# Check whether --with-update-version was given.
11065if test "${with_update_version+set}" = set; then :
11066  withval=$with_update_version;
11067fi
11068
11069if test "x$with_update_version" = xyes; then
11070  as_fn_error $? "Update version must have a value" "$LINENO" 5
11071elif test "x$with_update_version" != x; then
11072  JDK_UPDATE_VERSION="$with_update_version"
11073fi
11074
11075
11076# Check whether --with-build-number was given.
11077if test "${with_build_number+set}" = set; then :
11078  withval=$with_build_number;
11079fi
11080
11081if test "x$with_build_number" = xyes; then
11082  as_fn_error $? "Build number must have a value" "$LINENO" 5
11083elif test "x$with_build_number" != x; then
11084  JDK_BUILD_NUMBER="$with_build_number"
11085fi
11086if test "x$JDK_BUILD_NUMBER" = x; then
11087  JDK_BUILD_NUMBER=b00
11088fi
11089
11090
11091# Check whether --with-user-release-suffix was given.
11092if test "${with_user_release_suffix+set}" = set; then :
11093  withval=$with_user_release_suffix;
11094fi
11095
11096if test "x$with_user_release_suffix" = xyes; then
11097  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11098elif test "x$with_user_release_suffix" != x; then
11099  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11100else
11101  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11102  # Avoid [:alnum:] since it depends on the locale.
11103  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11104  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11105fi
11106
11107
11108# Now set the JDK version, milestone, build number etc.
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123COPYRIGHT_YEAR=`date +'%Y'`
11124
11125
11126if test "x$JDK_UPDATE_VERSION" != x; then
11127  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11128else
11129  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11130fi
11131
11132
11133COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11134
11135
11136
11137###############################################################################
11138#
11139# Setup BootJDK, used to bootstrap the build.
11140#
11141###############################################################################
11142
11143
11144BOOT_JDK_FOUND=no
11145
11146# Check whether --with-boot-jdk was given.
11147if test "${with_boot_jdk+set}" = set; then :
11148  withval=$with_boot_jdk;
11149fi
11150
11151
11152# We look for the Boot JDK through various means, going from more certain to
11153# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11154# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11155# must check if this is indeed valid; otherwise we'll continue looking.
11156
11157# Test: Is bootjdk explicitely set by command line arguments?
11158
11159  if test "x$BOOT_JDK_FOUND" = xno; then
11160    # Now execute the test
11161
11162if test "x$with_boot_jdk" != x; then
11163    BOOT_JDK=$with_boot_jdk
11164    BOOT_JDK_FOUND=maybe
11165    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11166$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11167fi
11168
11169
11170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11171    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11172      # Do we have a bin/java?
11173      if test ! -x "$BOOT_JDK/bin/java"; then
11174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11176        BOOT_JDK_FOUND=no
11177      else
11178        # Do we have a bin/javac?
11179        if test ! -x "$BOOT_JDK/bin/javac"; then
11180          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11182          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11183$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11184          BOOT_JDK_FOUND=no
11185        else
11186          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11187          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11188            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11190            BOOT_JDK_FOUND=no
11191          else
11192            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11194
11195            # Extra M4 quote needed to protect [] in grep expression.
11196            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11197            if test "x$FOUND_VERSION_78" = x; then
11198              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11200              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11201$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11202              BOOT_JDK_FOUND=no
11203            else
11204              # We're done! :-)
11205              BOOT_JDK_FOUND=yes
11206
11207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11208
11209  # Input might be given as Windows format, start by converting to
11210  # unix format.
11211  path="$BOOT_JDK"
11212  new_path=`$CYGPATH -u "$path"`
11213
11214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11217  # "foo.exe" is OK but "foo" is an error.
11218  #
11219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11220  # It is also a way to make sure we got the proper file name for the real test later on.
11221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11222  if test "x$test_shortpath" = x; then
11223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11225    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11226  fi
11227
11228  # Call helper function which possibly converts this using DOS-style short mode.
11229  # If so, the updated path is stored in $new_path.
11230
11231  input_path="$new_path"
11232  # Check if we need to convert this using DOS-style short mode. If the path
11233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11234  # take no chances and rewrite it.
11235  # Note: m4 eats our [], so we need to use [ and ] instead.
11236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11237  if test "x$has_forbidden_chars" != x; then
11238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11242      # Going to short mode and back again did indeed matter. Since short mode is
11243      # case insensitive, let's make it lowercase to improve readability.
11244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11245      # Now convert it back to Unix-stile (cygpath)
11246      input_path=`$CYGPATH -u "$shortmode_path"`
11247      new_path="$input_path"
11248    fi
11249  fi
11250
11251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11252  if test "x$test_cygdrive_prefix" = x; then
11253    # As a simple fix, exclude /usr/bin since it's not a real path.
11254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11256      # a path prefixed by /cygdrive for fixpath to work.
11257      new_path="$CYGWIN_ROOT_PATH$input_path"
11258    fi
11259  fi
11260
11261
11262  if test "x$path" != "x$new_path"; then
11263    BOOT_JDK="$new_path"
11264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11265$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11266  fi
11267
11268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11269
11270  path="$BOOT_JDK"
11271  has_colon=`$ECHO $path | $GREP ^.:`
11272  new_path="$path"
11273  if test "x$has_colon" = x; then
11274    # Not in mixed or Windows style, start by that.
11275    new_path=`cmd //c echo $path`
11276  fi
11277
11278
11279  input_path="$new_path"
11280  # Check if we need to convert this using DOS-style short mode. If the path
11281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11282  # take no chances and rewrite it.
11283  # Note: m4 eats our [], so we need to use [ and ] instead.
11284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11285  if test "x$has_forbidden_chars" != x; then
11286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11288  fi
11289
11290
11291  windows_path="$new_path"
11292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11293    unix_path=`$CYGPATH -u "$windows_path"`
11294    new_path="$unix_path"
11295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11297    new_path="$unix_path"
11298  fi
11299
11300  if test "x$path" != "x$new_path"; then
11301    BOOT_JDK="$new_path"
11302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11303$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11304  fi
11305
11306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11308
11309  else
11310    # We're on a posix platform. Hooray! :)
11311    path="$BOOT_JDK"
11312    has_space=`$ECHO "$path" | $GREP " "`
11313    if test "x$has_space" != x; then
11314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11316      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11317    fi
11318
11319    # Use eval to expand a potential ~
11320    eval path="$path"
11321    if test ! -f "$path" && test ! -d "$path"; then
11322      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11323    fi
11324
11325    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11326  fi
11327
11328              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11329$as_echo_n "checking for Boot JDK... " >&6; }
11330              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11331$as_echo "$BOOT_JDK" >&6; }
11332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11333$as_echo_n "checking Boot JDK version... " >&6; }
11334              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11335              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11336$as_echo "$BOOT_JDK_VERSION" >&6; }
11337            fi # end check jdk version
11338          fi # end check rt.jar
11339        fi # end check javac
11340      fi # end check java
11341    fi # end check boot jdk found
11342  fi
11343
11344if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11345  # Having specified an argument which is incorrect will produce an instant failure;
11346  # we should not go on looking
11347  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11348fi
11349
11350# Test: Is bootjdk available from builddeps?
11351
11352  if test "x$BOOT_JDK_FOUND" = xno; then
11353    # Now execute the test
11354
11355
11356
11357    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11358        # Source the builddeps file again, to make sure it uses the latest variables!
11359        . $builddepsfile
11360        # Look for a target and build machine specific resource!
11361        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11362        if test "x$resource" = x; then
11363            # Ok, lets instead look for a target specific resource
11364            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11365        fi
11366        if test "x$resource" = x; then
11367            # Ok, lets instead look for a build specific resource
11368            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11369        fi
11370        if test "x$resource" = x; then
11371            # Ok, lets instead look for a generic resource
11372            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11373            resource=${builddep_bootjdk}
11374        fi
11375        if test "x$resource" != x; then
11376            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11377$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11378	    # If the resource in the builddeps.conf file is an existing directory,
11379	    # for example /java/linux/cups
11380	    if test -d ${resource}; then
11381	       depdir=${resource}
11382	    else
11383
11384# bootjdk is for example mymodule
11385# $resource is for example libs/general/libmymod_1_2_3.zip
11386# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11387# $with_builddeps_dir is for example /localhome/builddeps
11388# depdir is the name of the variable into which we store the depdir, eg MYMOD
11389# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11390# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11391    filename=`basename $resource`
11392    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11393    filebase=${filename%%.*}
11394    extension=${filename#*.}
11395    installdir=$with_builddeps_dir/$filebase
11396    if test ! -f $installdir/$filename.unpacked; then
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11398$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11399        if test ! -d $installdir; then
11400            mkdir -p $installdir
11401        fi
11402        if test ! -d $installdir; then
11403            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11404        fi
11405        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11406        touch $tmpfile
11407        if test ! -f $tmpfile; then
11408            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11409        fi
11410
11411    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11412    # $tmpfile is the local file name for the downloaded file.
11413    VALID_TOOL=no
11414    if test "x$BDEPS_FTP" = xwget; then
11415       VALID_TOOL=yes
11416       wget -O $tmpfile $with_builddeps_server/$resource
11417    fi
11418    if test "x$BDEPS_FTP" = xlftp; then
11419       VALID_TOOL=yes
11420       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11421    fi
11422    if test "x$BDEPS_FTP" = xftp; then
11423        VALID_TOOL=yes
11424        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11425        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11426        FTPUSERPWD=${FTPSERVER%%@*}
11427        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11428            FTPUSER=${userpwd%%:*}
11429            FTPPWD=${userpwd#*@}
11430            FTPSERVER=${FTPSERVER#*@}
11431        else
11432            FTPUSER=ftp
11433            FTPPWD=ftp
11434        fi
11435        # the "pass" command does not work on some
11436        # ftp clients (read ftp.exe) but if it works,
11437        # passive mode is better!
11438        (\
11439            echo "user $FTPUSER $FTPPWD"        ;\
11440            echo "pass"                         ;\
11441            echo "bin"                          ;\
11442            echo "get $FTPPATH $tmpfile"              ;\
11443        ) | ftp -in $FTPSERVER
11444    fi
11445    if test "x$VALID_TOOL" != xyes; then
11446       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11447    fi
11448
11449        mv $tmpfile $installdir/$filename
11450        if test ! -s $installdir/$filename; then
11451            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11452        fi
11453        case "$extension" in
11454            zip)  echo "Unzipping $installdir/$filename..."
11455               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11456            ;;
11457            tar.gz) echo "Untaring $installdir/$filename..."
11458               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11459            ;;
11460            tgz) echo "Untaring $installdir/$filename..."
11461               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11462            ;;
11463            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11464            ;;
11465        esac
11466    fi
11467    if test -f $installdir/$filename.unpacked; then
11468        depdir=$installdir
11469    fi
11470
11471	    fi
11472            # Source the builddeps file again, because in the previous command, the depdir
11473            # was updated to point at the current build dependency install directory.
11474            . $builddepsfile
11475            # Now extract variables from the builddeps.conf files.
11476            theroot=${builddep_bootjdk_ROOT}
11477            thecflags=${builddep_bootjdk_CFLAGS}
11478            thelibs=${builddep_bootjdk_LIBS}
11479            if test "x$depdir" = x; then
11480                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11481            fi
11482            BOOT_JDK=$depdir
11483            if test "x$theroot" != x; then
11484               BOOT_JDK="$theroot"
11485            fi
11486            if test "x$thecflags" != x; then
11487               BOOT_JDK_CFLAGS="$thecflags"
11488            fi
11489            if test "x$thelibs" != x; then
11490               BOOT_JDK_LIBS="$thelibs"
11491            fi
11492            BOOT_JDK_FOUND=maybe
11493            else BOOT_JDK_FOUND=no
11494
11495        fi
11496        else BOOT_JDK_FOUND=no
11497
11498    fi
11499
11500
11501
11502    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11503    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11504      # Do we have a bin/java?
11505      if test ! -x "$BOOT_JDK/bin/java"; then
11506        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11508        BOOT_JDK_FOUND=no
11509      else
11510        # Do we have a bin/javac?
11511        if test ! -x "$BOOT_JDK/bin/javac"; then
11512          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11514          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11515$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11516          BOOT_JDK_FOUND=no
11517        else
11518          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11519          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11520            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11522            BOOT_JDK_FOUND=no
11523          else
11524            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11526
11527            # Extra M4 quote needed to protect [] in grep expression.
11528            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11529            if test "x$FOUND_VERSION_78" = x; then
11530              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11532              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11533$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11534              BOOT_JDK_FOUND=no
11535            else
11536              # We're done! :-)
11537              BOOT_JDK_FOUND=yes
11538
11539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11540
11541  # Input might be given as Windows format, start by converting to
11542  # unix format.
11543  path="$BOOT_JDK"
11544  new_path=`$CYGPATH -u "$path"`
11545
11546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11549  # "foo.exe" is OK but "foo" is an error.
11550  #
11551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11552  # It is also a way to make sure we got the proper file name for the real test later on.
11553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11554  if test "x$test_shortpath" = x; then
11555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11558  fi
11559
11560  # Call helper function which possibly converts this using DOS-style short mode.
11561  # If so, the updated path is stored in $new_path.
11562
11563  input_path="$new_path"
11564  # Check if we need to convert this using DOS-style short mode. If the path
11565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11566  # take no chances and rewrite it.
11567  # Note: m4 eats our [], so we need to use [ and ] instead.
11568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11569  if test "x$has_forbidden_chars" != x; then
11570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11574      # Going to short mode and back again did indeed matter. Since short mode is
11575      # case insensitive, let's make it lowercase to improve readability.
11576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11577      # Now convert it back to Unix-stile (cygpath)
11578      input_path=`$CYGPATH -u "$shortmode_path"`
11579      new_path="$input_path"
11580    fi
11581  fi
11582
11583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11584  if test "x$test_cygdrive_prefix" = x; then
11585    # As a simple fix, exclude /usr/bin since it's not a real path.
11586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11588      # a path prefixed by /cygdrive for fixpath to work.
11589      new_path="$CYGWIN_ROOT_PATH$input_path"
11590    fi
11591  fi
11592
11593
11594  if test "x$path" != "x$new_path"; then
11595    BOOT_JDK="$new_path"
11596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11598  fi
11599
11600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11601
11602  path="$BOOT_JDK"
11603  has_colon=`$ECHO $path | $GREP ^.:`
11604  new_path="$path"
11605  if test "x$has_colon" = x; then
11606    # Not in mixed or Windows style, start by that.
11607    new_path=`cmd //c echo $path`
11608  fi
11609
11610
11611  input_path="$new_path"
11612  # Check if we need to convert this using DOS-style short mode. If the path
11613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11614  # take no chances and rewrite it.
11615  # Note: m4 eats our [], so we need to use [ and ] instead.
11616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11617  if test "x$has_forbidden_chars" != x; then
11618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11620  fi
11621
11622
11623  windows_path="$new_path"
11624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11625    unix_path=`$CYGPATH -u "$windows_path"`
11626    new_path="$unix_path"
11627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11629    new_path="$unix_path"
11630  fi
11631
11632  if test "x$path" != "x$new_path"; then
11633    BOOT_JDK="$new_path"
11634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11636  fi
11637
11638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11640
11641  else
11642    # We're on a posix platform. Hooray! :)
11643    path="$BOOT_JDK"
11644    has_space=`$ECHO "$path" | $GREP " "`
11645    if test "x$has_space" != x; then
11646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11648      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11649    fi
11650
11651    # Use eval to expand a potential ~
11652    eval path="$path"
11653    if test ! -f "$path" && test ! -d "$path"; then
11654      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11655    fi
11656
11657    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11658  fi
11659
11660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11661$as_echo_n "checking for Boot JDK... " >&6; }
11662              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11663$as_echo "$BOOT_JDK" >&6; }
11664              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11665$as_echo_n "checking Boot JDK version... " >&6; }
11666              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11667              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11668$as_echo "$BOOT_JDK_VERSION" >&6; }
11669            fi # end check jdk version
11670          fi # end check rt.jar
11671        fi # end check javac
11672      fi # end check java
11673    fi # end check boot jdk found
11674  fi
11675
11676
11677# Test: Is $JAVA_HOME set?
11678
11679  if test "x$BOOT_JDK_FOUND" = xno; then
11680    # Now execute the test
11681
11682    if test "x$JAVA_HOME" != x; then
11683        JAVA_HOME_PROCESSED="$JAVA_HOME"
11684
11685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11686
11687  # Input might be given as Windows format, start by converting to
11688  # unix format.
11689  path="$JAVA_HOME_PROCESSED"
11690  new_path=`$CYGPATH -u "$path"`
11691
11692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11695  # "foo.exe" is OK but "foo" is an error.
11696  #
11697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11698  # It is also a way to make sure we got the proper file name for the real test later on.
11699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11700  if test "x$test_shortpath" = x; then
11701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11702$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11703    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11704  fi
11705
11706  # Call helper function which possibly converts this using DOS-style short mode.
11707  # If so, the updated path is stored in $new_path.
11708
11709  input_path="$new_path"
11710  # Check if we need to convert this using DOS-style short mode. If the path
11711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11712  # take no chances and rewrite it.
11713  # Note: m4 eats our [], so we need to use [ and ] instead.
11714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11715  if test "x$has_forbidden_chars" != x; then
11716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11720      # Going to short mode and back again did indeed matter. Since short mode is
11721      # case insensitive, let's make it lowercase to improve readability.
11722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11723      # Now convert it back to Unix-stile (cygpath)
11724      input_path=`$CYGPATH -u "$shortmode_path"`
11725      new_path="$input_path"
11726    fi
11727  fi
11728
11729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11730  if test "x$test_cygdrive_prefix" = x; then
11731    # As a simple fix, exclude /usr/bin since it's not a real path.
11732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11734      # a path prefixed by /cygdrive for fixpath to work.
11735      new_path="$CYGWIN_ROOT_PATH$input_path"
11736    fi
11737  fi
11738
11739
11740  if test "x$path" != "x$new_path"; then
11741    JAVA_HOME_PROCESSED="$new_path"
11742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11743$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11744  fi
11745
11746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11747
11748  path="$JAVA_HOME_PROCESSED"
11749  has_colon=`$ECHO $path | $GREP ^.:`
11750  new_path="$path"
11751  if test "x$has_colon" = x; then
11752    # Not in mixed or Windows style, start by that.
11753    new_path=`cmd //c echo $path`
11754  fi
11755
11756
11757  input_path="$new_path"
11758  # Check if we need to convert this using DOS-style short mode. If the path
11759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11760  # take no chances and rewrite it.
11761  # Note: m4 eats our [], so we need to use [ and ] instead.
11762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11763  if test "x$has_forbidden_chars" != x; then
11764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11766  fi
11767
11768
11769  windows_path="$new_path"
11770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11771    unix_path=`$CYGPATH -u "$windows_path"`
11772    new_path="$unix_path"
11773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11775    new_path="$unix_path"
11776  fi
11777
11778  if test "x$path" != "x$new_path"; then
11779    JAVA_HOME_PROCESSED="$new_path"
11780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11781$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11782  fi
11783
11784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11786
11787  else
11788    # We're on a posix platform. Hooray! :)
11789    path="$JAVA_HOME_PROCESSED"
11790    has_space=`$ECHO "$path" | $GREP " "`
11791    if test "x$has_space" != x; then
11792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11793$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11794      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11795    fi
11796
11797    # Use eval to expand a potential ~
11798    eval path="$path"
11799    if test ! -f "$path" && test ! -d "$path"; then
11800      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11801    fi
11802
11803    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11804  fi
11805
11806        if test ! -d "$JAVA_HOME_PROCESSED"; then
11807            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11808$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11809        else
11810          # Aha, the user has set a JAVA_HOME
11811          # let us use that as the Boot JDK.
11812          BOOT_JDK="$JAVA_HOME_PROCESSED"
11813          BOOT_JDK_FOUND=maybe
11814          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11815$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11816        fi
11817    fi
11818
11819
11820    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11821    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11822      # Do we have a bin/java?
11823      if test ! -x "$BOOT_JDK/bin/java"; then
11824        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11826        BOOT_JDK_FOUND=no
11827      else
11828        # Do we have a bin/javac?
11829        if test ! -x "$BOOT_JDK/bin/javac"; then
11830          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11832          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11833$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11834          BOOT_JDK_FOUND=no
11835        else
11836          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11837          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11838            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11840            BOOT_JDK_FOUND=no
11841          else
11842            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11843            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11844
11845            # Extra M4 quote needed to protect [] in grep expression.
11846            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11847            if test "x$FOUND_VERSION_78" = x; then
11848              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11850              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11851$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11852              BOOT_JDK_FOUND=no
11853            else
11854              # We're done! :-)
11855              BOOT_JDK_FOUND=yes
11856
11857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11858
11859  # Input might be given as Windows format, start by converting to
11860  # unix format.
11861  path="$BOOT_JDK"
11862  new_path=`$CYGPATH -u "$path"`
11863
11864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11867  # "foo.exe" is OK but "foo" is an error.
11868  #
11869  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11870  # It is also a way to make sure we got the proper file name for the real test later on.
11871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11872  if test "x$test_shortpath" = x; then
11873    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11874$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11875    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11876  fi
11877
11878  # Call helper function which possibly converts this using DOS-style short mode.
11879  # If so, the updated path is stored in $new_path.
11880
11881  input_path="$new_path"
11882  # Check if we need to convert this using DOS-style short mode. If the path
11883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11884  # take no chances and rewrite it.
11885  # Note: m4 eats our [], so we need to use [ and ] instead.
11886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11887  if test "x$has_forbidden_chars" != x; then
11888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11892      # Going to short mode and back again did indeed matter. Since short mode is
11893      # case insensitive, let's make it lowercase to improve readability.
11894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11895      # Now convert it back to Unix-stile (cygpath)
11896      input_path=`$CYGPATH -u "$shortmode_path"`
11897      new_path="$input_path"
11898    fi
11899  fi
11900
11901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11902  if test "x$test_cygdrive_prefix" = x; then
11903    # As a simple fix, exclude /usr/bin since it's not a real path.
11904    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11906      # a path prefixed by /cygdrive for fixpath to work.
11907      new_path="$CYGWIN_ROOT_PATH$input_path"
11908    fi
11909  fi
11910
11911
11912  if test "x$path" != "x$new_path"; then
11913    BOOT_JDK="$new_path"
11914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11916  fi
11917
11918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11919
11920  path="$BOOT_JDK"
11921  has_colon=`$ECHO $path | $GREP ^.:`
11922  new_path="$path"
11923  if test "x$has_colon" = x; then
11924    # Not in mixed or Windows style, start by that.
11925    new_path=`cmd //c echo $path`
11926  fi
11927
11928
11929  input_path="$new_path"
11930  # Check if we need to convert this using DOS-style short mode. If the path
11931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11932  # take no chances and rewrite it.
11933  # Note: m4 eats our [], so we need to use [ and ] instead.
11934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11935  if test "x$has_forbidden_chars" != x; then
11936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11938  fi
11939
11940
11941  windows_path="$new_path"
11942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11943    unix_path=`$CYGPATH -u "$windows_path"`
11944    new_path="$unix_path"
11945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11947    new_path="$unix_path"
11948  fi
11949
11950  if test "x$path" != "x$new_path"; then
11951    BOOT_JDK="$new_path"
11952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11953$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11954  fi
11955
11956  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11957  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11958
11959  else
11960    # We're on a posix platform. Hooray! :)
11961    path="$BOOT_JDK"
11962    has_space=`$ECHO "$path" | $GREP " "`
11963    if test "x$has_space" != x; then
11964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11965$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11966      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11967    fi
11968
11969    # Use eval to expand a potential ~
11970    eval path="$path"
11971    if test ! -f "$path" && test ! -d "$path"; then
11972      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11973    fi
11974
11975    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11976  fi
11977
11978              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11979$as_echo_n "checking for Boot JDK... " >&6; }
11980              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11981$as_echo "$BOOT_JDK" >&6; }
11982              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11983$as_echo_n "checking Boot JDK version... " >&6; }
11984              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11985              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11986$as_echo "$BOOT_JDK_VERSION" >&6; }
11987            fi # end check jdk version
11988          fi # end check rt.jar
11989        fi # end check javac
11990      fi # end check java
11991    fi # end check boot jdk found
11992  fi
11993
11994
11995# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11996
11997  if test "x$BOOT_JDK_FOUND" = xno; then
11998    # Now execute the test
11999
12000    if test -x /usr/libexec/java_home; then
12001        BOOT_JDK=`/usr/libexec/java_home`
12002        BOOT_JDK_FOUND=maybe
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12004$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12005    fi
12006
12007
12008    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12009    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12010      # Do we have a bin/java?
12011      if test ! -x "$BOOT_JDK/bin/java"; then
12012        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12014        BOOT_JDK_FOUND=no
12015      else
12016        # Do we have a bin/javac?
12017        if test ! -x "$BOOT_JDK/bin/javac"; then
12018          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12020          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12021$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12022          BOOT_JDK_FOUND=no
12023        else
12024          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12025          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12026            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12028            BOOT_JDK_FOUND=no
12029          else
12030            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12031            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12032
12033            # Extra M4 quote needed to protect [] in grep expression.
12034            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12035            if test "x$FOUND_VERSION_78" = x; then
12036              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12038              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12039$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12040              BOOT_JDK_FOUND=no
12041            else
12042              # We're done! :-)
12043              BOOT_JDK_FOUND=yes
12044
12045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12046
12047  # Input might be given as Windows format, start by converting to
12048  # unix format.
12049  path="$BOOT_JDK"
12050  new_path=`$CYGPATH -u "$path"`
12051
12052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12055  # "foo.exe" is OK but "foo" is an error.
12056  #
12057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12058  # It is also a way to make sure we got the proper file name for the real test later on.
12059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12060  if test "x$test_shortpath" = x; then
12061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12064  fi
12065
12066  # Call helper function which possibly converts this using DOS-style short mode.
12067  # If so, the updated path is stored in $new_path.
12068
12069  input_path="$new_path"
12070  # Check if we need to convert this using DOS-style short mode. If the path
12071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12072  # take no chances and rewrite it.
12073  # Note: m4 eats our [], so we need to use [ and ] instead.
12074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12075  if test "x$has_forbidden_chars" != x; then
12076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12080      # Going to short mode and back again did indeed matter. Since short mode is
12081      # case insensitive, let's make it lowercase to improve readability.
12082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12083      # Now convert it back to Unix-stile (cygpath)
12084      input_path=`$CYGPATH -u "$shortmode_path"`
12085      new_path="$input_path"
12086    fi
12087  fi
12088
12089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12090  if test "x$test_cygdrive_prefix" = x; then
12091    # As a simple fix, exclude /usr/bin since it's not a real path.
12092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12094      # a path prefixed by /cygdrive for fixpath to work.
12095      new_path="$CYGWIN_ROOT_PATH$input_path"
12096    fi
12097  fi
12098
12099
12100  if test "x$path" != "x$new_path"; then
12101    BOOT_JDK="$new_path"
12102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12104  fi
12105
12106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12107
12108  path="$BOOT_JDK"
12109  has_colon=`$ECHO $path | $GREP ^.:`
12110  new_path="$path"
12111  if test "x$has_colon" = x; then
12112    # Not in mixed or Windows style, start by that.
12113    new_path=`cmd //c echo $path`
12114  fi
12115
12116
12117  input_path="$new_path"
12118  # Check if we need to convert this using DOS-style short mode. If the path
12119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12120  # take no chances and rewrite it.
12121  # Note: m4 eats our [], so we need to use [ and ] instead.
12122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12123  if test "x$has_forbidden_chars" != x; then
12124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12126  fi
12127
12128
12129  windows_path="$new_path"
12130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12131    unix_path=`$CYGPATH -u "$windows_path"`
12132    new_path="$unix_path"
12133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12135    new_path="$unix_path"
12136  fi
12137
12138  if test "x$path" != "x$new_path"; then
12139    BOOT_JDK="$new_path"
12140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12142  fi
12143
12144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12146
12147  else
12148    # We're on a posix platform. Hooray! :)
12149    path="$BOOT_JDK"
12150    has_space=`$ECHO "$path" | $GREP " "`
12151    if test "x$has_space" != x; then
12152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12154      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12155    fi
12156
12157    # Use eval to expand a potential ~
12158    eval path="$path"
12159    if test ! -f "$path" && test ! -d "$path"; then
12160      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12161    fi
12162
12163    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12164  fi
12165
12166              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12167$as_echo_n "checking for Boot JDK... " >&6; }
12168              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12169$as_echo "$BOOT_JDK" >&6; }
12170              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12171$as_echo_n "checking Boot JDK version... " >&6; }
12172              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12174$as_echo "$BOOT_JDK_VERSION" >&6; }
12175            fi # end check jdk version
12176          fi # end check rt.jar
12177        fi # end check javac
12178      fi # end check java
12179    fi # end check boot jdk found
12180  fi
12181
12182
12183# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12184
12185  if test "x$BOOT_JDK_FOUND" = xno; then
12186    # Now execute the test
12187
12188    # Extract the first word of "javac", so it can be a program name with args.
12189set dummy javac; ac_word=$2
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12191$as_echo_n "checking for $ac_word... " >&6; }
12192if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12193  $as_echo_n "(cached) " >&6
12194else
12195  case $JAVAC_CHECK in
12196  [\\/]* | ?:[\\/]*)
12197  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12198  ;;
12199  *)
12200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12201for as_dir in $PATH
12202do
12203  IFS=$as_save_IFS
12204  test -z "$as_dir" && as_dir=.
12205    for ac_exec_ext in '' $ac_executable_extensions; do
12206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12207    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12209    break 2
12210  fi
12211done
12212  done
12213IFS=$as_save_IFS
12214
12215  ;;
12216esac
12217fi
12218JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12219if test -n "$JAVAC_CHECK"; then
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12221$as_echo "$JAVAC_CHECK" >&6; }
12222else
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224$as_echo "no" >&6; }
12225fi
12226
12227
12228    # Extract the first word of "java", so it can be a program name with args.
12229set dummy java; ac_word=$2
12230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12231$as_echo_n "checking for $ac_word... " >&6; }
12232if ${ac_cv_path_JAVA_CHECK+:} false; then :
12233  $as_echo_n "(cached) " >&6
12234else
12235  case $JAVA_CHECK in
12236  [\\/]* | ?:[\\/]*)
12237  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12238  ;;
12239  *)
12240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12241for as_dir in $PATH
12242do
12243  IFS=$as_save_IFS
12244  test -z "$as_dir" && as_dir=.
12245    for ac_exec_ext in '' $ac_executable_extensions; do
12246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12247    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12249    break 2
12250  fi
12251done
12252  done
12253IFS=$as_save_IFS
12254
12255  ;;
12256esac
12257fi
12258JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12259if test -n "$JAVA_CHECK"; then
12260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12261$as_echo "$JAVA_CHECK" >&6; }
12262else
12263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12264$as_echo "no" >&6; }
12265fi
12266
12267
12268    BINARY="$JAVAC_CHECK"
12269    if test "x$JAVAC_CHECK" = x; then
12270        BINARY="$JAVA_CHECK"
12271    fi
12272    if test "x$BINARY" != x; then
12273        # So there is a java(c) binary, it might be part of a JDK.
12274        # Lets find the JDK/JRE directory by following symbolic links.
12275        # Linux/GNU systems often have links from /usr/bin/java to
12276        # /etc/alternatives/java to the real JDK binary.
12277
12278    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12279        # Follow a chain of symbolic links. Use readlink
12280        # where it exists, else fall back to horribly
12281        # complicated shell code.
12282        if test "x$READLINK_TESTED" != yes; then
12283            # On MacOSX there is a readlink tool with a different
12284            # purpose than the GNU readlink tool. Check the found readlink.
12285            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12286            if test "x$ISGNU" = x; then
12287                 # A readlink that we do not know how to use.
12288                 # Are there other non-GNU readlinks out there?
12289                 READLINK_TESTED=yes
12290                 READLINK=
12291            fi
12292        fi
12293
12294        if test "x$READLINK" != x; then
12295            BINARY=`$READLINK -f $BINARY`
12296        else
12297            # Save the current directory for restoring afterwards
12298            STARTDIR=$PWD
12299            COUNTER=0
12300            sym_link_dir=`$DIRNAME $BINARY`
12301            sym_link_file=`$BASENAME $BINARY`
12302            cd $sym_link_dir
12303            # Use -P flag to resolve symlinks in directories.
12304            cd `$THEPWDCMD -P`
12305            sym_link_dir=`$THEPWDCMD -P`
12306            # Resolve file symlinks
12307            while test $COUNTER -lt 20; do
12308                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12309                if test "x$ISLINK" == x; then
12310                    # This is not a symbolic link! We are done!
12311                    break
12312                fi
12313                # Again resolve directory symlinks since the target of the just found
12314                # link could be in a different directory
12315                cd `$DIRNAME $ISLINK`
12316                sym_link_dir=`$THEPWDCMD -P`
12317                sym_link_file=`$BASENAME $ISLINK`
12318                let COUNTER=COUNTER+1
12319            done
12320            cd $STARTDIR
12321            BINARY=$sym_link_dir/$sym_link_file
12322        fi
12323    fi
12324
12325        BOOT_JDK=`dirname "$BINARY"`
12326        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12327        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12328            # Looks like we found ourselves an JDK
12329            BOOT_JDK_FOUND=maybe
12330            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12331$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12332        fi
12333    fi
12334
12335
12336    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12337    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12338      # Do we have a bin/java?
12339      if test ! -x "$BOOT_JDK/bin/java"; then
12340        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12342        BOOT_JDK_FOUND=no
12343      else
12344        # Do we have a bin/javac?
12345        if test ! -x "$BOOT_JDK/bin/javac"; then
12346          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12348          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12349$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12350          BOOT_JDK_FOUND=no
12351        else
12352          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12353          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12354            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12356            BOOT_JDK_FOUND=no
12357          else
12358            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12359            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12360
12361            # Extra M4 quote needed to protect [] in grep expression.
12362            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12363            if test "x$FOUND_VERSION_78" = x; then
12364              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12366              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12367$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12368              BOOT_JDK_FOUND=no
12369            else
12370              # We're done! :-)
12371              BOOT_JDK_FOUND=yes
12372
12373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12374
12375  # Input might be given as Windows format, start by converting to
12376  # unix format.
12377  path="$BOOT_JDK"
12378  new_path=`$CYGPATH -u "$path"`
12379
12380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12383  # "foo.exe" is OK but "foo" is an error.
12384  #
12385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12386  # It is also a way to make sure we got the proper file name for the real test later on.
12387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12388  if test "x$test_shortpath" = x; then
12389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12391    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12392  fi
12393
12394  # Call helper function which possibly converts this using DOS-style short mode.
12395  # If so, the updated path is stored in $new_path.
12396
12397  input_path="$new_path"
12398  # Check if we need to convert this using DOS-style short mode. If the path
12399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12400  # take no chances and rewrite it.
12401  # Note: m4 eats our [], so we need to use [ and ] instead.
12402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12403  if test "x$has_forbidden_chars" != x; then
12404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12408      # Going to short mode and back again did indeed matter. Since short mode is
12409      # case insensitive, let's make it lowercase to improve readability.
12410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12411      # Now convert it back to Unix-stile (cygpath)
12412      input_path=`$CYGPATH -u "$shortmode_path"`
12413      new_path="$input_path"
12414    fi
12415  fi
12416
12417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12418  if test "x$test_cygdrive_prefix" = x; then
12419    # As a simple fix, exclude /usr/bin since it's not a real path.
12420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12422      # a path prefixed by /cygdrive for fixpath to work.
12423      new_path="$CYGWIN_ROOT_PATH$input_path"
12424    fi
12425  fi
12426
12427
12428  if test "x$path" != "x$new_path"; then
12429    BOOT_JDK="$new_path"
12430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12431$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12432  fi
12433
12434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12435
12436  path="$BOOT_JDK"
12437  has_colon=`$ECHO $path | $GREP ^.:`
12438  new_path="$path"
12439  if test "x$has_colon" = x; then
12440    # Not in mixed or Windows style, start by that.
12441    new_path=`cmd //c echo $path`
12442  fi
12443
12444
12445  input_path="$new_path"
12446  # Check if we need to convert this using DOS-style short mode. If the path
12447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12448  # take no chances and rewrite it.
12449  # Note: m4 eats our [], so we need to use [ and ] instead.
12450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12451  if test "x$has_forbidden_chars" != x; then
12452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12454  fi
12455
12456
12457  windows_path="$new_path"
12458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12459    unix_path=`$CYGPATH -u "$windows_path"`
12460    new_path="$unix_path"
12461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12463    new_path="$unix_path"
12464  fi
12465
12466  if test "x$path" != "x$new_path"; then
12467    BOOT_JDK="$new_path"
12468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12469$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12470  fi
12471
12472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12474
12475  else
12476    # We're on a posix platform. Hooray! :)
12477    path="$BOOT_JDK"
12478    has_space=`$ECHO "$path" | $GREP " "`
12479    if test "x$has_space" != x; then
12480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12482      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12483    fi
12484
12485    # Use eval to expand a potential ~
12486    eval path="$path"
12487    if test ! -f "$path" && test ! -d "$path"; then
12488      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12489    fi
12490
12491    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12492  fi
12493
12494              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12495$as_echo_n "checking for Boot JDK... " >&6; }
12496              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12497$as_echo "$BOOT_JDK" >&6; }
12498              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12499$as_echo_n "checking Boot JDK version... " >&6; }
12500              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12501              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12502$as_echo "$BOOT_JDK_VERSION" >&6; }
12503            fi # end check jdk version
12504          fi # end check rt.jar
12505        fi # end check javac
12506      fi # end check java
12507    fi # end check boot jdk found
12508  fi
12509
12510
12511# Test: Is there a JDK installed in default, well-known locations?
12512
12513  if test "x$BOOT_JDK_FOUND" = xno; then
12514    # Now execute the test
12515
12516  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12517
12518  if test "x$BOOT_JDK_FOUND" = xno; then
12519    # Now execute the test
12520
12521  if test "x$ProgramW6432" != x; then
12522    VIRTUAL_DIR="$ProgramW6432/Java"
12523
12524  windows_path="$VIRTUAL_DIR"
12525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12526    unix_path=`$CYGPATH -u "$windows_path"`
12527    VIRTUAL_DIR="$unix_path"
12528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12530    VIRTUAL_DIR="$unix_path"
12531  fi
12532
12533
12534  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12535  BOOT_JDK_SUFFIX=""
12536  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12537  if test "x$ALL_JDKS_FOUND" != x; then
12538    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12539
12540  if test "x$BOOT_JDK_FOUND" = xno; then
12541    # Now execute the test
12542
12543        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12544        if test -d "$BOOT_JDK"; then
12545          BOOT_JDK_FOUND=maybe
12546          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12547$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12548        fi
12549
12550
12551    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12552    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12553      # Do we have a bin/java?
12554      if test ! -x "$BOOT_JDK/bin/java"; then
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12557        BOOT_JDK_FOUND=no
12558      else
12559        # Do we have a bin/javac?
12560        if test ! -x "$BOOT_JDK/bin/javac"; then
12561          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12563          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12564$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12565          BOOT_JDK_FOUND=no
12566        else
12567          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12568          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12569            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12571            BOOT_JDK_FOUND=no
12572          else
12573            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12574            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12575
12576            # Extra M4 quote needed to protect [] in grep expression.
12577            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12578            if test "x$FOUND_VERSION_78" = x; then
12579              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12581              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12582$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12583              BOOT_JDK_FOUND=no
12584            else
12585              # We're done! :-)
12586              BOOT_JDK_FOUND=yes
12587
12588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12589
12590  # Input might be given as Windows format, start by converting to
12591  # unix format.
12592  path="$BOOT_JDK"
12593  new_path=`$CYGPATH -u "$path"`
12594
12595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12598  # "foo.exe" is OK but "foo" is an error.
12599  #
12600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12601  # It is also a way to make sure we got the proper file name for the real test later on.
12602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12603  if test "x$test_shortpath" = x; then
12604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12606    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12607  fi
12608
12609  # Call helper function which possibly converts this using DOS-style short mode.
12610  # If so, the updated path is stored in $new_path.
12611
12612  input_path="$new_path"
12613  # Check if we need to convert this using DOS-style short mode. If the path
12614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12615  # take no chances and rewrite it.
12616  # Note: m4 eats our [], so we need to use [ and ] instead.
12617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12618  if test "x$has_forbidden_chars" != x; then
12619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12623      # Going to short mode and back again did indeed matter. Since short mode is
12624      # case insensitive, let's make it lowercase to improve readability.
12625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12626      # Now convert it back to Unix-stile (cygpath)
12627      input_path=`$CYGPATH -u "$shortmode_path"`
12628      new_path="$input_path"
12629    fi
12630  fi
12631
12632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12633  if test "x$test_cygdrive_prefix" = x; then
12634    # As a simple fix, exclude /usr/bin since it's not a real path.
12635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12637      # a path prefixed by /cygdrive for fixpath to work.
12638      new_path="$CYGWIN_ROOT_PATH$input_path"
12639    fi
12640  fi
12641
12642
12643  if test "x$path" != "x$new_path"; then
12644    BOOT_JDK="$new_path"
12645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12647  fi
12648
12649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12650
12651  path="$BOOT_JDK"
12652  has_colon=`$ECHO $path | $GREP ^.:`
12653  new_path="$path"
12654  if test "x$has_colon" = x; then
12655    # Not in mixed or Windows style, start by that.
12656    new_path=`cmd //c echo $path`
12657  fi
12658
12659
12660  input_path="$new_path"
12661  # Check if we need to convert this using DOS-style short mode. If the path
12662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12663  # take no chances and rewrite it.
12664  # Note: m4 eats our [], so we need to use [ and ] instead.
12665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12666  if test "x$has_forbidden_chars" != x; then
12667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12669  fi
12670
12671
12672  windows_path="$new_path"
12673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12674    unix_path=`$CYGPATH -u "$windows_path"`
12675    new_path="$unix_path"
12676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12678    new_path="$unix_path"
12679  fi
12680
12681  if test "x$path" != "x$new_path"; then
12682    BOOT_JDK="$new_path"
12683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12685  fi
12686
12687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12689
12690  else
12691    # We're on a posix platform. Hooray! :)
12692    path="$BOOT_JDK"
12693    has_space=`$ECHO "$path" | $GREP " "`
12694    if test "x$has_space" != x; then
12695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12696$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12697      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12698    fi
12699
12700    # Use eval to expand a potential ~
12701    eval path="$path"
12702    if test ! -f "$path" && test ! -d "$path"; then
12703      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12704    fi
12705
12706    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12707  fi
12708
12709              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12710$as_echo_n "checking for Boot JDK... " >&6; }
12711              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12712$as_echo "$BOOT_JDK" >&6; }
12713              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12714$as_echo_n "checking Boot JDK version... " >&6; }
12715              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12716              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12717$as_echo "$BOOT_JDK_VERSION" >&6; }
12718            fi # end check jdk version
12719          fi # end check rt.jar
12720        fi # end check javac
12721      fi # end check java
12722    fi # end check boot jdk found
12723  fi
12724
12725    done
12726  fi
12727
12728  fi
12729
12730
12731    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12732    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12733      # Do we have a bin/java?
12734      if test ! -x "$BOOT_JDK/bin/java"; then
12735        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12737        BOOT_JDK_FOUND=no
12738      else
12739        # Do we have a bin/javac?
12740        if test ! -x "$BOOT_JDK/bin/javac"; then
12741          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12743          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12744$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12745          BOOT_JDK_FOUND=no
12746        else
12747          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12748          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12749            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12751            BOOT_JDK_FOUND=no
12752          else
12753            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12755
12756            # Extra M4 quote needed to protect [] in grep expression.
12757            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12758            if test "x$FOUND_VERSION_78" = x; then
12759              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12761              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12762$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12763              BOOT_JDK_FOUND=no
12764            else
12765              # We're done! :-)
12766              BOOT_JDK_FOUND=yes
12767
12768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12769
12770  # Input might be given as Windows format, start by converting to
12771  # unix format.
12772  path="$BOOT_JDK"
12773  new_path=`$CYGPATH -u "$path"`
12774
12775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12778  # "foo.exe" is OK but "foo" is an error.
12779  #
12780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12781  # It is also a way to make sure we got the proper file name for the real test later on.
12782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12783  if test "x$test_shortpath" = x; then
12784    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12785$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12786    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12787  fi
12788
12789  # Call helper function which possibly converts this using DOS-style short mode.
12790  # If so, the updated path is stored in $new_path.
12791
12792  input_path="$new_path"
12793  # Check if we need to convert this using DOS-style short mode. If the path
12794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12795  # take no chances and rewrite it.
12796  # Note: m4 eats our [], so we need to use [ and ] instead.
12797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12798  if test "x$has_forbidden_chars" != x; then
12799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12803      # Going to short mode and back again did indeed matter. Since short mode is
12804      # case insensitive, let's make it lowercase to improve readability.
12805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12806      # Now convert it back to Unix-stile (cygpath)
12807      input_path=`$CYGPATH -u "$shortmode_path"`
12808      new_path="$input_path"
12809    fi
12810  fi
12811
12812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12813  if test "x$test_cygdrive_prefix" = x; then
12814    # As a simple fix, exclude /usr/bin since it's not a real path.
12815    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12817      # a path prefixed by /cygdrive for fixpath to work.
12818      new_path="$CYGWIN_ROOT_PATH$input_path"
12819    fi
12820  fi
12821
12822
12823  if test "x$path" != "x$new_path"; then
12824    BOOT_JDK="$new_path"
12825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12827  fi
12828
12829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12830
12831  path="$BOOT_JDK"
12832  has_colon=`$ECHO $path | $GREP ^.:`
12833  new_path="$path"
12834  if test "x$has_colon" = x; then
12835    # Not in mixed or Windows style, start by that.
12836    new_path=`cmd //c echo $path`
12837  fi
12838
12839
12840  input_path="$new_path"
12841  # Check if we need to convert this using DOS-style short mode. If the path
12842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12843  # take no chances and rewrite it.
12844  # Note: m4 eats our [], so we need to use [ and ] instead.
12845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12846  if test "x$has_forbidden_chars" != x; then
12847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12849  fi
12850
12851
12852  windows_path="$new_path"
12853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12854    unix_path=`$CYGPATH -u "$windows_path"`
12855    new_path="$unix_path"
12856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12858    new_path="$unix_path"
12859  fi
12860
12861  if test "x$path" != "x$new_path"; then
12862    BOOT_JDK="$new_path"
12863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12865  fi
12866
12867  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12868  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12869
12870  else
12871    # We're on a posix platform. Hooray! :)
12872    path="$BOOT_JDK"
12873    has_space=`$ECHO "$path" | $GREP " "`
12874    if test "x$has_space" != x; then
12875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12877      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12878    fi
12879
12880    # Use eval to expand a potential ~
12881    eval path="$path"
12882    if test ! -f "$path" && test ! -d "$path"; then
12883      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12884    fi
12885
12886    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12887  fi
12888
12889              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12890$as_echo_n "checking for Boot JDK... " >&6; }
12891              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12892$as_echo "$BOOT_JDK" >&6; }
12893              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12894$as_echo_n "checking Boot JDK version... " >&6; }
12895              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12896              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12897$as_echo "$BOOT_JDK_VERSION" >&6; }
12898            fi # end check jdk version
12899          fi # end check rt.jar
12900        fi # end check javac
12901      fi # end check java
12902    fi # end check boot jdk found
12903  fi
12904
12905
12906  if test "x$BOOT_JDK_FOUND" = xno; then
12907    # Now execute the test
12908
12909  if test "x$PROGRAMW6432" != x; then
12910    VIRTUAL_DIR="$PROGRAMW6432/Java"
12911
12912  windows_path="$VIRTUAL_DIR"
12913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12914    unix_path=`$CYGPATH -u "$windows_path"`
12915    VIRTUAL_DIR="$unix_path"
12916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12918    VIRTUAL_DIR="$unix_path"
12919  fi
12920
12921
12922  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12923  BOOT_JDK_SUFFIX=""
12924  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12925  if test "x$ALL_JDKS_FOUND" != x; then
12926    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12927
12928  if test "x$BOOT_JDK_FOUND" = xno; then
12929    # Now execute the test
12930
12931        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12932        if test -d "$BOOT_JDK"; then
12933          BOOT_JDK_FOUND=maybe
12934          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12935$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12936        fi
12937
12938
12939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12941      # Do we have a bin/java?
12942      if test ! -x "$BOOT_JDK/bin/java"; then
12943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12945        BOOT_JDK_FOUND=no
12946      else
12947        # Do we have a bin/javac?
12948        if test ! -x "$BOOT_JDK/bin/javac"; then
12949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12953          BOOT_JDK_FOUND=no
12954        else
12955          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12956          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12959            BOOT_JDK_FOUND=no
12960          else
12961            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12963
12964            # Extra M4 quote needed to protect [] in grep expression.
12965            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12966            if test "x$FOUND_VERSION_78" = x; then
12967              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12969              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12970$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12971              BOOT_JDK_FOUND=no
12972            else
12973              # We're done! :-)
12974              BOOT_JDK_FOUND=yes
12975
12976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12977
12978  # Input might be given as Windows format, start by converting to
12979  # unix format.
12980  path="$BOOT_JDK"
12981  new_path=`$CYGPATH -u "$path"`
12982
12983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12986  # "foo.exe" is OK but "foo" is an error.
12987  #
12988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12989  # It is also a way to make sure we got the proper file name for the real test later on.
12990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12991  if test "x$test_shortpath" = x; then
12992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12993$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12994    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12995  fi
12996
12997  # Call helper function which possibly converts this using DOS-style short mode.
12998  # If so, the updated path is stored in $new_path.
12999
13000  input_path="$new_path"
13001  # Check if we need to convert this using DOS-style short mode. If the path
13002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13003  # take no chances and rewrite it.
13004  # Note: m4 eats our [], so we need to use [ and ] instead.
13005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13006  if test "x$has_forbidden_chars" != x; then
13007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13011      # Going to short mode and back again did indeed matter. Since short mode is
13012      # case insensitive, let's make it lowercase to improve readability.
13013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13014      # Now convert it back to Unix-stile (cygpath)
13015      input_path=`$CYGPATH -u "$shortmode_path"`
13016      new_path="$input_path"
13017    fi
13018  fi
13019
13020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13021  if test "x$test_cygdrive_prefix" = x; then
13022    # As a simple fix, exclude /usr/bin since it's not a real path.
13023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13025      # a path prefixed by /cygdrive for fixpath to work.
13026      new_path="$CYGWIN_ROOT_PATH$input_path"
13027    fi
13028  fi
13029
13030
13031  if test "x$path" != "x$new_path"; then
13032    BOOT_JDK="$new_path"
13033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13035  fi
13036
13037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13038
13039  path="$BOOT_JDK"
13040  has_colon=`$ECHO $path | $GREP ^.:`
13041  new_path="$path"
13042  if test "x$has_colon" = x; then
13043    # Not in mixed or Windows style, start by that.
13044    new_path=`cmd //c echo $path`
13045  fi
13046
13047
13048  input_path="$new_path"
13049  # Check if we need to convert this using DOS-style short mode. If the path
13050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13051  # take no chances and rewrite it.
13052  # Note: m4 eats our [], so we need to use [ and ] instead.
13053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13054  if test "x$has_forbidden_chars" != x; then
13055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13057  fi
13058
13059
13060  windows_path="$new_path"
13061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13062    unix_path=`$CYGPATH -u "$windows_path"`
13063    new_path="$unix_path"
13064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13066    new_path="$unix_path"
13067  fi
13068
13069  if test "x$path" != "x$new_path"; then
13070    BOOT_JDK="$new_path"
13071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13073  fi
13074
13075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13077
13078  else
13079    # We're on a posix platform. Hooray! :)
13080    path="$BOOT_JDK"
13081    has_space=`$ECHO "$path" | $GREP " "`
13082    if test "x$has_space" != x; then
13083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13085      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13086    fi
13087
13088    # Use eval to expand a potential ~
13089    eval path="$path"
13090    if test ! -f "$path" && test ! -d "$path"; then
13091      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13092    fi
13093
13094    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13095  fi
13096
13097              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13098$as_echo_n "checking for Boot JDK... " >&6; }
13099              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13100$as_echo "$BOOT_JDK" >&6; }
13101              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13102$as_echo_n "checking Boot JDK version... " >&6; }
13103              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13104              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13105$as_echo "$BOOT_JDK_VERSION" >&6; }
13106            fi # end check jdk version
13107          fi # end check rt.jar
13108        fi # end check javac
13109      fi # end check java
13110    fi # end check boot jdk found
13111  fi
13112
13113    done
13114  fi
13115
13116  fi
13117
13118
13119    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13120    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13121      # Do we have a bin/java?
13122      if test ! -x "$BOOT_JDK/bin/java"; then
13123        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13125        BOOT_JDK_FOUND=no
13126      else
13127        # Do we have a bin/javac?
13128        if test ! -x "$BOOT_JDK/bin/javac"; then
13129          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13131          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13132$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13133          BOOT_JDK_FOUND=no
13134        else
13135          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13136          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13137            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13139            BOOT_JDK_FOUND=no
13140          else
13141            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13142            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13143
13144            # Extra M4 quote needed to protect [] in grep expression.
13145            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13146            if test "x$FOUND_VERSION_78" = x; then
13147              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13149              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13150$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13151              BOOT_JDK_FOUND=no
13152            else
13153              # We're done! :-)
13154              BOOT_JDK_FOUND=yes
13155
13156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13157
13158  # Input might be given as Windows format, start by converting to
13159  # unix format.
13160  path="$BOOT_JDK"
13161  new_path=`$CYGPATH -u "$path"`
13162
13163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13166  # "foo.exe" is OK but "foo" is an error.
13167  #
13168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13169  # It is also a way to make sure we got the proper file name for the real test later on.
13170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13171  if test "x$test_shortpath" = x; then
13172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13174    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13175  fi
13176
13177  # Call helper function which possibly converts this using DOS-style short mode.
13178  # If so, the updated path is stored in $new_path.
13179
13180  input_path="$new_path"
13181  # Check if we need to convert this using DOS-style short mode. If the path
13182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13183  # take no chances and rewrite it.
13184  # Note: m4 eats our [], so we need to use [ and ] instead.
13185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13186  if test "x$has_forbidden_chars" != x; then
13187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13191      # Going to short mode and back again did indeed matter. Since short mode is
13192      # case insensitive, let's make it lowercase to improve readability.
13193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13194      # Now convert it back to Unix-stile (cygpath)
13195      input_path=`$CYGPATH -u "$shortmode_path"`
13196      new_path="$input_path"
13197    fi
13198  fi
13199
13200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13201  if test "x$test_cygdrive_prefix" = x; then
13202    # As a simple fix, exclude /usr/bin since it's not a real path.
13203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13205      # a path prefixed by /cygdrive for fixpath to work.
13206      new_path="$CYGWIN_ROOT_PATH$input_path"
13207    fi
13208  fi
13209
13210
13211  if test "x$path" != "x$new_path"; then
13212    BOOT_JDK="$new_path"
13213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13215  fi
13216
13217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13218
13219  path="$BOOT_JDK"
13220  has_colon=`$ECHO $path | $GREP ^.:`
13221  new_path="$path"
13222  if test "x$has_colon" = x; then
13223    # Not in mixed or Windows style, start by that.
13224    new_path=`cmd //c echo $path`
13225  fi
13226
13227
13228  input_path="$new_path"
13229  # Check if we need to convert this using DOS-style short mode. If the path
13230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13231  # take no chances and rewrite it.
13232  # Note: m4 eats our [], so we need to use [ and ] instead.
13233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13234  if test "x$has_forbidden_chars" != x; then
13235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13237  fi
13238
13239
13240  windows_path="$new_path"
13241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13242    unix_path=`$CYGPATH -u "$windows_path"`
13243    new_path="$unix_path"
13244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13246    new_path="$unix_path"
13247  fi
13248
13249  if test "x$path" != "x$new_path"; then
13250    BOOT_JDK="$new_path"
13251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13253  fi
13254
13255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13257
13258  else
13259    # We're on a posix platform. Hooray! :)
13260    path="$BOOT_JDK"
13261    has_space=`$ECHO "$path" | $GREP " "`
13262    if test "x$has_space" != x; then
13263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13265      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13266    fi
13267
13268    # Use eval to expand a potential ~
13269    eval path="$path"
13270    if test ! -f "$path" && test ! -d "$path"; then
13271      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13272    fi
13273
13274    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13275  fi
13276
13277              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13278$as_echo_n "checking for Boot JDK... " >&6; }
13279              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13280$as_echo "$BOOT_JDK" >&6; }
13281              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13282$as_echo_n "checking Boot JDK version... " >&6; }
13283              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13285$as_echo "$BOOT_JDK_VERSION" >&6; }
13286            fi # end check jdk version
13287          fi # end check rt.jar
13288        fi # end check javac
13289      fi # end check java
13290    fi # end check boot jdk found
13291  fi
13292
13293
13294  if test "x$BOOT_JDK_FOUND" = xno; then
13295    # Now execute the test
13296
13297  if test "x$PROGRAMFILES" != x; then
13298    VIRTUAL_DIR="$PROGRAMFILES/Java"
13299
13300  windows_path="$VIRTUAL_DIR"
13301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13302    unix_path=`$CYGPATH -u "$windows_path"`
13303    VIRTUAL_DIR="$unix_path"
13304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13306    VIRTUAL_DIR="$unix_path"
13307  fi
13308
13309
13310  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13311  BOOT_JDK_SUFFIX=""
13312  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13313  if test "x$ALL_JDKS_FOUND" != x; then
13314    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13315
13316  if test "x$BOOT_JDK_FOUND" = xno; then
13317    # Now execute the test
13318
13319        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13320        if test -d "$BOOT_JDK"; then
13321          BOOT_JDK_FOUND=maybe
13322          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13323$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13324        fi
13325
13326
13327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13329      # Do we have a bin/java?
13330      if test ! -x "$BOOT_JDK/bin/java"; then
13331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13333        BOOT_JDK_FOUND=no
13334      else
13335        # Do we have a bin/javac?
13336        if test ! -x "$BOOT_JDK/bin/javac"; then
13337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13341          BOOT_JDK_FOUND=no
13342        else
13343          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13344          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13345            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13347            BOOT_JDK_FOUND=no
13348          else
13349            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13350            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13351
13352            # Extra M4 quote needed to protect [] in grep expression.
13353            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13354            if test "x$FOUND_VERSION_78" = x; then
13355              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13357              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13358$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13359              BOOT_JDK_FOUND=no
13360            else
13361              # We're done! :-)
13362              BOOT_JDK_FOUND=yes
13363
13364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13365
13366  # Input might be given as Windows format, start by converting to
13367  # unix format.
13368  path="$BOOT_JDK"
13369  new_path=`$CYGPATH -u "$path"`
13370
13371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13374  # "foo.exe" is OK but "foo" is an error.
13375  #
13376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13377  # It is also a way to make sure we got the proper file name for the real test later on.
13378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13379  if test "x$test_shortpath" = x; then
13380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13383  fi
13384
13385  # Call helper function which possibly converts this using DOS-style short mode.
13386  # If so, the updated path is stored in $new_path.
13387
13388  input_path="$new_path"
13389  # Check if we need to convert this using DOS-style short mode. If the path
13390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13391  # take no chances and rewrite it.
13392  # Note: m4 eats our [], so we need to use [ and ] instead.
13393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13394  if test "x$has_forbidden_chars" != x; then
13395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13399      # Going to short mode and back again did indeed matter. Since short mode is
13400      # case insensitive, let's make it lowercase to improve readability.
13401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13402      # Now convert it back to Unix-stile (cygpath)
13403      input_path=`$CYGPATH -u "$shortmode_path"`
13404      new_path="$input_path"
13405    fi
13406  fi
13407
13408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13409  if test "x$test_cygdrive_prefix" = x; then
13410    # As a simple fix, exclude /usr/bin since it's not a real path.
13411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13413      # a path prefixed by /cygdrive for fixpath to work.
13414      new_path="$CYGWIN_ROOT_PATH$input_path"
13415    fi
13416  fi
13417
13418
13419  if test "x$path" != "x$new_path"; then
13420    BOOT_JDK="$new_path"
13421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13423  fi
13424
13425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13426
13427  path="$BOOT_JDK"
13428  has_colon=`$ECHO $path | $GREP ^.:`
13429  new_path="$path"
13430  if test "x$has_colon" = x; then
13431    # Not in mixed or Windows style, start by that.
13432    new_path=`cmd //c echo $path`
13433  fi
13434
13435
13436  input_path="$new_path"
13437  # Check if we need to convert this using DOS-style short mode. If the path
13438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13439  # take no chances and rewrite it.
13440  # Note: m4 eats our [], so we need to use [ and ] instead.
13441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13442  if test "x$has_forbidden_chars" != x; then
13443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13445  fi
13446
13447
13448  windows_path="$new_path"
13449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13450    unix_path=`$CYGPATH -u "$windows_path"`
13451    new_path="$unix_path"
13452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13454    new_path="$unix_path"
13455  fi
13456
13457  if test "x$path" != "x$new_path"; then
13458    BOOT_JDK="$new_path"
13459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13461  fi
13462
13463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13465
13466  else
13467    # We're on a posix platform. Hooray! :)
13468    path="$BOOT_JDK"
13469    has_space=`$ECHO "$path" | $GREP " "`
13470    if test "x$has_space" != x; then
13471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13473      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13474    fi
13475
13476    # Use eval to expand a potential ~
13477    eval path="$path"
13478    if test ! -f "$path" && test ! -d "$path"; then
13479      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13480    fi
13481
13482    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13483  fi
13484
13485              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13486$as_echo_n "checking for Boot JDK... " >&6; }
13487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13488$as_echo "$BOOT_JDK" >&6; }
13489              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13490$as_echo_n "checking Boot JDK version... " >&6; }
13491              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13493$as_echo "$BOOT_JDK_VERSION" >&6; }
13494            fi # end check jdk version
13495          fi # end check rt.jar
13496        fi # end check javac
13497      fi # end check java
13498    fi # end check boot jdk found
13499  fi
13500
13501    done
13502  fi
13503
13504  fi
13505
13506
13507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13509      # Do we have a bin/java?
13510      if test ! -x "$BOOT_JDK/bin/java"; then
13511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13513        BOOT_JDK_FOUND=no
13514      else
13515        # Do we have a bin/javac?
13516        if test ! -x "$BOOT_JDK/bin/javac"; then
13517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13521          BOOT_JDK_FOUND=no
13522        else
13523          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13524          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13525            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13527            BOOT_JDK_FOUND=no
13528          else
13529            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13531
13532            # Extra M4 quote needed to protect [] in grep expression.
13533            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13534            if test "x$FOUND_VERSION_78" = x; then
13535              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13537              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13538$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13539              BOOT_JDK_FOUND=no
13540            else
13541              # We're done! :-)
13542              BOOT_JDK_FOUND=yes
13543
13544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13545
13546  # Input might be given as Windows format, start by converting to
13547  # unix format.
13548  path="$BOOT_JDK"
13549  new_path=`$CYGPATH -u "$path"`
13550
13551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13554  # "foo.exe" is OK but "foo" is an error.
13555  #
13556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13557  # It is also a way to make sure we got the proper file name for the real test later on.
13558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13559  if test "x$test_shortpath" = x; then
13560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13563  fi
13564
13565  # Call helper function which possibly converts this using DOS-style short mode.
13566  # If so, the updated path is stored in $new_path.
13567
13568  input_path="$new_path"
13569  # Check if we need to convert this using DOS-style short mode. If the path
13570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13571  # take no chances and rewrite it.
13572  # Note: m4 eats our [], so we need to use [ and ] instead.
13573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13574  if test "x$has_forbidden_chars" != x; then
13575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13579      # Going to short mode and back again did indeed matter. Since short mode is
13580      # case insensitive, let's make it lowercase to improve readability.
13581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13582      # Now convert it back to Unix-stile (cygpath)
13583      input_path=`$CYGPATH -u "$shortmode_path"`
13584      new_path="$input_path"
13585    fi
13586  fi
13587
13588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13589  if test "x$test_cygdrive_prefix" = x; then
13590    # As a simple fix, exclude /usr/bin since it's not a real path.
13591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13593      # a path prefixed by /cygdrive for fixpath to work.
13594      new_path="$CYGWIN_ROOT_PATH$input_path"
13595    fi
13596  fi
13597
13598
13599  if test "x$path" != "x$new_path"; then
13600    BOOT_JDK="$new_path"
13601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13603  fi
13604
13605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13606
13607  path="$BOOT_JDK"
13608  has_colon=`$ECHO $path | $GREP ^.:`
13609  new_path="$path"
13610  if test "x$has_colon" = x; then
13611    # Not in mixed or Windows style, start by that.
13612    new_path=`cmd //c echo $path`
13613  fi
13614
13615
13616  input_path="$new_path"
13617  # Check if we need to convert this using DOS-style short mode. If the path
13618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13619  # take no chances and rewrite it.
13620  # Note: m4 eats our [], so we need to use [ and ] instead.
13621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13622  if test "x$has_forbidden_chars" != x; then
13623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13625  fi
13626
13627
13628  windows_path="$new_path"
13629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13630    unix_path=`$CYGPATH -u "$windows_path"`
13631    new_path="$unix_path"
13632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13634    new_path="$unix_path"
13635  fi
13636
13637  if test "x$path" != "x$new_path"; then
13638    BOOT_JDK="$new_path"
13639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13641  fi
13642
13643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13645
13646  else
13647    # We're on a posix platform. Hooray! :)
13648    path="$BOOT_JDK"
13649    has_space=`$ECHO "$path" | $GREP " "`
13650    if test "x$has_space" != x; then
13651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13653      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13654    fi
13655
13656    # Use eval to expand a potential ~
13657    eval path="$path"
13658    if test ! -f "$path" && test ! -d "$path"; then
13659      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13660    fi
13661
13662    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13663  fi
13664
13665              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13666$as_echo_n "checking for Boot JDK... " >&6; }
13667              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13668$as_echo "$BOOT_JDK" >&6; }
13669              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13670$as_echo_n "checking Boot JDK version... " >&6; }
13671              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13672              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13673$as_echo "$BOOT_JDK_VERSION" >&6; }
13674            fi # end check jdk version
13675          fi # end check rt.jar
13676        fi # end check javac
13677      fi # end check java
13678    fi # end check boot jdk found
13679  fi
13680
13681
13682  if test "x$BOOT_JDK_FOUND" = xno; then
13683    # Now execute the test
13684
13685  if test "x$ProgramFiles" != x; then
13686    VIRTUAL_DIR="$ProgramFiles/Java"
13687
13688  windows_path="$VIRTUAL_DIR"
13689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13690    unix_path=`$CYGPATH -u "$windows_path"`
13691    VIRTUAL_DIR="$unix_path"
13692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13694    VIRTUAL_DIR="$unix_path"
13695  fi
13696
13697
13698  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13699  BOOT_JDK_SUFFIX=""
13700  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13701  if test "x$ALL_JDKS_FOUND" != x; then
13702    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13703
13704  if test "x$BOOT_JDK_FOUND" = xno; then
13705    # Now execute the test
13706
13707        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13708        if test -d "$BOOT_JDK"; then
13709          BOOT_JDK_FOUND=maybe
13710          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13711$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13712        fi
13713
13714
13715    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13716    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13717      # Do we have a bin/java?
13718      if test ! -x "$BOOT_JDK/bin/java"; then
13719        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13721        BOOT_JDK_FOUND=no
13722      else
13723        # Do we have a bin/javac?
13724        if test ! -x "$BOOT_JDK/bin/javac"; then
13725          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13727          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13728$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13729          BOOT_JDK_FOUND=no
13730        else
13731          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13732          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13735            BOOT_JDK_FOUND=no
13736          else
13737            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13738            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13739
13740            # Extra M4 quote needed to protect [] in grep expression.
13741            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13742            if test "x$FOUND_VERSION_78" = x; then
13743              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13745              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13746$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13747              BOOT_JDK_FOUND=no
13748            else
13749              # We're done! :-)
13750              BOOT_JDK_FOUND=yes
13751
13752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13753
13754  # Input might be given as Windows format, start by converting to
13755  # unix format.
13756  path="$BOOT_JDK"
13757  new_path=`$CYGPATH -u "$path"`
13758
13759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13762  # "foo.exe" is OK but "foo" is an error.
13763  #
13764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13765  # It is also a way to make sure we got the proper file name for the real test later on.
13766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13767  if test "x$test_shortpath" = x; then
13768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13770    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13771  fi
13772
13773  # Call helper function which possibly converts this using DOS-style short mode.
13774  # If so, the updated path is stored in $new_path.
13775
13776  input_path="$new_path"
13777  # Check if we need to convert this using DOS-style short mode. If the path
13778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13779  # take no chances and rewrite it.
13780  # Note: m4 eats our [], so we need to use [ and ] instead.
13781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13782  if test "x$has_forbidden_chars" != x; then
13783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13787      # Going to short mode and back again did indeed matter. Since short mode is
13788      # case insensitive, let's make it lowercase to improve readability.
13789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13790      # Now convert it back to Unix-stile (cygpath)
13791      input_path=`$CYGPATH -u "$shortmode_path"`
13792      new_path="$input_path"
13793    fi
13794  fi
13795
13796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13797  if test "x$test_cygdrive_prefix" = x; then
13798    # As a simple fix, exclude /usr/bin since it's not a real path.
13799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13801      # a path prefixed by /cygdrive for fixpath to work.
13802      new_path="$CYGWIN_ROOT_PATH$input_path"
13803    fi
13804  fi
13805
13806
13807  if test "x$path" != "x$new_path"; then
13808    BOOT_JDK="$new_path"
13809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13811  fi
13812
13813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13814
13815  path="$BOOT_JDK"
13816  has_colon=`$ECHO $path | $GREP ^.:`
13817  new_path="$path"
13818  if test "x$has_colon" = x; then
13819    # Not in mixed or Windows style, start by that.
13820    new_path=`cmd //c echo $path`
13821  fi
13822
13823
13824  input_path="$new_path"
13825  # Check if we need to convert this using DOS-style short mode. If the path
13826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13827  # take no chances and rewrite it.
13828  # Note: m4 eats our [], so we need to use [ and ] instead.
13829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13830  if test "x$has_forbidden_chars" != x; then
13831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13833  fi
13834
13835
13836  windows_path="$new_path"
13837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13838    unix_path=`$CYGPATH -u "$windows_path"`
13839    new_path="$unix_path"
13840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13842    new_path="$unix_path"
13843  fi
13844
13845  if test "x$path" != "x$new_path"; then
13846    BOOT_JDK="$new_path"
13847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13849  fi
13850
13851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13853
13854  else
13855    # We're on a posix platform. Hooray! :)
13856    path="$BOOT_JDK"
13857    has_space=`$ECHO "$path" | $GREP " "`
13858    if test "x$has_space" != x; then
13859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13861      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13862    fi
13863
13864    # Use eval to expand a potential ~
13865    eval path="$path"
13866    if test ! -f "$path" && test ! -d "$path"; then
13867      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13868    fi
13869
13870    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13871  fi
13872
13873              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13874$as_echo_n "checking for Boot JDK... " >&6; }
13875              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13876$as_echo "$BOOT_JDK" >&6; }
13877              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13878$as_echo_n "checking Boot JDK version... " >&6; }
13879              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13880              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13881$as_echo "$BOOT_JDK_VERSION" >&6; }
13882            fi # end check jdk version
13883          fi # end check rt.jar
13884        fi # end check javac
13885      fi # end check java
13886    fi # end check boot jdk found
13887  fi
13888
13889    done
13890  fi
13891
13892  fi
13893
13894
13895    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13896    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13897      # Do we have a bin/java?
13898      if test ! -x "$BOOT_JDK/bin/java"; then
13899        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13901        BOOT_JDK_FOUND=no
13902      else
13903        # Do we have a bin/javac?
13904        if test ! -x "$BOOT_JDK/bin/javac"; then
13905          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13907          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13908$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13909          BOOT_JDK_FOUND=no
13910        else
13911          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13912          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13913            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13915            BOOT_JDK_FOUND=no
13916          else
13917            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13918            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13919
13920            # Extra M4 quote needed to protect [] in grep expression.
13921            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13922            if test "x$FOUND_VERSION_78" = x; then
13923              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13925              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13926$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13927              BOOT_JDK_FOUND=no
13928            else
13929              # We're done! :-)
13930              BOOT_JDK_FOUND=yes
13931
13932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13933
13934  # Input might be given as Windows format, start by converting to
13935  # unix format.
13936  path="$BOOT_JDK"
13937  new_path=`$CYGPATH -u "$path"`
13938
13939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13942  # "foo.exe" is OK but "foo" is an error.
13943  #
13944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13945  # It is also a way to make sure we got the proper file name for the real test later on.
13946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13947  if test "x$test_shortpath" = x; then
13948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13949$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13950    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13951  fi
13952
13953  # Call helper function which possibly converts this using DOS-style short mode.
13954  # If so, the updated path is stored in $new_path.
13955
13956  input_path="$new_path"
13957  # Check if we need to convert this using DOS-style short mode. If the path
13958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13959  # take no chances and rewrite it.
13960  # Note: m4 eats our [], so we need to use [ and ] instead.
13961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13962  if test "x$has_forbidden_chars" != x; then
13963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13967      # Going to short mode and back again did indeed matter. Since short mode is
13968      # case insensitive, let's make it lowercase to improve readability.
13969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13970      # Now convert it back to Unix-stile (cygpath)
13971      input_path=`$CYGPATH -u "$shortmode_path"`
13972      new_path="$input_path"
13973    fi
13974  fi
13975
13976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13977  if test "x$test_cygdrive_prefix" = x; then
13978    # As a simple fix, exclude /usr/bin since it's not a real path.
13979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13981      # a path prefixed by /cygdrive for fixpath to work.
13982      new_path="$CYGWIN_ROOT_PATH$input_path"
13983    fi
13984  fi
13985
13986
13987  if test "x$path" != "x$new_path"; then
13988    BOOT_JDK="$new_path"
13989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13990$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13991  fi
13992
13993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13994
13995  path="$BOOT_JDK"
13996  has_colon=`$ECHO $path | $GREP ^.:`
13997  new_path="$path"
13998  if test "x$has_colon" = x; then
13999    # Not in mixed or Windows style, start by that.
14000    new_path=`cmd //c echo $path`
14001  fi
14002
14003
14004  input_path="$new_path"
14005  # Check if we need to convert this using DOS-style short mode. If the path
14006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14007  # take no chances and rewrite it.
14008  # Note: m4 eats our [], so we need to use [ and ] instead.
14009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14010  if test "x$has_forbidden_chars" != x; then
14011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14013  fi
14014
14015
14016  windows_path="$new_path"
14017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14018    unix_path=`$CYGPATH -u "$windows_path"`
14019    new_path="$unix_path"
14020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14022    new_path="$unix_path"
14023  fi
14024
14025  if test "x$path" != "x$new_path"; then
14026    BOOT_JDK="$new_path"
14027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14029  fi
14030
14031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14033
14034  else
14035    # We're on a posix platform. Hooray! :)
14036    path="$BOOT_JDK"
14037    has_space=`$ECHO "$path" | $GREP " "`
14038    if test "x$has_space" != x; then
14039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14041      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14042    fi
14043
14044    # Use eval to expand a potential ~
14045    eval path="$path"
14046    if test ! -f "$path" && test ! -d "$path"; then
14047      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14048    fi
14049
14050    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14051  fi
14052
14053              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14054$as_echo_n "checking for Boot JDK... " >&6; }
14055              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14056$as_echo "$BOOT_JDK" >&6; }
14057              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14058$as_echo_n "checking Boot JDK version... " >&6; }
14059              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14060              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14061$as_echo "$BOOT_JDK_VERSION" >&6; }
14062            fi # end check jdk version
14063          fi # end check rt.jar
14064        fi # end check javac
14065      fi # end check java
14066    fi # end check boot jdk found
14067  fi
14068
14069
14070  if test "x$BOOT_JDK_FOUND" = xno; then
14071    # Now execute the test
14072
14073  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14074  BOOT_JDK_SUFFIX=""
14075  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14076  if test "x$ALL_JDKS_FOUND" != x; then
14077    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14078
14079  if test "x$BOOT_JDK_FOUND" = xno; then
14080    # Now execute the test
14081
14082        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14083        if test -d "$BOOT_JDK"; then
14084          BOOT_JDK_FOUND=maybe
14085          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14086$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14087        fi
14088
14089
14090    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14091    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14092      # Do we have a bin/java?
14093      if test ! -x "$BOOT_JDK/bin/java"; then
14094        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14096        BOOT_JDK_FOUND=no
14097      else
14098        # Do we have a bin/javac?
14099        if test ! -x "$BOOT_JDK/bin/javac"; then
14100          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14102          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14103$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14104          BOOT_JDK_FOUND=no
14105        else
14106          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14107          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14108            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14110            BOOT_JDK_FOUND=no
14111          else
14112            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14114
14115            # Extra M4 quote needed to protect [] in grep expression.
14116            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14117            if test "x$FOUND_VERSION_78" = x; then
14118              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14120              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14121$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14122              BOOT_JDK_FOUND=no
14123            else
14124              # We're done! :-)
14125              BOOT_JDK_FOUND=yes
14126
14127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14128
14129  # Input might be given as Windows format, start by converting to
14130  # unix format.
14131  path="$BOOT_JDK"
14132  new_path=`$CYGPATH -u "$path"`
14133
14134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14137  # "foo.exe" is OK but "foo" is an error.
14138  #
14139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14140  # It is also a way to make sure we got the proper file name for the real test later on.
14141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14142  if test "x$test_shortpath" = x; then
14143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14146  fi
14147
14148  # Call helper function which possibly converts this using DOS-style short mode.
14149  # If so, the updated path is stored in $new_path.
14150
14151  input_path="$new_path"
14152  # Check if we need to convert this using DOS-style short mode. If the path
14153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14154  # take no chances and rewrite it.
14155  # Note: m4 eats our [], so we need to use [ and ] instead.
14156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14157  if test "x$has_forbidden_chars" != x; then
14158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14162      # Going to short mode and back again did indeed matter. Since short mode is
14163      # case insensitive, let's make it lowercase to improve readability.
14164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14165      # Now convert it back to Unix-stile (cygpath)
14166      input_path=`$CYGPATH -u "$shortmode_path"`
14167      new_path="$input_path"
14168    fi
14169  fi
14170
14171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14172  if test "x$test_cygdrive_prefix" = x; then
14173    # As a simple fix, exclude /usr/bin since it's not a real path.
14174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14176      # a path prefixed by /cygdrive for fixpath to work.
14177      new_path="$CYGWIN_ROOT_PATH$input_path"
14178    fi
14179  fi
14180
14181
14182  if test "x$path" != "x$new_path"; then
14183    BOOT_JDK="$new_path"
14184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14186  fi
14187
14188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14189
14190  path="$BOOT_JDK"
14191  has_colon=`$ECHO $path | $GREP ^.:`
14192  new_path="$path"
14193  if test "x$has_colon" = x; then
14194    # Not in mixed or Windows style, start by that.
14195    new_path=`cmd //c echo $path`
14196  fi
14197
14198
14199  input_path="$new_path"
14200  # Check if we need to convert this using DOS-style short mode. If the path
14201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14202  # take no chances and rewrite it.
14203  # Note: m4 eats our [], so we need to use [ and ] instead.
14204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14205  if test "x$has_forbidden_chars" != x; then
14206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14208  fi
14209
14210
14211  windows_path="$new_path"
14212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14213    unix_path=`$CYGPATH -u "$windows_path"`
14214    new_path="$unix_path"
14215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14217    new_path="$unix_path"
14218  fi
14219
14220  if test "x$path" != "x$new_path"; then
14221    BOOT_JDK="$new_path"
14222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14224  fi
14225
14226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14228
14229  else
14230    # We're on a posix platform. Hooray! :)
14231    path="$BOOT_JDK"
14232    has_space=`$ECHO "$path" | $GREP " "`
14233    if test "x$has_space" != x; then
14234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14236      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14237    fi
14238
14239    # Use eval to expand a potential ~
14240    eval path="$path"
14241    if test ! -f "$path" && test ! -d "$path"; then
14242      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14243    fi
14244
14245    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14246  fi
14247
14248              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14249$as_echo_n "checking for Boot JDK... " >&6; }
14250              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14251$as_echo "$BOOT_JDK" >&6; }
14252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14253$as_echo_n "checking Boot JDK version... " >&6; }
14254              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14255              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14256$as_echo "$BOOT_JDK_VERSION" >&6; }
14257            fi # end check jdk version
14258          fi # end check rt.jar
14259        fi # end check javac
14260      fi # end check java
14261    fi # end check boot jdk found
14262  fi
14263
14264    done
14265  fi
14266
14267
14268    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14269    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14270      # Do we have a bin/java?
14271      if test ! -x "$BOOT_JDK/bin/java"; then
14272        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14274        BOOT_JDK_FOUND=no
14275      else
14276        # Do we have a bin/javac?
14277        if test ! -x "$BOOT_JDK/bin/javac"; then
14278          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14280          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14281$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14282          BOOT_JDK_FOUND=no
14283        else
14284          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14285          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14288            BOOT_JDK_FOUND=no
14289          else
14290            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14292
14293            # Extra M4 quote needed to protect [] in grep expression.
14294            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14295            if test "x$FOUND_VERSION_78" = x; then
14296              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14298              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14299$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14300              BOOT_JDK_FOUND=no
14301            else
14302              # We're done! :-)
14303              BOOT_JDK_FOUND=yes
14304
14305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14306
14307  # Input might be given as Windows format, start by converting to
14308  # unix format.
14309  path="$BOOT_JDK"
14310  new_path=`$CYGPATH -u "$path"`
14311
14312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14315  # "foo.exe" is OK but "foo" is an error.
14316  #
14317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14318  # It is also a way to make sure we got the proper file name for the real test later on.
14319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14320  if test "x$test_shortpath" = x; then
14321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14323    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14324  fi
14325
14326  # Call helper function which possibly converts this using DOS-style short mode.
14327  # If so, the updated path is stored in $new_path.
14328
14329  input_path="$new_path"
14330  # Check if we need to convert this using DOS-style short mode. If the path
14331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14332  # take no chances and rewrite it.
14333  # Note: m4 eats our [], so we need to use [ and ] instead.
14334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14335  if test "x$has_forbidden_chars" != x; then
14336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14340      # Going to short mode and back again did indeed matter. Since short mode is
14341      # case insensitive, let's make it lowercase to improve readability.
14342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14343      # Now convert it back to Unix-stile (cygpath)
14344      input_path=`$CYGPATH -u "$shortmode_path"`
14345      new_path="$input_path"
14346    fi
14347  fi
14348
14349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14350  if test "x$test_cygdrive_prefix" = x; then
14351    # As a simple fix, exclude /usr/bin since it's not a real path.
14352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14354      # a path prefixed by /cygdrive for fixpath to work.
14355      new_path="$CYGWIN_ROOT_PATH$input_path"
14356    fi
14357  fi
14358
14359
14360  if test "x$path" != "x$new_path"; then
14361    BOOT_JDK="$new_path"
14362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14364  fi
14365
14366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14367
14368  path="$BOOT_JDK"
14369  has_colon=`$ECHO $path | $GREP ^.:`
14370  new_path="$path"
14371  if test "x$has_colon" = x; then
14372    # Not in mixed or Windows style, start by that.
14373    new_path=`cmd //c echo $path`
14374  fi
14375
14376
14377  input_path="$new_path"
14378  # Check if we need to convert this using DOS-style short mode. If the path
14379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14380  # take no chances and rewrite it.
14381  # Note: m4 eats our [], so we need to use [ and ] instead.
14382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14383  if test "x$has_forbidden_chars" != x; then
14384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14386  fi
14387
14388
14389  windows_path="$new_path"
14390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14391    unix_path=`$CYGPATH -u "$windows_path"`
14392    new_path="$unix_path"
14393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14395    new_path="$unix_path"
14396  fi
14397
14398  if test "x$path" != "x$new_path"; then
14399    BOOT_JDK="$new_path"
14400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14402  fi
14403
14404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14406
14407  else
14408    # We're on a posix platform. Hooray! :)
14409    path="$BOOT_JDK"
14410    has_space=`$ECHO "$path" | $GREP " "`
14411    if test "x$has_space" != x; then
14412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14414      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14415    fi
14416
14417    # Use eval to expand a potential ~
14418    eval path="$path"
14419    if test ! -f "$path" && test ! -d "$path"; then
14420      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14421    fi
14422
14423    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14424  fi
14425
14426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14427$as_echo_n "checking for Boot JDK... " >&6; }
14428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14429$as_echo "$BOOT_JDK" >&6; }
14430              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14431$as_echo_n "checking Boot JDK version... " >&6; }
14432              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14433              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14434$as_echo "$BOOT_JDK_VERSION" >&6; }
14435            fi # end check jdk version
14436          fi # end check rt.jar
14437        fi # end check javac
14438      fi # end check java
14439    fi # end check boot jdk found
14440  fi
14441
14442  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14443
14444  if test "x$BOOT_JDK_FOUND" = xno; then
14445    # Now execute the test
14446
14447  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14448  BOOT_JDK_SUFFIX="/Contents/Home"
14449  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14450  if test "x$ALL_JDKS_FOUND" != x; then
14451    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14452
14453  if test "x$BOOT_JDK_FOUND" = xno; then
14454    # Now execute the test
14455
14456        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14457        if test -d "$BOOT_JDK"; then
14458          BOOT_JDK_FOUND=maybe
14459          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14460$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14461        fi
14462
14463
14464    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14465    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14466      # Do we have a bin/java?
14467      if test ! -x "$BOOT_JDK/bin/java"; then
14468        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14470        BOOT_JDK_FOUND=no
14471      else
14472        # Do we have a bin/javac?
14473        if test ! -x "$BOOT_JDK/bin/javac"; then
14474          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14477$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14478          BOOT_JDK_FOUND=no
14479        else
14480          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14481          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14482            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14484            BOOT_JDK_FOUND=no
14485          else
14486            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14487            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14488
14489            # Extra M4 quote needed to protect [] in grep expression.
14490            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14491            if test "x$FOUND_VERSION_78" = x; then
14492              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14494              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14495$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14496              BOOT_JDK_FOUND=no
14497            else
14498              # We're done! :-)
14499              BOOT_JDK_FOUND=yes
14500
14501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14502
14503  # Input might be given as Windows format, start by converting to
14504  # unix format.
14505  path="$BOOT_JDK"
14506  new_path=`$CYGPATH -u "$path"`
14507
14508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14511  # "foo.exe" is OK but "foo" is an error.
14512  #
14513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14514  # It is also a way to make sure we got the proper file name for the real test later on.
14515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14516  if test "x$test_shortpath" = x; then
14517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14520  fi
14521
14522  # Call helper function which possibly converts this using DOS-style short mode.
14523  # If so, the updated path is stored in $new_path.
14524
14525  input_path="$new_path"
14526  # Check if we need to convert this using DOS-style short mode. If the path
14527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14528  # take no chances and rewrite it.
14529  # Note: m4 eats our [], so we need to use [ and ] instead.
14530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14531  if test "x$has_forbidden_chars" != x; then
14532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14536      # Going to short mode and back again did indeed matter. Since short mode is
14537      # case insensitive, let's make it lowercase to improve readability.
14538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14539      # Now convert it back to Unix-stile (cygpath)
14540      input_path=`$CYGPATH -u "$shortmode_path"`
14541      new_path="$input_path"
14542    fi
14543  fi
14544
14545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14546  if test "x$test_cygdrive_prefix" = x; then
14547    # As a simple fix, exclude /usr/bin since it's not a real path.
14548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14550      # a path prefixed by /cygdrive for fixpath to work.
14551      new_path="$CYGWIN_ROOT_PATH$input_path"
14552    fi
14553  fi
14554
14555
14556  if test "x$path" != "x$new_path"; then
14557    BOOT_JDK="$new_path"
14558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14560  fi
14561
14562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14563
14564  path="$BOOT_JDK"
14565  has_colon=`$ECHO $path | $GREP ^.:`
14566  new_path="$path"
14567  if test "x$has_colon" = x; then
14568    # Not in mixed or Windows style, start by that.
14569    new_path=`cmd //c echo $path`
14570  fi
14571
14572
14573  input_path="$new_path"
14574  # Check if we need to convert this using DOS-style short mode. If the path
14575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14576  # take no chances and rewrite it.
14577  # Note: m4 eats our [], so we need to use [ and ] instead.
14578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14579  if test "x$has_forbidden_chars" != x; then
14580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14582  fi
14583
14584
14585  windows_path="$new_path"
14586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14587    unix_path=`$CYGPATH -u "$windows_path"`
14588    new_path="$unix_path"
14589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14591    new_path="$unix_path"
14592  fi
14593
14594  if test "x$path" != "x$new_path"; then
14595    BOOT_JDK="$new_path"
14596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14598  fi
14599
14600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14602
14603  else
14604    # We're on a posix platform. Hooray! :)
14605    path="$BOOT_JDK"
14606    has_space=`$ECHO "$path" | $GREP " "`
14607    if test "x$has_space" != x; then
14608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14610      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14611    fi
14612
14613    # Use eval to expand a potential ~
14614    eval path="$path"
14615    if test ! -f "$path" && test ! -d "$path"; then
14616      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14617    fi
14618
14619    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14620  fi
14621
14622              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14623$as_echo_n "checking for Boot JDK... " >&6; }
14624              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14625$as_echo "$BOOT_JDK" >&6; }
14626              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14627$as_echo_n "checking Boot JDK version... " >&6; }
14628              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14630$as_echo "$BOOT_JDK_VERSION" >&6; }
14631            fi # end check jdk version
14632          fi # end check rt.jar
14633        fi # end check javac
14634      fi # end check java
14635    fi # end check boot jdk found
14636  fi
14637
14638    done
14639  fi
14640
14641
14642    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14643    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14644      # Do we have a bin/java?
14645      if test ! -x "$BOOT_JDK/bin/java"; then
14646        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14648        BOOT_JDK_FOUND=no
14649      else
14650        # Do we have a bin/javac?
14651        if test ! -x "$BOOT_JDK/bin/javac"; then
14652          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14654          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14655$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14656          BOOT_JDK_FOUND=no
14657        else
14658          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14659          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14660            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14662            BOOT_JDK_FOUND=no
14663          else
14664            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14665            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14666
14667            # Extra M4 quote needed to protect [] in grep expression.
14668            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14669            if test "x$FOUND_VERSION_78" = x; then
14670              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14672              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14673$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14674              BOOT_JDK_FOUND=no
14675            else
14676              # We're done! :-)
14677              BOOT_JDK_FOUND=yes
14678
14679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14680
14681  # Input might be given as Windows format, start by converting to
14682  # unix format.
14683  path="$BOOT_JDK"
14684  new_path=`$CYGPATH -u "$path"`
14685
14686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14689  # "foo.exe" is OK but "foo" is an error.
14690  #
14691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14692  # It is also a way to make sure we got the proper file name for the real test later on.
14693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14694  if test "x$test_shortpath" = x; then
14695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14696$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14697    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14698  fi
14699
14700  # Call helper function which possibly converts this using DOS-style short mode.
14701  # If so, the updated path is stored in $new_path.
14702
14703  input_path="$new_path"
14704  # Check if we need to convert this using DOS-style short mode. If the path
14705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14706  # take no chances and rewrite it.
14707  # Note: m4 eats our [], so we need to use [ and ] instead.
14708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14709  if test "x$has_forbidden_chars" != x; then
14710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14714      # Going to short mode and back again did indeed matter. Since short mode is
14715      # case insensitive, let's make it lowercase to improve readability.
14716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14717      # Now convert it back to Unix-stile (cygpath)
14718      input_path=`$CYGPATH -u "$shortmode_path"`
14719      new_path="$input_path"
14720    fi
14721  fi
14722
14723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14724  if test "x$test_cygdrive_prefix" = x; then
14725    # As a simple fix, exclude /usr/bin since it's not a real path.
14726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14728      # a path prefixed by /cygdrive for fixpath to work.
14729      new_path="$CYGWIN_ROOT_PATH$input_path"
14730    fi
14731  fi
14732
14733
14734  if test "x$path" != "x$new_path"; then
14735    BOOT_JDK="$new_path"
14736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14738  fi
14739
14740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14741
14742  path="$BOOT_JDK"
14743  has_colon=`$ECHO $path | $GREP ^.:`
14744  new_path="$path"
14745  if test "x$has_colon" = x; then
14746    # Not in mixed or Windows style, start by that.
14747    new_path=`cmd //c echo $path`
14748  fi
14749
14750
14751  input_path="$new_path"
14752  # Check if we need to convert this using DOS-style short mode. If the path
14753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14754  # take no chances and rewrite it.
14755  # Note: m4 eats our [], so we need to use [ and ] instead.
14756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14757  if test "x$has_forbidden_chars" != x; then
14758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14760  fi
14761
14762
14763  windows_path="$new_path"
14764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14765    unix_path=`$CYGPATH -u "$windows_path"`
14766    new_path="$unix_path"
14767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14769    new_path="$unix_path"
14770  fi
14771
14772  if test "x$path" != "x$new_path"; then
14773    BOOT_JDK="$new_path"
14774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14775$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14776  fi
14777
14778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14780
14781  else
14782    # We're on a posix platform. Hooray! :)
14783    path="$BOOT_JDK"
14784    has_space=`$ECHO "$path" | $GREP " "`
14785    if test "x$has_space" != x; then
14786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14788      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14789    fi
14790
14791    # Use eval to expand a potential ~
14792    eval path="$path"
14793    if test ! -f "$path" && test ! -d "$path"; then
14794      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14795    fi
14796
14797    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14798  fi
14799
14800              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14801$as_echo_n "checking for Boot JDK... " >&6; }
14802              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14803$as_echo "$BOOT_JDK" >&6; }
14804              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14805$as_echo_n "checking Boot JDK version... " >&6; }
14806              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14807              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14808$as_echo "$BOOT_JDK_VERSION" >&6; }
14809            fi # end check jdk version
14810          fi # end check rt.jar
14811        fi # end check javac
14812      fi # end check java
14813    fi # end check boot jdk found
14814  fi
14815
14816
14817  if test "x$BOOT_JDK_FOUND" = xno; then
14818    # Now execute the test
14819
14820  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14821  BOOT_JDK_SUFFIX="/Contents/Home"
14822  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14823  if test "x$ALL_JDKS_FOUND" != x; then
14824    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14825
14826  if test "x$BOOT_JDK_FOUND" = xno; then
14827    # Now execute the test
14828
14829        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14830        if test -d "$BOOT_JDK"; then
14831          BOOT_JDK_FOUND=maybe
14832          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14833$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14834        fi
14835
14836
14837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14839      # Do we have a bin/java?
14840      if test ! -x "$BOOT_JDK/bin/java"; then
14841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14843        BOOT_JDK_FOUND=no
14844      else
14845        # Do we have a bin/javac?
14846        if test ! -x "$BOOT_JDK/bin/javac"; then
14847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14851          BOOT_JDK_FOUND=no
14852        else
14853          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14854          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14857            BOOT_JDK_FOUND=no
14858          else
14859            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14861
14862            # Extra M4 quote needed to protect [] in grep expression.
14863            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14864            if test "x$FOUND_VERSION_78" = x; then
14865              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14867              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14868$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14869              BOOT_JDK_FOUND=no
14870            else
14871              # We're done! :-)
14872              BOOT_JDK_FOUND=yes
14873
14874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14875
14876  # Input might be given as Windows format, start by converting to
14877  # unix format.
14878  path="$BOOT_JDK"
14879  new_path=`$CYGPATH -u "$path"`
14880
14881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14884  # "foo.exe" is OK but "foo" is an error.
14885  #
14886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14887  # It is also a way to make sure we got the proper file name for the real test later on.
14888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14889  if test "x$test_shortpath" = x; then
14890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14893  fi
14894
14895  # Call helper function which possibly converts this using DOS-style short mode.
14896  # If so, the updated path is stored in $new_path.
14897
14898  input_path="$new_path"
14899  # Check if we need to convert this using DOS-style short mode. If the path
14900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14901  # take no chances and rewrite it.
14902  # Note: m4 eats our [], so we need to use [ and ] instead.
14903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14904  if test "x$has_forbidden_chars" != x; then
14905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14909      # Going to short mode and back again did indeed matter. Since short mode is
14910      # case insensitive, let's make it lowercase to improve readability.
14911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14912      # Now convert it back to Unix-stile (cygpath)
14913      input_path=`$CYGPATH -u "$shortmode_path"`
14914      new_path="$input_path"
14915    fi
14916  fi
14917
14918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14919  if test "x$test_cygdrive_prefix" = x; then
14920    # As a simple fix, exclude /usr/bin since it's not a real path.
14921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14923      # a path prefixed by /cygdrive for fixpath to work.
14924      new_path="$CYGWIN_ROOT_PATH$input_path"
14925    fi
14926  fi
14927
14928
14929  if test "x$path" != "x$new_path"; then
14930    BOOT_JDK="$new_path"
14931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14933  fi
14934
14935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14936
14937  path="$BOOT_JDK"
14938  has_colon=`$ECHO $path | $GREP ^.:`
14939  new_path="$path"
14940  if test "x$has_colon" = x; then
14941    # Not in mixed or Windows style, start by that.
14942    new_path=`cmd //c echo $path`
14943  fi
14944
14945
14946  input_path="$new_path"
14947  # Check if we need to convert this using DOS-style short mode. If the path
14948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14949  # take no chances and rewrite it.
14950  # Note: m4 eats our [], so we need to use [ and ] instead.
14951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14952  if test "x$has_forbidden_chars" != x; then
14953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14955  fi
14956
14957
14958  windows_path="$new_path"
14959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14960    unix_path=`$CYGPATH -u "$windows_path"`
14961    new_path="$unix_path"
14962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14964    new_path="$unix_path"
14965  fi
14966
14967  if test "x$path" != "x$new_path"; then
14968    BOOT_JDK="$new_path"
14969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14971  fi
14972
14973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14975
14976  else
14977    # We're on a posix platform. Hooray! :)
14978    path="$BOOT_JDK"
14979    has_space=`$ECHO "$path" | $GREP " "`
14980    if test "x$has_space" != x; then
14981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14984    fi
14985
14986    # Use eval to expand a potential ~
14987    eval path="$path"
14988    if test ! -f "$path" && test ! -d "$path"; then
14989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14990    fi
14991
14992    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14993  fi
14994
14995              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14996$as_echo_n "checking for Boot JDK... " >&6; }
14997              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14998$as_echo "$BOOT_JDK" >&6; }
14999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15000$as_echo_n "checking Boot JDK version... " >&6; }
15001              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15003$as_echo "$BOOT_JDK_VERSION" >&6; }
15004            fi # end check jdk version
15005          fi # end check rt.jar
15006        fi # end check javac
15007      fi # end check java
15008    fi # end check boot jdk found
15009  fi
15010
15011    done
15012  fi
15013
15014
15015    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15016    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15017      # Do we have a bin/java?
15018      if test ! -x "$BOOT_JDK/bin/java"; then
15019        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15021        BOOT_JDK_FOUND=no
15022      else
15023        # Do we have a bin/javac?
15024        if test ! -x "$BOOT_JDK/bin/javac"; then
15025          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15027          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15028$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15029          BOOT_JDK_FOUND=no
15030        else
15031          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15032          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15035            BOOT_JDK_FOUND=no
15036          else
15037            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15039
15040            # Extra M4 quote needed to protect [] in grep expression.
15041            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15042            if test "x$FOUND_VERSION_78" = x; then
15043              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15045              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15046$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15047              BOOT_JDK_FOUND=no
15048            else
15049              # We're done! :-)
15050              BOOT_JDK_FOUND=yes
15051
15052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15053
15054  # Input might be given as Windows format, start by converting to
15055  # unix format.
15056  path="$BOOT_JDK"
15057  new_path=`$CYGPATH -u "$path"`
15058
15059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15062  # "foo.exe" is OK but "foo" is an error.
15063  #
15064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15065  # It is also a way to make sure we got the proper file name for the real test later on.
15066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15067  if test "x$test_shortpath" = x; then
15068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15069$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15070    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15071  fi
15072
15073  # Call helper function which possibly converts this using DOS-style short mode.
15074  # If so, the updated path is stored in $new_path.
15075
15076  input_path="$new_path"
15077  # Check if we need to convert this using DOS-style short mode. If the path
15078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15079  # take no chances and rewrite it.
15080  # Note: m4 eats our [], so we need to use [ and ] instead.
15081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15082  if test "x$has_forbidden_chars" != x; then
15083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15087      # Going to short mode and back again did indeed matter. Since short mode is
15088      # case insensitive, let's make it lowercase to improve readability.
15089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15090      # Now convert it back to Unix-stile (cygpath)
15091      input_path=`$CYGPATH -u "$shortmode_path"`
15092      new_path="$input_path"
15093    fi
15094  fi
15095
15096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15097  if test "x$test_cygdrive_prefix" = x; then
15098    # As a simple fix, exclude /usr/bin since it's not a real path.
15099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15101      # a path prefixed by /cygdrive for fixpath to work.
15102      new_path="$CYGWIN_ROOT_PATH$input_path"
15103    fi
15104  fi
15105
15106
15107  if test "x$path" != "x$new_path"; then
15108    BOOT_JDK="$new_path"
15109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15111  fi
15112
15113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15114
15115  path="$BOOT_JDK"
15116  has_colon=`$ECHO $path | $GREP ^.:`
15117  new_path="$path"
15118  if test "x$has_colon" = x; then
15119    # Not in mixed or Windows style, start by that.
15120    new_path=`cmd //c echo $path`
15121  fi
15122
15123
15124  input_path="$new_path"
15125  # Check if we need to convert this using DOS-style short mode. If the path
15126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15127  # take no chances and rewrite it.
15128  # Note: m4 eats our [], so we need to use [ and ] instead.
15129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15130  if test "x$has_forbidden_chars" != x; then
15131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15133  fi
15134
15135
15136  windows_path="$new_path"
15137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15138    unix_path=`$CYGPATH -u "$windows_path"`
15139    new_path="$unix_path"
15140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15142    new_path="$unix_path"
15143  fi
15144
15145  if test "x$path" != "x$new_path"; then
15146    BOOT_JDK="$new_path"
15147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15149  fi
15150
15151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15153
15154  else
15155    # We're on a posix platform. Hooray! :)
15156    path="$BOOT_JDK"
15157    has_space=`$ECHO "$path" | $GREP " "`
15158    if test "x$has_space" != x; then
15159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15161      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15162    fi
15163
15164    # Use eval to expand a potential ~
15165    eval path="$path"
15166    if test ! -f "$path" && test ! -d "$path"; then
15167      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15168    fi
15169
15170    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15171  fi
15172
15173              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15174$as_echo_n "checking for Boot JDK... " >&6; }
15175              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15176$as_echo "$BOOT_JDK" >&6; }
15177              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15178$as_echo_n "checking Boot JDK version... " >&6; }
15179              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15180              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15181$as_echo "$BOOT_JDK_VERSION" >&6; }
15182            fi # end check jdk version
15183          fi # end check rt.jar
15184        fi # end check javac
15185      fi # end check java
15186    fi # end check boot jdk found
15187  fi
15188
15189  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15190
15191  if test "x$BOOT_JDK_FOUND" = xno; then
15192    # Now execute the test
15193
15194  BOOT_JDK_PREFIX="/usr/lib/jvm"
15195  BOOT_JDK_SUFFIX=""
15196  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15197  if test "x$ALL_JDKS_FOUND" != x; then
15198    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15199
15200  if test "x$BOOT_JDK_FOUND" = xno; then
15201    # Now execute the test
15202
15203        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15204        if test -d "$BOOT_JDK"; then
15205          BOOT_JDK_FOUND=maybe
15206          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15207$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15208        fi
15209
15210
15211    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15212    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15213      # Do we have a bin/java?
15214      if test ! -x "$BOOT_JDK/bin/java"; then
15215        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15217        BOOT_JDK_FOUND=no
15218      else
15219        # Do we have a bin/javac?
15220        if test ! -x "$BOOT_JDK/bin/javac"; then
15221          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15223          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15224$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15225          BOOT_JDK_FOUND=no
15226        else
15227          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15228          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15231            BOOT_JDK_FOUND=no
15232          else
15233            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15235
15236            # Extra M4 quote needed to protect [] in grep expression.
15237            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15238            if test "x$FOUND_VERSION_78" = x; then
15239              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15241              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15242$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15243              BOOT_JDK_FOUND=no
15244            else
15245              # We're done! :-)
15246              BOOT_JDK_FOUND=yes
15247
15248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15249
15250  # Input might be given as Windows format, start by converting to
15251  # unix format.
15252  path="$BOOT_JDK"
15253  new_path=`$CYGPATH -u "$path"`
15254
15255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15258  # "foo.exe" is OK but "foo" is an error.
15259  #
15260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15261  # It is also a way to make sure we got the proper file name for the real test later on.
15262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15263  if test "x$test_shortpath" = x; then
15264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15267  fi
15268
15269  # Call helper function which possibly converts this using DOS-style short mode.
15270  # If so, the updated path is stored in $new_path.
15271
15272  input_path="$new_path"
15273  # Check if we need to convert this using DOS-style short mode. If the path
15274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15275  # take no chances and rewrite it.
15276  # Note: m4 eats our [], so we need to use [ and ] instead.
15277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15278  if test "x$has_forbidden_chars" != x; then
15279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15283      # Going to short mode and back again did indeed matter. Since short mode is
15284      # case insensitive, let's make it lowercase to improve readability.
15285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15286      # Now convert it back to Unix-stile (cygpath)
15287      input_path=`$CYGPATH -u "$shortmode_path"`
15288      new_path="$input_path"
15289    fi
15290  fi
15291
15292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15293  if test "x$test_cygdrive_prefix" = x; then
15294    # As a simple fix, exclude /usr/bin since it's not a real path.
15295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15297      # a path prefixed by /cygdrive for fixpath to work.
15298      new_path="$CYGWIN_ROOT_PATH$input_path"
15299    fi
15300  fi
15301
15302
15303  if test "x$path" != "x$new_path"; then
15304    BOOT_JDK="$new_path"
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15307  fi
15308
15309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15310
15311  path="$BOOT_JDK"
15312  has_colon=`$ECHO $path | $GREP ^.:`
15313  new_path="$path"
15314  if test "x$has_colon" = x; then
15315    # Not in mixed or Windows style, start by that.
15316    new_path=`cmd //c echo $path`
15317  fi
15318
15319
15320  input_path="$new_path"
15321  # Check if we need to convert this using DOS-style short mode. If the path
15322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15323  # take no chances and rewrite it.
15324  # Note: m4 eats our [], so we need to use [ and ] instead.
15325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15326  if test "x$has_forbidden_chars" != x; then
15327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15329  fi
15330
15331
15332  windows_path="$new_path"
15333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15334    unix_path=`$CYGPATH -u "$windows_path"`
15335    new_path="$unix_path"
15336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15338    new_path="$unix_path"
15339  fi
15340
15341  if test "x$path" != "x$new_path"; then
15342    BOOT_JDK="$new_path"
15343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15345  fi
15346
15347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15349
15350  else
15351    # We're on a posix platform. Hooray! :)
15352    path="$BOOT_JDK"
15353    has_space=`$ECHO "$path" | $GREP " "`
15354    if test "x$has_space" != x; then
15355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15357      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15358    fi
15359
15360    # Use eval to expand a potential ~
15361    eval path="$path"
15362    if test ! -f "$path" && test ! -d "$path"; then
15363      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15364    fi
15365
15366    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15367  fi
15368
15369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15370$as_echo_n "checking for Boot JDK... " >&6; }
15371              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15372$as_echo "$BOOT_JDK" >&6; }
15373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15374$as_echo_n "checking Boot JDK version... " >&6; }
15375              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15377$as_echo "$BOOT_JDK_VERSION" >&6; }
15378            fi # end check jdk version
15379          fi # end check rt.jar
15380        fi # end check javac
15381      fi # end check java
15382    fi # end check boot jdk found
15383  fi
15384
15385    done
15386  fi
15387
15388
15389    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15390    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15391      # Do we have a bin/java?
15392      if test ! -x "$BOOT_JDK/bin/java"; then
15393        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15395        BOOT_JDK_FOUND=no
15396      else
15397        # Do we have a bin/javac?
15398        if test ! -x "$BOOT_JDK/bin/javac"; then
15399          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15401          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15402$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15403          BOOT_JDK_FOUND=no
15404        else
15405          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15406          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15407            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15409            BOOT_JDK_FOUND=no
15410          else
15411            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15412            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15413
15414            # Extra M4 quote needed to protect [] in grep expression.
15415            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15416            if test "x$FOUND_VERSION_78" = x; then
15417              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15419              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15420$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15421              BOOT_JDK_FOUND=no
15422            else
15423              # We're done! :-)
15424              BOOT_JDK_FOUND=yes
15425
15426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15427
15428  # Input might be given as Windows format, start by converting to
15429  # unix format.
15430  path="$BOOT_JDK"
15431  new_path=`$CYGPATH -u "$path"`
15432
15433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15436  # "foo.exe" is OK but "foo" is an error.
15437  #
15438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15439  # It is also a way to make sure we got the proper file name for the real test later on.
15440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15441  if test "x$test_shortpath" = x; then
15442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15445  fi
15446
15447  # Call helper function which possibly converts this using DOS-style short mode.
15448  # If so, the updated path is stored in $new_path.
15449
15450  input_path="$new_path"
15451  # Check if we need to convert this using DOS-style short mode. If the path
15452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15453  # take no chances and rewrite it.
15454  # Note: m4 eats our [], so we need to use [ and ] instead.
15455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15456  if test "x$has_forbidden_chars" != x; then
15457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15461      # Going to short mode and back again did indeed matter. Since short mode is
15462      # case insensitive, let's make it lowercase to improve readability.
15463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15464      # Now convert it back to Unix-stile (cygpath)
15465      input_path=`$CYGPATH -u "$shortmode_path"`
15466      new_path="$input_path"
15467    fi
15468  fi
15469
15470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15471  if test "x$test_cygdrive_prefix" = x; then
15472    # As a simple fix, exclude /usr/bin since it's not a real path.
15473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15475      # a path prefixed by /cygdrive for fixpath to work.
15476      new_path="$CYGWIN_ROOT_PATH$input_path"
15477    fi
15478  fi
15479
15480
15481  if test "x$path" != "x$new_path"; then
15482    BOOT_JDK="$new_path"
15483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15485  fi
15486
15487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15488
15489  path="$BOOT_JDK"
15490  has_colon=`$ECHO $path | $GREP ^.:`
15491  new_path="$path"
15492  if test "x$has_colon" = x; then
15493    # Not in mixed or Windows style, start by that.
15494    new_path=`cmd //c echo $path`
15495  fi
15496
15497
15498  input_path="$new_path"
15499  # Check if we need to convert this using DOS-style short mode. If the path
15500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15501  # take no chances and rewrite it.
15502  # Note: m4 eats our [], so we need to use [ and ] instead.
15503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15504  if test "x$has_forbidden_chars" != x; then
15505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15507  fi
15508
15509
15510  windows_path="$new_path"
15511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15512    unix_path=`$CYGPATH -u "$windows_path"`
15513    new_path="$unix_path"
15514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15516    new_path="$unix_path"
15517  fi
15518
15519  if test "x$path" != "x$new_path"; then
15520    BOOT_JDK="$new_path"
15521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15523  fi
15524
15525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15527
15528  else
15529    # We're on a posix platform. Hooray! :)
15530    path="$BOOT_JDK"
15531    has_space=`$ECHO "$path" | $GREP " "`
15532    if test "x$has_space" != x; then
15533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15536    fi
15537
15538    # Use eval to expand a potential ~
15539    eval path="$path"
15540    if test ! -f "$path" && test ! -d "$path"; then
15541      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15542    fi
15543
15544    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15545  fi
15546
15547              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15548$as_echo_n "checking for Boot JDK... " >&6; }
15549              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15550$as_echo "$BOOT_JDK" >&6; }
15551              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15552$as_echo_n "checking Boot JDK version... " >&6; }
15553              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15555$as_echo "$BOOT_JDK_VERSION" >&6; }
15556            fi # end check jdk version
15557          fi # end check rt.jar
15558        fi # end check javac
15559      fi # end check java
15560    fi # end check boot jdk found
15561  fi
15562
15563  fi
15564
15565
15566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15568      # Do we have a bin/java?
15569      if test ! -x "$BOOT_JDK/bin/java"; then
15570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15572        BOOT_JDK_FOUND=no
15573      else
15574        # Do we have a bin/javac?
15575        if test ! -x "$BOOT_JDK/bin/javac"; then
15576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15580          BOOT_JDK_FOUND=no
15581        else
15582          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15583          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15586            BOOT_JDK_FOUND=no
15587          else
15588            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15589            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15590
15591            # Extra M4 quote needed to protect [] in grep expression.
15592            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15593            if test "x$FOUND_VERSION_78" = x; then
15594              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15596              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15597$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15598              BOOT_JDK_FOUND=no
15599            else
15600              # We're done! :-)
15601              BOOT_JDK_FOUND=yes
15602
15603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15604
15605  # Input might be given as Windows format, start by converting to
15606  # unix format.
15607  path="$BOOT_JDK"
15608  new_path=`$CYGPATH -u "$path"`
15609
15610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15613  # "foo.exe" is OK but "foo" is an error.
15614  #
15615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15616  # It is also a way to make sure we got the proper file name for the real test later on.
15617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15618  if test "x$test_shortpath" = x; then
15619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15621    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15622  fi
15623
15624  # Call helper function which possibly converts this using DOS-style short mode.
15625  # If so, the updated path is stored in $new_path.
15626
15627  input_path="$new_path"
15628  # Check if we need to convert this using DOS-style short mode. If the path
15629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15630  # take no chances and rewrite it.
15631  # Note: m4 eats our [], so we need to use [ and ] instead.
15632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15633  if test "x$has_forbidden_chars" != x; then
15634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15638      # Going to short mode and back again did indeed matter. Since short mode is
15639      # case insensitive, let's make it lowercase to improve readability.
15640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15641      # Now convert it back to Unix-stile (cygpath)
15642      input_path=`$CYGPATH -u "$shortmode_path"`
15643      new_path="$input_path"
15644    fi
15645  fi
15646
15647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15648  if test "x$test_cygdrive_prefix" = x; then
15649    # As a simple fix, exclude /usr/bin since it's not a real path.
15650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15652      # a path prefixed by /cygdrive for fixpath to work.
15653      new_path="$CYGWIN_ROOT_PATH$input_path"
15654    fi
15655  fi
15656
15657
15658  if test "x$path" != "x$new_path"; then
15659    BOOT_JDK="$new_path"
15660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15662  fi
15663
15664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15665
15666  path="$BOOT_JDK"
15667  has_colon=`$ECHO $path | $GREP ^.:`
15668  new_path="$path"
15669  if test "x$has_colon" = x; then
15670    # Not in mixed or Windows style, start by that.
15671    new_path=`cmd //c echo $path`
15672  fi
15673
15674
15675  input_path="$new_path"
15676  # Check if we need to convert this using DOS-style short mode. If the path
15677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15678  # take no chances and rewrite it.
15679  # Note: m4 eats our [], so we need to use [ and ] instead.
15680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15681  if test "x$has_forbidden_chars" != x; then
15682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15684  fi
15685
15686
15687  windows_path="$new_path"
15688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15689    unix_path=`$CYGPATH -u "$windows_path"`
15690    new_path="$unix_path"
15691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15693    new_path="$unix_path"
15694  fi
15695
15696  if test "x$path" != "x$new_path"; then
15697    BOOT_JDK="$new_path"
15698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15700  fi
15701
15702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15704
15705  else
15706    # We're on a posix platform. Hooray! :)
15707    path="$BOOT_JDK"
15708    has_space=`$ECHO "$path" | $GREP " "`
15709    if test "x$has_space" != x; then
15710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15713    fi
15714
15715    # Use eval to expand a potential ~
15716    eval path="$path"
15717    if test ! -f "$path" && test ! -d "$path"; then
15718      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15719    fi
15720
15721    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15722  fi
15723
15724              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15725$as_echo_n "checking for Boot JDK... " >&6; }
15726              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15727$as_echo "$BOOT_JDK" >&6; }
15728              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15729$as_echo_n "checking Boot JDK version... " >&6; }
15730              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15731              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15732$as_echo "$BOOT_JDK_VERSION" >&6; }
15733            fi # end check jdk version
15734          fi # end check rt.jar
15735        fi # end check javac
15736      fi # end check java
15737    fi # end check boot jdk found
15738  fi
15739
15740
15741# If we haven't found anything yet, we've truly lost. Give up.
15742if test "x$BOOT_JDK_FOUND" = xno; then
15743
15744    # Print a helpful message on how to acquire the necessary build dependency.
15745    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15746    MISSING_DEPENDENCY=openjdk
15747    PKGHANDLER_COMMAND=
15748
15749    case $PKGHANDLER in
15750	apt-get)
15751                apt_help     $MISSING_DEPENDENCY ;;
15752    yum)
15753                yum_help     $MISSING_DEPENDENCY ;;
15754	port)
15755                port_help    $MISSING_DEPENDENCY ;;
15756	pkgutil)
15757                pkgutil_help $MISSING_DEPENDENCY ;;
15758	pkgadd)
15759                pkgadd_help  $MISSING_DEPENDENCY ;;
15760    * )
15761      break ;;
15762    esac
15763
15764    if test "x$PKGHANDLER_COMMAND" != x; then
15765        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15766    fi
15767
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15769$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15770  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15771$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15772  as_fn_error $? "Cannot continue" "$LINENO" 5
15773fi
15774
15775# Setup proper paths for what we found
15776BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15777if test ! -f "$BOOT_RTJAR"; then
15778    # On MacOSX it is called classes.jar
15779    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15780    if test -f "$BOOT_RTJAR"; then
15781      # Remove the ..
15782      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15783    fi
15784fi
15785BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15786BOOT_JDK="$BOOT_JDK"
15787
15788
15789
15790
15791# Setup tools from the Boot JDK.
15792
15793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15794$as_echo_n "checking for java in Boot JDK... " >&6; }
15795  JAVA=$BOOT_JDK/bin/java
15796  if test ! -x $JAVA; then
15797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15798$as_echo "not found" >&6; }
15799      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15800$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15801      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15802  fi
15803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15804$as_echo "ok" >&6; }
15805
15806
15807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15808$as_echo_n "checking for javac in Boot JDK... " >&6; }
15809  JAVAC=$BOOT_JDK/bin/javac
15810  if test ! -x $JAVAC; then
15811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15812$as_echo "not found" >&6; }
15813      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15814$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15815      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15816  fi
15817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15818$as_echo "ok" >&6; }
15819
15820
15821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15822$as_echo_n "checking for javah in Boot JDK... " >&6; }
15823  JAVAH=$BOOT_JDK/bin/javah
15824  if test ! -x $JAVAH; then
15825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15826$as_echo "not found" >&6; }
15827      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15828$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15829      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15830  fi
15831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15832$as_echo "ok" >&6; }
15833
15834
15835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15836$as_echo_n "checking for javap in Boot JDK... " >&6; }
15837  JAVAP=$BOOT_JDK/bin/javap
15838  if test ! -x $JAVAP; then
15839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15840$as_echo "not found" >&6; }
15841      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15842$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15843      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15844  fi
15845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15846$as_echo "ok" >&6; }
15847
15848
15849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15850$as_echo_n "checking for jar in Boot JDK... " >&6; }
15851  JAR=$BOOT_JDK/bin/jar
15852  if test ! -x $JAR; then
15853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15854$as_echo "not found" >&6; }
15855      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15856$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15857      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15858  fi
15859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15860$as_echo "ok" >&6; }
15861
15862
15863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15864$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15865  RMIC=$BOOT_JDK/bin/rmic
15866  if test ! -x $RMIC; then
15867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15868$as_echo "not found" >&6; }
15869      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15870$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15871      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15872  fi
15873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15874$as_echo "ok" >&6; }
15875
15876
15877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15878$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15879  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15880  if test ! -x $NATIVE2ASCII; then
15881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15882$as_echo "not found" >&6; }
15883      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15884$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15885      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15886  fi
15887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15888$as_echo "ok" >&6; }
15889
15890
15891# Finally, set some other options...
15892
15893# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15894BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15895
15896
15897
15898
15899##############################################################################
15900#
15901# Specify options for anything that is run with the Boot JDK.
15902#
15903
15904# Check whether --with-boot-jdk-jvmargs was given.
15905if test "${with_boot_jdk_jvmargs+set}" = set; then :
15906  withval=$with_boot_jdk_jvmargs;
15907fi
15908
15909
15910if test "x$with_boot_jdk_jvmargs" = x; then
15911    # Not all JVM:s accept the same arguments on the command line.
15912    # OpenJDK specific increase in thread stack for JDK build,
15913    # well more specifically, when running javac.
15914    if test "x$BUILD_NUM_BITS" = x32; then
15915       STACK_SIZE=768
15916    else
15917       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15918       # since 64-bit pointers are pushed on the stach. Apparently, we need
15919       # to increase the stack space when javacing the JDK....
15920       STACK_SIZE=1536
15921    fi
15922
15923    # Minimum amount of heap memory.
15924
15925    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15926    $ECHO "Command: $JAVA -Xms64M -version" >&5
15927    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15928    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15929    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15930    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15931        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15932	JVM_ARG_OK=true
15933    else
15934	$ECHO "Arg failed:" >&5
15935	$ECHO "$OUTPUT" >&5
15936	JVM_ARG_OK=false
15937    fi
15938
15939    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
15940        # Why does macosx need more heap? Its the huge JDK batch.
15941
15942    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15943    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15944    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15945    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15946    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15947    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15948        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15949	JVM_ARG_OK=true
15950    else
15951	$ECHO "Arg failed:" >&5
15952	$ECHO "$OUTPUT" >&5
15953	JVM_ARG_OK=false
15954    fi
15955
15956    else
15957
15958    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15959    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15960    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15961    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15962    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15963    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15964        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15965	JVM_ARG_OK=true
15966    else
15967	$ECHO "Arg failed:" >&5
15968	$ECHO "$OUTPUT" >&5
15969	JVM_ARG_OK=false
15970    fi
15971
15972    fi
15973    # When is adding -client something that speeds up the JVM?
15974    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15975
15976    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15977    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15978    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15979    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15980    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15981    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15982        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15983	JVM_ARG_OK=true
15984    else
15985	$ECHO "Arg failed:" >&5
15986	$ECHO "$OUTPUT" >&5
15987	JVM_ARG_OK=false
15988    fi
15989
15990
15991    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15992    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15993    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15994    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15995    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15996    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15997        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15998	JVM_ARG_OK=true
15999    else
16000	$ECHO "Arg failed:" >&5
16001	$ECHO "$OUTPUT" >&5
16002	JVM_ARG_OK=false
16003    fi
16004
16005
16006    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16007    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16008    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16009    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16010    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16011    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16012        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16013	JVM_ARG_OK=true
16014    else
16015	$ECHO "Arg failed:" >&5
16016	$ECHO "$OUTPUT" >&5
16017	JVM_ARG_OK=false
16018    fi
16019
16020    # Disable special log output when a debug build is used as Boot JDK...
16021
16022    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16023    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16024    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16025    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16026    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16027    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16028        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16029	JVM_ARG_OK=true
16030    else
16031	$ECHO "Arg failed:" >&5
16032	$ECHO "$OUTPUT" >&5
16033	JVM_ARG_OK=false
16034    fi
16035
16036fi
16037
16038BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16039
16040
16041
16042###############################################################################
16043#
16044# Configure the sources to use. We can add or override individual directories.
16045#
16046###############################################################################
16047
16048
16049
16050# Where are the sources. Any of these can be overridden
16051# using --with-override-corba and the likes.
16052LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16053CORBA_TOPDIR="$SRC_ROOT/corba"
16054JAXP_TOPDIR="$SRC_ROOT/jaxp"
16055JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16056HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16057NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16058JDK_TOPDIR="$SRC_ROOT/jdk"
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069###############################################################################
16070#
16071# Pickup additional source for a component from outside of the source root
16072# or override source for a component.
16073#
16074
16075# Check whether --with-add-source-root was given.
16076if test "${with_add_source_root+set}" = set; then :
16077  withval=$with_add_source_root;
16078fi
16079
16080
16081
16082# Check whether --with-override-source-root was given.
16083if test "${with_override_source_root+set}" = set; then :
16084  withval=$with_override_source_root;
16085fi
16086
16087
16088
16089# Check whether --with-adds-and-overrides was given.
16090if test "${with_adds_and_overrides+set}" = set; then :
16091  withval=$with_adds_and_overrides;
16092fi
16093
16094
16095if test "x$with_adds_and_overrides" != x; then
16096    with_add_source_root="$with_adds_and_overrides/adds"
16097    with_override_source_root="$with_adds_and_overrides/overrides"
16098fi
16099
16100if test "x$with_add_source_root" != x; then
16101    if ! test -d $with_add_source_root; then
16102       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16103    fi
16104    CURDIR="$PWD"
16105    cd "$with_add_source_root"
16106    ADD_SRC_ROOT="`pwd`"
16107    cd "$CURDIR"
16108    # Verify that the addon source root does not have any root makefiles.
16109    # If it does, then it is usually an error, prevent this.
16110    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16111       test -f $with_add_source_root/langtools/make/Makefile; then
16112        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
16113    fi
16114    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16115       test -f $with_add_source_root/corba/make/Makefile; then
16116        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
16117    fi
16118    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16119       test -f $with_add_source_root/jaxp/make/Makefile; then
16120        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
16121    fi
16122    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16123       test -f $with_add_source_root/jaxws/make/Makefile; then
16124        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
16125    fi
16126    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16127       test -f $with_add_source_root/hotspot/make/Makefile; then
16128        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
16129    fi
16130    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16131       test -f $with_add_source_root/jdk/make/Makefile; then
16132        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
16133    fi
16134fi
16135
16136
16137if test "x$with_override_source_root" != x; then
16138    if ! test -d $with_override_source_root; then
16139       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16140    fi
16141    CURDIR="$PWD"
16142    cd "$with_override_source_root"
16143    OVERRIDE_SRC_ROOT="`pwd`"
16144    cd "$CURDIR"
16145    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16146       test -f $with_override_source_root/langtools/make/Makefile; then
16147        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
16148    fi
16149    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16150       test -f $with_override_source_root/corba/make/Makefile; then
16151        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
16152    fi
16153    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16154       test -f $with_override_source_root/jaxp/make/Makefile; then
16155        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
16156    fi
16157    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16158       test -f $with_override_source_root/jaxws/make/Makefile; then
16159        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
16160    fi
16161    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16162       test -f $with_override_source_root/hotspot/make/Makefile; then
16163        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
16164    fi
16165    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16166       test -f $with_override_source_root/jdk/make/Makefile; then
16167        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
16168    fi
16169fi
16170
16171
16172###############################################################################
16173#
16174# Override a repo completely, this is used for example when you have 3 small
16175# development sandboxes of the langtools sources and want to avoid having 3 full
16176# OpenJDK sources checked out on disk.
16177#
16178# Assuming that the 3 langtools sandboxes are located here:
16179# /home/fredrik/sandbox1/langtools
16180# /home/fredrik/sandbox2/langtools
16181# /home/fredrik/sandbox3/langtools
16182#
16183# From the source root you create build subdirs manually:
16184#     mkdir -p build1 build2 build3
16185# in each build directory run:
16186#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16187#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16188#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16189#
16190
16191
16192# Check whether --with-override-langtools was given.
16193if test "${with_override_langtools+set}" = set; then :
16194  withval=$with_override_langtools;
16195fi
16196
16197
16198
16199# Check whether --with-override-corba was given.
16200if test "${with_override_corba+set}" = set; then :
16201  withval=$with_override_corba;
16202fi
16203
16204
16205
16206# Check whether --with-override-jaxp was given.
16207if test "${with_override_jaxp+set}" = set; then :
16208  withval=$with_override_jaxp;
16209fi
16210
16211
16212
16213# Check whether --with-override-jaxws was given.
16214if test "${with_override_jaxws+set}" = set; then :
16215  withval=$with_override_jaxws;
16216fi
16217
16218
16219
16220# Check whether --with-override-hotspot was given.
16221if test "${with_override_hotspot+set}" = set; then :
16222  withval=$with_override_hotspot;
16223fi
16224
16225
16226
16227# Check whether --with-override-jdk was given.
16228if test "${with_override_jdk+set}" = set; then :
16229  withval=$with_override_jdk;
16230fi
16231
16232
16233if test "x$with_override_langtools" != x; then
16234    CURDIR="$PWD"
16235    cd "$with_override_langtools"
16236    LANGTOOLS_TOPDIR="`pwd`"
16237    cd "$CURDIR"
16238    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16239        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16240    fi
16241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16242$as_echo_n "checking if langtools should be overridden... " >&6; }
16243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16244$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16245fi
16246if test "x$with_override_corba" != x; then
16247    CURDIR="$PWD"
16248    cd "$with_override_corba"
16249    CORBA_TOPDIR="`pwd`"
16250    cd "$CURDIR"
16251    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16252        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16253    fi
16254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16255$as_echo_n "checking if corba should be overridden... " >&6; }
16256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16257$as_echo "yes with $CORBA_TOPDIR" >&6; }
16258fi
16259if test "x$with_override_jaxp" != x; then
16260    CURDIR="$PWD"
16261    cd "$with_override_jaxp"
16262    JAXP_TOPDIR="`pwd`"
16263    cd "$CURDIR"
16264    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16265        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16266    fi
16267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16268$as_echo_n "checking if jaxp should be overridden... " >&6; }
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16270$as_echo "yes with $JAXP_TOPDIR" >&6; }
16271fi
16272if test "x$with_override_jaxws" != x; then
16273    CURDIR="$PWD"
16274    cd "$with_override_jaxws"
16275    JAXWS_TOPDIR="`pwd`"
16276    cd "$CURDIR"
16277    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16278        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16279    fi
16280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16281$as_echo_n "checking if jaxws should be overridden... " >&6; }
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16283$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16284fi
16285if test "x$with_override_hotspot" != x; then
16286    CURDIR="$PWD"
16287    cd "$with_override_hotspot"
16288    HOTSPOT_TOPDIR="`pwd`"
16289    cd "$CURDIR"
16290    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16291       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16292        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16293    fi
16294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16295$as_echo_n "checking if hotspot should be overridden... " >&6; }
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16297$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16298fi
16299if test "x$with_override_nashorn" != x; then
16300    CURDIR="$PWD"
16301    cd "$with_override_nashorn"
16302    NASHORN_TOPDIR="`pwd`"
16303    cd "$CURDIR"
16304    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16305        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16306    fi
16307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16308$as_echo_n "checking if nashorn should be overridden... " >&6; }
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16310$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16311fi
16312if test "x$with_override_jdk" != x; then
16313    CURDIR="$PWD"
16314    cd "$with_override_jdk"
16315    JDK_TOPDIR="`pwd`"
16316    cd "$CURDIR"
16317    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16318        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16319    fi
16320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16321$as_echo_n "checking if JDK should be overridden... " >&6; }
16322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16323$as_echo "yes with $JDK_TOPDIR" >&6; }
16324fi
16325
16326
16327
16328BUILD_OUTPUT="$OUTPUT_ROOT"
16329
16330
16331HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16332BUILD_HOTSPOT=true
16333
16334
16335
16336# Check whether --with-import-hotspot was given.
16337if test "${with_import_hotspot+set}" = set; then :
16338  withval=$with_import_hotspot;
16339fi
16340
16341if test "x$with_import_hotspot" != x; then
16342    CURDIR="$PWD"
16343    cd "$with_import_hotspot"
16344    HOTSPOT_DIST="`pwd`"
16345    cd "$CURDIR"
16346    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16347        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16348    fi
16349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16350$as_echo_n "checking if hotspot should be imported... " >&6; }
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16352$as_echo "yes from $HOTSPOT_DIST" >&6; }
16353    BUILD_HOTSPOT=false
16354fi
16355
16356JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16357
16358
16359###############################################################################
16360#
16361# Setup the toolchain (compilers etc), i.e. the tools that need to be
16362# cross-compilation aware.
16363#
16364###############################################################################
16365
16366
16367###############################################################################
16368#
16369# Configure the development tool paths and potential sysroot.
16370#
16371ac_ext=cpp
16372ac_cpp='$CXXCPP $CPPFLAGS'
16373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16376
16377
16378# The option used to specify the target .o,.a or .so file.
16379# When compiling, how to specify the to be created object file.
16380CC_OUT_OPTION='-o$(SPACE)'
16381# When linking, how to specify the to be created executable.
16382EXE_OUT_OPTION='-o$(SPACE)'
16383# When linking, how to specify the to be created dynamically linkable library.
16384LD_OUT_OPTION='-o$(SPACE)'
16385# When archiving, how to specify the to be create static archive for object files.
16386AR_OUT_OPTION='rcs$(SPACE)'
16387
16388
16389
16390
16391
16392# Locate the actual tools
16393
16394
16395# Check whether --with-jtreg was given.
16396if test "${with_jtreg+set}" = set; then :
16397  withval=$with_jtreg;
16398else
16399  with_jtreg=no
16400fi
16401
16402
16403  if test "x$with_jtreg" = xno; then
16404    # jtreg disabled
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16406$as_echo_n "checking for jtreg... " >&6; }
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16408$as_echo "no" >&6; }
16409  else
16410    if test "x$with_jtreg" != xyes; then
16411      # with path specified.
16412      JT_HOME="$with_jtreg"
16413    fi
16414
16415    if test "x$JT_HOME" != x; then
16416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16417$as_echo_n "checking for jtreg... " >&6; }
16418
16419      # use JT_HOME enviroment var.
16420
16421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16422
16423  # Input might be given as Windows format, start by converting to
16424  # unix format.
16425  path="$JT_HOME"
16426  new_path=`$CYGPATH -u "$path"`
16427
16428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16431  # "foo.exe" is OK but "foo" is an error.
16432  #
16433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16434  # It is also a way to make sure we got the proper file name for the real test later on.
16435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16436  if test "x$test_shortpath" = x; then
16437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16438$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16439    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16440  fi
16441
16442  # Call helper function which possibly converts this using DOS-style short mode.
16443  # If so, the updated path is stored in $new_path.
16444
16445  input_path="$new_path"
16446  # Check if we need to convert this using DOS-style short mode. If the path
16447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16448  # take no chances and rewrite it.
16449  # Note: m4 eats our [], so we need to use [ and ] instead.
16450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16451  if test "x$has_forbidden_chars" != x; then
16452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16456      # Going to short mode and back again did indeed matter. Since short mode is
16457      # case insensitive, let's make it lowercase to improve readability.
16458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16459      # Now convert it back to Unix-stile (cygpath)
16460      input_path=`$CYGPATH -u "$shortmode_path"`
16461      new_path="$input_path"
16462    fi
16463  fi
16464
16465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16466  if test "x$test_cygdrive_prefix" = x; then
16467    # As a simple fix, exclude /usr/bin since it's not a real path.
16468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16470      # a path prefixed by /cygdrive for fixpath to work.
16471      new_path="$CYGWIN_ROOT_PATH$input_path"
16472    fi
16473  fi
16474
16475
16476  if test "x$path" != "x$new_path"; then
16477    JT_HOME="$new_path"
16478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16479$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16480  fi
16481
16482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483
16484  path="$JT_HOME"
16485  has_colon=`$ECHO $path | $GREP ^.:`
16486  new_path="$path"
16487  if test "x$has_colon" = x; then
16488    # Not in mixed or Windows style, start by that.
16489    new_path=`cmd //c echo $path`
16490  fi
16491
16492
16493  input_path="$new_path"
16494  # Check if we need to convert this using DOS-style short mode. If the path
16495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16496  # take no chances and rewrite it.
16497  # Note: m4 eats our [], so we need to use [ and ] instead.
16498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16499  if test "x$has_forbidden_chars" != x; then
16500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16502  fi
16503
16504
16505  windows_path="$new_path"
16506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16507    unix_path=`$CYGPATH -u "$windows_path"`
16508    new_path="$unix_path"
16509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16511    new_path="$unix_path"
16512  fi
16513
16514  if test "x$path" != "x$new_path"; then
16515    JT_HOME="$new_path"
16516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16517$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16518  fi
16519
16520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16522
16523  else
16524    # We're on a posix platform. Hooray! :)
16525    path="$JT_HOME"
16526    has_space=`$ECHO "$path" | $GREP " "`
16527    if test "x$has_space" != x; then
16528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16529$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16530      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16531    fi
16532
16533    # Use eval to expand a potential ~
16534    eval path="$path"
16535    if test ! -f "$path" && test ! -d "$path"; then
16536      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16537    fi
16538
16539    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16540  fi
16541
16542
16543      # jtreg win32 script works for everybody
16544      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16545
16546      if test ! -f "$JTREGEXE"; then
16547        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16548      fi
16549
16550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16551$as_echo "$JTREGEXE" >&6; }
16552    else
16553      # try to find jtreg on path
16554
16555    for ac_prog in jtreg
16556do
16557  # Extract the first word of "$ac_prog", so it can be a program name with args.
16558set dummy $ac_prog; ac_word=$2
16559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16560$as_echo_n "checking for $ac_word... " >&6; }
16561if ${ac_cv_path_JTREGEXE+:} false; then :
16562  $as_echo_n "(cached) " >&6
16563else
16564  case $JTREGEXE in
16565  [\\/]* | ?:[\\/]*)
16566  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16567  ;;
16568  *)
16569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16570for as_dir in $PATH
16571do
16572  IFS=$as_save_IFS
16573  test -z "$as_dir" && as_dir=.
16574    for ac_exec_ext in '' $ac_executable_extensions; do
16575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16576    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16578    break 2
16579  fi
16580done
16581  done
16582IFS=$as_save_IFS
16583
16584  ;;
16585esac
16586fi
16587JTREGEXE=$ac_cv_path_JTREGEXE
16588if test -n "$JTREGEXE"; then
16589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16590$as_echo "$JTREGEXE" >&6; }
16591else
16592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16593$as_echo "no" >&6; }
16594fi
16595
16596
16597  test -n "$JTREGEXE" && break
16598done
16599
16600
16601    if test "x$JTREGEXE" = x; then
16602        if test "xjtreg" = x; then
16603          PROG_NAME=jtregexe
16604        else
16605          PROG_NAME=jtreg
16606        fi
16607        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16608$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16609        as_fn_error $? "Cannot continue" "$LINENO" 5
16610    fi
16611
16612
16613      JT_HOME="`$DIRNAME $JTREGEXE`"
16614    fi
16615  fi
16616
16617
16618
16619
16620
16621if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16622
16623  # Store path to cygwin link.exe to help excluding it when searching for
16624  # VS linker. This must be done before changing the PATH when looking for VS.
16625  # Extract the first word of "link", so it can be a program name with args.
16626set dummy link; ac_word=$2
16627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16628$as_echo_n "checking for $ac_word... " >&6; }
16629if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16630  $as_echo_n "(cached) " >&6
16631else
16632  case $CYGWIN_LINK in
16633  [\\/]* | ?:[\\/]*)
16634  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16635  ;;
16636  *)
16637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16638for as_dir in $PATH
16639do
16640  IFS=$as_save_IFS
16641  test -z "$as_dir" && as_dir=.
16642    for ac_exec_ext in '' $ac_executable_extensions; do
16643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16644    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16646    break 2
16647  fi
16648done
16649  done
16650IFS=$as_save_IFS
16651
16652  ;;
16653esac
16654fi
16655CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16656if test -n "$CYGWIN_LINK"; then
16657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16658$as_echo "$CYGWIN_LINK" >&6; }
16659else
16660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16661$as_echo "no" >&6; }
16662fi
16663
16664
16665  if test "x$CYGWIN_LINK" != x; then
16666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16667$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16668    "$CYGWIN_LINK" --version > /dev/null
16669    if test $? -eq 0 ; then
16670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16671$as_echo "yes" >&6; }
16672    else
16673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16674$as_echo "no" >&6; }
16675      # This might be the VS linker. Don't exclude it later on.
16676      CYGWIN_LINK=""
16677    fi
16678  fi
16679
16680  # First-hand choice is to locate and run the vsvars bat file.
16681
16682  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16683    VCVARSFILE="vc/bin/vcvars32.bat"
16684  else
16685    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16686  fi
16687
16688  VS_ENV_CMD=""
16689  VS_ENV_ARGS=""
16690  if test "x$with_toolsdir" != x; then
16691
16692  if test "x$VS_ENV_CMD" = x; then
16693    VS100BASE="$with_toolsdir/../.."
16694    METHOD="--with-tools-dir"
16695
16696  windows_path="$VS100BASE"
16697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16698    unix_path=`$CYGPATH -u "$windows_path"`
16699    VS100BASE="$unix_path"
16700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16702    VS100BASE="$unix_path"
16703  fi
16704
16705    if test -d "$VS100BASE"; then
16706      if test -f "$VS100BASE/$VCVARSFILE"; then
16707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16708$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16709        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16710      else
16711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16712$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16713        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16714$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16715      fi
16716    fi
16717  fi
16718
16719  fi
16720
16721  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16722    # Having specified an argument which is incorrect will produce an instant failure;
16723    # we should not go on looking
16724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16725$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16726    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16727$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16728    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16729  fi
16730
16731  if test "x$VS100COMNTOOLS" != x; then
16732
16733  if test "x$VS_ENV_CMD" = x; then
16734    VS100BASE="$VS100COMNTOOLS/../.."
16735    METHOD="VS100COMNTOOLS variable"
16736
16737  windows_path="$VS100BASE"
16738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16739    unix_path=`$CYGPATH -u "$windows_path"`
16740    VS100BASE="$unix_path"
16741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16743    VS100BASE="$unix_path"
16744  fi
16745
16746    if test -d "$VS100BASE"; then
16747      if test -f "$VS100BASE/$VCVARSFILE"; then
16748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16749$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16750        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16751      else
16752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16753$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16755$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16756      fi
16757    fi
16758  fi
16759
16760  fi
16761  if test "x$PROGRAMFILES" != x; then
16762
16763  if test "x$VS_ENV_CMD" = x; then
16764    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16765    METHOD="well-known name"
16766
16767  windows_path="$VS100BASE"
16768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16769    unix_path=`$CYGPATH -u "$windows_path"`
16770    VS100BASE="$unix_path"
16771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16773    VS100BASE="$unix_path"
16774  fi
16775
16776    if test -d "$VS100BASE"; then
16777      if test -f "$VS100BASE/$VCVARSFILE"; then
16778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16779$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16780        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16781      else
16782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16783$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16785$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16786      fi
16787    fi
16788  fi
16789
16790  fi
16791
16792  if test "x$VS_ENV_CMD" = x; then
16793    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16794    METHOD="well-known name"
16795
16796  windows_path="$VS100BASE"
16797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16798    unix_path=`$CYGPATH -u "$windows_path"`
16799    VS100BASE="$unix_path"
16800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16802    VS100BASE="$unix_path"
16803  fi
16804
16805    if test -d "$VS100BASE"; then
16806      if test -f "$VS100BASE/$VCVARSFILE"; then
16807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16808$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16809        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16810      else
16811        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16812$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16813        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16814$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16815      fi
16816    fi
16817  fi
16818
16819
16820  if test "x$VS_ENV_CMD" = x; then
16821    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16822    METHOD="well-known name"
16823
16824  windows_path="$VS100BASE"
16825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16826    unix_path=`$CYGPATH -u "$windows_path"`
16827    VS100BASE="$unix_path"
16828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16830    VS100BASE="$unix_path"
16831  fi
16832
16833    if test -d "$VS100BASE"; then
16834      if test -f "$VS100BASE/$VCVARSFILE"; then
16835        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16836$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16837        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16838      else
16839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16840$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16842$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16843      fi
16844    fi
16845  fi
16846
16847
16848  if test "x$ProgramW6432" != x; then
16849
16850  if test "x$VS_ENV_CMD" = x; then
16851    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16852    METHOD="well-known name"
16853
16854  windows_path="$WIN_SDK_BASE"
16855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16856    unix_path=`$CYGPATH -u "$windows_path"`
16857    WIN_SDK_BASE="$unix_path"
16858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16860    WIN_SDK_BASE="$unix_path"
16861  fi
16862
16863    if test -d "$WIN_SDK_BASE"; then
16864      # There have been cases of partial or broken SDK installations. A missing
16865      # lib dir is not going to work.
16866      if test ! -d "$WIN_SDK_BASE/../lib"; then
16867        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16868$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16869        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16870$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16871      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16872        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16873$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16874        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16875        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16876          VS_ENV_ARGS="/x86"
16877        else
16878          VS_ENV_ARGS="/x64"
16879        fi
16880      else
16881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16882$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16883        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16884$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16885      fi
16886    fi
16887  fi
16888
16889  fi
16890  if test "x$PROGRAMW6432" != x; then
16891
16892  if test "x$VS_ENV_CMD" = x; then
16893    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16894    METHOD="well-known name"
16895
16896  windows_path="$WIN_SDK_BASE"
16897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16898    unix_path=`$CYGPATH -u "$windows_path"`
16899    WIN_SDK_BASE="$unix_path"
16900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16902    WIN_SDK_BASE="$unix_path"
16903  fi
16904
16905    if test -d "$WIN_SDK_BASE"; then
16906      # There have been cases of partial or broken SDK installations. A missing
16907      # lib dir is not going to work.
16908      if test ! -d "$WIN_SDK_BASE/../lib"; then
16909        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16910$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16912$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16913      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16914        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16915$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16916        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16917        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16918          VS_ENV_ARGS="/x86"
16919        else
16920          VS_ENV_ARGS="/x64"
16921        fi
16922      else
16923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16924$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16925        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16926$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16927      fi
16928    fi
16929  fi
16930
16931  fi
16932  if test "x$PROGRAMFILES" != x; then
16933
16934  if test "x$VS_ENV_CMD" = x; then
16935    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16936    METHOD="well-known name"
16937
16938  windows_path="$WIN_SDK_BASE"
16939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16940    unix_path=`$CYGPATH -u "$windows_path"`
16941    WIN_SDK_BASE="$unix_path"
16942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16944    WIN_SDK_BASE="$unix_path"
16945  fi
16946
16947    if test -d "$WIN_SDK_BASE"; then
16948      # There have been cases of partial or broken SDK installations. A missing
16949      # lib dir is not going to work.
16950      if test ! -d "$WIN_SDK_BASE/../lib"; then
16951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16952$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16953        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16954$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16955      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16957$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16958        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16959        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16960          VS_ENV_ARGS="/x86"
16961        else
16962          VS_ENV_ARGS="/x64"
16963        fi
16964      else
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16966$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16967        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16968$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16969      fi
16970    fi
16971  fi
16972
16973  fi
16974
16975  if test "x$VS_ENV_CMD" = x; then
16976    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16977    METHOD="well-known name"
16978
16979  windows_path="$WIN_SDK_BASE"
16980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16981    unix_path=`$CYGPATH -u "$windows_path"`
16982    WIN_SDK_BASE="$unix_path"
16983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16985    WIN_SDK_BASE="$unix_path"
16986  fi
16987
16988    if test -d "$WIN_SDK_BASE"; then
16989      # There have been cases of partial or broken SDK installations. A missing
16990      # lib dir is not going to work.
16991      if test ! -d "$WIN_SDK_BASE/../lib"; then
16992        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16993$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16995$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16996      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16999        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17000        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17001          VS_ENV_ARGS="/x86"
17002        else
17003          VS_ENV_ARGS="/x64"
17004        fi
17005      else
17006        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17007$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17008        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17009$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17010      fi
17011    fi
17012  fi
17013
17014
17015  if test "x$VS_ENV_CMD" = x; then
17016    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17017    METHOD="well-known name"
17018
17019  windows_path="$WIN_SDK_BASE"
17020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17021    unix_path=`$CYGPATH -u "$windows_path"`
17022    WIN_SDK_BASE="$unix_path"
17023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17025    WIN_SDK_BASE="$unix_path"
17026  fi
17027
17028    if test -d "$WIN_SDK_BASE"; then
17029      # There have been cases of partial or broken SDK installations. A missing
17030      # lib dir is not going to work.
17031      if test ! -d "$WIN_SDK_BASE/../lib"; then
17032        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17033$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17034        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17035$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17036      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17038$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17039        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17040        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17041          VS_ENV_ARGS="/x86"
17042        else
17043          VS_ENV_ARGS="/x64"
17044        fi
17045      else
17046        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17047$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17048        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17049$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17050      fi
17051    fi
17052  fi
17053
17054
17055  if test "x$VS_ENV_CMD" != x; then
17056    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17057
17058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17059
17060  # First separate the path from the arguments. This will split at the first
17061  # space.
17062  complete="$VS_ENV_CMD"
17063  path="${complete%% *}"
17064  tmp="$complete EOL"
17065  arguments="${tmp#* }"
17066
17067  # Input might be given as Windows format, start by converting to
17068  # unix format.
17069  new_path=`$CYGPATH -u "$path"`
17070
17071  # Now try to locate executable using which
17072  new_path=`$WHICH "$new_path" 2> /dev/null`
17073  # bat and cmd files are not always considered executable in cygwin causing which
17074  # to not find them
17075  if test "x$new_path" = x \
17076           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17077           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17078    new_path=`$CYGPATH -u "$path"`
17079  fi
17080  if test "x$new_path" = x; then
17081    # Oops. Which didn't find the executable.
17082    # The splitting of arguments from the executable at a space might have been incorrect,
17083    # since paths with space are more likely in Windows. Give it another try with the whole
17084    # argument.
17085    path="$complete"
17086    arguments="EOL"
17087    new_path=`$CYGPATH -u "$path"`
17088    new_path=`$WHICH "$new_path" 2> /dev/null`
17089    # bat and cmd files are not always considered executable in cygwin causing which
17090    # to not find them
17091    if test "x$new_path" = x \
17092             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17093             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17094      new_path=`$CYGPATH -u "$path"`
17095    fi
17096    if test "x$new_path" = x; then
17097      # It's still not found. Now this is an unrecoverable error.
17098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17099$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17100      has_space=`$ECHO "$complete" | $GREP " "`
17101      if test "x$has_space" != x; then
17102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17104      fi
17105      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17106    fi
17107  fi
17108
17109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17112  # "foo.exe" is OK but "foo" is an error.
17113  #
17114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17115  # It is also a way to make sure we got the proper file name for the real test later on.
17116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17117  if test "x$test_shortpath" = x; then
17118    # Short path failed, file does not exist as specified.
17119    # Try adding .exe or .cmd
17120    if test -f "${new_path}.exe"; then
17121       input_to_shortpath="${new_path}.exe"
17122    elif test -f "${new_path}.cmd"; then
17123       input_to_shortpath="${new_path}.cmd"
17124    else
17125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17126$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17129      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17130    fi
17131  else
17132    input_to_shortpath="$new_path"
17133  fi
17134
17135  # Call helper function which possibly converts this using DOS-style short mode.
17136  # If so, the updated path is stored in $new_path.
17137  new_path="$input_to_shortpath"
17138
17139  input_path="$input_to_shortpath"
17140  # Check if we need to convert this using DOS-style short mode. If the path
17141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17142  # take no chances and rewrite it.
17143  # Note: m4 eats our [], so we need to use [ and ] instead.
17144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17145  if test "x$has_forbidden_chars" != x; then
17146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17150      # Going to short mode and back again did indeed matter. Since short mode is
17151      # case insensitive, let's make it lowercase to improve readability.
17152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17153      # Now convert it back to Unix-stile (cygpath)
17154      input_path=`$CYGPATH -u "$shortmode_path"`
17155      new_path="$input_path"
17156    fi
17157  fi
17158
17159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17160  if test "x$test_cygdrive_prefix" = x; then
17161    # As a simple fix, exclude /usr/bin since it's not a real path.
17162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17164      # a path prefixed by /cygdrive for fixpath to work.
17165      new_path="$CYGWIN_ROOT_PATH$input_path"
17166    fi
17167  fi
17168
17169  # remove trailing .exe if any
17170  new_path="${new_path/%.exe/}"
17171
17172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17173
17174  # First separate the path from the arguments. This will split at the first
17175  # space.
17176  complete="$VS_ENV_CMD"
17177  path="${complete%% *}"
17178  tmp="$complete EOL"
17179  arguments="${tmp#* }"
17180
17181  # Input might be given as Windows format, start by converting to
17182  # unix format.
17183  new_path="$path"
17184
17185  windows_path="$new_path"
17186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17187    unix_path=`$CYGPATH -u "$windows_path"`
17188    new_path="$unix_path"
17189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17191    new_path="$unix_path"
17192  fi
17193
17194
17195  # Now try to locate executable using which
17196  new_path=`$WHICH "$new_path" 2> /dev/null`
17197
17198  if test "x$new_path" = x; then
17199    # Oops. Which didn't find the executable.
17200    # The splitting of arguments from the executable at a space might have been incorrect,
17201    # since paths with space are more likely in Windows. Give it another try with the whole
17202    # argument.
17203    path="$complete"
17204    arguments="EOL"
17205    new_path="$path"
17206
17207  windows_path="$new_path"
17208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17209    unix_path=`$CYGPATH -u "$windows_path"`
17210    new_path="$unix_path"
17211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17213    new_path="$unix_path"
17214  fi
17215
17216
17217    new_path=`$WHICH "$new_path" 2> /dev/null`
17218
17219    if test "x$new_path" = x; then
17220      # It's still not found. Now this is an unrecoverable error.
17221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17222$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17223      has_space=`$ECHO "$complete" | $GREP " "`
17224      if test "x$has_space" != x; then
17225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17227      fi
17228      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17229    fi
17230  fi
17231
17232  # Now new_path has a complete unix path to the binary
17233  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17234    # Keep paths in /bin as-is, but remove trailing .exe if any
17235    new_path="${new_path/%.exe/}"
17236    # Do not save /bin paths to all_fixpath_prefixes!
17237  else
17238    # Not in mixed or Windows style, start by that.
17239    new_path=`cmd //c echo $new_path`
17240
17241  input_path="$new_path"
17242  # Check if we need to convert this using DOS-style short mode. If the path
17243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17244  # take no chances and rewrite it.
17245  # Note: m4 eats our [], so we need to use [ and ] instead.
17246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17247  if test "x$has_forbidden_chars" != x; then
17248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17250  fi
17251
17252    # Output is in $new_path
17253
17254  windows_path="$new_path"
17255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17256    unix_path=`$CYGPATH -u "$windows_path"`
17257    new_path="$unix_path"
17258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17260    new_path="$unix_path"
17261  fi
17262
17263    # remove trailing .exe if any
17264    new_path="${new_path/%.exe/}"
17265
17266    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17267    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17268  fi
17269
17270  else
17271    # We're on a posix platform. Hooray! :)
17272    # First separate the path from the arguments. This will split at the first
17273    # space.
17274    complete="$VS_ENV_CMD"
17275    path="${complete%% *}"
17276    tmp="$complete EOL"
17277    arguments="${tmp#* }"
17278
17279    # Cannot rely on the command "which" here since it doesn't always work.
17280    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17281    if test -z "$is_absolute_path"; then
17282      # Path to executable is not absolute. Find it.
17283      IFS_save="$IFS"
17284      IFS=:
17285      for p in $PATH; do
17286        if test -f "$p/$path" && test -x "$p/$path"; then
17287          new_path="$p/$path"
17288          break
17289        fi
17290      done
17291      IFS="$IFS_save"
17292    else
17293      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17294$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17295      new_path="$path"
17296    fi
17297
17298    if test "x$new_path" = x; then
17299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17300$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17301        has_space=`$ECHO "$complete" | $GREP " "`
17302        if test "x$has_space" != x; then
17303          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17304$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17305        fi
17306        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17307      fi
17308  fi
17309
17310      # Now join together the path and the arguments once again
17311      if test "x$arguments" != xEOL; then
17312        new_complete="$new_path ${arguments% *}"
17313      else
17314        new_complete="$new_path"
17315      fi
17316
17317  if test "x$complete" != "x$new_complete"; then
17318      VS_ENV_CMD="$new_complete"
17319      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17320$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17321    fi
17322
17323
17324    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17325    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17326$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17327    cd $OUTPUT_ROOT
17328    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17329    # to autoconf standards.
17330
17331    #----
17332
17333    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17334    # but calculate the difference in Cygwin environment before/after running it and then
17335    # apply the diff.
17336
17337    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17338      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17339      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17340      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17341    else
17342      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17343      _dosbash=`cmd //c echo \`which bash\``
17344    fi
17345
17346    # generate the set of exported vars before/after the vs10 setup
17347    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17348    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17349    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17350    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17351
17352    # Now execute the newly created bat file.
17353    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17354    cmd /c localdevenvtmp.bat | cat
17355
17356    # apply the diff (less some non-vs10 vars named by "!")
17357    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17358    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17359    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17360
17361    # cleanup
17362    $RM localdevenvtmp*
17363    #----
17364    cd $CURDIR
17365    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17367$as_echo "no" >&6; }
17368      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17369$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17370      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17371$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17372      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17373$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17374      as_fn_error $? "Cannot continue" "$LINENO" 5
17375    fi
17376
17377    # Now set all paths and other env variables. This will allow the rest of
17378    # the configure script to find and run the compiler in the proper way.
17379    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17380$as_echo "$as_me: Setting extracted environment variables" >&6;}
17381    . $OUTPUT_ROOT/localdevenv.sh
17382  else
17383    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17384    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17385$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17386  fi
17387
17388  # At this point, we should have corrent variables in the environment, or we can't continue.
17389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17390$as_echo_n "checking for Visual Studio variables... " >&6; }
17391
17392  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17393    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17395$as_echo "present but broken" >&6; }
17396      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17397    else
17398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17399$as_echo "ok" >&6; }
17400      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17401      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17402      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17403      # Remove any paths containing # (typically F#) as that messes up make
17404      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17405      VS_PATH="$PATH"
17406
17407
17408
17409    fi
17410  else
17411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17412$as_echo "not found" >&6; }
17413
17414    if test "x$VS_ENV_CMD" = x; then
17415      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17416$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17417      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17418$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17419    else
17420      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17421$as_echo "$as_me: Running the extraction script failed." >&6;}
17422    fi
17423    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17424$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17425    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17426$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17427    as_fn_error $? "Cannot continue" "$LINENO" 5
17428  fi
17429
17430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17431$as_echo_n "checking for msvcr100.dll... " >&6; }
17432
17433# Check whether --with-msvcr-dll was given.
17434if test "${with_msvcr_dll+set}" = set; then :
17435  withval=$with_msvcr_dll;
17436fi
17437
17438  if test "x$with_msvcr_dll" != x; then
17439    MSVCR_DLL="$with_msvcr_dll"
17440  else
17441    if test "x$VCINSTALLDIR" != x; then
17442      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17443        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17444      else
17445        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17446        if test "x$MSVCR_DLL" = x; then
17447          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17448        fi
17449      fi
17450      if test "x$MSVCR_DLL" != x; then
17451        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17452$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17453      else
17454        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17455$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17456      fi
17457    fi
17458    # Try some fallback alternatives
17459    if test "x$MSVCR_DLL" = x; then
17460      # If visual studio express is installed, there is usually one with the debugger
17461      if test "x$VS100COMNTOOLS" != x; then
17462        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17463          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17464          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17465$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17466        fi
17467      fi
17468    fi
17469    if test "x$MSVCR_DLL" = x; then
17470      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17471        # Fallback for 32bit builds, look in the windows directory.
17472        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17473          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17474$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17475          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17476        fi
17477      fi
17478    fi
17479  fi
17480  if test "x$MSVCR_DLL" = x; then
17481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17482$as_echo "no" >&6; }
17483    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17484  fi
17485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17486$as_echo "$MSVCR_DLL" >&6; }
17487
17488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17489
17490  # Input might be given as Windows format, start by converting to
17491  # unix format.
17492  path="$MSVCR_DLL"
17493  new_path=`$CYGPATH -u "$path"`
17494
17495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17498  # "foo.exe" is OK but "foo" is an error.
17499  #
17500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17501  # It is also a way to make sure we got the proper file name for the real test later on.
17502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17503  if test "x$test_shortpath" = x; then
17504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17505$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17506    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17507  fi
17508
17509  # Call helper function which possibly converts this using DOS-style short mode.
17510  # If so, the updated path is stored in $new_path.
17511
17512  input_path="$new_path"
17513  # Check if we need to convert this using DOS-style short mode. If the path
17514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17515  # take no chances and rewrite it.
17516  # Note: m4 eats our [], so we need to use [ and ] instead.
17517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17518  if test "x$has_forbidden_chars" != x; then
17519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17523      # Going to short mode and back again did indeed matter. Since short mode is
17524      # case insensitive, let's make it lowercase to improve readability.
17525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17526      # Now convert it back to Unix-stile (cygpath)
17527      input_path=`$CYGPATH -u "$shortmode_path"`
17528      new_path="$input_path"
17529    fi
17530  fi
17531
17532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17533  if test "x$test_cygdrive_prefix" = x; then
17534    # As a simple fix, exclude /usr/bin since it's not a real path.
17535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17537      # a path prefixed by /cygdrive for fixpath to work.
17538      new_path="$CYGWIN_ROOT_PATH$input_path"
17539    fi
17540  fi
17541
17542
17543  if test "x$path" != "x$new_path"; then
17544    MSVCR_DLL="$new_path"
17545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17546$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17547  fi
17548
17549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17550
17551  path="$MSVCR_DLL"
17552  has_colon=`$ECHO $path | $GREP ^.:`
17553  new_path="$path"
17554  if test "x$has_colon" = x; then
17555    # Not in mixed or Windows style, start by that.
17556    new_path=`cmd //c echo $path`
17557  fi
17558
17559
17560  input_path="$new_path"
17561  # Check if we need to convert this using DOS-style short mode. If the path
17562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17563  # take no chances and rewrite it.
17564  # Note: m4 eats our [], so we need to use [ and ] instead.
17565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17566  if test "x$has_forbidden_chars" != x; then
17567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17569  fi
17570
17571
17572  windows_path="$new_path"
17573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17574    unix_path=`$CYGPATH -u "$windows_path"`
17575    new_path="$unix_path"
17576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17578    new_path="$unix_path"
17579  fi
17580
17581  if test "x$path" != "x$new_path"; then
17582    MSVCR_DLL="$new_path"
17583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17584$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17585  fi
17586
17587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17589
17590  else
17591    # We're on a posix platform. Hooray! :)
17592    path="$MSVCR_DLL"
17593    has_space=`$ECHO "$path" | $GREP " "`
17594    if test "x$has_space" != x; then
17595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17596$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17597      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17598    fi
17599
17600    # Use eval to expand a potential ~
17601    eval path="$path"
17602    if test ! -f "$path" && test ! -d "$path"; then
17603      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17604    fi
17605
17606    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17607  fi
17608
17609
17610
17611
17612# Check whether --with-dxsdk was given.
17613if test "${with_dxsdk+set}" = set; then :
17614  withval=$with_dxsdk;
17615fi
17616
17617
17618# Check whether --with-dxsdk-lib was given.
17619if test "${with_dxsdk_lib+set}" = set; then :
17620  withval=$with_dxsdk_lib;
17621fi
17622
17623
17624# Check whether --with-dxsdk-include was given.
17625if test "${with_dxsdk_include+set}" = set; then :
17626  withval=$with_dxsdk_include;
17627fi
17628
17629
17630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17631$as_echo_n "checking for DirectX SDK... " >&6; }
17632
17633  if test "x$with_dxsdk" != x; then
17634    dxsdk_path="$with_dxsdk"
17635  elif test "x$DXSDK_DIR" != x; then
17636    dxsdk_path="$DXSDK_DIR"
17637  elif test -d "C:/DXSDK"; then
17638    dxsdk_path="C:/DXSDK"
17639  else
17640    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17641  fi
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17643$as_echo "$dxsdk_path" >&6; }
17644
17645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17646
17647  # Input might be given as Windows format, start by converting to
17648  # unix format.
17649  path="$dxsdk_path"
17650  new_path=`$CYGPATH -u "$path"`
17651
17652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17655  # "foo.exe" is OK but "foo" is an error.
17656  #
17657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17658  # It is also a way to make sure we got the proper file name for the real test later on.
17659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17660  if test "x$test_shortpath" = x; then
17661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17662$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17663    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17664  fi
17665
17666  # Call helper function which possibly converts this using DOS-style short mode.
17667  # If so, the updated path is stored in $new_path.
17668
17669  input_path="$new_path"
17670  # Check if we need to convert this using DOS-style short mode. If the path
17671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17672  # take no chances and rewrite it.
17673  # Note: m4 eats our [], so we need to use [ and ] instead.
17674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17675  if test "x$has_forbidden_chars" != x; then
17676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17680      # Going to short mode and back again did indeed matter. Since short mode is
17681      # case insensitive, let's make it lowercase to improve readability.
17682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17683      # Now convert it back to Unix-stile (cygpath)
17684      input_path=`$CYGPATH -u "$shortmode_path"`
17685      new_path="$input_path"
17686    fi
17687  fi
17688
17689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17690  if test "x$test_cygdrive_prefix" = x; then
17691    # As a simple fix, exclude /usr/bin since it's not a real path.
17692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17694      # a path prefixed by /cygdrive for fixpath to work.
17695      new_path="$CYGWIN_ROOT_PATH$input_path"
17696    fi
17697  fi
17698
17699
17700  if test "x$path" != "x$new_path"; then
17701    dxsdk_path="$new_path"
17702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17703$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17704  fi
17705
17706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17707
17708  path="$dxsdk_path"
17709  has_colon=`$ECHO $path | $GREP ^.:`
17710  new_path="$path"
17711  if test "x$has_colon" = x; then
17712    # Not in mixed or Windows style, start by that.
17713    new_path=`cmd //c echo $path`
17714  fi
17715
17716
17717  input_path="$new_path"
17718  # Check if we need to convert this using DOS-style short mode. If the path
17719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17720  # take no chances and rewrite it.
17721  # Note: m4 eats our [], so we need to use [ and ] instead.
17722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17723  if test "x$has_forbidden_chars" != x; then
17724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17726  fi
17727
17728
17729  windows_path="$new_path"
17730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17731    unix_path=`$CYGPATH -u "$windows_path"`
17732    new_path="$unix_path"
17733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17735    new_path="$unix_path"
17736  fi
17737
17738  if test "x$path" != "x$new_path"; then
17739    dxsdk_path="$new_path"
17740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17741$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17742  fi
17743
17744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17746
17747  else
17748    # We're on a posix platform. Hooray! :)
17749    path="$dxsdk_path"
17750    has_space=`$ECHO "$path" | $GREP " "`
17751    if test "x$has_space" != x; then
17752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17753$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17754      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17755    fi
17756
17757    # Use eval to expand a potential ~
17758    eval path="$path"
17759    if test ! -f "$path" && test ! -d "$path"; then
17760      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17761    fi
17762
17763    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17764  fi
17765
17766
17767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17768$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17769  if test "x$with_dxsdk_lib" != x; then
17770    DXSDK_LIB_PATH="$with_dxsdk_lib"
17771  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17772    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17773  else
17774    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17775  fi
17776  # dsound.lib is linked to in jsoundds
17777  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17778    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17779  fi
17780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17781$as_echo "$DXSDK_LIB_PATH" >&6; }
17782
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784
17785  # Input might be given as Windows format, start by converting to
17786  # unix format.
17787  path="$DXSDK_LIB_PATH"
17788  new_path=`$CYGPATH -u "$path"`
17789
17790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17793  # "foo.exe" is OK but "foo" is an error.
17794  #
17795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17796  # It is also a way to make sure we got the proper file name for the real test later on.
17797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17798  if test "x$test_shortpath" = x; then
17799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17800$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17801    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17802  fi
17803
17804  # Call helper function which possibly converts this using DOS-style short mode.
17805  # If so, the updated path is stored in $new_path.
17806
17807  input_path="$new_path"
17808  # Check if we need to convert this using DOS-style short mode. If the path
17809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17810  # take no chances and rewrite it.
17811  # Note: m4 eats our [], so we need to use [ and ] instead.
17812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17813  if test "x$has_forbidden_chars" != x; then
17814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17818      # Going to short mode and back again did indeed matter. Since short mode is
17819      # case insensitive, let's make it lowercase to improve readability.
17820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17821      # Now convert it back to Unix-stile (cygpath)
17822      input_path=`$CYGPATH -u "$shortmode_path"`
17823      new_path="$input_path"
17824    fi
17825  fi
17826
17827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17828  if test "x$test_cygdrive_prefix" = x; then
17829    # As a simple fix, exclude /usr/bin since it's not a real path.
17830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17832      # a path prefixed by /cygdrive for fixpath to work.
17833      new_path="$CYGWIN_ROOT_PATH$input_path"
17834    fi
17835  fi
17836
17837
17838  if test "x$path" != "x$new_path"; then
17839    DXSDK_LIB_PATH="$new_path"
17840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17841$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17842  fi
17843
17844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17845
17846  path="$DXSDK_LIB_PATH"
17847  has_colon=`$ECHO $path | $GREP ^.:`
17848  new_path="$path"
17849  if test "x$has_colon" = x; then
17850    # Not in mixed or Windows style, start by that.
17851    new_path=`cmd //c echo $path`
17852  fi
17853
17854
17855  input_path="$new_path"
17856  # Check if we need to convert this using DOS-style short mode. If the path
17857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17858  # take no chances and rewrite it.
17859  # Note: m4 eats our [], so we need to use [ and ] instead.
17860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17861  if test "x$has_forbidden_chars" != x; then
17862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17864  fi
17865
17866
17867  windows_path="$new_path"
17868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17869    unix_path=`$CYGPATH -u "$windows_path"`
17870    new_path="$unix_path"
17871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17873    new_path="$unix_path"
17874  fi
17875
17876  if test "x$path" != "x$new_path"; then
17877    DXSDK_LIB_PATH="$new_path"
17878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17879$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17880  fi
17881
17882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17884
17885  else
17886    # We're on a posix platform. Hooray! :)
17887    path="$DXSDK_LIB_PATH"
17888    has_space=`$ECHO "$path" | $GREP " "`
17889    if test "x$has_space" != x; then
17890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17891$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17892      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17893    fi
17894
17895    # Use eval to expand a potential ~
17896    eval path="$path"
17897    if test ! -f "$path" && test ! -d "$path"; then
17898      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17899    fi
17900
17901    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17902  fi
17903
17904
17905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17906$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17907  if test "x$with_dxsdk_include" != x; then
17908    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17909  else
17910    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17911  fi
17912  # dsound.h is included in jsoundds
17913  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17914    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17915  fi
17916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17917$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17918
17919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17920
17921  # Input might be given as Windows format, start by converting to
17922  # unix format.
17923  path="$DXSDK_INCLUDE_PATH"
17924  new_path=`$CYGPATH -u "$path"`
17925
17926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17929  # "foo.exe" is OK but "foo" is an error.
17930  #
17931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17932  # It is also a way to make sure we got the proper file name for the real test later on.
17933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17934  if test "x$test_shortpath" = x; then
17935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17936$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17937    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17938  fi
17939
17940  # Call helper function which possibly converts this using DOS-style short mode.
17941  # If so, the updated path is stored in $new_path.
17942
17943  input_path="$new_path"
17944  # Check if we need to convert this using DOS-style short mode. If the path
17945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17946  # take no chances and rewrite it.
17947  # Note: m4 eats our [], so we need to use [ and ] instead.
17948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17949  if test "x$has_forbidden_chars" != x; then
17950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17954      # Going to short mode and back again did indeed matter. Since short mode is
17955      # case insensitive, let's make it lowercase to improve readability.
17956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17957      # Now convert it back to Unix-stile (cygpath)
17958      input_path=`$CYGPATH -u "$shortmode_path"`
17959      new_path="$input_path"
17960    fi
17961  fi
17962
17963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17964  if test "x$test_cygdrive_prefix" = x; then
17965    # As a simple fix, exclude /usr/bin since it's not a real path.
17966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17968      # a path prefixed by /cygdrive for fixpath to work.
17969      new_path="$CYGWIN_ROOT_PATH$input_path"
17970    fi
17971  fi
17972
17973
17974  if test "x$path" != "x$new_path"; then
17975    DXSDK_INCLUDE_PATH="$new_path"
17976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17977$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17978  fi
17979
17980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17981
17982  path="$DXSDK_INCLUDE_PATH"
17983  has_colon=`$ECHO $path | $GREP ^.:`
17984  new_path="$path"
17985  if test "x$has_colon" = x; then
17986    # Not in mixed or Windows style, start by that.
17987    new_path=`cmd //c echo $path`
17988  fi
17989
17990
17991  input_path="$new_path"
17992  # Check if we need to convert this using DOS-style short mode. If the path
17993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17994  # take no chances and rewrite it.
17995  # Note: m4 eats our [], so we need to use [ and ] instead.
17996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17997  if test "x$has_forbidden_chars" != x; then
17998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18000  fi
18001
18002
18003  windows_path="$new_path"
18004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18005    unix_path=`$CYGPATH -u "$windows_path"`
18006    new_path="$unix_path"
18007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18009    new_path="$unix_path"
18010  fi
18011
18012  if test "x$path" != "x$new_path"; then
18013    DXSDK_INCLUDE_PATH="$new_path"
18014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18015$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18016  fi
18017
18018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18020
18021  else
18022    # We're on a posix platform. Hooray! :)
18023    path="$DXSDK_INCLUDE_PATH"
18024    has_space=`$ECHO "$path" | $GREP " "`
18025    if test "x$has_space" != x; then
18026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18027$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18028      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18029    fi
18030
18031    # Use eval to expand a potential ~
18032    eval path="$path"
18033    if test ! -f "$path" && test ! -d "$path"; then
18034      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18035    fi
18036
18037    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
18038  fi
18039
18040
18041
18042
18043  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18044
18045fi
18046
18047
18048
18049# If --build AND --host is set, then the configure script will find any
18050# cross compilation tools in the PATH. Cross compilation tools
18051# follows the cross compilation standard where they are prefixed with ${host}.
18052# For example the binary i686-sun-solaris2.10-gcc
18053# will cross compile for i686-sun-solaris2.10
18054# If neither of build and host is not set, then build=host and the
18055# default compiler found in the path will be used.
18056# Setting only --host, does not seem to be really supported.
18057# Please set both --build and --host if you want to cross compile.
18058
18059if test "x$COMPILE_TYPE" = "xcross"; then
18060    # Now we to find a C/C++ compiler that can build executables for the build
18061    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18062    # once. Also, we need to do this before adding a tools dir to the path,
18063    # otherwise we might pick up cross-compilers which don't use standard naming.
18064    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18065    # to wait until they are properly discovered.
18066    for ac_prog in cl cc gcc
18067do
18068  # Extract the first word of "$ac_prog", so it can be a program name with args.
18069set dummy $ac_prog; ac_word=$2
18070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18071$as_echo_n "checking for $ac_word... " >&6; }
18072if ${ac_cv_path_BUILD_CC+:} false; then :
18073  $as_echo_n "(cached) " >&6
18074else
18075  case $BUILD_CC in
18076  [\\/]* | ?:[\\/]*)
18077  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18078  ;;
18079  *)
18080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18081for as_dir in $PATH
18082do
18083  IFS=$as_save_IFS
18084  test -z "$as_dir" && as_dir=.
18085    for ac_exec_ext in '' $ac_executable_extensions; do
18086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18087    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18089    break 2
18090  fi
18091done
18092  done
18093IFS=$as_save_IFS
18094
18095  ;;
18096esac
18097fi
18098BUILD_CC=$ac_cv_path_BUILD_CC
18099if test -n "$BUILD_CC"; then
18100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18101$as_echo "$BUILD_CC" >&6; }
18102else
18103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18104$as_echo "no" >&6; }
18105fi
18106
18107
18108  test -n "$BUILD_CC" && break
18109done
18110
18111
18112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18113
18114  # First separate the path from the arguments. This will split at the first
18115  # space.
18116  complete="$BUILD_CC"
18117  path="${complete%% *}"
18118  tmp="$complete EOL"
18119  arguments="${tmp#* }"
18120
18121  # Input might be given as Windows format, start by converting to
18122  # unix format.
18123  new_path=`$CYGPATH -u "$path"`
18124
18125  # Now try to locate executable using which
18126  new_path=`$WHICH "$new_path" 2> /dev/null`
18127  # bat and cmd files are not always considered executable in cygwin causing which
18128  # to not find them
18129  if test "x$new_path" = x \
18130           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18131           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18132    new_path=`$CYGPATH -u "$path"`
18133  fi
18134  if test "x$new_path" = x; then
18135    # Oops. Which didn't find the executable.
18136    # The splitting of arguments from the executable at a space might have been incorrect,
18137    # since paths with space are more likely in Windows. Give it another try with the whole
18138    # argument.
18139    path="$complete"
18140    arguments="EOL"
18141    new_path=`$CYGPATH -u "$path"`
18142    new_path=`$WHICH "$new_path" 2> /dev/null`
18143    # bat and cmd files are not always considered executable in cygwin causing which
18144    # to not find them
18145    if test "x$new_path" = x \
18146             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18147             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18148      new_path=`$CYGPATH -u "$path"`
18149    fi
18150    if test "x$new_path" = x; then
18151      # It's still not found. Now this is an unrecoverable error.
18152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18153$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18154      has_space=`$ECHO "$complete" | $GREP " "`
18155      if test "x$has_space" != x; then
18156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18158      fi
18159      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18160    fi
18161  fi
18162
18163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18166  # "foo.exe" is OK but "foo" is an error.
18167  #
18168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18169  # It is also a way to make sure we got the proper file name for the real test later on.
18170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18171  if test "x$test_shortpath" = x; then
18172    # Short path failed, file does not exist as specified.
18173    # Try adding .exe or .cmd
18174    if test -f "${new_path}.exe"; then
18175       input_to_shortpath="${new_path}.exe"
18176    elif test -f "${new_path}.cmd"; then
18177       input_to_shortpath="${new_path}.cmd"
18178    else
18179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18180$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18181      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18182$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18183      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18184    fi
18185  else
18186    input_to_shortpath="$new_path"
18187  fi
18188
18189  # Call helper function which possibly converts this using DOS-style short mode.
18190  # If so, the updated path is stored in $new_path.
18191  new_path="$input_to_shortpath"
18192
18193  input_path="$input_to_shortpath"
18194  # Check if we need to convert this using DOS-style short mode. If the path
18195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18196  # take no chances and rewrite it.
18197  # Note: m4 eats our [], so we need to use [ and ] instead.
18198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18199  if test "x$has_forbidden_chars" != x; then
18200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18204      # Going to short mode and back again did indeed matter. Since short mode is
18205      # case insensitive, let's make it lowercase to improve readability.
18206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18207      # Now convert it back to Unix-stile (cygpath)
18208      input_path=`$CYGPATH -u "$shortmode_path"`
18209      new_path="$input_path"
18210    fi
18211  fi
18212
18213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18214  if test "x$test_cygdrive_prefix" = x; then
18215    # As a simple fix, exclude /usr/bin since it's not a real path.
18216    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18218      # a path prefixed by /cygdrive for fixpath to work.
18219      new_path="$CYGWIN_ROOT_PATH$input_path"
18220    fi
18221  fi
18222
18223  # remove trailing .exe if any
18224  new_path="${new_path/%.exe/}"
18225
18226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18227
18228  # First separate the path from the arguments. This will split at the first
18229  # space.
18230  complete="$BUILD_CC"
18231  path="${complete%% *}"
18232  tmp="$complete EOL"
18233  arguments="${tmp#* }"
18234
18235  # Input might be given as Windows format, start by converting to
18236  # unix format.
18237  new_path="$path"
18238
18239  windows_path="$new_path"
18240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18241    unix_path=`$CYGPATH -u "$windows_path"`
18242    new_path="$unix_path"
18243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18245    new_path="$unix_path"
18246  fi
18247
18248
18249  # Now try to locate executable using which
18250  new_path=`$WHICH "$new_path" 2> /dev/null`
18251
18252  if test "x$new_path" = x; then
18253    # Oops. Which didn't find the executable.
18254    # The splitting of arguments from the executable at a space might have been incorrect,
18255    # since paths with space are more likely in Windows. Give it another try with the whole
18256    # argument.
18257    path="$complete"
18258    arguments="EOL"
18259    new_path="$path"
18260
18261  windows_path="$new_path"
18262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18263    unix_path=`$CYGPATH -u "$windows_path"`
18264    new_path="$unix_path"
18265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18267    new_path="$unix_path"
18268  fi
18269
18270
18271    new_path=`$WHICH "$new_path" 2> /dev/null`
18272
18273    if test "x$new_path" = x; then
18274      # It's still not found. Now this is an unrecoverable error.
18275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18276$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18277      has_space=`$ECHO "$complete" | $GREP " "`
18278      if test "x$has_space" != x; then
18279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18281      fi
18282      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18283    fi
18284  fi
18285
18286  # Now new_path has a complete unix path to the binary
18287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18288    # Keep paths in /bin as-is, but remove trailing .exe if any
18289    new_path="${new_path/%.exe/}"
18290    # Do not save /bin paths to all_fixpath_prefixes!
18291  else
18292    # Not in mixed or Windows style, start by that.
18293    new_path=`cmd //c echo $new_path`
18294
18295  input_path="$new_path"
18296  # Check if we need to convert this using DOS-style short mode. If the path
18297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18298  # take no chances and rewrite it.
18299  # Note: m4 eats our [], so we need to use [ and ] instead.
18300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18301  if test "x$has_forbidden_chars" != x; then
18302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18304  fi
18305
18306    # Output is in $new_path
18307
18308  windows_path="$new_path"
18309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18310    unix_path=`$CYGPATH -u "$windows_path"`
18311    new_path="$unix_path"
18312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18314    new_path="$unix_path"
18315  fi
18316
18317    # remove trailing .exe if any
18318    new_path="${new_path/%.exe/}"
18319
18320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18322  fi
18323
18324  else
18325    # We're on a posix platform. Hooray! :)
18326    # First separate the path from the arguments. This will split at the first
18327    # space.
18328    complete="$BUILD_CC"
18329    path="${complete%% *}"
18330    tmp="$complete EOL"
18331    arguments="${tmp#* }"
18332
18333    # Cannot rely on the command "which" here since it doesn't always work.
18334    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18335    if test -z "$is_absolute_path"; then
18336      # Path to executable is not absolute. Find it.
18337      IFS_save="$IFS"
18338      IFS=:
18339      for p in $PATH; do
18340        if test -f "$p/$path" && test -x "$p/$path"; then
18341          new_path="$p/$path"
18342          break
18343        fi
18344      done
18345      IFS="$IFS_save"
18346    else
18347      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18348$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18349      new_path="$path"
18350    fi
18351
18352    if test "x$new_path" = x; then
18353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18354$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18355        has_space=`$ECHO "$complete" | $GREP " "`
18356        if test "x$has_space" != x; then
18357          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18358$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18359        fi
18360        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18361      fi
18362  fi
18363
18364      # Now join together the path and the arguments once again
18365      if test "x$arguments" != xEOL; then
18366        new_complete="$new_path ${arguments% *}"
18367      else
18368        new_complete="$new_path"
18369      fi
18370
18371  if test "x$complete" != "x$new_complete"; then
18372      BUILD_CC="$new_complete"
18373      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18374$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18375    fi
18376
18377    for ac_prog in cl CC g++
18378do
18379  # Extract the first word of "$ac_prog", so it can be a program name with args.
18380set dummy $ac_prog; ac_word=$2
18381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18382$as_echo_n "checking for $ac_word... " >&6; }
18383if ${ac_cv_path_BUILD_CXX+:} false; then :
18384  $as_echo_n "(cached) " >&6
18385else
18386  case $BUILD_CXX in
18387  [\\/]* | ?:[\\/]*)
18388  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18389  ;;
18390  *)
18391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18392for as_dir in $PATH
18393do
18394  IFS=$as_save_IFS
18395  test -z "$as_dir" && as_dir=.
18396    for ac_exec_ext in '' $ac_executable_extensions; do
18397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18398    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18400    break 2
18401  fi
18402done
18403  done
18404IFS=$as_save_IFS
18405
18406  ;;
18407esac
18408fi
18409BUILD_CXX=$ac_cv_path_BUILD_CXX
18410if test -n "$BUILD_CXX"; then
18411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18412$as_echo "$BUILD_CXX" >&6; }
18413else
18414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18415$as_echo "no" >&6; }
18416fi
18417
18418
18419  test -n "$BUILD_CXX" && break
18420done
18421
18422
18423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18424
18425  # First separate the path from the arguments. This will split at the first
18426  # space.
18427  complete="$BUILD_CXX"
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=`$CYGPATH -u "$path"`
18435
18436  # Now try to locate executable using which
18437  new_path=`$WHICH "$new_path" 2> /dev/null`
18438  # bat and cmd files are not always considered executable in cygwin causing which
18439  # to not find them
18440  if test "x$new_path" = x \
18441           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18442           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18443    new_path=`$CYGPATH -u "$path"`
18444  fi
18445  if test "x$new_path" = x; then
18446    # Oops. Which didn't find the executable.
18447    # The splitting of arguments from the executable at a space might have been incorrect,
18448    # since paths with space are more likely in Windows. Give it another try with the whole
18449    # argument.
18450    path="$complete"
18451    arguments="EOL"
18452    new_path=`$CYGPATH -u "$path"`
18453    new_path=`$WHICH "$new_path" 2> /dev/null`
18454    # bat and cmd files are not always considered executable in cygwin causing which
18455    # to not find them
18456    if test "x$new_path" = x \
18457             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18458             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18459      new_path=`$CYGPATH -u "$path"`
18460    fi
18461    if test "x$new_path" = x; then
18462      # It's still not found. Now this is an unrecoverable error.
18463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18464$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18465      has_space=`$ECHO "$complete" | $GREP " "`
18466      if test "x$has_space" != x; then
18467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18469      fi
18470      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18471    fi
18472  fi
18473
18474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18477  # "foo.exe" is OK but "foo" is an error.
18478  #
18479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18480  # It is also a way to make sure we got the proper file name for the real test later on.
18481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18482  if test "x$test_shortpath" = x; then
18483    # Short path failed, file does not exist as specified.
18484    # Try adding .exe or .cmd
18485    if test -f "${new_path}.exe"; then
18486       input_to_shortpath="${new_path}.exe"
18487    elif test -f "${new_path}.cmd"; then
18488       input_to_shortpath="${new_path}.cmd"
18489    else
18490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18491$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18492      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18493$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18494      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18495    fi
18496  else
18497    input_to_shortpath="$new_path"
18498  fi
18499
18500  # Call helper function which possibly converts this using DOS-style short mode.
18501  # If so, the updated path is stored in $new_path.
18502  new_path="$input_to_shortpath"
18503
18504  input_path="$input_to_shortpath"
18505  # Check if we need to convert this using DOS-style short mode. If the path
18506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18507  # take no chances and rewrite it.
18508  # Note: m4 eats our [], so we need to use [ and ] instead.
18509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18510  if test "x$has_forbidden_chars" != x; then
18511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18515      # Going to short mode and back again did indeed matter. Since short mode is
18516      # case insensitive, let's make it lowercase to improve readability.
18517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18518      # Now convert it back to Unix-stile (cygpath)
18519      input_path=`$CYGPATH -u "$shortmode_path"`
18520      new_path="$input_path"
18521    fi
18522  fi
18523
18524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18525  if test "x$test_cygdrive_prefix" = x; then
18526    # As a simple fix, exclude /usr/bin since it's not a real path.
18527    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18529      # a path prefixed by /cygdrive for fixpath to work.
18530      new_path="$CYGWIN_ROOT_PATH$input_path"
18531    fi
18532  fi
18533
18534  # remove trailing .exe if any
18535  new_path="${new_path/%.exe/}"
18536
18537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18538
18539  # First separate the path from the arguments. This will split at the first
18540  # space.
18541  complete="$BUILD_CXX"
18542  path="${complete%% *}"
18543  tmp="$complete EOL"
18544  arguments="${tmp#* }"
18545
18546  # Input might be given as Windows format, start by converting to
18547  # unix format.
18548  new_path="$path"
18549
18550  windows_path="$new_path"
18551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552    unix_path=`$CYGPATH -u "$windows_path"`
18553    new_path="$unix_path"
18554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18556    new_path="$unix_path"
18557  fi
18558
18559
18560  # Now try to locate executable using which
18561  new_path=`$WHICH "$new_path" 2> /dev/null`
18562
18563  if test "x$new_path" = x; then
18564    # Oops. Which didn't find the executable.
18565    # The splitting of arguments from the executable at a space might have been incorrect,
18566    # since paths with space are more likely in Windows. Give it another try with the whole
18567    # argument.
18568    path="$complete"
18569    arguments="EOL"
18570    new_path="$path"
18571
18572  windows_path="$new_path"
18573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18574    unix_path=`$CYGPATH -u "$windows_path"`
18575    new_path="$unix_path"
18576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18578    new_path="$unix_path"
18579  fi
18580
18581
18582    new_path=`$WHICH "$new_path" 2> /dev/null`
18583
18584    if test "x$new_path" = x; then
18585      # It's still not found. Now this is an unrecoverable error.
18586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18587$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18588      has_space=`$ECHO "$complete" | $GREP " "`
18589      if test "x$has_space" != x; then
18590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18592      fi
18593      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18594    fi
18595  fi
18596
18597  # Now new_path has a complete unix path to the binary
18598  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18599    # Keep paths in /bin as-is, but remove trailing .exe if any
18600    new_path="${new_path/%.exe/}"
18601    # Do not save /bin paths to all_fixpath_prefixes!
18602  else
18603    # Not in mixed or Windows style, start by that.
18604    new_path=`cmd //c echo $new_path`
18605
18606  input_path="$new_path"
18607  # Check if we need to convert this using DOS-style short mode. If the path
18608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18609  # take no chances and rewrite it.
18610  # Note: m4 eats our [], so we need to use [ and ] instead.
18611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18612  if test "x$has_forbidden_chars" != x; then
18613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18615  fi
18616
18617    # Output is in $new_path
18618
18619  windows_path="$new_path"
18620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18621    unix_path=`$CYGPATH -u "$windows_path"`
18622    new_path="$unix_path"
18623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18625    new_path="$unix_path"
18626  fi
18627
18628    # remove trailing .exe if any
18629    new_path="${new_path/%.exe/}"
18630
18631    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18632    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18633  fi
18634
18635  else
18636    # We're on a posix platform. Hooray! :)
18637    # First separate the path from the arguments. This will split at the first
18638    # space.
18639    complete="$BUILD_CXX"
18640    path="${complete%% *}"
18641    tmp="$complete EOL"
18642    arguments="${tmp#* }"
18643
18644    # Cannot rely on the command "which" here since it doesn't always work.
18645    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18646    if test -z "$is_absolute_path"; then
18647      # Path to executable is not absolute. Find it.
18648      IFS_save="$IFS"
18649      IFS=:
18650      for p in $PATH; do
18651        if test -f "$p/$path" && test -x "$p/$path"; then
18652          new_path="$p/$path"
18653          break
18654        fi
18655      done
18656      IFS="$IFS_save"
18657    else
18658      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18659$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18660      new_path="$path"
18661    fi
18662
18663    if test "x$new_path" = x; then
18664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18665$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18666        has_space=`$ECHO "$complete" | $GREP " "`
18667        if test "x$has_space" != x; then
18668          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18669$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18670        fi
18671        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18672      fi
18673  fi
18674
18675      # Now join together the path and the arguments once again
18676      if test "x$arguments" != xEOL; then
18677        new_complete="$new_path ${arguments% *}"
18678      else
18679        new_complete="$new_path"
18680      fi
18681
18682  if test "x$complete" != "x$new_complete"; then
18683      BUILD_CXX="$new_complete"
18684      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18685$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18686    fi
18687
18688    # Extract the first word of "ld", so it can be a program name with args.
18689set dummy ld; ac_word=$2
18690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18691$as_echo_n "checking for $ac_word... " >&6; }
18692if ${ac_cv_path_BUILD_LD+:} false; then :
18693  $as_echo_n "(cached) " >&6
18694else
18695  case $BUILD_LD in
18696  [\\/]* | ?:[\\/]*)
18697  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18698  ;;
18699  *)
18700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18701for as_dir in $PATH
18702do
18703  IFS=$as_save_IFS
18704  test -z "$as_dir" && as_dir=.
18705    for ac_exec_ext in '' $ac_executable_extensions; do
18706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18707    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18709    break 2
18710  fi
18711done
18712  done
18713IFS=$as_save_IFS
18714
18715  ;;
18716esac
18717fi
18718BUILD_LD=$ac_cv_path_BUILD_LD
18719if test -n "$BUILD_LD"; then
18720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18721$as_echo "$BUILD_LD" >&6; }
18722else
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18724$as_echo "no" >&6; }
18725fi
18726
18727
18728
18729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18730
18731  # First separate the path from the arguments. This will split at the first
18732  # space.
18733  complete="$BUILD_LD"
18734  path="${complete%% *}"
18735  tmp="$complete EOL"
18736  arguments="${tmp#* }"
18737
18738  # Input might be given as Windows format, start by converting to
18739  # unix format.
18740  new_path=`$CYGPATH -u "$path"`
18741
18742  # Now try to locate executable using which
18743  new_path=`$WHICH "$new_path" 2> /dev/null`
18744  # bat and cmd files are not always considered executable in cygwin causing which
18745  # to not find them
18746  if test "x$new_path" = x \
18747           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18748           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18749    new_path=`$CYGPATH -u "$path"`
18750  fi
18751  if test "x$new_path" = x; then
18752    # Oops. Which didn't find the executable.
18753    # The splitting of arguments from the executable at a space might have been incorrect,
18754    # since paths with space are more likely in Windows. Give it another try with the whole
18755    # argument.
18756    path="$complete"
18757    arguments="EOL"
18758    new_path=`$CYGPATH -u "$path"`
18759    new_path=`$WHICH "$new_path" 2> /dev/null`
18760    # bat and cmd files are not always considered executable in cygwin causing which
18761    # to not find them
18762    if test "x$new_path" = x \
18763             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18764             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18765      new_path=`$CYGPATH -u "$path"`
18766    fi
18767    if test "x$new_path" = x; then
18768      # It's still not found. Now this is an unrecoverable error.
18769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18770$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18771      has_space=`$ECHO "$complete" | $GREP " "`
18772      if test "x$has_space" != x; then
18773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18775      fi
18776      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18777    fi
18778  fi
18779
18780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18783  # "foo.exe" is OK but "foo" is an error.
18784  #
18785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18786  # It is also a way to make sure we got the proper file name for the real test later on.
18787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18788  if test "x$test_shortpath" = x; then
18789    # Short path failed, file does not exist as specified.
18790    # Try adding .exe or .cmd
18791    if test -f "${new_path}.exe"; then
18792       input_to_shortpath="${new_path}.exe"
18793    elif test -f "${new_path}.cmd"; then
18794       input_to_shortpath="${new_path}.cmd"
18795    else
18796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18797$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18798      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18799$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18800      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18801    fi
18802  else
18803    input_to_shortpath="$new_path"
18804  fi
18805
18806  # Call helper function which possibly converts this using DOS-style short mode.
18807  # If so, the updated path is stored in $new_path.
18808  new_path="$input_to_shortpath"
18809
18810  input_path="$input_to_shortpath"
18811  # Check if we need to convert this using DOS-style short mode. If the path
18812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18813  # take no chances and rewrite it.
18814  # Note: m4 eats our [], so we need to use [ and ] instead.
18815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18816  if test "x$has_forbidden_chars" != x; then
18817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18821      # Going to short mode and back again did indeed matter. Since short mode is
18822      # case insensitive, let's make it lowercase to improve readability.
18823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18824      # Now convert it back to Unix-stile (cygpath)
18825      input_path=`$CYGPATH -u "$shortmode_path"`
18826      new_path="$input_path"
18827    fi
18828  fi
18829
18830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18831  if test "x$test_cygdrive_prefix" = x; then
18832    # As a simple fix, exclude /usr/bin since it's not a real path.
18833    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18835      # a path prefixed by /cygdrive for fixpath to work.
18836      new_path="$CYGWIN_ROOT_PATH$input_path"
18837    fi
18838  fi
18839
18840  # remove trailing .exe if any
18841  new_path="${new_path/%.exe/}"
18842
18843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18844
18845  # First separate the path from the arguments. This will split at the first
18846  # space.
18847  complete="$BUILD_LD"
18848  path="${complete%% *}"
18849  tmp="$complete EOL"
18850  arguments="${tmp#* }"
18851
18852  # Input might be given as Windows format, start by converting to
18853  # unix format.
18854  new_path="$path"
18855
18856  windows_path="$new_path"
18857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18858    unix_path=`$CYGPATH -u "$windows_path"`
18859    new_path="$unix_path"
18860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18862    new_path="$unix_path"
18863  fi
18864
18865
18866  # Now try to locate executable using which
18867  new_path=`$WHICH "$new_path" 2> /dev/null`
18868
18869  if test "x$new_path" = x; then
18870    # Oops. Which didn't find the executable.
18871    # The splitting of arguments from the executable at a space might have been incorrect,
18872    # since paths with space are more likely in Windows. Give it another try with the whole
18873    # argument.
18874    path="$complete"
18875    arguments="EOL"
18876    new_path="$path"
18877
18878  windows_path="$new_path"
18879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18880    unix_path=`$CYGPATH -u "$windows_path"`
18881    new_path="$unix_path"
18882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18884    new_path="$unix_path"
18885  fi
18886
18887
18888    new_path=`$WHICH "$new_path" 2> /dev/null`
18889
18890    if test "x$new_path" = x; then
18891      # It's still not found. Now this is an unrecoverable error.
18892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18893$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18894      has_space=`$ECHO "$complete" | $GREP " "`
18895      if test "x$has_space" != x; then
18896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18898      fi
18899      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18900    fi
18901  fi
18902
18903  # Now new_path has a complete unix path to the binary
18904  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18905    # Keep paths in /bin as-is, but remove trailing .exe if any
18906    new_path="${new_path/%.exe/}"
18907    # Do not save /bin paths to all_fixpath_prefixes!
18908  else
18909    # Not in mixed or Windows style, start by that.
18910    new_path=`cmd //c echo $new_path`
18911
18912  input_path="$new_path"
18913  # Check if we need to convert this using DOS-style short mode. If the path
18914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18915  # take no chances and rewrite it.
18916  # Note: m4 eats our [], so we need to use [ and ] instead.
18917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18918  if test "x$has_forbidden_chars" != x; then
18919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18921  fi
18922
18923    # Output is in $new_path
18924
18925  windows_path="$new_path"
18926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18927    unix_path=`$CYGPATH -u "$windows_path"`
18928    new_path="$unix_path"
18929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18931    new_path="$unix_path"
18932  fi
18933
18934    # remove trailing .exe if any
18935    new_path="${new_path/%.exe/}"
18936
18937    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18938    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18939  fi
18940
18941  else
18942    # We're on a posix platform. Hooray! :)
18943    # First separate the path from the arguments. This will split at the first
18944    # space.
18945    complete="$BUILD_LD"
18946    path="${complete%% *}"
18947    tmp="$complete EOL"
18948    arguments="${tmp#* }"
18949
18950    # Cannot rely on the command "which" here since it doesn't always work.
18951    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18952    if test -z "$is_absolute_path"; then
18953      # Path to executable is not absolute. Find it.
18954      IFS_save="$IFS"
18955      IFS=:
18956      for p in $PATH; do
18957        if test -f "$p/$path" && test -x "$p/$path"; then
18958          new_path="$p/$path"
18959          break
18960        fi
18961      done
18962      IFS="$IFS_save"
18963    else
18964      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18965$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18966      new_path="$path"
18967    fi
18968
18969    if test "x$new_path" = x; then
18970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18971$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18972        has_space=`$ECHO "$complete" | $GREP " "`
18973        if test "x$has_space" != x; then
18974          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18975$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18976        fi
18977        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18978      fi
18979  fi
18980
18981      # Now join together the path and the arguments once again
18982      if test "x$arguments" != xEOL; then
18983        new_complete="$new_path ${arguments% *}"
18984      else
18985        new_complete="$new_path"
18986      fi
18987
18988  if test "x$complete" != "x$new_complete"; then
18989      BUILD_LD="$new_complete"
18990      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18991$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18992    fi
18993
18994fi
18995
18996
18997
18998
18999# If a devkit is found on the builddeps server, then prepend its path to the
19000# PATH variable. If there are cross compilers available in the devkit, these
19001# will be found by AC_PROG_CC et al.
19002DEVKIT=
19003
19004
19005    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19006        # Source the builddeps file again, to make sure it uses the latest variables!
19007        . $builddepsfile
19008        # Look for a target and build machine specific resource!
19009        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19010        if test "x$resource" = x; then
19011            # Ok, lets instead look for a target specific resource
19012            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19013        fi
19014        if test "x$resource" = x; then
19015            # Ok, lets instead look for a build specific resource
19016            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19017        fi
19018        if test "x$resource" = x; then
19019            # Ok, lets instead look for a generic resource
19020            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19021            resource=${builddep_devkit}
19022        fi
19023        if test "x$resource" != x; then
19024            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19025$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19026	    # If the resource in the builddeps.conf file is an existing directory,
19027	    # for example /java/linux/cups
19028	    if test -d ${resource}; then
19029	       depdir=${resource}
19030	    else
19031
19032# devkit is for example mymodule
19033# $resource is for example libs/general/libmymod_1_2_3.zip
19034# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19035# $with_builddeps_dir is for example /localhome/builddeps
19036# depdir is the name of the variable into which we store the depdir, eg MYMOD
19037# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19038# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19039    filename=`basename $resource`
19040    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19041    filebase=${filename%%.*}
19042    extension=${filename#*.}
19043    installdir=$with_builddeps_dir/$filebase
19044    if test ! -f $installdir/$filename.unpacked; then
19045        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19046$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19047        if test ! -d $installdir; then
19048            mkdir -p $installdir
19049        fi
19050        if test ! -d $installdir; then
19051            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19052        fi
19053        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19054        touch $tmpfile
19055        if test ! -f $tmpfile; then
19056            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19057        fi
19058
19059    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19060    # $tmpfile is the local file name for the downloaded file.
19061    VALID_TOOL=no
19062    if test "x$BDEPS_FTP" = xwget; then
19063       VALID_TOOL=yes
19064       wget -O $tmpfile $with_builddeps_server/$resource
19065    fi
19066    if test "x$BDEPS_FTP" = xlftp; then
19067       VALID_TOOL=yes
19068       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19069    fi
19070    if test "x$BDEPS_FTP" = xftp; then
19071        VALID_TOOL=yes
19072        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19073        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19074        FTPUSERPWD=${FTPSERVER%%@*}
19075        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19076            FTPUSER=${userpwd%%:*}
19077            FTPPWD=${userpwd#*@}
19078            FTPSERVER=${FTPSERVER#*@}
19079        else
19080            FTPUSER=ftp
19081            FTPPWD=ftp
19082        fi
19083        # the "pass" command does not work on some
19084        # ftp clients (read ftp.exe) but if it works,
19085        # passive mode is better!
19086        (\
19087            echo "user $FTPUSER $FTPPWD"        ;\
19088            echo "pass"                         ;\
19089            echo "bin"                          ;\
19090            echo "get $FTPPATH $tmpfile"              ;\
19091        ) | ftp -in $FTPSERVER
19092    fi
19093    if test "x$VALID_TOOL" != xyes; then
19094       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19095    fi
19096
19097        mv $tmpfile $installdir/$filename
19098        if test ! -s $installdir/$filename; then
19099            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19100        fi
19101        case "$extension" in
19102            zip)  echo "Unzipping $installdir/$filename..."
19103               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19104            ;;
19105            tar.gz) echo "Untaring $installdir/$filename..."
19106               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19107            ;;
19108            tgz) echo "Untaring $installdir/$filename..."
19109               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19110            ;;
19111            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19112            ;;
19113        esac
19114    fi
19115    if test -f $installdir/$filename.unpacked; then
19116        depdir=$installdir
19117    fi
19118
19119	    fi
19120            # Source the builddeps file again, because in the previous command, the depdir
19121            # was updated to point at the current build dependency install directory.
19122            . $builddepsfile
19123            # Now extract variables from the builddeps.conf files.
19124            theroot=${builddep_devkit_ROOT}
19125            thecflags=${builddep_devkit_CFLAGS}
19126            thelibs=${builddep_devkit_LIBS}
19127            if test "x$depdir" = x; then
19128                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19129            fi
19130            DEVKIT=$depdir
19131            if test "x$theroot" != x; then
19132               DEVKIT="$theroot"
19133            fi
19134            if test "x$thecflags" != x; then
19135               DEVKIT_CFLAGS="$thecflags"
19136            fi
19137            if test "x$thelibs" != x; then
19138               DEVKIT_LIBS="$thelibs"
19139            fi
19140            # Found devkit
19141                     PATH="$DEVKIT/bin:$PATH"
19142                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19143                     if test "x$x_includes" = "xNONE"; then
19144                         x_includes="$SYS_ROOT/usr/include/X11"
19145                     fi
19146                     if test "x$x_libraries" = "xNONE"; then
19147                         x_libraries="$SYS_ROOT/usr/lib"
19148                     fi
19149
19150
19151        fi
19152
19153    fi
19154
19155
19156# Store the CFLAGS etal passed to the configure script.
19157ORG_CFLAGS="$CFLAGS"
19158ORG_CXXFLAGS="$CXXFLAGS"
19159ORG_OBJCFLAGS="$OBJCFLAGS"
19160
19161# autoconf magic only relies on PATH, so update it if tools dir is specified
19162OLD_PATH="$PATH"
19163if test "x$TOOLS_DIR" != x; then
19164  PATH=$TOOLS_DIR:$PATH
19165fi
19166
19167
19168### Locate C compiler (CC)
19169
19170# On windows, only cl.exe is supported.
19171# On Solaris, cc is preferred to gcc.
19172# Elsewhere, gcc is preferred to cc.
19173
19174if test "x$CC" != x; then
19175  COMPILER_CHECK_LIST="$CC"
19176elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19177  COMPILER_CHECK_LIST="cl"
19178elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19179  COMPILER_CHECK_LIST="cc gcc"
19180else
19181  COMPILER_CHECK_LIST="gcc cc"
19182fi
19183
19184
19185  COMPILER_NAME=C
19186
19187  CC=
19188  # If TOOLS_DIR is set, check for all compiler names in there first
19189  # before checking the rest of the PATH.
19190  if test -n "$TOOLS_DIR"; then
19191    PATH_save="$PATH"
19192    PATH="$TOOLS_DIR"
19193    for ac_prog in $COMPILER_CHECK_LIST
19194do
19195  # Extract the first word of "$ac_prog", so it can be a program name with args.
19196set dummy $ac_prog; ac_word=$2
19197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19198$as_echo_n "checking for $ac_word... " >&6; }
19199if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19200  $as_echo_n "(cached) " >&6
19201else
19202  case $TOOLS_DIR_CC in
19203  [\\/]* | ?:[\\/]*)
19204  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19205  ;;
19206  *)
19207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19208for as_dir in $PATH
19209do
19210  IFS=$as_save_IFS
19211  test -z "$as_dir" && as_dir=.
19212    for ac_exec_ext in '' $ac_executable_extensions; do
19213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19214    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19216    break 2
19217  fi
19218done
19219  done
19220IFS=$as_save_IFS
19221
19222  ;;
19223esac
19224fi
19225TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19226if test -n "$TOOLS_DIR_CC"; then
19227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19228$as_echo "$TOOLS_DIR_CC" >&6; }
19229else
19230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19231$as_echo "no" >&6; }
19232fi
19233
19234
19235  test -n "$TOOLS_DIR_CC" && break
19236done
19237
19238    CC=$TOOLS_DIR_CC
19239    PATH="$PATH_save"
19240  fi
19241
19242  # AC_PATH_PROGS can't be run multiple times with the same variable,
19243  # so create a new name for this run.
19244  if test "x$CC" = x; then
19245    for ac_prog in $COMPILER_CHECK_LIST
19246do
19247  # Extract the first word of "$ac_prog", so it can be a program name with args.
19248set dummy $ac_prog; ac_word=$2
19249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19250$as_echo_n "checking for $ac_word... " >&6; }
19251if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19252  $as_echo_n "(cached) " >&6
19253else
19254  case $POTENTIAL_CC in
19255  [\\/]* | ?:[\\/]*)
19256  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19257  ;;
19258  *)
19259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19260for as_dir in $PATH
19261do
19262  IFS=$as_save_IFS
19263  test -z "$as_dir" && as_dir=.
19264    for ac_exec_ext in '' $ac_executable_extensions; do
19265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19266    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19268    break 2
19269  fi
19270done
19271  done
19272IFS=$as_save_IFS
19273
19274  ;;
19275esac
19276fi
19277POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19278if test -n "$POTENTIAL_CC"; then
19279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19280$as_echo "$POTENTIAL_CC" >&6; }
19281else
19282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19283$as_echo "no" >&6; }
19284fi
19285
19286
19287  test -n "$POTENTIAL_CC" && break
19288done
19289
19290    CC=$POTENTIAL_CC
19291  fi
19292
19293  if test "x$CC" = x; then
19294
19295    # Print a helpful message on how to acquire the necessary build dependency.
19296    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19297    MISSING_DEPENDENCY=devkit
19298    PKGHANDLER_COMMAND=
19299
19300    case $PKGHANDLER in
19301	apt-get)
19302                apt_help     $MISSING_DEPENDENCY ;;
19303    yum)
19304                yum_help     $MISSING_DEPENDENCY ;;
19305	port)
19306                port_help    $MISSING_DEPENDENCY ;;
19307	pkgutil)
19308                pkgutil_help $MISSING_DEPENDENCY ;;
19309	pkgadd)
19310                pkgadd_help  $MISSING_DEPENDENCY ;;
19311    * )
19312      break ;;
19313    esac
19314
19315    if test "x$PKGHANDLER_COMMAND" != x; then
19316        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19317    fi
19318
19319      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19320  fi
19321
19322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19323
19324  # First separate the path from the arguments. This will split at the first
19325  # space.
19326  complete="$CC"
19327  path="${complete%% *}"
19328  tmp="$complete EOL"
19329  arguments="${tmp#* }"
19330
19331  # Input might be given as Windows format, start by converting to
19332  # unix format.
19333  new_path=`$CYGPATH -u "$path"`
19334
19335  # Now try to locate executable using which
19336  new_path=`$WHICH "$new_path" 2> /dev/null`
19337  # bat and cmd files are not always considered executable in cygwin causing which
19338  # to not find them
19339  if test "x$new_path" = x \
19340           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19341           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19342    new_path=`$CYGPATH -u "$path"`
19343  fi
19344  if test "x$new_path" = x; then
19345    # Oops. Which didn't find the executable.
19346    # The splitting of arguments from the executable at a space might have been incorrect,
19347    # since paths with space are more likely in Windows. Give it another try with the whole
19348    # argument.
19349    path="$complete"
19350    arguments="EOL"
19351    new_path=`$CYGPATH -u "$path"`
19352    new_path=`$WHICH "$new_path" 2> /dev/null`
19353    # bat and cmd files are not always considered executable in cygwin causing which
19354    # to not find them
19355    if test "x$new_path" = x \
19356             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19357             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19358      new_path=`$CYGPATH -u "$path"`
19359    fi
19360    if test "x$new_path" = x; then
19361      # It's still not found. Now this is an unrecoverable error.
19362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19363$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19364      has_space=`$ECHO "$complete" | $GREP " "`
19365      if test "x$has_space" != x; then
19366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19368      fi
19369      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19370    fi
19371  fi
19372
19373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19376  # "foo.exe" is OK but "foo" is an error.
19377  #
19378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19379  # It is also a way to make sure we got the proper file name for the real test later on.
19380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19381  if test "x$test_shortpath" = x; then
19382    # Short path failed, file does not exist as specified.
19383    # Try adding .exe or .cmd
19384    if test -f "${new_path}.exe"; then
19385       input_to_shortpath="${new_path}.exe"
19386    elif test -f "${new_path}.cmd"; then
19387       input_to_shortpath="${new_path}.cmd"
19388    else
19389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19390$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19393      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19394    fi
19395  else
19396    input_to_shortpath="$new_path"
19397  fi
19398
19399  # Call helper function which possibly converts this using DOS-style short mode.
19400  # If so, the updated path is stored in $new_path.
19401  new_path="$input_to_shortpath"
19402
19403  input_path="$input_to_shortpath"
19404  # Check if we need to convert this using DOS-style short mode. If the path
19405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19406  # take no chances and rewrite it.
19407  # Note: m4 eats our [], so we need to use [ and ] instead.
19408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19409  if test "x$has_forbidden_chars" != x; then
19410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19414      # Going to short mode and back again did indeed matter. Since short mode is
19415      # case insensitive, let's make it lowercase to improve readability.
19416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19417      # Now convert it back to Unix-stile (cygpath)
19418      input_path=`$CYGPATH -u "$shortmode_path"`
19419      new_path="$input_path"
19420    fi
19421  fi
19422
19423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19424  if test "x$test_cygdrive_prefix" = x; then
19425    # As a simple fix, exclude /usr/bin since it's not a real path.
19426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19428      # a path prefixed by /cygdrive for fixpath to work.
19429      new_path="$CYGWIN_ROOT_PATH$input_path"
19430    fi
19431  fi
19432
19433  # remove trailing .exe if any
19434  new_path="${new_path/%.exe/}"
19435
19436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19437
19438  # First separate the path from the arguments. This will split at the first
19439  # space.
19440  complete="$CC"
19441  path="${complete%% *}"
19442  tmp="$complete EOL"
19443  arguments="${tmp#* }"
19444
19445  # Input might be given as Windows format, start by converting to
19446  # unix format.
19447  new_path="$path"
19448
19449  windows_path="$new_path"
19450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19451    unix_path=`$CYGPATH -u "$windows_path"`
19452    new_path="$unix_path"
19453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19455    new_path="$unix_path"
19456  fi
19457
19458
19459  # Now try to locate executable using which
19460  new_path=`$WHICH "$new_path" 2> /dev/null`
19461
19462  if test "x$new_path" = x; then
19463    # Oops. Which didn't find the executable.
19464    # The splitting of arguments from the executable at a space might have been incorrect,
19465    # since paths with space are more likely in Windows. Give it another try with the whole
19466    # argument.
19467    path="$complete"
19468    arguments="EOL"
19469    new_path="$path"
19470
19471  windows_path="$new_path"
19472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19473    unix_path=`$CYGPATH -u "$windows_path"`
19474    new_path="$unix_path"
19475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19477    new_path="$unix_path"
19478  fi
19479
19480
19481    new_path=`$WHICH "$new_path" 2> /dev/null`
19482
19483    if test "x$new_path" = x; then
19484      # It's still not found. Now this is an unrecoverable error.
19485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19486$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19487      has_space=`$ECHO "$complete" | $GREP " "`
19488      if test "x$has_space" != x; then
19489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19491      fi
19492      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19493    fi
19494  fi
19495
19496  # Now new_path has a complete unix path to the binary
19497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19498    # Keep paths in /bin as-is, but remove trailing .exe if any
19499    new_path="${new_path/%.exe/}"
19500    # Do not save /bin paths to all_fixpath_prefixes!
19501  else
19502    # Not in mixed or Windows style, start by that.
19503    new_path=`cmd //c echo $new_path`
19504
19505  input_path="$new_path"
19506  # Check if we need to convert this using DOS-style short mode. If the path
19507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19508  # take no chances and rewrite it.
19509  # Note: m4 eats our [], so we need to use [ and ] instead.
19510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19511  if test "x$has_forbidden_chars" != x; then
19512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19514  fi
19515
19516    # Output is in $new_path
19517
19518  windows_path="$new_path"
19519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19520    unix_path=`$CYGPATH -u "$windows_path"`
19521    new_path="$unix_path"
19522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19524    new_path="$unix_path"
19525  fi
19526
19527    # remove trailing .exe if any
19528    new_path="${new_path/%.exe/}"
19529
19530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19532  fi
19533
19534  else
19535    # We're on a posix platform. Hooray! :)
19536    # First separate the path from the arguments. This will split at the first
19537    # space.
19538    complete="$CC"
19539    path="${complete%% *}"
19540    tmp="$complete EOL"
19541    arguments="${tmp#* }"
19542
19543    # Cannot rely on the command "which" here since it doesn't always work.
19544    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19545    if test -z "$is_absolute_path"; then
19546      # Path to executable is not absolute. Find it.
19547      IFS_save="$IFS"
19548      IFS=:
19549      for p in $PATH; do
19550        if test -f "$p/$path" && test -x "$p/$path"; then
19551          new_path="$p/$path"
19552          break
19553        fi
19554      done
19555      IFS="$IFS_save"
19556    else
19557      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19558$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19559      new_path="$path"
19560    fi
19561
19562    if test "x$new_path" = x; then
19563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19564$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19565        has_space=`$ECHO "$complete" | $GREP " "`
19566        if test "x$has_space" != x; then
19567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19569        fi
19570        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19571      fi
19572  fi
19573
19574      # Now join together the path and the arguments once again
19575      if test "x$arguments" != xEOL; then
19576        new_complete="$new_path ${arguments% *}"
19577      else
19578        new_complete="$new_path"
19579      fi
19580
19581  if test "x$complete" != "x$new_complete"; then
19582      CC="$new_complete"
19583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19584$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19585    fi
19586
19587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19588$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19589  TEST_COMPILER="$CC"
19590
19591    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19592        # Follow a chain of symbolic links. Use readlink
19593        # where it exists, else fall back to horribly
19594        # complicated shell code.
19595        if test "x$READLINK_TESTED" != yes; then
19596            # On MacOSX there is a readlink tool with a different
19597            # purpose than the GNU readlink tool. Check the found readlink.
19598            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19599            if test "x$ISGNU" = x; then
19600                 # A readlink that we do not know how to use.
19601                 # Are there other non-GNU readlinks out there?
19602                 READLINK_TESTED=yes
19603                 READLINK=
19604            fi
19605        fi
19606
19607        if test "x$READLINK" != x; then
19608            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19609        else
19610            # Save the current directory for restoring afterwards
19611            STARTDIR=$PWD
19612            COUNTER=0
19613            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19614            sym_link_file=`$BASENAME $TEST_COMPILER`
19615            cd $sym_link_dir
19616            # Use -P flag to resolve symlinks in directories.
19617            cd `$THEPWDCMD -P`
19618            sym_link_dir=`$THEPWDCMD -P`
19619            # Resolve file symlinks
19620            while test $COUNTER -lt 20; do
19621                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19622                if test "x$ISLINK" == x; then
19623                    # This is not a symbolic link! We are done!
19624                    break
19625                fi
19626                # Again resolve directory symlinks since the target of the just found
19627                # link could be in a different directory
19628                cd `$DIRNAME $ISLINK`
19629                sym_link_dir=`$THEPWDCMD -P`
19630                sym_link_file=`$BASENAME $ISLINK`
19631                let COUNTER=COUNTER+1
19632            done
19633            cd $STARTDIR
19634            TEST_COMPILER=$sym_link_dir/$sym_link_file
19635        fi
19636    fi
19637
19638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19639$as_echo "$TEST_COMPILER" >&6; }
19640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19641$as_echo_n "checking if CC is disguised ccache... " >&6; }
19642
19643  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19644  if test "x$COMPILER_BASENAME" = "xccache"; then
19645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19646$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19647    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19648    # We want to control ccache invocation ourselves, so ignore this cc and try
19649    # searching again.
19650
19651    # Remove the path to the fake ccache cc from the PATH
19652    RETRY_COMPILER_SAVED_PATH="$PATH"
19653    COMPILER_DIRNAME=`$DIRNAME $CC`
19654    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19655
19656    # Try again looking for our compiler
19657    if test -n "$ac_tool_prefix"; then
19658  for ac_prog in $COMPILER_CHECK_LIST
19659  do
19660    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19661set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19663$as_echo_n "checking for $ac_word... " >&6; }
19664if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19665  $as_echo_n "(cached) " >&6
19666else
19667  if test -n "$PROPER_COMPILER_CC"; then
19668  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19669else
19670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19671for as_dir in $PATH
19672do
19673  IFS=$as_save_IFS
19674  test -z "$as_dir" && as_dir=.
19675    for ac_exec_ext in '' $ac_executable_extensions; do
19676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19677    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19679    break 2
19680  fi
19681done
19682  done
19683IFS=$as_save_IFS
19684
19685fi
19686fi
19687PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19688if test -n "$PROPER_COMPILER_CC"; then
19689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19690$as_echo "$PROPER_COMPILER_CC" >&6; }
19691else
19692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19693$as_echo "no" >&6; }
19694fi
19695
19696
19697    test -n "$PROPER_COMPILER_CC" && break
19698  done
19699fi
19700if test -z "$PROPER_COMPILER_CC"; then
19701  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19702  for ac_prog in $COMPILER_CHECK_LIST
19703do
19704  # Extract the first word of "$ac_prog", so it can be a program name with args.
19705set dummy $ac_prog; ac_word=$2
19706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19707$as_echo_n "checking for $ac_word... " >&6; }
19708if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19709  $as_echo_n "(cached) " >&6
19710else
19711  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19712  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19713else
19714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19715for as_dir in $PATH
19716do
19717  IFS=$as_save_IFS
19718  test -z "$as_dir" && as_dir=.
19719    for ac_exec_ext in '' $ac_executable_extensions; do
19720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19721    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19723    break 2
19724  fi
19725done
19726  done
19727IFS=$as_save_IFS
19728
19729fi
19730fi
19731ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19732if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19734$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19735else
19736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19737$as_echo "no" >&6; }
19738fi
19739
19740
19741  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19742done
19743
19744  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19745    PROPER_COMPILER_CC=""
19746  else
19747    case $cross_compiling:$ac_tool_warned in
19748yes:)
19749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19751ac_tool_warned=yes ;;
19752esac
19753    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19754  fi
19755fi
19756
19757
19758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19759
19760  # First separate the path from the arguments. This will split at the first
19761  # space.
19762  complete="$PROPER_COMPILER_CC"
19763  path="${complete%% *}"
19764  tmp="$complete EOL"
19765  arguments="${tmp#* }"
19766
19767  # Input might be given as Windows format, start by converting to
19768  # unix format.
19769  new_path=`$CYGPATH -u "$path"`
19770
19771  # Now try to locate executable using which
19772  new_path=`$WHICH "$new_path" 2> /dev/null`
19773  # bat and cmd files are not always considered executable in cygwin causing which
19774  # to not find them
19775  if test "x$new_path" = x \
19776           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19777           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19778    new_path=`$CYGPATH -u "$path"`
19779  fi
19780  if test "x$new_path" = x; then
19781    # Oops. Which didn't find the executable.
19782    # The splitting of arguments from the executable at a space might have been incorrect,
19783    # since paths with space are more likely in Windows. Give it another try with the whole
19784    # argument.
19785    path="$complete"
19786    arguments="EOL"
19787    new_path=`$CYGPATH -u "$path"`
19788    new_path=`$WHICH "$new_path" 2> /dev/null`
19789    # bat and cmd files are not always considered executable in cygwin causing which
19790    # to not find them
19791    if test "x$new_path" = x \
19792             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19793             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19794      new_path=`$CYGPATH -u "$path"`
19795    fi
19796    if test "x$new_path" = x; then
19797      # It's still not found. Now this is an unrecoverable error.
19798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19799$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19800      has_space=`$ECHO "$complete" | $GREP " "`
19801      if test "x$has_space" != x; then
19802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19804      fi
19805      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19806    fi
19807  fi
19808
19809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19812  # "foo.exe" is OK but "foo" is an error.
19813  #
19814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19815  # It is also a way to make sure we got the proper file name for the real test later on.
19816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19817  if test "x$test_shortpath" = x; then
19818    # Short path failed, file does not exist as specified.
19819    # Try adding .exe or .cmd
19820    if test -f "${new_path}.exe"; then
19821       input_to_shortpath="${new_path}.exe"
19822    elif test -f "${new_path}.cmd"; then
19823       input_to_shortpath="${new_path}.cmd"
19824    else
19825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19826$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19829      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19830    fi
19831  else
19832    input_to_shortpath="$new_path"
19833  fi
19834
19835  # Call helper function which possibly converts this using DOS-style short mode.
19836  # If so, the updated path is stored in $new_path.
19837  new_path="$input_to_shortpath"
19838
19839  input_path="$input_to_shortpath"
19840  # Check if we need to convert this using DOS-style short mode. If the path
19841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19842  # take no chances and rewrite it.
19843  # Note: m4 eats our [], so we need to use [ and ] instead.
19844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19845  if test "x$has_forbidden_chars" != x; then
19846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19850      # Going to short mode and back again did indeed matter. Since short mode is
19851      # case insensitive, let's make it lowercase to improve readability.
19852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19853      # Now convert it back to Unix-stile (cygpath)
19854      input_path=`$CYGPATH -u "$shortmode_path"`
19855      new_path="$input_path"
19856    fi
19857  fi
19858
19859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19860  if test "x$test_cygdrive_prefix" = x; then
19861    # As a simple fix, exclude /usr/bin since it's not a real path.
19862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19864      # a path prefixed by /cygdrive for fixpath to work.
19865      new_path="$CYGWIN_ROOT_PATH$input_path"
19866    fi
19867  fi
19868
19869  # remove trailing .exe if any
19870  new_path="${new_path/%.exe/}"
19871
19872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19873
19874  # First separate the path from the arguments. This will split at the first
19875  # space.
19876  complete="$PROPER_COMPILER_CC"
19877  path="${complete%% *}"
19878  tmp="$complete EOL"
19879  arguments="${tmp#* }"
19880
19881  # Input might be given as Windows format, start by converting to
19882  # unix format.
19883  new_path="$path"
19884
19885  windows_path="$new_path"
19886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19887    unix_path=`$CYGPATH -u "$windows_path"`
19888    new_path="$unix_path"
19889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19891    new_path="$unix_path"
19892  fi
19893
19894
19895  # Now try to locate executable using which
19896  new_path=`$WHICH "$new_path" 2> /dev/null`
19897
19898  if test "x$new_path" = x; then
19899    # Oops. Which didn't find the executable.
19900    # The splitting of arguments from the executable at a space might have been incorrect,
19901    # since paths with space are more likely in Windows. Give it another try with the whole
19902    # argument.
19903    path="$complete"
19904    arguments="EOL"
19905    new_path="$path"
19906
19907  windows_path="$new_path"
19908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19909    unix_path=`$CYGPATH -u "$windows_path"`
19910    new_path="$unix_path"
19911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19913    new_path="$unix_path"
19914  fi
19915
19916
19917    new_path=`$WHICH "$new_path" 2> /dev/null`
19918
19919    if test "x$new_path" = x; then
19920      # It's still not found. Now this is an unrecoverable error.
19921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19922$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19923      has_space=`$ECHO "$complete" | $GREP " "`
19924      if test "x$has_space" != x; then
19925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19927      fi
19928      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19929    fi
19930  fi
19931
19932  # Now new_path has a complete unix path to the binary
19933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19934    # Keep paths in /bin as-is, but remove trailing .exe if any
19935    new_path="${new_path/%.exe/}"
19936    # Do not save /bin paths to all_fixpath_prefixes!
19937  else
19938    # Not in mixed or Windows style, start by that.
19939    new_path=`cmd //c echo $new_path`
19940
19941  input_path="$new_path"
19942  # Check if we need to convert this using DOS-style short mode. If the path
19943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19944  # take no chances and rewrite it.
19945  # Note: m4 eats our [], so we need to use [ and ] instead.
19946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19947  if test "x$has_forbidden_chars" != x; then
19948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19950  fi
19951
19952    # Output is in $new_path
19953
19954  windows_path="$new_path"
19955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19956    unix_path=`$CYGPATH -u "$windows_path"`
19957    new_path="$unix_path"
19958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19960    new_path="$unix_path"
19961  fi
19962
19963    # remove trailing .exe if any
19964    new_path="${new_path/%.exe/}"
19965
19966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19968  fi
19969
19970  else
19971    # We're on a posix platform. Hooray! :)
19972    # First separate the path from the arguments. This will split at the first
19973    # space.
19974    complete="$PROPER_COMPILER_CC"
19975    path="${complete%% *}"
19976    tmp="$complete EOL"
19977    arguments="${tmp#* }"
19978
19979    # Cannot rely on the command "which" here since it doesn't always work.
19980    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19981    if test -z "$is_absolute_path"; then
19982      # Path to executable is not absolute. Find it.
19983      IFS_save="$IFS"
19984      IFS=:
19985      for p in $PATH; do
19986        if test -f "$p/$path" && test -x "$p/$path"; then
19987          new_path="$p/$path"
19988          break
19989        fi
19990      done
19991      IFS="$IFS_save"
19992    else
19993      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19994$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19995      new_path="$path"
19996    fi
19997
19998    if test "x$new_path" = x; then
19999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20000$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20001        has_space=`$ECHO "$complete" | $GREP " "`
20002        if test "x$has_space" != x; then
20003          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20004$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20005        fi
20006        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20007      fi
20008  fi
20009
20010      # Now join together the path and the arguments once again
20011      if test "x$arguments" != xEOL; then
20012        new_complete="$new_path ${arguments% *}"
20013      else
20014        new_complete="$new_path"
20015      fi
20016
20017  if test "x$complete" != "x$new_complete"; then
20018      PROPER_COMPILER_CC="$new_complete"
20019      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20020$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20021    fi
20022
20023    PATH="$RETRY_COMPILER_SAVED_PATH"
20024
20025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20026$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20027
20028    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20029        # Follow a chain of symbolic links. Use readlink
20030        # where it exists, else fall back to horribly
20031        # complicated shell code.
20032        if test "x$READLINK_TESTED" != yes; then
20033            # On MacOSX there is a readlink tool with a different
20034            # purpose than the GNU readlink tool. Check the found readlink.
20035            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20036            if test "x$ISGNU" = x; then
20037                 # A readlink that we do not know how to use.
20038                 # Are there other non-GNU readlinks out there?
20039                 READLINK_TESTED=yes
20040                 READLINK=
20041            fi
20042        fi
20043
20044        if test "x$READLINK" != x; then
20045            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20046        else
20047            # Save the current directory for restoring afterwards
20048            STARTDIR=$PWD
20049            COUNTER=0
20050            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20051            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20052            cd $sym_link_dir
20053            # Use -P flag to resolve symlinks in directories.
20054            cd `$THEPWDCMD -P`
20055            sym_link_dir=`$THEPWDCMD -P`
20056            # Resolve file symlinks
20057            while test $COUNTER -lt 20; do
20058                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20059                if test "x$ISLINK" == x; then
20060                    # This is not a symbolic link! We are done!
20061                    break
20062                fi
20063                # Again resolve directory symlinks since the target of the just found
20064                # link could be in a different directory
20065                cd `$DIRNAME $ISLINK`
20066                sym_link_dir=`$THEPWDCMD -P`
20067                sym_link_file=`$BASENAME $ISLINK`
20068                let COUNTER=COUNTER+1
20069            done
20070            cd $STARTDIR
20071            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20072        fi
20073    fi
20074
20075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20076$as_echo "$PROPER_COMPILER_CC" >&6; }
20077    CC="$PROPER_COMPILER_CC"
20078  else
20079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20080$as_echo "no, keeping CC" >&6; }
20081    CC="$TEST_COMPILER"
20082  fi
20083
20084  COMPILER=$CC
20085  COMPILER_NAME=$COMPILER_NAME
20086
20087  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20088    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20089    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20090    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20091    if test $? -ne 0; then
20092      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20093
20094      { $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
20095$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20096      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20097$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20098      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20099    else
20100      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20101      COMPILER_VENDOR="Sun Studio"
20102    fi
20103  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20104    # First line typically looks something like:
20105    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20106    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20107    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20108    COMPILER_VENDOR="Microsoft CL.EXE"
20109    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20110    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20111      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20112        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20113      fi
20114    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20115      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20116        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20117      fi
20118    fi
20119  else
20120    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20121    # Check that this is likely to be GCC.
20122    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20123    if test $? -ne 0; then
20124      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20125$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20126      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20127$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20128      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20129    fi
20130
20131    # First line typically looks something like:
20132    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20133    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20134    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20135  fi
20136  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20137  CC_VERSION="$COMPILER_VERSION"
20138  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20139  CC_VENDOR="$COMPILER_VENDOR"
20140
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20142$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20143
20144
20145# Now that we have resolved CC ourself, let autoconf have its go at it
20146ac_ext=c
20147ac_cpp='$CPP $CPPFLAGS'
20148ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20149ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20150ac_compiler_gnu=$ac_cv_c_compiler_gnu
20151if test -n "$ac_tool_prefix"; then
20152  for ac_prog in $CC
20153  do
20154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20157$as_echo_n "checking for $ac_word... " >&6; }
20158if ${ac_cv_prog_CC+:} false; then :
20159  $as_echo_n "(cached) " >&6
20160else
20161  if test -n "$CC"; then
20162  ac_cv_prog_CC="$CC" # Let the user override the test.
20163else
20164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20165for as_dir in $PATH
20166do
20167  IFS=$as_save_IFS
20168  test -z "$as_dir" && as_dir=.
20169    for ac_exec_ext in '' $ac_executable_extensions; do
20170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20171    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20173    break 2
20174  fi
20175done
20176  done
20177IFS=$as_save_IFS
20178
20179fi
20180fi
20181CC=$ac_cv_prog_CC
20182if test -n "$CC"; then
20183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20184$as_echo "$CC" >&6; }
20185else
20186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20187$as_echo "no" >&6; }
20188fi
20189
20190
20191    test -n "$CC" && break
20192  done
20193fi
20194if test -z "$CC"; then
20195  ac_ct_CC=$CC
20196  for ac_prog in $CC
20197do
20198  # Extract the first word of "$ac_prog", so it can be a program name with args.
20199set dummy $ac_prog; ac_word=$2
20200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20201$as_echo_n "checking for $ac_word... " >&6; }
20202if ${ac_cv_prog_ac_ct_CC+:} false; then :
20203  $as_echo_n "(cached) " >&6
20204else
20205  if test -n "$ac_ct_CC"; then
20206  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20207else
20208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20209for as_dir in $PATH
20210do
20211  IFS=$as_save_IFS
20212  test -z "$as_dir" && as_dir=.
20213    for ac_exec_ext in '' $ac_executable_extensions; do
20214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20215    ac_cv_prog_ac_ct_CC="$ac_prog"
20216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20217    break 2
20218  fi
20219done
20220  done
20221IFS=$as_save_IFS
20222
20223fi
20224fi
20225ac_ct_CC=$ac_cv_prog_ac_ct_CC
20226if test -n "$ac_ct_CC"; then
20227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20228$as_echo "$ac_ct_CC" >&6; }
20229else
20230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20231$as_echo "no" >&6; }
20232fi
20233
20234
20235  test -n "$ac_ct_CC" && break
20236done
20237
20238  if test "x$ac_ct_CC" = x; then
20239    CC=""
20240  else
20241    case $cross_compiling:$ac_tool_warned in
20242yes:)
20243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20245ac_tool_warned=yes ;;
20246esac
20247    CC=$ac_ct_CC
20248  fi
20249fi
20250
20251
20252test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20254as_fn_error $? "no acceptable C compiler found in \$PATH
20255See \`config.log' for more details" "$LINENO" 5; }
20256
20257# Provide some information about the compiler.
20258$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20259set X $ac_compile
20260ac_compiler=$2
20261for ac_option in --version -v -V -qversion; do
20262  { { ac_try="$ac_compiler $ac_option >&5"
20263case "(($ac_try" in
20264  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20265  *) ac_try_echo=$ac_try;;
20266esac
20267eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20268$as_echo "$ac_try_echo"; } >&5
20269  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20270  ac_status=$?
20271  if test -s conftest.err; then
20272    sed '10a\
20273... rest of stderr output deleted ...
20274         10q' conftest.err >conftest.er1
20275    cat conftest.er1 >&5
20276  fi
20277  rm -f conftest.er1 conftest.err
20278  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20279  test $ac_status = 0; }
20280done
20281
20282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20283/* end confdefs.h.  */
20284
20285int
20286main ()
20287{
20288
20289  ;
20290  return 0;
20291}
20292_ACEOF
20293ac_clean_files_save=$ac_clean_files
20294ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20295# Try to create an executable without -o first, disregard a.out.
20296# It will help us diagnose broken compilers, and finding out an intuition
20297# of exeext.
20298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20299$as_echo_n "checking whether the C compiler works... " >&6; }
20300ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20301
20302# The possible output files:
20303ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20304
20305ac_rmfiles=
20306for ac_file in $ac_files
20307do
20308  case $ac_file in
20309    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20310    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20311  esac
20312done
20313rm -f $ac_rmfiles
20314
20315if { { ac_try="$ac_link_default"
20316case "(($ac_try" in
20317  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20318  *) ac_try_echo=$ac_try;;
20319esac
20320eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20321$as_echo "$ac_try_echo"; } >&5
20322  (eval "$ac_link_default") 2>&5
20323  ac_status=$?
20324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20325  test $ac_status = 0; }; then :
20326  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20327# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20328# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20329# so that the user can short-circuit this test for compilers unknown to
20330# Autoconf.
20331for ac_file in $ac_files ''
20332do
20333  test -f "$ac_file" || continue
20334  case $ac_file in
20335    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20336	;;
20337    [ab].out )
20338	# We found the default executable, but exeext='' is most
20339	# certainly right.
20340	break;;
20341    *.* )
20342	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20343	then :; else
20344	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20345	fi
20346	# We set ac_cv_exeext here because the later test for it is not
20347	# safe: cross compilers may not add the suffix if given an `-o'
20348	# argument, so we may need to know it at that point already.
20349	# Even if this section looks crufty: it has the advantage of
20350	# actually working.
20351	break;;
20352    * )
20353	break;;
20354  esac
20355done
20356test "$ac_cv_exeext" = no && ac_cv_exeext=
20357
20358else
20359  ac_file=''
20360fi
20361if test -z "$ac_file"; then :
20362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20363$as_echo "no" >&6; }
20364$as_echo "$as_me: failed program was:" >&5
20365sed 's/^/| /' conftest.$ac_ext >&5
20366
20367{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20369as_fn_error 77 "C compiler cannot create executables
20370See \`config.log' for more details" "$LINENO" 5; }
20371else
20372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20373$as_echo "yes" >&6; }
20374fi
20375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20376$as_echo_n "checking for C compiler default output file name... " >&6; }
20377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20378$as_echo "$ac_file" >&6; }
20379ac_exeext=$ac_cv_exeext
20380
20381rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20382ac_clean_files=$ac_clean_files_save
20383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20384$as_echo_n "checking for suffix of executables... " >&6; }
20385if { { ac_try="$ac_link"
20386case "(($ac_try" in
20387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20388  *) ac_try_echo=$ac_try;;
20389esac
20390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20391$as_echo "$ac_try_echo"; } >&5
20392  (eval "$ac_link") 2>&5
20393  ac_status=$?
20394  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20395  test $ac_status = 0; }; then :
20396  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20397# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20398# work properly (i.e., refer to `conftest.exe'), while it won't with
20399# `rm'.
20400for ac_file in conftest.exe conftest conftest.*; do
20401  test -f "$ac_file" || continue
20402  case $ac_file in
20403    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20404    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20405	  break;;
20406    * ) break;;
20407  esac
20408done
20409else
20410  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20411$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20412as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20413See \`config.log' for more details" "$LINENO" 5; }
20414fi
20415rm -f conftest conftest$ac_cv_exeext
20416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20417$as_echo "$ac_cv_exeext" >&6; }
20418
20419rm -f conftest.$ac_ext
20420EXEEXT=$ac_cv_exeext
20421ac_exeext=$EXEEXT
20422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20423/* end confdefs.h.  */
20424#include <stdio.h>
20425int
20426main ()
20427{
20428FILE *f = fopen ("conftest.out", "w");
20429 return ferror (f) || fclose (f) != 0;
20430
20431  ;
20432  return 0;
20433}
20434_ACEOF
20435ac_clean_files="$ac_clean_files conftest.out"
20436# Check that the compiler produces executables we can run.  If not, either
20437# the compiler is broken, or we cross compile.
20438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20439$as_echo_n "checking whether we are cross compiling... " >&6; }
20440if test "$cross_compiling" != yes; then
20441  { { ac_try="$ac_link"
20442case "(($ac_try" in
20443  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20444  *) ac_try_echo=$ac_try;;
20445esac
20446eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20447$as_echo "$ac_try_echo"; } >&5
20448  (eval "$ac_link") 2>&5
20449  ac_status=$?
20450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20451  test $ac_status = 0; }
20452  if { ac_try='./conftest$ac_cv_exeext'
20453  { { case "(($ac_try" in
20454  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20455  *) ac_try_echo=$ac_try;;
20456esac
20457eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20458$as_echo "$ac_try_echo"; } >&5
20459  (eval "$ac_try") 2>&5
20460  ac_status=$?
20461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20462  test $ac_status = 0; }; }; then
20463    cross_compiling=no
20464  else
20465    if test "$cross_compiling" = maybe; then
20466	cross_compiling=yes
20467    else
20468	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20470as_fn_error $? "cannot run C compiled programs.
20471If you meant to cross compile, use \`--host'.
20472See \`config.log' for more details" "$LINENO" 5; }
20473    fi
20474  fi
20475fi
20476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20477$as_echo "$cross_compiling" >&6; }
20478
20479rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20480ac_clean_files=$ac_clean_files_save
20481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20482$as_echo_n "checking for suffix of object files... " >&6; }
20483if ${ac_cv_objext+:} false; then :
20484  $as_echo_n "(cached) " >&6
20485else
20486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20487/* end confdefs.h.  */
20488
20489int
20490main ()
20491{
20492
20493  ;
20494  return 0;
20495}
20496_ACEOF
20497rm -f conftest.o conftest.obj
20498if { { ac_try="$ac_compile"
20499case "(($ac_try" in
20500  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20501  *) ac_try_echo=$ac_try;;
20502esac
20503eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20504$as_echo "$ac_try_echo"; } >&5
20505  (eval "$ac_compile") 2>&5
20506  ac_status=$?
20507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20508  test $ac_status = 0; }; then :
20509  for ac_file in conftest.o conftest.obj conftest.*; do
20510  test -f "$ac_file" || continue;
20511  case $ac_file in
20512    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20513    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20514       break;;
20515  esac
20516done
20517else
20518  $as_echo "$as_me: failed program was:" >&5
20519sed 's/^/| /' conftest.$ac_ext >&5
20520
20521{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20523as_fn_error $? "cannot compute suffix of object files: cannot compile
20524See \`config.log' for more details" "$LINENO" 5; }
20525fi
20526rm -f conftest.$ac_cv_objext conftest.$ac_ext
20527fi
20528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20529$as_echo "$ac_cv_objext" >&6; }
20530OBJEXT=$ac_cv_objext
20531ac_objext=$OBJEXT
20532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20533$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20534if ${ac_cv_c_compiler_gnu+:} false; then :
20535  $as_echo_n "(cached) " >&6
20536else
20537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20538/* end confdefs.h.  */
20539
20540int
20541main ()
20542{
20543#ifndef __GNUC__
20544       choke me
20545#endif
20546
20547  ;
20548  return 0;
20549}
20550_ACEOF
20551if ac_fn_c_try_compile "$LINENO"; then :
20552  ac_compiler_gnu=yes
20553else
20554  ac_compiler_gnu=no
20555fi
20556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20557ac_cv_c_compiler_gnu=$ac_compiler_gnu
20558
20559fi
20560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20561$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20562if test $ac_compiler_gnu = yes; then
20563  GCC=yes
20564else
20565  GCC=
20566fi
20567ac_test_CFLAGS=${CFLAGS+set}
20568ac_save_CFLAGS=$CFLAGS
20569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20570$as_echo_n "checking whether $CC accepts -g... " >&6; }
20571if ${ac_cv_prog_cc_g+:} false; then :
20572  $as_echo_n "(cached) " >&6
20573else
20574  ac_save_c_werror_flag=$ac_c_werror_flag
20575   ac_c_werror_flag=yes
20576   ac_cv_prog_cc_g=no
20577   CFLAGS="-g"
20578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20579/* end confdefs.h.  */
20580
20581int
20582main ()
20583{
20584
20585  ;
20586  return 0;
20587}
20588_ACEOF
20589if ac_fn_c_try_compile "$LINENO"; then :
20590  ac_cv_prog_cc_g=yes
20591else
20592  CFLAGS=""
20593      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20594/* end confdefs.h.  */
20595
20596int
20597main ()
20598{
20599
20600  ;
20601  return 0;
20602}
20603_ACEOF
20604if ac_fn_c_try_compile "$LINENO"; then :
20605
20606else
20607  ac_c_werror_flag=$ac_save_c_werror_flag
20608	 CFLAGS="-g"
20609	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20610/* end confdefs.h.  */
20611
20612int
20613main ()
20614{
20615
20616  ;
20617  return 0;
20618}
20619_ACEOF
20620if ac_fn_c_try_compile "$LINENO"; then :
20621  ac_cv_prog_cc_g=yes
20622fi
20623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20624fi
20625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20626fi
20627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20628   ac_c_werror_flag=$ac_save_c_werror_flag
20629fi
20630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20631$as_echo "$ac_cv_prog_cc_g" >&6; }
20632if test "$ac_test_CFLAGS" = set; then
20633  CFLAGS=$ac_save_CFLAGS
20634elif test $ac_cv_prog_cc_g = yes; then
20635  if test "$GCC" = yes; then
20636    CFLAGS="-g -O2"
20637  else
20638    CFLAGS="-g"
20639  fi
20640else
20641  if test "$GCC" = yes; then
20642    CFLAGS="-O2"
20643  else
20644    CFLAGS=
20645  fi
20646fi
20647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20648$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20649if ${ac_cv_prog_cc_c89+:} false; then :
20650  $as_echo_n "(cached) " >&6
20651else
20652  ac_cv_prog_cc_c89=no
20653ac_save_CC=$CC
20654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20655/* end confdefs.h.  */
20656#include <stdarg.h>
20657#include <stdio.h>
20658struct stat;
20659/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20660struct buf { int x; };
20661FILE * (*rcsopen) (struct buf *, struct stat *, int);
20662static char *e (p, i)
20663     char **p;
20664     int i;
20665{
20666  return p[i];
20667}
20668static char *f (char * (*g) (char **, int), char **p, ...)
20669{
20670  char *s;
20671  va_list v;
20672  va_start (v,p);
20673  s = g (p, va_arg (v,int));
20674  va_end (v);
20675  return s;
20676}
20677
20678/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20679   function prototypes and stuff, but not '\xHH' hex character constants.
20680   These don't provoke an error unfortunately, instead are silently treated
20681   as 'x'.  The following induces an error, until -std is added to get
20682   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20683   array size at least.  It's necessary to write '\x00'==0 to get something
20684   that's true only with -std.  */
20685int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20686
20687/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20688   inside strings and character constants.  */
20689#define FOO(x) 'x'
20690int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20691
20692int test (int i, double x);
20693struct s1 {int (*f) (int a);};
20694struct s2 {int (*f) (double a);};
20695int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20696int argc;
20697char **argv;
20698int
20699main ()
20700{
20701return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20702  ;
20703  return 0;
20704}
20705_ACEOF
20706for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20707	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20708do
20709  CC="$ac_save_CC $ac_arg"
20710  if ac_fn_c_try_compile "$LINENO"; then :
20711  ac_cv_prog_cc_c89=$ac_arg
20712fi
20713rm -f core conftest.err conftest.$ac_objext
20714  test "x$ac_cv_prog_cc_c89" != "xno" && break
20715done
20716rm -f conftest.$ac_ext
20717CC=$ac_save_CC
20718
20719fi
20720# AC_CACHE_VAL
20721case "x$ac_cv_prog_cc_c89" in
20722  x)
20723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20724$as_echo "none needed" >&6; } ;;
20725  xno)
20726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20727$as_echo "unsupported" >&6; } ;;
20728  *)
20729    CC="$CC $ac_cv_prog_cc_c89"
20730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20731$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20732esac
20733if test "x$ac_cv_prog_cc_c89" != xno; then :
20734
20735fi
20736
20737ac_ext=cpp
20738ac_cpp='$CXXCPP $CPPFLAGS'
20739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20742
20743
20744### Locate C++ compiler (CXX)
20745
20746if test "x$CXX" != x; then
20747  COMPILER_CHECK_LIST="$CXX"
20748elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20749  COMPILER_CHECK_LIST="cl"
20750elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20751  COMPILER_CHECK_LIST="CC g++"
20752else
20753  COMPILER_CHECK_LIST="g++ CC"
20754fi
20755
20756
20757  COMPILER_NAME=C++
20758
20759  CXX=
20760  # If TOOLS_DIR is set, check for all compiler names in there first
20761  # before checking the rest of the PATH.
20762  if test -n "$TOOLS_DIR"; then
20763    PATH_save="$PATH"
20764    PATH="$TOOLS_DIR"
20765    for ac_prog in $COMPILER_CHECK_LIST
20766do
20767  # Extract the first word of "$ac_prog", so it can be a program name with args.
20768set dummy $ac_prog; ac_word=$2
20769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20770$as_echo_n "checking for $ac_word... " >&6; }
20771if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20772  $as_echo_n "(cached) " >&6
20773else
20774  case $TOOLS_DIR_CXX in
20775  [\\/]* | ?:[\\/]*)
20776  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20777  ;;
20778  *)
20779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20780for as_dir in $PATH
20781do
20782  IFS=$as_save_IFS
20783  test -z "$as_dir" && as_dir=.
20784    for ac_exec_ext in '' $ac_executable_extensions; do
20785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20786    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20788    break 2
20789  fi
20790done
20791  done
20792IFS=$as_save_IFS
20793
20794  ;;
20795esac
20796fi
20797TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20798if test -n "$TOOLS_DIR_CXX"; then
20799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20800$as_echo "$TOOLS_DIR_CXX" >&6; }
20801else
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20803$as_echo "no" >&6; }
20804fi
20805
20806
20807  test -n "$TOOLS_DIR_CXX" && break
20808done
20809
20810    CXX=$TOOLS_DIR_CXX
20811    PATH="$PATH_save"
20812  fi
20813
20814  # AC_PATH_PROGS can't be run multiple times with the same variable,
20815  # so create a new name for this run.
20816  if test "x$CXX" = x; then
20817    for ac_prog in $COMPILER_CHECK_LIST
20818do
20819  # Extract the first word of "$ac_prog", so it can be a program name with args.
20820set dummy $ac_prog; ac_word=$2
20821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20822$as_echo_n "checking for $ac_word... " >&6; }
20823if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20824  $as_echo_n "(cached) " >&6
20825else
20826  case $POTENTIAL_CXX in
20827  [\\/]* | ?:[\\/]*)
20828  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20829  ;;
20830  *)
20831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20832for as_dir in $PATH
20833do
20834  IFS=$as_save_IFS
20835  test -z "$as_dir" && as_dir=.
20836    for ac_exec_ext in '' $ac_executable_extensions; do
20837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20838    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20840    break 2
20841  fi
20842done
20843  done
20844IFS=$as_save_IFS
20845
20846  ;;
20847esac
20848fi
20849POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20850if test -n "$POTENTIAL_CXX"; then
20851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20852$as_echo "$POTENTIAL_CXX" >&6; }
20853else
20854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20855$as_echo "no" >&6; }
20856fi
20857
20858
20859  test -n "$POTENTIAL_CXX" && break
20860done
20861
20862    CXX=$POTENTIAL_CXX
20863  fi
20864
20865  if test "x$CXX" = x; then
20866
20867    # Print a helpful message on how to acquire the necessary build dependency.
20868    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20869    MISSING_DEPENDENCY=devkit
20870    PKGHANDLER_COMMAND=
20871
20872    case $PKGHANDLER in
20873	apt-get)
20874                apt_help     $MISSING_DEPENDENCY ;;
20875    yum)
20876                yum_help     $MISSING_DEPENDENCY ;;
20877	port)
20878                port_help    $MISSING_DEPENDENCY ;;
20879	pkgutil)
20880                pkgutil_help $MISSING_DEPENDENCY ;;
20881	pkgadd)
20882                pkgadd_help  $MISSING_DEPENDENCY ;;
20883    * )
20884      break ;;
20885    esac
20886
20887    if test "x$PKGHANDLER_COMMAND" != x; then
20888        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20889    fi
20890
20891      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20892  fi
20893
20894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20895
20896  # First separate the path from the arguments. This will split at the first
20897  # space.
20898  complete="$CXX"
20899  path="${complete%% *}"
20900  tmp="$complete EOL"
20901  arguments="${tmp#* }"
20902
20903  # Input might be given as Windows format, start by converting to
20904  # unix format.
20905  new_path=`$CYGPATH -u "$path"`
20906
20907  # Now try to locate executable using which
20908  new_path=`$WHICH "$new_path" 2> /dev/null`
20909  # bat and cmd files are not always considered executable in cygwin causing which
20910  # to not find them
20911  if test "x$new_path" = x \
20912           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20913           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20914    new_path=`$CYGPATH -u "$path"`
20915  fi
20916  if test "x$new_path" = x; then
20917    # Oops. Which didn't find the executable.
20918    # The splitting of arguments from the executable at a space might have been incorrect,
20919    # since paths with space are more likely in Windows. Give it another try with the whole
20920    # argument.
20921    path="$complete"
20922    arguments="EOL"
20923    new_path=`$CYGPATH -u "$path"`
20924    new_path=`$WHICH "$new_path" 2> /dev/null`
20925    # bat and cmd files are not always considered executable in cygwin causing which
20926    # to not find them
20927    if test "x$new_path" = x \
20928             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20929             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20930      new_path=`$CYGPATH -u "$path"`
20931    fi
20932    if test "x$new_path" = x; then
20933      # It's still not found. Now this is an unrecoverable error.
20934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20935$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20936      has_space=`$ECHO "$complete" | $GREP " "`
20937      if test "x$has_space" != x; then
20938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20940      fi
20941      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20942    fi
20943  fi
20944
20945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20948  # "foo.exe" is OK but "foo" is an error.
20949  #
20950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20951  # It is also a way to make sure we got the proper file name for the real test later on.
20952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20953  if test "x$test_shortpath" = x; then
20954    # Short path failed, file does not exist as specified.
20955    # Try adding .exe or .cmd
20956    if test -f "${new_path}.exe"; then
20957       input_to_shortpath="${new_path}.exe"
20958    elif test -f "${new_path}.cmd"; then
20959       input_to_shortpath="${new_path}.cmd"
20960    else
20961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20962$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20963      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20964$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20965      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20966    fi
20967  else
20968    input_to_shortpath="$new_path"
20969  fi
20970
20971  # Call helper function which possibly converts this using DOS-style short mode.
20972  # If so, the updated path is stored in $new_path.
20973  new_path="$input_to_shortpath"
20974
20975  input_path="$input_to_shortpath"
20976  # Check if we need to convert this using DOS-style short mode. If the path
20977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20978  # take no chances and rewrite it.
20979  # Note: m4 eats our [], so we need to use [ and ] instead.
20980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20981  if test "x$has_forbidden_chars" != x; then
20982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20986      # Going to short mode and back again did indeed matter. Since short mode is
20987      # case insensitive, let's make it lowercase to improve readability.
20988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20989      # Now convert it back to Unix-stile (cygpath)
20990      input_path=`$CYGPATH -u "$shortmode_path"`
20991      new_path="$input_path"
20992    fi
20993  fi
20994
20995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20996  if test "x$test_cygdrive_prefix" = x; then
20997    # As a simple fix, exclude /usr/bin since it's not a real path.
20998    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21000      # a path prefixed by /cygdrive for fixpath to work.
21001      new_path="$CYGWIN_ROOT_PATH$input_path"
21002    fi
21003  fi
21004
21005  # remove trailing .exe if any
21006  new_path="${new_path/%.exe/}"
21007
21008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21009
21010  # First separate the path from the arguments. This will split at the first
21011  # space.
21012  complete="$CXX"
21013  path="${complete%% *}"
21014  tmp="$complete EOL"
21015  arguments="${tmp#* }"
21016
21017  # Input might be given as Windows format, start by converting to
21018  # unix format.
21019  new_path="$path"
21020
21021  windows_path="$new_path"
21022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21023    unix_path=`$CYGPATH -u "$windows_path"`
21024    new_path="$unix_path"
21025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21027    new_path="$unix_path"
21028  fi
21029
21030
21031  # Now try to locate executable using which
21032  new_path=`$WHICH "$new_path" 2> /dev/null`
21033
21034  if test "x$new_path" = x; then
21035    # Oops. Which didn't find the executable.
21036    # The splitting of arguments from the executable at a space might have been incorrect,
21037    # since paths with space are more likely in Windows. Give it another try with the whole
21038    # argument.
21039    path="$complete"
21040    arguments="EOL"
21041    new_path="$path"
21042
21043  windows_path="$new_path"
21044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21045    unix_path=`$CYGPATH -u "$windows_path"`
21046    new_path="$unix_path"
21047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21049    new_path="$unix_path"
21050  fi
21051
21052
21053    new_path=`$WHICH "$new_path" 2> /dev/null`
21054
21055    if test "x$new_path" = x; then
21056      # It's still not found. Now this is an unrecoverable error.
21057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21058$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21059      has_space=`$ECHO "$complete" | $GREP " "`
21060      if test "x$has_space" != x; then
21061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21063      fi
21064      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21065    fi
21066  fi
21067
21068  # Now new_path has a complete unix path to the binary
21069  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21070    # Keep paths in /bin as-is, but remove trailing .exe if any
21071    new_path="${new_path/%.exe/}"
21072    # Do not save /bin paths to all_fixpath_prefixes!
21073  else
21074    # Not in mixed or Windows style, start by that.
21075    new_path=`cmd //c echo $new_path`
21076
21077  input_path="$new_path"
21078  # Check if we need to convert this using DOS-style short mode. If the path
21079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21080  # take no chances and rewrite it.
21081  # Note: m4 eats our [], so we need to use [ and ] instead.
21082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21083  if test "x$has_forbidden_chars" != x; then
21084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21086  fi
21087
21088    # Output is in $new_path
21089
21090  windows_path="$new_path"
21091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21092    unix_path=`$CYGPATH -u "$windows_path"`
21093    new_path="$unix_path"
21094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21096    new_path="$unix_path"
21097  fi
21098
21099    # remove trailing .exe if any
21100    new_path="${new_path/%.exe/}"
21101
21102    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21103    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21104  fi
21105
21106  else
21107    # We're on a posix platform. Hooray! :)
21108    # First separate the path from the arguments. This will split at the first
21109    # space.
21110    complete="$CXX"
21111    path="${complete%% *}"
21112    tmp="$complete EOL"
21113    arguments="${tmp#* }"
21114
21115    # Cannot rely on the command "which" here since it doesn't always work.
21116    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21117    if test -z "$is_absolute_path"; then
21118      # Path to executable is not absolute. Find it.
21119      IFS_save="$IFS"
21120      IFS=:
21121      for p in $PATH; do
21122        if test -f "$p/$path" && test -x "$p/$path"; then
21123          new_path="$p/$path"
21124          break
21125        fi
21126      done
21127      IFS="$IFS_save"
21128    else
21129      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21130$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21131      new_path="$path"
21132    fi
21133
21134    if test "x$new_path" = x; then
21135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21136$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21137        has_space=`$ECHO "$complete" | $GREP " "`
21138        if test "x$has_space" != x; then
21139          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21140$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21141        fi
21142        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21143      fi
21144  fi
21145
21146      # Now join together the path and the arguments once again
21147      if test "x$arguments" != xEOL; then
21148        new_complete="$new_path ${arguments% *}"
21149      else
21150        new_complete="$new_path"
21151      fi
21152
21153  if test "x$complete" != "x$new_complete"; then
21154      CXX="$new_complete"
21155      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21156$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21157    fi
21158
21159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21160$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21161  TEST_COMPILER="$CXX"
21162
21163    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21164        # Follow a chain of symbolic links. Use readlink
21165        # where it exists, else fall back to horribly
21166        # complicated shell code.
21167        if test "x$READLINK_TESTED" != yes; then
21168            # On MacOSX there is a readlink tool with a different
21169            # purpose than the GNU readlink tool. Check the found readlink.
21170            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21171            if test "x$ISGNU" = x; then
21172                 # A readlink that we do not know how to use.
21173                 # Are there other non-GNU readlinks out there?
21174                 READLINK_TESTED=yes
21175                 READLINK=
21176            fi
21177        fi
21178
21179        if test "x$READLINK" != x; then
21180            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21181        else
21182            # Save the current directory for restoring afterwards
21183            STARTDIR=$PWD
21184            COUNTER=0
21185            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21186            sym_link_file=`$BASENAME $TEST_COMPILER`
21187            cd $sym_link_dir
21188            # Use -P flag to resolve symlinks in directories.
21189            cd `$THEPWDCMD -P`
21190            sym_link_dir=`$THEPWDCMD -P`
21191            # Resolve file symlinks
21192            while test $COUNTER -lt 20; do
21193                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21194                if test "x$ISLINK" == x; then
21195                    # This is not a symbolic link! We are done!
21196                    break
21197                fi
21198                # Again resolve directory symlinks since the target of the just found
21199                # link could be in a different directory
21200                cd `$DIRNAME $ISLINK`
21201                sym_link_dir=`$THEPWDCMD -P`
21202                sym_link_file=`$BASENAME $ISLINK`
21203                let COUNTER=COUNTER+1
21204            done
21205            cd $STARTDIR
21206            TEST_COMPILER=$sym_link_dir/$sym_link_file
21207        fi
21208    fi
21209
21210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21211$as_echo "$TEST_COMPILER" >&6; }
21212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21213$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21214
21215  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21216  if test "x$COMPILER_BASENAME" = "xccache"; then
21217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21218$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21219    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21220    # We want to control ccache invocation ourselves, so ignore this cc and try
21221    # searching again.
21222
21223    # Remove the path to the fake ccache cc from the PATH
21224    RETRY_COMPILER_SAVED_PATH="$PATH"
21225    COMPILER_DIRNAME=`$DIRNAME $CXX`
21226    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21227
21228    # Try again looking for our compiler
21229    if test -n "$ac_tool_prefix"; then
21230  for ac_prog in $COMPILER_CHECK_LIST
21231  do
21232    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21233set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21235$as_echo_n "checking for $ac_word... " >&6; }
21236if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21237  $as_echo_n "(cached) " >&6
21238else
21239  if test -n "$PROPER_COMPILER_CXX"; then
21240  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21241else
21242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21243for as_dir in $PATH
21244do
21245  IFS=$as_save_IFS
21246  test -z "$as_dir" && as_dir=.
21247    for ac_exec_ext in '' $ac_executable_extensions; do
21248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21249    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21251    break 2
21252  fi
21253done
21254  done
21255IFS=$as_save_IFS
21256
21257fi
21258fi
21259PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21260if test -n "$PROPER_COMPILER_CXX"; then
21261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21262$as_echo "$PROPER_COMPILER_CXX" >&6; }
21263else
21264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21265$as_echo "no" >&6; }
21266fi
21267
21268
21269    test -n "$PROPER_COMPILER_CXX" && break
21270  done
21271fi
21272if test -z "$PROPER_COMPILER_CXX"; then
21273  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21274  for ac_prog in $COMPILER_CHECK_LIST
21275do
21276  # Extract the first word of "$ac_prog", so it can be a program name with args.
21277set dummy $ac_prog; ac_word=$2
21278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21279$as_echo_n "checking for $ac_word... " >&6; }
21280if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21281  $as_echo_n "(cached) " >&6
21282else
21283  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21284  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21285else
21286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21287for as_dir in $PATH
21288do
21289  IFS=$as_save_IFS
21290  test -z "$as_dir" && as_dir=.
21291    for ac_exec_ext in '' $ac_executable_extensions; do
21292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21293    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21295    break 2
21296  fi
21297done
21298  done
21299IFS=$as_save_IFS
21300
21301fi
21302fi
21303ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21304if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21306$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21307else
21308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21309$as_echo "no" >&6; }
21310fi
21311
21312
21313  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21314done
21315
21316  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21317    PROPER_COMPILER_CXX=""
21318  else
21319    case $cross_compiling:$ac_tool_warned in
21320yes:)
21321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21323ac_tool_warned=yes ;;
21324esac
21325    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21326  fi
21327fi
21328
21329
21330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21331
21332  # First separate the path from the arguments. This will split at the first
21333  # space.
21334  complete="$PROPER_COMPILER_CXX"
21335  path="${complete%% *}"
21336  tmp="$complete EOL"
21337  arguments="${tmp#* }"
21338
21339  # Input might be given as Windows format, start by converting to
21340  # unix format.
21341  new_path=`$CYGPATH -u "$path"`
21342
21343  # Now try to locate executable using which
21344  new_path=`$WHICH "$new_path" 2> /dev/null`
21345  # bat and cmd files are not always considered executable in cygwin causing which
21346  # to not find them
21347  if test "x$new_path" = x \
21348           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21349           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21350    new_path=`$CYGPATH -u "$path"`
21351  fi
21352  if test "x$new_path" = x; then
21353    # Oops. Which didn't find the executable.
21354    # The splitting of arguments from the executable at a space might have been incorrect,
21355    # since paths with space are more likely in Windows. Give it another try with the whole
21356    # argument.
21357    path="$complete"
21358    arguments="EOL"
21359    new_path=`$CYGPATH -u "$path"`
21360    new_path=`$WHICH "$new_path" 2> /dev/null`
21361    # bat and cmd files are not always considered executable in cygwin causing which
21362    # to not find them
21363    if test "x$new_path" = x \
21364             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21365             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21366      new_path=`$CYGPATH -u "$path"`
21367    fi
21368    if test "x$new_path" = x; then
21369      # It's still not found. Now this is an unrecoverable error.
21370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21371$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21372      has_space=`$ECHO "$complete" | $GREP " "`
21373      if test "x$has_space" != x; then
21374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21376      fi
21377      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21378    fi
21379  fi
21380
21381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21384  # "foo.exe" is OK but "foo" is an error.
21385  #
21386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21387  # It is also a way to make sure we got the proper file name for the real test later on.
21388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21389  if test "x$test_shortpath" = x; then
21390    # Short path failed, file does not exist as specified.
21391    # Try adding .exe or .cmd
21392    if test -f "${new_path}.exe"; then
21393       input_to_shortpath="${new_path}.exe"
21394    elif test -f "${new_path}.cmd"; then
21395       input_to_shortpath="${new_path}.cmd"
21396    else
21397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21398$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21399      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21400$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21401      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21402    fi
21403  else
21404    input_to_shortpath="$new_path"
21405  fi
21406
21407  # Call helper function which possibly converts this using DOS-style short mode.
21408  # If so, the updated path is stored in $new_path.
21409  new_path="$input_to_shortpath"
21410
21411  input_path="$input_to_shortpath"
21412  # Check if we need to convert this using DOS-style short mode. If the path
21413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21414  # take no chances and rewrite it.
21415  # Note: m4 eats our [], so we need to use [ and ] instead.
21416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21417  if test "x$has_forbidden_chars" != x; then
21418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21422      # Going to short mode and back again did indeed matter. Since short mode is
21423      # case insensitive, let's make it lowercase to improve readability.
21424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21425      # Now convert it back to Unix-stile (cygpath)
21426      input_path=`$CYGPATH -u "$shortmode_path"`
21427      new_path="$input_path"
21428    fi
21429  fi
21430
21431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21432  if test "x$test_cygdrive_prefix" = x; then
21433    # As a simple fix, exclude /usr/bin since it's not a real path.
21434    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21436      # a path prefixed by /cygdrive for fixpath to work.
21437      new_path="$CYGWIN_ROOT_PATH$input_path"
21438    fi
21439  fi
21440
21441  # remove trailing .exe if any
21442  new_path="${new_path/%.exe/}"
21443
21444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21445
21446  # First separate the path from the arguments. This will split at the first
21447  # space.
21448  complete="$PROPER_COMPILER_CXX"
21449  path="${complete%% *}"
21450  tmp="$complete EOL"
21451  arguments="${tmp#* }"
21452
21453  # Input might be given as Windows format, start by converting to
21454  # unix format.
21455  new_path="$path"
21456
21457  windows_path="$new_path"
21458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21459    unix_path=`$CYGPATH -u "$windows_path"`
21460    new_path="$unix_path"
21461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21463    new_path="$unix_path"
21464  fi
21465
21466
21467  # Now try to locate executable using which
21468  new_path=`$WHICH "$new_path" 2> /dev/null`
21469
21470  if test "x$new_path" = x; then
21471    # Oops. Which didn't find the executable.
21472    # The splitting of arguments from the executable at a space might have been incorrect,
21473    # since paths with space are more likely in Windows. Give it another try with the whole
21474    # argument.
21475    path="$complete"
21476    arguments="EOL"
21477    new_path="$path"
21478
21479  windows_path="$new_path"
21480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21481    unix_path=`$CYGPATH -u "$windows_path"`
21482    new_path="$unix_path"
21483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21485    new_path="$unix_path"
21486  fi
21487
21488
21489    new_path=`$WHICH "$new_path" 2> /dev/null`
21490
21491    if test "x$new_path" = x; then
21492      # It's still not found. Now this is an unrecoverable error.
21493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21494$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21495      has_space=`$ECHO "$complete" | $GREP " "`
21496      if test "x$has_space" != x; then
21497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21499      fi
21500      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21501    fi
21502  fi
21503
21504  # Now new_path has a complete unix path to the binary
21505  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21506    # Keep paths in /bin as-is, but remove trailing .exe if any
21507    new_path="${new_path/%.exe/}"
21508    # Do not save /bin paths to all_fixpath_prefixes!
21509  else
21510    # Not in mixed or Windows style, start by that.
21511    new_path=`cmd //c echo $new_path`
21512
21513  input_path="$new_path"
21514  # Check if we need to convert this using DOS-style short mode. If the path
21515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21516  # take no chances and rewrite it.
21517  # Note: m4 eats our [], so we need to use [ and ] instead.
21518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21519  if test "x$has_forbidden_chars" != x; then
21520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21522  fi
21523
21524    # Output is in $new_path
21525
21526  windows_path="$new_path"
21527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21528    unix_path=`$CYGPATH -u "$windows_path"`
21529    new_path="$unix_path"
21530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21532    new_path="$unix_path"
21533  fi
21534
21535    # remove trailing .exe if any
21536    new_path="${new_path/%.exe/}"
21537
21538    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21539    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21540  fi
21541
21542  else
21543    # We're on a posix platform. Hooray! :)
21544    # First separate the path from the arguments. This will split at the first
21545    # space.
21546    complete="$PROPER_COMPILER_CXX"
21547    path="${complete%% *}"
21548    tmp="$complete EOL"
21549    arguments="${tmp#* }"
21550
21551    # Cannot rely on the command "which" here since it doesn't always work.
21552    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21553    if test -z "$is_absolute_path"; then
21554      # Path to executable is not absolute. Find it.
21555      IFS_save="$IFS"
21556      IFS=:
21557      for p in $PATH; do
21558        if test -f "$p/$path" && test -x "$p/$path"; then
21559          new_path="$p/$path"
21560          break
21561        fi
21562      done
21563      IFS="$IFS_save"
21564    else
21565      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21566$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21567      new_path="$path"
21568    fi
21569
21570    if test "x$new_path" = x; then
21571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21572$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21573        has_space=`$ECHO "$complete" | $GREP " "`
21574        if test "x$has_space" != x; then
21575          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21576$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21577        fi
21578        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21579      fi
21580  fi
21581
21582      # Now join together the path and the arguments once again
21583      if test "x$arguments" != xEOL; then
21584        new_complete="$new_path ${arguments% *}"
21585      else
21586        new_complete="$new_path"
21587      fi
21588
21589  if test "x$complete" != "x$new_complete"; then
21590      PROPER_COMPILER_CXX="$new_complete"
21591      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21592$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21593    fi
21594
21595    PATH="$RETRY_COMPILER_SAVED_PATH"
21596
21597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21598$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21599
21600    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21601        # Follow a chain of symbolic links. Use readlink
21602        # where it exists, else fall back to horribly
21603        # complicated shell code.
21604        if test "x$READLINK_TESTED" != yes; then
21605            # On MacOSX there is a readlink tool with a different
21606            # purpose than the GNU readlink tool. Check the found readlink.
21607            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21608            if test "x$ISGNU" = x; then
21609                 # A readlink that we do not know how to use.
21610                 # Are there other non-GNU readlinks out there?
21611                 READLINK_TESTED=yes
21612                 READLINK=
21613            fi
21614        fi
21615
21616        if test "x$READLINK" != x; then
21617            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21618        else
21619            # Save the current directory for restoring afterwards
21620            STARTDIR=$PWD
21621            COUNTER=0
21622            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21623            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21624            cd $sym_link_dir
21625            # Use -P flag to resolve symlinks in directories.
21626            cd `$THEPWDCMD -P`
21627            sym_link_dir=`$THEPWDCMD -P`
21628            # Resolve file symlinks
21629            while test $COUNTER -lt 20; do
21630                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21631                if test "x$ISLINK" == x; then
21632                    # This is not a symbolic link! We are done!
21633                    break
21634                fi
21635                # Again resolve directory symlinks since the target of the just found
21636                # link could be in a different directory
21637                cd `$DIRNAME $ISLINK`
21638                sym_link_dir=`$THEPWDCMD -P`
21639                sym_link_file=`$BASENAME $ISLINK`
21640                let COUNTER=COUNTER+1
21641            done
21642            cd $STARTDIR
21643            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21644        fi
21645    fi
21646
21647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21648$as_echo "$PROPER_COMPILER_CXX" >&6; }
21649    CXX="$PROPER_COMPILER_CXX"
21650  else
21651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21652$as_echo "no, keeping CXX" >&6; }
21653    CXX="$TEST_COMPILER"
21654  fi
21655
21656  COMPILER=$CXX
21657  COMPILER_NAME=$COMPILER_NAME
21658
21659  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21660    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21661    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21662    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21663    if test $? -ne 0; then
21664      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21665
21666      { $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
21667$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21668      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21669$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21670      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21671    else
21672      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21673      COMPILER_VENDOR="Sun Studio"
21674    fi
21675  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21676    # First line typically looks something like:
21677    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21678    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21679    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21680    COMPILER_VENDOR="Microsoft CL.EXE"
21681    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21682    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21683      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21684        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21685      fi
21686    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21687      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21688        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21689      fi
21690    fi
21691  else
21692    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21693    # Check that this is likely to be GCC.
21694    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21695    if test $? -ne 0; then
21696      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21697$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21698      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21699$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21700      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21701    fi
21702
21703    # First line typically looks something like:
21704    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21705    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21706    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21707  fi
21708  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21709  CXX_VERSION="$COMPILER_VERSION"
21710  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21711  CXX_VENDOR="$COMPILER_VENDOR"
21712
21713  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21714$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21715
21716
21717# Now that we have resolved CXX ourself, let autoconf have its go at it
21718ac_ext=cpp
21719ac_cpp='$CXXCPP $CPPFLAGS'
21720ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21721ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21722ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21723if test -z "$CXX"; then
21724  if test -n "$CCC"; then
21725    CXX=$CCC
21726  else
21727    if test -n "$ac_tool_prefix"; then
21728  for ac_prog in $CXX
21729  do
21730    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21733$as_echo_n "checking for $ac_word... " >&6; }
21734if ${ac_cv_prog_CXX+:} false; then :
21735  $as_echo_n "(cached) " >&6
21736else
21737  if test -n "$CXX"; then
21738  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21739else
21740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21741for as_dir in $PATH
21742do
21743  IFS=$as_save_IFS
21744  test -z "$as_dir" && as_dir=.
21745    for ac_exec_ext in '' $ac_executable_extensions; do
21746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21747    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21749    break 2
21750  fi
21751done
21752  done
21753IFS=$as_save_IFS
21754
21755fi
21756fi
21757CXX=$ac_cv_prog_CXX
21758if test -n "$CXX"; then
21759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21760$as_echo "$CXX" >&6; }
21761else
21762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21763$as_echo "no" >&6; }
21764fi
21765
21766
21767    test -n "$CXX" && break
21768  done
21769fi
21770if test -z "$CXX"; then
21771  ac_ct_CXX=$CXX
21772  for ac_prog in $CXX
21773do
21774  # Extract the first word of "$ac_prog", so it can be a program name with args.
21775set dummy $ac_prog; ac_word=$2
21776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21777$as_echo_n "checking for $ac_word... " >&6; }
21778if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21779  $as_echo_n "(cached) " >&6
21780else
21781  if test -n "$ac_ct_CXX"; then
21782  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21783else
21784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21785for as_dir in $PATH
21786do
21787  IFS=$as_save_IFS
21788  test -z "$as_dir" && as_dir=.
21789    for ac_exec_ext in '' $ac_executable_extensions; do
21790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21791    ac_cv_prog_ac_ct_CXX="$ac_prog"
21792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21793    break 2
21794  fi
21795done
21796  done
21797IFS=$as_save_IFS
21798
21799fi
21800fi
21801ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21802if test -n "$ac_ct_CXX"; then
21803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21804$as_echo "$ac_ct_CXX" >&6; }
21805else
21806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21807$as_echo "no" >&6; }
21808fi
21809
21810
21811  test -n "$ac_ct_CXX" && break
21812done
21813
21814  if test "x$ac_ct_CXX" = x; then
21815    CXX="g++"
21816  else
21817    case $cross_compiling:$ac_tool_warned in
21818yes:)
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21821ac_tool_warned=yes ;;
21822esac
21823    CXX=$ac_ct_CXX
21824  fi
21825fi
21826
21827  fi
21828fi
21829# Provide some information about the compiler.
21830$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21831set X $ac_compile
21832ac_compiler=$2
21833for ac_option in --version -v -V -qversion; do
21834  { { ac_try="$ac_compiler $ac_option >&5"
21835case "(($ac_try" in
21836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21837  *) ac_try_echo=$ac_try;;
21838esac
21839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21840$as_echo "$ac_try_echo"; } >&5
21841  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21842  ac_status=$?
21843  if test -s conftest.err; then
21844    sed '10a\
21845... rest of stderr output deleted ...
21846         10q' conftest.err >conftest.er1
21847    cat conftest.er1 >&5
21848  fi
21849  rm -f conftest.er1 conftest.err
21850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21851  test $ac_status = 0; }
21852done
21853
21854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21855$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21856if ${ac_cv_cxx_compiler_gnu+:} false; then :
21857  $as_echo_n "(cached) " >&6
21858else
21859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21860/* end confdefs.h.  */
21861
21862int
21863main ()
21864{
21865#ifndef __GNUC__
21866       choke me
21867#endif
21868
21869  ;
21870  return 0;
21871}
21872_ACEOF
21873if ac_fn_cxx_try_compile "$LINENO"; then :
21874  ac_compiler_gnu=yes
21875else
21876  ac_compiler_gnu=no
21877fi
21878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21879ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21880
21881fi
21882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21883$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21884if test $ac_compiler_gnu = yes; then
21885  GXX=yes
21886else
21887  GXX=
21888fi
21889ac_test_CXXFLAGS=${CXXFLAGS+set}
21890ac_save_CXXFLAGS=$CXXFLAGS
21891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21892$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21893if ${ac_cv_prog_cxx_g+:} false; then :
21894  $as_echo_n "(cached) " >&6
21895else
21896  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21897   ac_cxx_werror_flag=yes
21898   ac_cv_prog_cxx_g=no
21899   CXXFLAGS="-g"
21900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21901/* end confdefs.h.  */
21902
21903int
21904main ()
21905{
21906
21907  ;
21908  return 0;
21909}
21910_ACEOF
21911if ac_fn_cxx_try_compile "$LINENO"; then :
21912  ac_cv_prog_cxx_g=yes
21913else
21914  CXXFLAGS=""
21915      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21916/* end confdefs.h.  */
21917
21918int
21919main ()
21920{
21921
21922  ;
21923  return 0;
21924}
21925_ACEOF
21926if ac_fn_cxx_try_compile "$LINENO"; then :
21927
21928else
21929  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21930	 CXXFLAGS="-g"
21931	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21932/* end confdefs.h.  */
21933
21934int
21935main ()
21936{
21937
21938  ;
21939  return 0;
21940}
21941_ACEOF
21942if ac_fn_cxx_try_compile "$LINENO"; then :
21943  ac_cv_prog_cxx_g=yes
21944fi
21945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21946fi
21947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21948fi
21949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21950   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21951fi
21952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21953$as_echo "$ac_cv_prog_cxx_g" >&6; }
21954if test "$ac_test_CXXFLAGS" = set; then
21955  CXXFLAGS=$ac_save_CXXFLAGS
21956elif test $ac_cv_prog_cxx_g = yes; then
21957  if test "$GXX" = yes; then
21958    CXXFLAGS="-g -O2"
21959  else
21960    CXXFLAGS="-g"
21961  fi
21962else
21963  if test "$GXX" = yes; then
21964    CXXFLAGS="-O2"
21965  else
21966    CXXFLAGS=
21967  fi
21968fi
21969ac_ext=cpp
21970ac_cpp='$CXXCPP $CPPFLAGS'
21971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21974
21975
21976### Locate other tools
21977
21978if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21979    ac_ext=m
21980ac_cpp='$OBJCPP $CPPFLAGS'
21981ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21982ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21983ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21984if test -n "$ac_tool_prefix"; then
21985  for ac_prog in gcc objcc objc cc CC
21986  do
21987    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21988set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21990$as_echo_n "checking for $ac_word... " >&6; }
21991if ${ac_cv_prog_OBJC+:} false; then :
21992  $as_echo_n "(cached) " >&6
21993else
21994  if test -n "$OBJC"; then
21995  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21996else
21997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21998for as_dir in $PATH
21999do
22000  IFS=$as_save_IFS
22001  test -z "$as_dir" && as_dir=.
22002    for ac_exec_ext in '' $ac_executable_extensions; do
22003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22004    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22006    break 2
22007  fi
22008done
22009  done
22010IFS=$as_save_IFS
22011
22012fi
22013fi
22014OBJC=$ac_cv_prog_OBJC
22015if test -n "$OBJC"; then
22016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22017$as_echo "$OBJC" >&6; }
22018else
22019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22020$as_echo "no" >&6; }
22021fi
22022
22023
22024    test -n "$OBJC" && break
22025  done
22026fi
22027if test -z "$OBJC"; then
22028  ac_ct_OBJC=$OBJC
22029  for ac_prog in gcc objcc objc cc CC
22030do
22031  # Extract the first word of "$ac_prog", so it can be a program name with args.
22032set dummy $ac_prog; ac_word=$2
22033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22034$as_echo_n "checking for $ac_word... " >&6; }
22035if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22036  $as_echo_n "(cached) " >&6
22037else
22038  if test -n "$ac_ct_OBJC"; then
22039  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22040else
22041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22042for as_dir in $PATH
22043do
22044  IFS=$as_save_IFS
22045  test -z "$as_dir" && as_dir=.
22046    for ac_exec_ext in '' $ac_executable_extensions; do
22047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22048    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22050    break 2
22051  fi
22052done
22053  done
22054IFS=$as_save_IFS
22055
22056fi
22057fi
22058ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22059if test -n "$ac_ct_OBJC"; then
22060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22061$as_echo "$ac_ct_OBJC" >&6; }
22062else
22063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22064$as_echo "no" >&6; }
22065fi
22066
22067
22068  test -n "$ac_ct_OBJC" && break
22069done
22070
22071  if test "x$ac_ct_OBJC" = x; then
22072    OBJC="gcc"
22073  else
22074    case $cross_compiling:$ac_tool_warned in
22075yes:)
22076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22078ac_tool_warned=yes ;;
22079esac
22080    OBJC=$ac_ct_OBJC
22081  fi
22082fi
22083
22084# Provide some information about the compiler.
22085$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22086set X $ac_compile
22087ac_compiler=$2
22088for ac_option in --version -v -V -qversion; do
22089  { { ac_try="$ac_compiler $ac_option >&5"
22090case "(($ac_try" in
22091  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22092  *) ac_try_echo=$ac_try;;
22093esac
22094eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22095$as_echo "$ac_try_echo"; } >&5
22096  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22097  ac_status=$?
22098  if test -s conftest.err; then
22099    sed '10a\
22100... rest of stderr output deleted ...
22101         10q' conftest.err >conftest.er1
22102    cat conftest.er1 >&5
22103  fi
22104  rm -f conftest.er1 conftest.err
22105  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22106  test $ac_status = 0; }
22107done
22108
22109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22110$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22111if ${ac_cv_objc_compiler_gnu+:} false; then :
22112  $as_echo_n "(cached) " >&6
22113else
22114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22115/* end confdefs.h.  */
22116
22117int
22118main ()
22119{
22120#ifndef __GNUC__
22121       choke me
22122#endif
22123
22124  ;
22125  return 0;
22126}
22127_ACEOF
22128if ac_fn_objc_try_compile "$LINENO"; then :
22129  ac_compiler_gnu=yes
22130else
22131  ac_compiler_gnu=no
22132fi
22133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22134ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22135
22136fi
22137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22138$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22139if test $ac_compiler_gnu = yes; then
22140  GOBJC=yes
22141else
22142  GOBJC=
22143fi
22144ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22145ac_save_OBJCFLAGS=$OBJCFLAGS
22146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22147$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22148if ${ac_cv_prog_objc_g+:} false; then :
22149  $as_echo_n "(cached) " >&6
22150else
22151  ac_save_objc_werror_flag=$ac_objc_werror_flag
22152   ac_objc_werror_flag=yes
22153   ac_cv_prog_objc_g=no
22154   OBJCFLAGS="-g"
22155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22156/* end confdefs.h.  */
22157
22158int
22159main ()
22160{
22161
22162  ;
22163  return 0;
22164}
22165_ACEOF
22166if ac_fn_objc_try_compile "$LINENO"; then :
22167  ac_cv_prog_objc_g=yes
22168else
22169  OBJCFLAGS=""
22170      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22171/* end confdefs.h.  */
22172
22173int
22174main ()
22175{
22176
22177  ;
22178  return 0;
22179}
22180_ACEOF
22181if ac_fn_objc_try_compile "$LINENO"; then :
22182
22183else
22184  ac_objc_werror_flag=$ac_save_objc_werror_flag
22185	 OBJCFLAGS="-g"
22186	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22187/* end confdefs.h.  */
22188
22189int
22190main ()
22191{
22192
22193  ;
22194  return 0;
22195}
22196_ACEOF
22197if ac_fn_objc_try_compile "$LINENO"; then :
22198  ac_cv_prog_objc_g=yes
22199fi
22200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22201fi
22202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22203fi
22204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22205   ac_objc_werror_flag=$ac_save_objc_werror_flag
22206fi
22207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22208$as_echo "$ac_cv_prog_objc_g" >&6; }
22209if test "$ac_test_OBJCFLAGS" = set; then
22210  OBJCFLAGS=$ac_save_OBJCFLAGS
22211elif test $ac_cv_prog_objc_g = yes; then
22212  if test "$GOBJC" = yes; then
22213    OBJCFLAGS="-g -O2"
22214  else
22215    OBJCFLAGS="-g"
22216  fi
22217else
22218  if test "$GOBJC" = yes; then
22219    OBJCFLAGS="-O2"
22220  else
22221    OBJCFLAGS=
22222  fi
22223fi
22224ac_ext=cpp
22225ac_cpp='$CXXCPP $CPPFLAGS'
22226ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22227ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22228ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22229
22230
22231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22232
22233  # First separate the path from the arguments. This will split at the first
22234  # space.
22235  complete="$OBJC"
22236  path="${complete%% *}"
22237  tmp="$complete EOL"
22238  arguments="${tmp#* }"
22239
22240  # Input might be given as Windows format, start by converting to
22241  # unix format.
22242  new_path=`$CYGPATH -u "$path"`
22243
22244  # Now try to locate executable using which
22245  new_path=`$WHICH "$new_path" 2> /dev/null`
22246  # bat and cmd files are not always considered executable in cygwin causing which
22247  # to not find them
22248  if test "x$new_path" = x \
22249           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22250           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22251    new_path=`$CYGPATH -u "$path"`
22252  fi
22253  if test "x$new_path" = x; then
22254    # Oops. Which didn't find the executable.
22255    # The splitting of arguments from the executable at a space might have been incorrect,
22256    # since paths with space are more likely in Windows. Give it another try with the whole
22257    # argument.
22258    path="$complete"
22259    arguments="EOL"
22260    new_path=`$CYGPATH -u "$path"`
22261    new_path=`$WHICH "$new_path" 2> /dev/null`
22262    # bat and cmd files are not always considered executable in cygwin causing which
22263    # to not find them
22264    if test "x$new_path" = x \
22265             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22266             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22267      new_path=`$CYGPATH -u "$path"`
22268    fi
22269    if test "x$new_path" = x; then
22270      # It's still not found. Now this is an unrecoverable error.
22271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22272$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22273      has_space=`$ECHO "$complete" | $GREP " "`
22274      if test "x$has_space" != x; then
22275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22277      fi
22278      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22279    fi
22280  fi
22281
22282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22285  # "foo.exe" is OK but "foo" is an error.
22286  #
22287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22288  # It is also a way to make sure we got the proper file name for the real test later on.
22289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22290  if test "x$test_shortpath" = x; then
22291    # Short path failed, file does not exist as specified.
22292    # Try adding .exe or .cmd
22293    if test -f "${new_path}.exe"; then
22294       input_to_shortpath="${new_path}.exe"
22295    elif test -f "${new_path}.cmd"; then
22296       input_to_shortpath="${new_path}.cmd"
22297    else
22298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22299$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22302      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22303    fi
22304  else
22305    input_to_shortpath="$new_path"
22306  fi
22307
22308  # Call helper function which possibly converts this using DOS-style short mode.
22309  # If so, the updated path is stored in $new_path.
22310  new_path="$input_to_shortpath"
22311
22312  input_path="$input_to_shortpath"
22313  # Check if we need to convert this using DOS-style short mode. If the path
22314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22315  # take no chances and rewrite it.
22316  # Note: m4 eats our [], so we need to use [ and ] instead.
22317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22318  if test "x$has_forbidden_chars" != x; then
22319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22323      # Going to short mode and back again did indeed matter. Since short mode is
22324      # case insensitive, let's make it lowercase to improve readability.
22325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22326      # Now convert it back to Unix-stile (cygpath)
22327      input_path=`$CYGPATH -u "$shortmode_path"`
22328      new_path="$input_path"
22329    fi
22330  fi
22331
22332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22333  if test "x$test_cygdrive_prefix" = x; then
22334    # As a simple fix, exclude /usr/bin since it's not a real path.
22335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22337      # a path prefixed by /cygdrive for fixpath to work.
22338      new_path="$CYGWIN_ROOT_PATH$input_path"
22339    fi
22340  fi
22341
22342  # remove trailing .exe if any
22343  new_path="${new_path/%.exe/}"
22344
22345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22346
22347  # First separate the path from the arguments. This will split at the first
22348  # space.
22349  complete="$OBJC"
22350  path="${complete%% *}"
22351  tmp="$complete EOL"
22352  arguments="${tmp#* }"
22353
22354  # Input might be given as Windows format, start by converting to
22355  # unix format.
22356  new_path="$path"
22357
22358  windows_path="$new_path"
22359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22360    unix_path=`$CYGPATH -u "$windows_path"`
22361    new_path="$unix_path"
22362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22364    new_path="$unix_path"
22365  fi
22366
22367
22368  # Now try to locate executable using which
22369  new_path=`$WHICH "$new_path" 2> /dev/null`
22370
22371  if test "x$new_path" = x; then
22372    # Oops. Which didn't find the executable.
22373    # The splitting of arguments from the executable at a space might have been incorrect,
22374    # since paths with space are more likely in Windows. Give it another try with the whole
22375    # argument.
22376    path="$complete"
22377    arguments="EOL"
22378    new_path="$path"
22379
22380  windows_path="$new_path"
22381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22382    unix_path=`$CYGPATH -u "$windows_path"`
22383    new_path="$unix_path"
22384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22386    new_path="$unix_path"
22387  fi
22388
22389
22390    new_path=`$WHICH "$new_path" 2> /dev/null`
22391
22392    if test "x$new_path" = x; then
22393      # It's still not found. Now this is an unrecoverable error.
22394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22395$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22396      has_space=`$ECHO "$complete" | $GREP " "`
22397      if test "x$has_space" != x; then
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22400      fi
22401      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22402    fi
22403  fi
22404
22405  # Now new_path has a complete unix path to the binary
22406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22407    # Keep paths in /bin as-is, but remove trailing .exe if any
22408    new_path="${new_path/%.exe/}"
22409    # Do not save /bin paths to all_fixpath_prefixes!
22410  else
22411    # Not in mixed or Windows style, start by that.
22412    new_path=`cmd //c echo $new_path`
22413
22414  input_path="$new_path"
22415  # Check if we need to convert this using DOS-style short mode. If the path
22416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22417  # take no chances and rewrite it.
22418  # Note: m4 eats our [], so we need to use [ and ] instead.
22419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22420  if test "x$has_forbidden_chars" != x; then
22421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22423  fi
22424
22425    # Output is in $new_path
22426
22427  windows_path="$new_path"
22428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22429    unix_path=`$CYGPATH -u "$windows_path"`
22430    new_path="$unix_path"
22431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22433    new_path="$unix_path"
22434  fi
22435
22436    # remove trailing .exe if any
22437    new_path="${new_path/%.exe/}"
22438
22439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22441  fi
22442
22443  else
22444    # We're on a posix platform. Hooray! :)
22445    # First separate the path from the arguments. This will split at the first
22446    # space.
22447    complete="$OBJC"
22448    path="${complete%% *}"
22449    tmp="$complete EOL"
22450    arguments="${tmp#* }"
22451
22452    # Cannot rely on the command "which" here since it doesn't always work.
22453    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22454    if test -z "$is_absolute_path"; then
22455      # Path to executable is not absolute. Find it.
22456      IFS_save="$IFS"
22457      IFS=:
22458      for p in $PATH; do
22459        if test -f "$p/$path" && test -x "$p/$path"; then
22460          new_path="$p/$path"
22461          break
22462        fi
22463      done
22464      IFS="$IFS_save"
22465    else
22466      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22467$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22468      new_path="$path"
22469    fi
22470
22471    if test "x$new_path" = x; then
22472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22473$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22474        has_space=`$ECHO "$complete" | $GREP " "`
22475        if test "x$has_space" != x; then
22476          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22478        fi
22479        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22480      fi
22481  fi
22482
22483      # Now join together the path and the arguments once again
22484      if test "x$arguments" != xEOL; then
22485        new_complete="$new_path ${arguments% *}"
22486      else
22487        new_complete="$new_path"
22488      fi
22489
22490  if test "x$complete" != "x$new_complete"; then
22491      OBJC="$new_complete"
22492      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22493$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22494    fi
22495
22496else
22497    OBJC=
22498fi
22499
22500# Restore the flags to the user specified values.
22501# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22502CFLAGS="$ORG_CFLAGS"
22503CXXFLAGS="$ORG_CXXFLAGS"
22504OBJCFLAGS="$ORG_OBJCFLAGS"
22505
22506LD="$CC"
22507LDEXE="$CC"
22508LDCXX="$CXX"
22509LDEXECXX="$CXX"
22510
22511# LDEXE is the linker to use, when creating executables.
22512
22513# Linking C++ libraries.
22514
22515# Linking C++ executables.
22516
22517
22518if test "x$OPENJDK_TARGET_OS" != xwindows; then
22519    if test -n "$ac_tool_prefix"; then
22520  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22521set dummy ${ac_tool_prefix}ar; ac_word=$2
22522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22523$as_echo_n "checking for $ac_word... " >&6; }
22524if ${ac_cv_prog_AR+:} false; then :
22525  $as_echo_n "(cached) " >&6
22526else
22527  if test -n "$AR"; then
22528  ac_cv_prog_AR="$AR" # Let the user override the test.
22529else
22530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22531for as_dir in $PATH
22532do
22533  IFS=$as_save_IFS
22534  test -z "$as_dir" && as_dir=.
22535    for ac_exec_ext in '' $ac_executable_extensions; do
22536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22537    ac_cv_prog_AR="${ac_tool_prefix}ar"
22538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22539    break 2
22540  fi
22541done
22542  done
22543IFS=$as_save_IFS
22544
22545fi
22546fi
22547AR=$ac_cv_prog_AR
22548if test -n "$AR"; then
22549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22550$as_echo "$AR" >&6; }
22551else
22552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22553$as_echo "no" >&6; }
22554fi
22555
22556
22557fi
22558if test -z "$ac_cv_prog_AR"; then
22559  ac_ct_AR=$AR
22560  # Extract the first word of "ar", so it can be a program name with args.
22561set dummy ar; ac_word=$2
22562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22563$as_echo_n "checking for $ac_word... " >&6; }
22564if ${ac_cv_prog_ac_ct_AR+:} false; then :
22565  $as_echo_n "(cached) " >&6
22566else
22567  if test -n "$ac_ct_AR"; then
22568  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22569else
22570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22571for as_dir in $PATH
22572do
22573  IFS=$as_save_IFS
22574  test -z "$as_dir" && as_dir=.
22575    for ac_exec_ext in '' $ac_executable_extensions; do
22576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22577    ac_cv_prog_ac_ct_AR="ar"
22578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22579    break 2
22580  fi
22581done
22582  done
22583IFS=$as_save_IFS
22584
22585fi
22586fi
22587ac_ct_AR=$ac_cv_prog_ac_ct_AR
22588if test -n "$ac_ct_AR"; then
22589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22590$as_echo "$ac_ct_AR" >&6; }
22591else
22592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22593$as_echo "no" >&6; }
22594fi
22595
22596  if test "x$ac_ct_AR" = x; then
22597    AR=""
22598  else
22599    case $cross_compiling:$ac_tool_warned in
22600yes:)
22601{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22602$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22603ac_tool_warned=yes ;;
22604esac
22605    AR=$ac_ct_AR
22606  fi
22607else
22608  AR="$ac_cv_prog_AR"
22609fi
22610
22611
22612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22613
22614  # First separate the path from the arguments. This will split at the first
22615  # space.
22616  complete="$AR"
22617  path="${complete%% *}"
22618  tmp="$complete EOL"
22619  arguments="${tmp#* }"
22620
22621  # Input might be given as Windows format, start by converting to
22622  # unix format.
22623  new_path=`$CYGPATH -u "$path"`
22624
22625  # Now try to locate executable using which
22626  new_path=`$WHICH "$new_path" 2> /dev/null`
22627  # bat and cmd files are not always considered executable in cygwin causing which
22628  # to not find them
22629  if test "x$new_path" = x \
22630           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22631           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22632    new_path=`$CYGPATH -u "$path"`
22633  fi
22634  if test "x$new_path" = x; then
22635    # Oops. Which didn't find the executable.
22636    # The splitting of arguments from the executable at a space might have been incorrect,
22637    # since paths with space are more likely in Windows. Give it another try with the whole
22638    # argument.
22639    path="$complete"
22640    arguments="EOL"
22641    new_path=`$CYGPATH -u "$path"`
22642    new_path=`$WHICH "$new_path" 2> /dev/null`
22643    # bat and cmd files are not always considered executable in cygwin causing which
22644    # to not find them
22645    if test "x$new_path" = x \
22646             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22647             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22648      new_path=`$CYGPATH -u "$path"`
22649    fi
22650    if test "x$new_path" = x; then
22651      # It's still not found. Now this is an unrecoverable error.
22652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22653$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22654      has_space=`$ECHO "$complete" | $GREP " "`
22655      if test "x$has_space" != x; then
22656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22658      fi
22659      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22660    fi
22661  fi
22662
22663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22666  # "foo.exe" is OK but "foo" is an error.
22667  #
22668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22669  # It is also a way to make sure we got the proper file name for the real test later on.
22670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22671  if test "x$test_shortpath" = x; then
22672    # Short path failed, file does not exist as specified.
22673    # Try adding .exe or .cmd
22674    if test -f "${new_path}.exe"; then
22675       input_to_shortpath="${new_path}.exe"
22676    elif test -f "${new_path}.cmd"; then
22677       input_to_shortpath="${new_path}.cmd"
22678    else
22679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22680$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22681      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22682$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22683      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22684    fi
22685  else
22686    input_to_shortpath="$new_path"
22687  fi
22688
22689  # Call helper function which possibly converts this using DOS-style short mode.
22690  # If so, the updated path is stored in $new_path.
22691  new_path="$input_to_shortpath"
22692
22693  input_path="$input_to_shortpath"
22694  # Check if we need to convert this using DOS-style short mode. If the path
22695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22696  # take no chances and rewrite it.
22697  # Note: m4 eats our [], so we need to use [ and ] instead.
22698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22699  if test "x$has_forbidden_chars" != x; then
22700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22704      # Going to short mode and back again did indeed matter. Since short mode is
22705      # case insensitive, let's make it lowercase to improve readability.
22706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22707      # Now convert it back to Unix-stile (cygpath)
22708      input_path=`$CYGPATH -u "$shortmode_path"`
22709      new_path="$input_path"
22710    fi
22711  fi
22712
22713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22714  if test "x$test_cygdrive_prefix" = x; then
22715    # As a simple fix, exclude /usr/bin since it's not a real path.
22716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22718      # a path prefixed by /cygdrive for fixpath to work.
22719      new_path="$CYGWIN_ROOT_PATH$input_path"
22720    fi
22721  fi
22722
22723  # remove trailing .exe if any
22724  new_path="${new_path/%.exe/}"
22725
22726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22727
22728  # First separate the path from the arguments. This will split at the first
22729  # space.
22730  complete="$AR"
22731  path="${complete%% *}"
22732  tmp="$complete EOL"
22733  arguments="${tmp#* }"
22734
22735  # Input might be given as Windows format, start by converting to
22736  # unix format.
22737  new_path="$path"
22738
22739  windows_path="$new_path"
22740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22741    unix_path=`$CYGPATH -u "$windows_path"`
22742    new_path="$unix_path"
22743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22745    new_path="$unix_path"
22746  fi
22747
22748
22749  # Now try to locate executable using which
22750  new_path=`$WHICH "$new_path" 2> /dev/null`
22751
22752  if test "x$new_path" = x; then
22753    # Oops. Which didn't find the executable.
22754    # The splitting of arguments from the executable at a space might have been incorrect,
22755    # since paths with space are more likely in Windows. Give it another try with the whole
22756    # argument.
22757    path="$complete"
22758    arguments="EOL"
22759    new_path="$path"
22760
22761  windows_path="$new_path"
22762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22763    unix_path=`$CYGPATH -u "$windows_path"`
22764    new_path="$unix_path"
22765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22767    new_path="$unix_path"
22768  fi
22769
22770
22771    new_path=`$WHICH "$new_path" 2> /dev/null`
22772
22773    if test "x$new_path" = x; then
22774      # It's still not found. Now this is an unrecoverable error.
22775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22776$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22777      has_space=`$ECHO "$complete" | $GREP " "`
22778      if test "x$has_space" != x; then
22779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22781      fi
22782      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22783    fi
22784  fi
22785
22786  # Now new_path has a complete unix path to the binary
22787  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22788    # Keep paths in /bin as-is, but remove trailing .exe if any
22789    new_path="${new_path/%.exe/}"
22790    # Do not save /bin paths to all_fixpath_prefixes!
22791  else
22792    # Not in mixed or Windows style, start by that.
22793    new_path=`cmd //c echo $new_path`
22794
22795  input_path="$new_path"
22796  # Check if we need to convert this using DOS-style short mode. If the path
22797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22798  # take no chances and rewrite it.
22799  # Note: m4 eats our [], so we need to use [ and ] instead.
22800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22801  if test "x$has_forbidden_chars" != x; then
22802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22804  fi
22805
22806    # Output is in $new_path
22807
22808  windows_path="$new_path"
22809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22810    unix_path=`$CYGPATH -u "$windows_path"`
22811    new_path="$unix_path"
22812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22814    new_path="$unix_path"
22815  fi
22816
22817    # remove trailing .exe if any
22818    new_path="${new_path/%.exe/}"
22819
22820    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22821    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22822  fi
22823
22824  else
22825    # We're on a posix platform. Hooray! :)
22826    # First separate the path from the arguments. This will split at the first
22827    # space.
22828    complete="$AR"
22829    path="${complete%% *}"
22830    tmp="$complete EOL"
22831    arguments="${tmp#* }"
22832
22833    # Cannot rely on the command "which" here since it doesn't always work.
22834    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22835    if test -z "$is_absolute_path"; then
22836      # Path to executable is not absolute. Find it.
22837      IFS_save="$IFS"
22838      IFS=:
22839      for p in $PATH; do
22840        if test -f "$p/$path" && test -x "$p/$path"; then
22841          new_path="$p/$path"
22842          break
22843        fi
22844      done
22845      IFS="$IFS_save"
22846    else
22847      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22848$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22849      new_path="$path"
22850    fi
22851
22852    if test "x$new_path" = x; then
22853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22854$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22855        has_space=`$ECHO "$complete" | $GREP " "`
22856        if test "x$has_space" != x; then
22857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22859        fi
22860        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22861      fi
22862  fi
22863
22864      # Now join together the path and the arguments once again
22865      if test "x$arguments" != xEOL; then
22866        new_complete="$new_path ${arguments% *}"
22867      else
22868        new_complete="$new_path"
22869      fi
22870
22871  if test "x$complete" != "x$new_complete"; then
22872      AR="$new_complete"
22873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22874$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22875    fi
22876
22877fi
22878if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22879    ARFLAGS="-r"
22880else
22881    ARFLAGS=""
22882fi
22883
22884
22885# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22886HOTSPOT_CXX="$CXX"
22887HOTSPOT_LD="$LD"
22888
22889
22890
22891COMPILER_NAME=gcc
22892COMPILER_TYPE=CC
22893if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22894
22895    # For now, assume that we are always compiling using cl.exe.
22896    CC_OUT_OPTION=-Fo
22897    EXE_OUT_OPTION=-out:
22898    LD_OUT_OPTION=-out:
22899    AR_OUT_OPTION=-out:
22900    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22901    # program for something completely different.
22902    # Extract the first word of "link", so it can be a program name with args.
22903set dummy link; ac_word=$2
22904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22905$as_echo_n "checking for $ac_word... " >&6; }
22906if ${ac_cv_prog_WINLD+:} false; then :
22907  $as_echo_n "(cached) " >&6
22908else
22909  if test -n "$WINLD"; then
22910  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22911else
22912  ac_prog_rejected=no
22913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22914for as_dir in $PATH
22915do
22916  IFS=$as_save_IFS
22917  test -z "$as_dir" && as_dir=.
22918    for ac_exec_ext in '' $ac_executable_extensions; do
22919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22920    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22921       ac_prog_rejected=yes
22922       continue
22923     fi
22924    ac_cv_prog_WINLD="link"
22925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22926    break 2
22927  fi
22928done
22929  done
22930IFS=$as_save_IFS
22931
22932if test $ac_prog_rejected = yes; then
22933  # We found a bogon in the path, so make sure we never use it.
22934  set dummy $ac_cv_prog_WINLD
22935  shift
22936  if test $# != 0; then
22937    # We chose a different compiler from the bogus one.
22938    # However, it has the same basename, so the bogon will be chosen
22939    # first if we set WINLD to just the basename; use the full file name.
22940    shift
22941    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22942  fi
22943fi
22944fi
22945fi
22946WINLD=$ac_cv_prog_WINLD
22947if test -n "$WINLD"; then
22948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22949$as_echo "$WINLD" >&6; }
22950else
22951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22952$as_echo "no" >&6; }
22953fi
22954
22955
22956    # Since we must ignore the first found link, WINLD will contain
22957    # the full path to the link.exe program.
22958
22959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22960
22961  # First separate the path from the arguments. This will split at the first
22962  # space.
22963  complete="$WINLD"
22964  path="${complete%% *}"
22965  tmp="$complete EOL"
22966  arguments="${tmp#* }"
22967
22968  # Input might be given as Windows format, start by converting to
22969  # unix format.
22970  new_path=`$CYGPATH -u "$path"`
22971
22972  # Now try to locate executable using which
22973  new_path=`$WHICH "$new_path" 2> /dev/null`
22974  # bat and cmd files are not always considered executable in cygwin causing which
22975  # to not find them
22976  if test "x$new_path" = x \
22977           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22978           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22979    new_path=`$CYGPATH -u "$path"`
22980  fi
22981  if test "x$new_path" = x; then
22982    # Oops. Which didn't find the executable.
22983    # The splitting of arguments from the executable at a space might have been incorrect,
22984    # since paths with space are more likely in Windows. Give it another try with the whole
22985    # argument.
22986    path="$complete"
22987    arguments="EOL"
22988    new_path=`$CYGPATH -u "$path"`
22989    new_path=`$WHICH "$new_path" 2> /dev/null`
22990    # bat and cmd files are not always considered executable in cygwin causing which
22991    # to not find them
22992    if test "x$new_path" = x \
22993             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22994             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22995      new_path=`$CYGPATH -u "$path"`
22996    fi
22997    if test "x$new_path" = x; then
22998      # It's still not found. Now this is an unrecoverable error.
22999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23000$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23001      has_space=`$ECHO "$complete" | $GREP " "`
23002      if test "x$has_space" != x; then
23003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23005      fi
23006      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23007    fi
23008  fi
23009
23010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23013  # "foo.exe" is OK but "foo" is an error.
23014  #
23015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23016  # It is also a way to make sure we got the proper file name for the real test later on.
23017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23018  if test "x$test_shortpath" = x; then
23019    # Short path failed, file does not exist as specified.
23020    # Try adding .exe or .cmd
23021    if test -f "${new_path}.exe"; then
23022       input_to_shortpath="${new_path}.exe"
23023    elif test -f "${new_path}.cmd"; then
23024       input_to_shortpath="${new_path}.cmd"
23025    else
23026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23027$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23028      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23029$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23030      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23031    fi
23032  else
23033    input_to_shortpath="$new_path"
23034  fi
23035
23036  # Call helper function which possibly converts this using DOS-style short mode.
23037  # If so, the updated path is stored in $new_path.
23038  new_path="$input_to_shortpath"
23039
23040  input_path="$input_to_shortpath"
23041  # Check if we need to convert this using DOS-style short mode. If the path
23042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23043  # take no chances and rewrite it.
23044  # Note: m4 eats our [], so we need to use [ and ] instead.
23045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23046  if test "x$has_forbidden_chars" != x; then
23047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23051      # Going to short mode and back again did indeed matter. Since short mode is
23052      # case insensitive, let's make it lowercase to improve readability.
23053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23054      # Now convert it back to Unix-stile (cygpath)
23055      input_path=`$CYGPATH -u "$shortmode_path"`
23056      new_path="$input_path"
23057    fi
23058  fi
23059
23060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23061  if test "x$test_cygdrive_prefix" = x; then
23062    # As a simple fix, exclude /usr/bin since it's not a real path.
23063    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23065      # a path prefixed by /cygdrive for fixpath to work.
23066      new_path="$CYGWIN_ROOT_PATH$input_path"
23067    fi
23068  fi
23069
23070  # remove trailing .exe if any
23071  new_path="${new_path/%.exe/}"
23072
23073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23074
23075  # First separate the path from the arguments. This will split at the first
23076  # space.
23077  complete="$WINLD"
23078  path="${complete%% *}"
23079  tmp="$complete EOL"
23080  arguments="${tmp#* }"
23081
23082  # Input might be given as Windows format, start by converting to
23083  # unix format.
23084  new_path="$path"
23085
23086  windows_path="$new_path"
23087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23088    unix_path=`$CYGPATH -u "$windows_path"`
23089    new_path="$unix_path"
23090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23092    new_path="$unix_path"
23093  fi
23094
23095
23096  # Now try to locate executable using which
23097  new_path=`$WHICH "$new_path" 2> /dev/null`
23098
23099  if test "x$new_path" = x; then
23100    # Oops. Which didn't find the executable.
23101    # The splitting of arguments from the executable at a space might have been incorrect,
23102    # since paths with space are more likely in Windows. Give it another try with the whole
23103    # argument.
23104    path="$complete"
23105    arguments="EOL"
23106    new_path="$path"
23107
23108  windows_path="$new_path"
23109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23110    unix_path=`$CYGPATH -u "$windows_path"`
23111    new_path="$unix_path"
23112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23114    new_path="$unix_path"
23115  fi
23116
23117
23118    new_path=`$WHICH "$new_path" 2> /dev/null`
23119
23120    if test "x$new_path" = x; then
23121      # It's still not found. Now this is an unrecoverable error.
23122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23123$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23124      has_space=`$ECHO "$complete" | $GREP " "`
23125      if test "x$has_space" != x; then
23126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23128      fi
23129      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23130    fi
23131  fi
23132
23133  # Now new_path has a complete unix path to the binary
23134  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23135    # Keep paths in /bin as-is, but remove trailing .exe if any
23136    new_path="${new_path/%.exe/}"
23137    # Do not save /bin paths to all_fixpath_prefixes!
23138  else
23139    # Not in mixed or Windows style, start by that.
23140    new_path=`cmd //c echo $new_path`
23141
23142  input_path="$new_path"
23143  # Check if we need to convert this using DOS-style short mode. If the path
23144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23145  # take no chances and rewrite it.
23146  # Note: m4 eats our [], so we need to use [ and ] instead.
23147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23148  if test "x$has_forbidden_chars" != x; then
23149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23151  fi
23152
23153    # Output is in $new_path
23154
23155  windows_path="$new_path"
23156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23157    unix_path=`$CYGPATH -u "$windows_path"`
23158    new_path="$unix_path"
23159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23161    new_path="$unix_path"
23162  fi
23163
23164    # remove trailing .exe if any
23165    new_path="${new_path/%.exe/}"
23166
23167    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23168    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23169  fi
23170
23171  else
23172    # We're on a posix platform. Hooray! :)
23173    # First separate the path from the arguments. This will split at the first
23174    # space.
23175    complete="$WINLD"
23176    path="${complete%% *}"
23177    tmp="$complete EOL"
23178    arguments="${tmp#* }"
23179
23180    # Cannot rely on the command "which" here since it doesn't always work.
23181    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23182    if test -z "$is_absolute_path"; then
23183      # Path to executable is not absolute. Find it.
23184      IFS_save="$IFS"
23185      IFS=:
23186      for p in $PATH; do
23187        if test -f "$p/$path" && test -x "$p/$path"; then
23188          new_path="$p/$path"
23189          break
23190        fi
23191      done
23192      IFS="$IFS_save"
23193    else
23194      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23195$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23196      new_path="$path"
23197    fi
23198
23199    if test "x$new_path" = x; then
23200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23201$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23202        has_space=`$ECHO "$complete" | $GREP " "`
23203        if test "x$has_space" != x; then
23204          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23205$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23206        fi
23207        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23208      fi
23209  fi
23210
23211      # Now join together the path and the arguments once again
23212      if test "x$arguments" != xEOL; then
23213        new_complete="$new_path ${arguments% *}"
23214      else
23215        new_complete="$new_path"
23216      fi
23217
23218  if test "x$complete" != "x$new_complete"; then
23219      WINLD="$new_complete"
23220      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23221$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23222    fi
23223
23224    printf "Windows linker was found at $WINLD\n"
23225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23226$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23227    "$WINLD" --version > /dev/null
23228    if test $? -eq 0 ; then
23229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23230$as_echo "no" >&6; }
23231      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23232    else
23233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23234$as_echo "yes" >&6; }
23235    fi
23236    LD="$WINLD"
23237    LDEXE="$WINLD"
23238    LDCXX="$WINLD"
23239    LDEXECXX="$WINLD"
23240
23241    # Extract the first word of "mt", so it can be a program name with args.
23242set dummy mt; ac_word=$2
23243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23244$as_echo_n "checking for $ac_word... " >&6; }
23245if ${ac_cv_prog_MT+:} false; then :
23246  $as_echo_n "(cached) " >&6
23247else
23248  if test -n "$MT"; then
23249  ac_cv_prog_MT="$MT" # Let the user override the test.
23250else
23251  ac_prog_rejected=no
23252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23253for as_dir in $PATH
23254do
23255  IFS=$as_save_IFS
23256  test -z "$as_dir" && as_dir=.
23257    for ac_exec_ext in '' $ac_executable_extensions; do
23258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23259    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23260       ac_prog_rejected=yes
23261       continue
23262     fi
23263    ac_cv_prog_MT="mt"
23264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23265    break 2
23266  fi
23267done
23268  done
23269IFS=$as_save_IFS
23270
23271if test $ac_prog_rejected = yes; then
23272  # We found a bogon in the path, so make sure we never use it.
23273  set dummy $ac_cv_prog_MT
23274  shift
23275  if test $# != 0; then
23276    # We chose a different compiler from the bogus one.
23277    # However, it has the same basename, so the bogon will be chosen
23278    # first if we set MT to just the basename; use the full file name.
23279    shift
23280    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23281  fi
23282fi
23283fi
23284fi
23285MT=$ac_cv_prog_MT
23286if test -n "$MT"; then
23287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23288$as_echo "$MT" >&6; }
23289else
23290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23291$as_echo "no" >&6; }
23292fi
23293
23294
23295
23296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23297
23298  # First separate the path from the arguments. This will split at the first
23299  # space.
23300  complete="$MT"
23301  path="${complete%% *}"
23302  tmp="$complete EOL"
23303  arguments="${tmp#* }"
23304
23305  # Input might be given as Windows format, start by converting to
23306  # unix format.
23307  new_path=`$CYGPATH -u "$path"`
23308
23309  # Now try to locate executable using which
23310  new_path=`$WHICH "$new_path" 2> /dev/null`
23311  # bat and cmd files are not always considered executable in cygwin causing which
23312  # to not find them
23313  if test "x$new_path" = x \
23314           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23315           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23316    new_path=`$CYGPATH -u "$path"`
23317  fi
23318  if test "x$new_path" = x; then
23319    # Oops. Which didn't find the executable.
23320    # The splitting of arguments from the executable at a space might have been incorrect,
23321    # since paths with space are more likely in Windows. Give it another try with the whole
23322    # argument.
23323    path="$complete"
23324    arguments="EOL"
23325    new_path=`$CYGPATH -u "$path"`
23326    new_path=`$WHICH "$new_path" 2> /dev/null`
23327    # bat and cmd files are not always considered executable in cygwin causing which
23328    # to not find them
23329    if test "x$new_path" = x \
23330             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23331             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23332      new_path=`$CYGPATH -u "$path"`
23333    fi
23334    if test "x$new_path" = x; then
23335      # It's still not found. Now this is an unrecoverable error.
23336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23337$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23338      has_space=`$ECHO "$complete" | $GREP " "`
23339      if test "x$has_space" != x; then
23340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23342      fi
23343      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23344    fi
23345  fi
23346
23347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23350  # "foo.exe" is OK but "foo" is an error.
23351  #
23352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23353  # It is also a way to make sure we got the proper file name for the real test later on.
23354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23355  if test "x$test_shortpath" = x; then
23356    # Short path failed, file does not exist as specified.
23357    # Try adding .exe or .cmd
23358    if test -f "${new_path}.exe"; then
23359       input_to_shortpath="${new_path}.exe"
23360    elif test -f "${new_path}.cmd"; then
23361       input_to_shortpath="${new_path}.cmd"
23362    else
23363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23364$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23365      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23366$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23367      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23368    fi
23369  else
23370    input_to_shortpath="$new_path"
23371  fi
23372
23373  # Call helper function which possibly converts this using DOS-style short mode.
23374  # If so, the updated path is stored in $new_path.
23375  new_path="$input_to_shortpath"
23376
23377  input_path="$input_to_shortpath"
23378  # Check if we need to convert this using DOS-style short mode. If the path
23379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23380  # take no chances and rewrite it.
23381  # Note: m4 eats our [], so we need to use [ and ] instead.
23382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23383  if test "x$has_forbidden_chars" != x; then
23384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23388      # Going to short mode and back again did indeed matter. Since short mode is
23389      # case insensitive, let's make it lowercase to improve readability.
23390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23391      # Now convert it back to Unix-stile (cygpath)
23392      input_path=`$CYGPATH -u "$shortmode_path"`
23393      new_path="$input_path"
23394    fi
23395  fi
23396
23397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23398  if test "x$test_cygdrive_prefix" = x; then
23399    # As a simple fix, exclude /usr/bin since it's not a real path.
23400    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23402      # a path prefixed by /cygdrive for fixpath to work.
23403      new_path="$CYGWIN_ROOT_PATH$input_path"
23404    fi
23405  fi
23406
23407  # remove trailing .exe if any
23408  new_path="${new_path/%.exe/}"
23409
23410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23411
23412  # First separate the path from the arguments. This will split at the first
23413  # space.
23414  complete="$MT"
23415  path="${complete%% *}"
23416  tmp="$complete EOL"
23417  arguments="${tmp#* }"
23418
23419  # Input might be given as Windows format, start by converting to
23420  # unix format.
23421  new_path="$path"
23422
23423  windows_path="$new_path"
23424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23425    unix_path=`$CYGPATH -u "$windows_path"`
23426    new_path="$unix_path"
23427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23429    new_path="$unix_path"
23430  fi
23431
23432
23433  # Now try to locate executable using which
23434  new_path=`$WHICH "$new_path" 2> /dev/null`
23435
23436  if test "x$new_path" = x; then
23437    # Oops. Which didn't find the executable.
23438    # The splitting of arguments from the executable at a space might have been incorrect,
23439    # since paths with space are more likely in Windows. Give it another try with the whole
23440    # argument.
23441    path="$complete"
23442    arguments="EOL"
23443    new_path="$path"
23444
23445  windows_path="$new_path"
23446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23447    unix_path=`$CYGPATH -u "$windows_path"`
23448    new_path="$unix_path"
23449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23451    new_path="$unix_path"
23452  fi
23453
23454
23455    new_path=`$WHICH "$new_path" 2> /dev/null`
23456
23457    if test "x$new_path" = x; then
23458      # It's still not found. Now this is an unrecoverable error.
23459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23460$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23461      has_space=`$ECHO "$complete" | $GREP " "`
23462      if test "x$has_space" != x; then
23463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23465      fi
23466      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23467    fi
23468  fi
23469
23470  # Now new_path has a complete unix path to the binary
23471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23472    # Keep paths in /bin as-is, but remove trailing .exe if any
23473    new_path="${new_path/%.exe/}"
23474    # Do not save /bin paths to all_fixpath_prefixes!
23475  else
23476    # Not in mixed or Windows style, start by that.
23477    new_path=`cmd //c echo $new_path`
23478
23479  input_path="$new_path"
23480  # Check if we need to convert this using DOS-style short mode. If the path
23481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23482  # take no chances and rewrite it.
23483  # Note: m4 eats our [], so we need to use [ and ] instead.
23484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23485  if test "x$has_forbidden_chars" != x; then
23486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23488  fi
23489
23490    # Output is in $new_path
23491
23492  windows_path="$new_path"
23493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23494    unix_path=`$CYGPATH -u "$windows_path"`
23495    new_path="$unix_path"
23496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23498    new_path="$unix_path"
23499  fi
23500
23501    # remove trailing .exe if any
23502    new_path="${new_path/%.exe/}"
23503
23504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23506  fi
23507
23508  else
23509    # We're on a posix platform. Hooray! :)
23510    # First separate the path from the arguments. This will split at the first
23511    # space.
23512    complete="$MT"
23513    path="${complete%% *}"
23514    tmp="$complete EOL"
23515    arguments="${tmp#* }"
23516
23517    # Cannot rely on the command "which" here since it doesn't always work.
23518    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23519    if test -z "$is_absolute_path"; then
23520      # Path to executable is not absolute. Find it.
23521      IFS_save="$IFS"
23522      IFS=:
23523      for p in $PATH; do
23524        if test -f "$p/$path" && test -x "$p/$path"; then
23525          new_path="$p/$path"
23526          break
23527        fi
23528      done
23529      IFS="$IFS_save"
23530    else
23531      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23532$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23533      new_path="$path"
23534    fi
23535
23536    if test "x$new_path" = x; then
23537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23538$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23539        has_space=`$ECHO "$complete" | $GREP " "`
23540        if test "x$has_space" != x; then
23541          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23542$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23543        fi
23544        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23545      fi
23546  fi
23547
23548      # Now join together the path and the arguments once again
23549      if test "x$arguments" != xEOL; then
23550        new_complete="$new_path ${arguments% *}"
23551      else
23552        new_complete="$new_path"
23553      fi
23554
23555  if test "x$complete" != "x$new_complete"; then
23556      MT="$new_complete"
23557      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23558$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23559    fi
23560
23561    # The resource compiler
23562    # Extract the first word of "rc", so it can be a program name with args.
23563set dummy rc; ac_word=$2
23564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23565$as_echo_n "checking for $ac_word... " >&6; }
23566if ${ac_cv_prog_RC+:} false; then :
23567  $as_echo_n "(cached) " >&6
23568else
23569  if test -n "$RC"; then
23570  ac_cv_prog_RC="$RC" # Let the user override the test.
23571else
23572  ac_prog_rejected=no
23573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23574for as_dir in $PATH
23575do
23576  IFS=$as_save_IFS
23577  test -z "$as_dir" && as_dir=.
23578    for ac_exec_ext in '' $ac_executable_extensions; do
23579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23580    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23581       ac_prog_rejected=yes
23582       continue
23583     fi
23584    ac_cv_prog_RC="rc"
23585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23586    break 2
23587  fi
23588done
23589  done
23590IFS=$as_save_IFS
23591
23592if test $ac_prog_rejected = yes; then
23593  # We found a bogon in the path, so make sure we never use it.
23594  set dummy $ac_cv_prog_RC
23595  shift
23596  if test $# != 0; then
23597    # We chose a different compiler from the bogus one.
23598    # However, it has the same basename, so the bogon will be chosen
23599    # first if we set RC to just the basename; use the full file name.
23600    shift
23601    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23602  fi
23603fi
23604fi
23605fi
23606RC=$ac_cv_prog_RC
23607if test -n "$RC"; then
23608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23609$as_echo "$RC" >&6; }
23610else
23611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23612$as_echo "no" >&6; }
23613fi
23614
23615
23616
23617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23618
23619  # First separate the path from the arguments. This will split at the first
23620  # space.
23621  complete="$RC"
23622  path="${complete%% *}"
23623  tmp="$complete EOL"
23624  arguments="${tmp#* }"
23625
23626  # Input might be given as Windows format, start by converting to
23627  # unix format.
23628  new_path=`$CYGPATH -u "$path"`
23629
23630  # Now try to locate executable using which
23631  new_path=`$WHICH "$new_path" 2> /dev/null`
23632  # bat and cmd files are not always considered executable in cygwin causing which
23633  # to not find them
23634  if test "x$new_path" = x \
23635           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23636           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23637    new_path=`$CYGPATH -u "$path"`
23638  fi
23639  if test "x$new_path" = x; then
23640    # Oops. Which didn't find the executable.
23641    # The splitting of arguments from the executable at a space might have been incorrect,
23642    # since paths with space are more likely in Windows. Give it another try with the whole
23643    # argument.
23644    path="$complete"
23645    arguments="EOL"
23646    new_path=`$CYGPATH -u "$path"`
23647    new_path=`$WHICH "$new_path" 2> /dev/null`
23648    # bat and cmd files are not always considered executable in cygwin causing which
23649    # to not find them
23650    if test "x$new_path" = x \
23651             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23652             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23653      new_path=`$CYGPATH -u "$path"`
23654    fi
23655    if test "x$new_path" = x; then
23656      # It's still not found. Now this is an unrecoverable error.
23657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23658$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23659      has_space=`$ECHO "$complete" | $GREP " "`
23660      if test "x$has_space" != x; then
23661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23663      fi
23664      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23665    fi
23666  fi
23667
23668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23671  # "foo.exe" is OK but "foo" is an error.
23672  #
23673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23674  # It is also a way to make sure we got the proper file name for the real test later on.
23675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23676  if test "x$test_shortpath" = x; then
23677    # Short path failed, file does not exist as specified.
23678    # Try adding .exe or .cmd
23679    if test -f "${new_path}.exe"; then
23680       input_to_shortpath="${new_path}.exe"
23681    elif test -f "${new_path}.cmd"; then
23682       input_to_shortpath="${new_path}.cmd"
23683    else
23684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23685$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23686      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23687$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23688      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23689    fi
23690  else
23691    input_to_shortpath="$new_path"
23692  fi
23693
23694  # Call helper function which possibly converts this using DOS-style short mode.
23695  # If so, the updated path is stored in $new_path.
23696  new_path="$input_to_shortpath"
23697
23698  input_path="$input_to_shortpath"
23699  # Check if we need to convert this using DOS-style short mode. If the path
23700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23701  # take no chances and rewrite it.
23702  # Note: m4 eats our [], so we need to use [ and ] instead.
23703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23704  if test "x$has_forbidden_chars" != x; then
23705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23709      # Going to short mode and back again did indeed matter. Since short mode is
23710      # case insensitive, let's make it lowercase to improve readability.
23711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23712      # Now convert it back to Unix-stile (cygpath)
23713      input_path=`$CYGPATH -u "$shortmode_path"`
23714      new_path="$input_path"
23715    fi
23716  fi
23717
23718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23719  if test "x$test_cygdrive_prefix" = x; then
23720    # As a simple fix, exclude /usr/bin since it's not a real path.
23721    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23723      # a path prefixed by /cygdrive for fixpath to work.
23724      new_path="$CYGWIN_ROOT_PATH$input_path"
23725    fi
23726  fi
23727
23728  # remove trailing .exe if any
23729  new_path="${new_path/%.exe/}"
23730
23731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23732
23733  # First separate the path from the arguments. This will split at the first
23734  # space.
23735  complete="$RC"
23736  path="${complete%% *}"
23737  tmp="$complete EOL"
23738  arguments="${tmp#* }"
23739
23740  # Input might be given as Windows format, start by converting to
23741  # unix format.
23742  new_path="$path"
23743
23744  windows_path="$new_path"
23745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23746    unix_path=`$CYGPATH -u "$windows_path"`
23747    new_path="$unix_path"
23748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23750    new_path="$unix_path"
23751  fi
23752
23753
23754  # Now try to locate executable using which
23755  new_path=`$WHICH "$new_path" 2> /dev/null`
23756
23757  if test "x$new_path" = x; then
23758    # Oops. Which didn't find the executable.
23759    # The splitting of arguments from the executable at a space might have been incorrect,
23760    # since paths with space are more likely in Windows. Give it another try with the whole
23761    # argument.
23762    path="$complete"
23763    arguments="EOL"
23764    new_path="$path"
23765
23766  windows_path="$new_path"
23767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23768    unix_path=`$CYGPATH -u "$windows_path"`
23769    new_path="$unix_path"
23770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23772    new_path="$unix_path"
23773  fi
23774
23775
23776    new_path=`$WHICH "$new_path" 2> /dev/null`
23777
23778    if test "x$new_path" = x; then
23779      # It's still not found. Now this is an unrecoverable error.
23780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23781$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23782      has_space=`$ECHO "$complete" | $GREP " "`
23783      if test "x$has_space" != x; then
23784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23786      fi
23787      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23788    fi
23789  fi
23790
23791  # Now new_path has a complete unix path to the binary
23792  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23793    # Keep paths in /bin as-is, but remove trailing .exe if any
23794    new_path="${new_path/%.exe/}"
23795    # Do not save /bin paths to all_fixpath_prefixes!
23796  else
23797    # Not in mixed or Windows style, start by that.
23798    new_path=`cmd //c echo $new_path`
23799
23800  input_path="$new_path"
23801  # Check if we need to convert this using DOS-style short mode. If the path
23802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23803  # take no chances and rewrite it.
23804  # Note: m4 eats our [], so we need to use [ and ] instead.
23805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23806  if test "x$has_forbidden_chars" != x; then
23807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23809  fi
23810
23811    # Output is in $new_path
23812
23813  windows_path="$new_path"
23814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23815    unix_path=`$CYGPATH -u "$windows_path"`
23816    new_path="$unix_path"
23817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23819    new_path="$unix_path"
23820  fi
23821
23822    # remove trailing .exe if any
23823    new_path="${new_path/%.exe/}"
23824
23825    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23826    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23827  fi
23828
23829  else
23830    # We're on a posix platform. Hooray! :)
23831    # First separate the path from the arguments. This will split at the first
23832    # space.
23833    complete="$RC"
23834    path="${complete%% *}"
23835    tmp="$complete EOL"
23836    arguments="${tmp#* }"
23837
23838    # Cannot rely on the command "which" here since it doesn't always work.
23839    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23840    if test -z "$is_absolute_path"; then
23841      # Path to executable is not absolute. Find it.
23842      IFS_save="$IFS"
23843      IFS=:
23844      for p in $PATH; do
23845        if test -f "$p/$path" && test -x "$p/$path"; then
23846          new_path="$p/$path"
23847          break
23848        fi
23849      done
23850      IFS="$IFS_save"
23851    else
23852      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23853$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23854      new_path="$path"
23855    fi
23856
23857    if test "x$new_path" = x; then
23858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23859$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23860        has_space=`$ECHO "$complete" | $GREP " "`
23861        if test "x$has_space" != x; then
23862          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23863$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23864        fi
23865        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23866      fi
23867  fi
23868
23869      # Now join together the path and the arguments once again
23870      if test "x$arguments" != xEOL; then
23871        new_complete="$new_path ${arguments% *}"
23872      else
23873        new_complete="$new_path"
23874      fi
23875
23876  if test "x$complete" != "x$new_complete"; then
23877      RC="$new_complete"
23878      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23879$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23880    fi
23881
23882
23883    # For hotspot, we need these in Windows mixed path,
23884    # so rewrite them all. Need added .exe suffix.
23885    HOTSPOT_CXX="$CXX.exe"
23886    HOTSPOT_LD="$LD.exe"
23887    HOTSPOT_MT="$MT.exe"
23888    HOTSPOT_RC="$RC.exe"
23889
23890  unix_path="$HOTSPOT_CXX"
23891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23892    windows_path=`$CYGPATH -m "$unix_path"`
23893    HOTSPOT_CXX="$windows_path"
23894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23895    windows_path=`cmd //c echo $unix_path`
23896    HOTSPOT_CXX="$windows_path"
23897  fi
23898
23899
23900  unix_path="$HOTSPOT_LD"
23901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23902    windows_path=`$CYGPATH -m "$unix_path"`
23903    HOTSPOT_LD="$windows_path"
23904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23905    windows_path=`cmd //c echo $unix_path`
23906    HOTSPOT_LD="$windows_path"
23907  fi
23908
23909
23910  unix_path="$HOTSPOT_MT"
23911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23912    windows_path=`$CYGPATH -m "$unix_path"`
23913    HOTSPOT_MT="$windows_path"
23914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23915    windows_path=`cmd //c echo $unix_path`
23916    HOTSPOT_MT="$windows_path"
23917  fi
23918
23919
23920  unix_path="$HOTSPOT_RC"
23921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23922    windows_path=`$CYGPATH -m "$unix_path"`
23923    HOTSPOT_RC="$windows_path"
23924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23925    windows_path=`cmd //c echo $unix_path`
23926    HOTSPOT_RC="$windows_path"
23927  fi
23928
23929
23930
23931
23932    RC_FLAGS="-nologo -l 0x409 -r"
23933    if test "x$VARIANT" = xOPT; then :
23934
23935        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23936
23937fi
23938
23939    # The version variables used to create RC_FLAGS may be overridden
23940    # in a custom configure script, or possibly the command line.
23941    # Let those variables be expanded at make time in spec.gmk.
23942    # The \$ are escaped to the shell, and the $(...) variables
23943    # are evaluated by make.
23944    RC_FLAGS="$RC_FLAGS \
23945        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23946        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23947        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23948        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23949        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23950        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23951        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23952
23953    # lib.exe is used to create static libraries.
23954    # Extract the first word of "lib", so it can be a program name with args.
23955set dummy lib; ac_word=$2
23956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23957$as_echo_n "checking for $ac_word... " >&6; }
23958if ${ac_cv_prog_WINAR+:} false; then :
23959  $as_echo_n "(cached) " >&6
23960else
23961  if test -n "$WINAR"; then
23962  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23963else
23964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23965for as_dir in $PATH
23966do
23967  IFS=$as_save_IFS
23968  test -z "$as_dir" && as_dir=.
23969    for ac_exec_ext in '' $ac_executable_extensions; do
23970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23971    ac_cv_prog_WINAR="lib"
23972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23973    break 2
23974  fi
23975done
23976  done
23977IFS=$as_save_IFS
23978
23979fi
23980fi
23981WINAR=$ac_cv_prog_WINAR
23982if test -n "$WINAR"; then
23983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23984$as_echo "$WINAR" >&6; }
23985else
23986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23987$as_echo "no" >&6; }
23988fi
23989
23990
23991
23992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23993
23994  # First separate the path from the arguments. This will split at the first
23995  # space.
23996  complete="$WINAR"
23997  path="${complete%% *}"
23998  tmp="$complete EOL"
23999  arguments="${tmp#* }"
24000
24001  # Input might be given as Windows format, start by converting to
24002  # unix format.
24003  new_path=`$CYGPATH -u "$path"`
24004
24005  # Now try to locate executable using which
24006  new_path=`$WHICH "$new_path" 2> /dev/null`
24007  # bat and cmd files are not always considered executable in cygwin causing which
24008  # to not find them
24009  if test "x$new_path" = x \
24010           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24011           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24012    new_path=`$CYGPATH -u "$path"`
24013  fi
24014  if test "x$new_path" = x; then
24015    # Oops. Which didn't find the executable.
24016    # The splitting of arguments from the executable at a space might have been incorrect,
24017    # since paths with space are more likely in Windows. Give it another try with the whole
24018    # argument.
24019    path="$complete"
24020    arguments="EOL"
24021    new_path=`$CYGPATH -u "$path"`
24022    new_path=`$WHICH "$new_path" 2> /dev/null`
24023    # bat and cmd files are not always considered executable in cygwin causing which
24024    # to not find them
24025    if test "x$new_path" = x \
24026             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24027             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24028      new_path=`$CYGPATH -u "$path"`
24029    fi
24030    if test "x$new_path" = x; then
24031      # It's still not found. Now this is an unrecoverable error.
24032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24033$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24034      has_space=`$ECHO "$complete" | $GREP " "`
24035      if test "x$has_space" != x; then
24036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24038      fi
24039      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24040    fi
24041  fi
24042
24043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24046  # "foo.exe" is OK but "foo" is an error.
24047  #
24048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24049  # It is also a way to make sure we got the proper file name for the real test later on.
24050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24051  if test "x$test_shortpath" = x; then
24052    # Short path failed, file does not exist as specified.
24053    # Try adding .exe or .cmd
24054    if test -f "${new_path}.exe"; then
24055       input_to_shortpath="${new_path}.exe"
24056    elif test -f "${new_path}.cmd"; then
24057       input_to_shortpath="${new_path}.cmd"
24058    else
24059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24060$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24063      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24064    fi
24065  else
24066    input_to_shortpath="$new_path"
24067  fi
24068
24069  # Call helper function which possibly converts this using DOS-style short mode.
24070  # If so, the updated path is stored in $new_path.
24071  new_path="$input_to_shortpath"
24072
24073  input_path="$input_to_shortpath"
24074  # Check if we need to convert this using DOS-style short mode. If the path
24075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24076  # take no chances and rewrite it.
24077  # Note: m4 eats our [], so we need to use [ and ] instead.
24078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24079  if test "x$has_forbidden_chars" != x; then
24080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24084      # Going to short mode and back again did indeed matter. Since short mode is
24085      # case insensitive, let's make it lowercase to improve readability.
24086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24087      # Now convert it back to Unix-stile (cygpath)
24088      input_path=`$CYGPATH -u "$shortmode_path"`
24089      new_path="$input_path"
24090    fi
24091  fi
24092
24093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24094  if test "x$test_cygdrive_prefix" = x; then
24095    # As a simple fix, exclude /usr/bin since it's not a real path.
24096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24098      # a path prefixed by /cygdrive for fixpath to work.
24099      new_path="$CYGWIN_ROOT_PATH$input_path"
24100    fi
24101  fi
24102
24103  # remove trailing .exe if any
24104  new_path="${new_path/%.exe/}"
24105
24106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24107
24108  # First separate the path from the arguments. This will split at the first
24109  # space.
24110  complete="$WINAR"
24111  path="${complete%% *}"
24112  tmp="$complete EOL"
24113  arguments="${tmp#* }"
24114
24115  # Input might be given as Windows format, start by converting to
24116  # unix format.
24117  new_path="$path"
24118
24119  windows_path="$new_path"
24120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24121    unix_path=`$CYGPATH -u "$windows_path"`
24122    new_path="$unix_path"
24123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24125    new_path="$unix_path"
24126  fi
24127
24128
24129  # Now try to locate executable using which
24130  new_path=`$WHICH "$new_path" 2> /dev/null`
24131
24132  if test "x$new_path" = x; then
24133    # Oops. Which didn't find the executable.
24134    # The splitting of arguments from the executable at a space might have been incorrect,
24135    # since paths with space are more likely in Windows. Give it another try with the whole
24136    # argument.
24137    path="$complete"
24138    arguments="EOL"
24139    new_path="$path"
24140
24141  windows_path="$new_path"
24142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24143    unix_path=`$CYGPATH -u "$windows_path"`
24144    new_path="$unix_path"
24145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24147    new_path="$unix_path"
24148  fi
24149
24150
24151    new_path=`$WHICH "$new_path" 2> /dev/null`
24152
24153    if test "x$new_path" = x; then
24154      # It's still not found. Now this is an unrecoverable error.
24155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24156$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24157      has_space=`$ECHO "$complete" | $GREP " "`
24158      if test "x$has_space" != x; then
24159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24161      fi
24162      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24163    fi
24164  fi
24165
24166  # Now new_path has a complete unix path to the binary
24167  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24168    # Keep paths in /bin as-is, but remove trailing .exe if any
24169    new_path="${new_path/%.exe/}"
24170    # Do not save /bin paths to all_fixpath_prefixes!
24171  else
24172    # Not in mixed or Windows style, start by that.
24173    new_path=`cmd //c echo $new_path`
24174
24175  input_path="$new_path"
24176  # Check if we need to convert this using DOS-style short mode. If the path
24177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24178  # take no chances and rewrite it.
24179  # Note: m4 eats our [], so we need to use [ and ] instead.
24180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24181  if test "x$has_forbidden_chars" != x; then
24182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24184  fi
24185
24186    # Output is in $new_path
24187
24188  windows_path="$new_path"
24189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24190    unix_path=`$CYGPATH -u "$windows_path"`
24191    new_path="$unix_path"
24192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24194    new_path="$unix_path"
24195  fi
24196
24197    # remove trailing .exe if any
24198    new_path="${new_path/%.exe/}"
24199
24200    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24201    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24202  fi
24203
24204  else
24205    # We're on a posix platform. Hooray! :)
24206    # First separate the path from the arguments. This will split at the first
24207    # space.
24208    complete="$WINAR"
24209    path="${complete%% *}"
24210    tmp="$complete EOL"
24211    arguments="${tmp#* }"
24212
24213    # Cannot rely on the command "which" here since it doesn't always work.
24214    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24215    if test -z "$is_absolute_path"; then
24216      # Path to executable is not absolute. Find it.
24217      IFS_save="$IFS"
24218      IFS=:
24219      for p in $PATH; do
24220        if test -f "$p/$path" && test -x "$p/$path"; then
24221          new_path="$p/$path"
24222          break
24223        fi
24224      done
24225      IFS="$IFS_save"
24226    else
24227      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24228$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24229      new_path="$path"
24230    fi
24231
24232    if test "x$new_path" = x; then
24233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24234$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24235        has_space=`$ECHO "$complete" | $GREP " "`
24236        if test "x$has_space" != x; then
24237          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24239        fi
24240        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24241      fi
24242  fi
24243
24244      # Now join together the path and the arguments once again
24245      if test "x$arguments" != xEOL; then
24246        new_complete="$new_path ${arguments% *}"
24247      else
24248        new_complete="$new_path"
24249      fi
24250
24251  if test "x$complete" != "x$new_complete"; then
24252      WINAR="$new_complete"
24253      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24254$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24255    fi
24256
24257    AR="$WINAR"
24258    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24259
24260    # Extract the first word of "dumpbin", so it can be a program name with args.
24261set dummy dumpbin; ac_word=$2
24262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24263$as_echo_n "checking for $ac_word... " >&6; }
24264if ${ac_cv_prog_DUMPBIN+:} false; then :
24265  $as_echo_n "(cached) " >&6
24266else
24267  if test -n "$DUMPBIN"; then
24268  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24269else
24270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24271for as_dir in $PATH
24272do
24273  IFS=$as_save_IFS
24274  test -z "$as_dir" && as_dir=.
24275    for ac_exec_ext in '' $ac_executable_extensions; do
24276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24277    ac_cv_prog_DUMPBIN="dumpbin"
24278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24279    break 2
24280  fi
24281done
24282  done
24283IFS=$as_save_IFS
24284
24285fi
24286fi
24287DUMPBIN=$ac_cv_prog_DUMPBIN
24288if test -n "$DUMPBIN"; then
24289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24290$as_echo "$DUMPBIN" >&6; }
24291else
24292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24293$as_echo "no" >&6; }
24294fi
24295
24296
24297
24298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24299
24300  # First separate the path from the arguments. This will split at the first
24301  # space.
24302  complete="$DUMPBIN"
24303  path="${complete%% *}"
24304  tmp="$complete EOL"
24305  arguments="${tmp#* }"
24306
24307  # Input might be given as Windows format, start by converting to
24308  # unix format.
24309  new_path=`$CYGPATH -u "$path"`
24310
24311  # Now try to locate executable using which
24312  new_path=`$WHICH "$new_path" 2> /dev/null`
24313  # bat and cmd files are not always considered executable in cygwin causing which
24314  # to not find them
24315  if test "x$new_path" = x \
24316           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24317           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24318    new_path=`$CYGPATH -u "$path"`
24319  fi
24320  if test "x$new_path" = x; then
24321    # Oops. Which didn't find the executable.
24322    # The splitting of arguments from the executable at a space might have been incorrect,
24323    # since paths with space are more likely in Windows. Give it another try with the whole
24324    # argument.
24325    path="$complete"
24326    arguments="EOL"
24327    new_path=`$CYGPATH -u "$path"`
24328    new_path=`$WHICH "$new_path" 2> /dev/null`
24329    # bat and cmd files are not always considered executable in cygwin causing which
24330    # to not find them
24331    if test "x$new_path" = x \
24332             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24333             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24334      new_path=`$CYGPATH -u "$path"`
24335    fi
24336    if test "x$new_path" = x; then
24337      # It's still not found. Now this is an unrecoverable error.
24338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24339$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24340      has_space=`$ECHO "$complete" | $GREP " "`
24341      if test "x$has_space" != x; then
24342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24344      fi
24345      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24346    fi
24347  fi
24348
24349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24352  # "foo.exe" is OK but "foo" is an error.
24353  #
24354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24355  # It is also a way to make sure we got the proper file name for the real test later on.
24356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24357  if test "x$test_shortpath" = x; then
24358    # Short path failed, file does not exist as specified.
24359    # Try adding .exe or .cmd
24360    if test -f "${new_path}.exe"; then
24361       input_to_shortpath="${new_path}.exe"
24362    elif test -f "${new_path}.cmd"; then
24363       input_to_shortpath="${new_path}.cmd"
24364    else
24365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24366$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24367      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24368$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24369      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24370    fi
24371  else
24372    input_to_shortpath="$new_path"
24373  fi
24374
24375  # Call helper function which possibly converts this using DOS-style short mode.
24376  # If so, the updated path is stored in $new_path.
24377  new_path="$input_to_shortpath"
24378
24379  input_path="$input_to_shortpath"
24380  # Check if we need to convert this using DOS-style short mode. If the path
24381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24382  # take no chances and rewrite it.
24383  # Note: m4 eats our [], so we need to use [ and ] instead.
24384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24385  if test "x$has_forbidden_chars" != x; then
24386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24390      # Going to short mode and back again did indeed matter. Since short mode is
24391      # case insensitive, let's make it lowercase to improve readability.
24392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24393      # Now convert it back to Unix-stile (cygpath)
24394      input_path=`$CYGPATH -u "$shortmode_path"`
24395      new_path="$input_path"
24396    fi
24397  fi
24398
24399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24400  if test "x$test_cygdrive_prefix" = x; then
24401    # As a simple fix, exclude /usr/bin since it's not a real path.
24402    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24404      # a path prefixed by /cygdrive for fixpath to work.
24405      new_path="$CYGWIN_ROOT_PATH$input_path"
24406    fi
24407  fi
24408
24409  # remove trailing .exe if any
24410  new_path="${new_path/%.exe/}"
24411
24412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24413
24414  # First separate the path from the arguments. This will split at the first
24415  # space.
24416  complete="$DUMPBIN"
24417  path="${complete%% *}"
24418  tmp="$complete EOL"
24419  arguments="${tmp#* }"
24420
24421  # Input might be given as Windows format, start by converting to
24422  # unix format.
24423  new_path="$path"
24424
24425  windows_path="$new_path"
24426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24427    unix_path=`$CYGPATH -u "$windows_path"`
24428    new_path="$unix_path"
24429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24431    new_path="$unix_path"
24432  fi
24433
24434
24435  # Now try to locate executable using which
24436  new_path=`$WHICH "$new_path" 2> /dev/null`
24437
24438  if test "x$new_path" = x; then
24439    # Oops. Which didn't find the executable.
24440    # The splitting of arguments from the executable at a space might have been incorrect,
24441    # since paths with space are more likely in Windows. Give it another try with the whole
24442    # argument.
24443    path="$complete"
24444    arguments="EOL"
24445    new_path="$path"
24446
24447  windows_path="$new_path"
24448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24449    unix_path=`$CYGPATH -u "$windows_path"`
24450    new_path="$unix_path"
24451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24453    new_path="$unix_path"
24454  fi
24455
24456
24457    new_path=`$WHICH "$new_path" 2> /dev/null`
24458
24459    if test "x$new_path" = x; then
24460      # It's still not found. Now this is an unrecoverable error.
24461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24462$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24463      has_space=`$ECHO "$complete" | $GREP " "`
24464      if test "x$has_space" != x; then
24465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24467      fi
24468      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24469    fi
24470  fi
24471
24472  # Now new_path has a complete unix path to the binary
24473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24474    # Keep paths in /bin as-is, but remove trailing .exe if any
24475    new_path="${new_path/%.exe/}"
24476    # Do not save /bin paths to all_fixpath_prefixes!
24477  else
24478    # Not in mixed or Windows style, start by that.
24479    new_path=`cmd //c echo $new_path`
24480
24481  input_path="$new_path"
24482  # Check if we need to convert this using DOS-style short mode. If the path
24483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24484  # take no chances and rewrite it.
24485  # Note: m4 eats our [], so we need to use [ and ] instead.
24486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24487  if test "x$has_forbidden_chars" != x; then
24488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24490  fi
24491
24492    # Output is in $new_path
24493
24494  windows_path="$new_path"
24495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24496    unix_path=`$CYGPATH -u "$windows_path"`
24497    new_path="$unix_path"
24498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24500    new_path="$unix_path"
24501  fi
24502
24503    # remove trailing .exe if any
24504    new_path="${new_path/%.exe/}"
24505
24506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24508  fi
24509
24510  else
24511    # We're on a posix platform. Hooray! :)
24512    # First separate the path from the arguments. This will split at the first
24513    # space.
24514    complete="$DUMPBIN"
24515    path="${complete%% *}"
24516    tmp="$complete EOL"
24517    arguments="${tmp#* }"
24518
24519    # Cannot rely on the command "which" here since it doesn't always work.
24520    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24521    if test -z "$is_absolute_path"; then
24522      # Path to executable is not absolute. Find it.
24523      IFS_save="$IFS"
24524      IFS=:
24525      for p in $PATH; do
24526        if test -f "$p/$path" && test -x "$p/$path"; then
24527          new_path="$p/$path"
24528          break
24529        fi
24530      done
24531      IFS="$IFS_save"
24532    else
24533      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24534$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24535      new_path="$path"
24536    fi
24537
24538    if test "x$new_path" = x; then
24539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24540$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24541        has_space=`$ECHO "$complete" | $GREP " "`
24542        if test "x$has_space" != x; then
24543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24545        fi
24546        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24547      fi
24548  fi
24549
24550      # Now join together the path and the arguments once again
24551      if test "x$arguments" != xEOL; then
24552        new_complete="$new_path ${arguments% *}"
24553      else
24554        new_complete="$new_path"
24555      fi
24556
24557  if test "x$complete" != "x$new_complete"; then
24558      DUMPBIN="$new_complete"
24559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24560$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24561    fi
24562
24563
24564    COMPILER_TYPE=CL
24565    CCXXFLAGS="$CCXXFLAGS -nologo"
24566
24567fi
24568
24569
24570
24571ac_ext=c
24572ac_cpp='$CPP $CPPFLAGS'
24573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24575ac_compiler_gnu=$ac_cv_c_compiler_gnu
24576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24577$as_echo_n "checking how to run the C preprocessor... " >&6; }
24578# On Suns, sometimes $CPP names a directory.
24579if test -n "$CPP" && test -d "$CPP"; then
24580  CPP=
24581fi
24582if test -z "$CPP"; then
24583  if ${ac_cv_prog_CPP+:} false; then :
24584  $as_echo_n "(cached) " >&6
24585else
24586      # Double quotes because CPP needs to be expanded
24587    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24588    do
24589      ac_preproc_ok=false
24590for ac_c_preproc_warn_flag in '' yes
24591do
24592  # Use a header file that comes with gcc, so configuring glibc
24593  # with a fresh cross-compiler works.
24594  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24595  # <limits.h> exists even on freestanding compilers.
24596  # On the NeXT, cc -E runs the code through the compiler's parser,
24597  # not just through cpp. "Syntax error" is here to catch this case.
24598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24599/* end confdefs.h.  */
24600#ifdef __STDC__
24601# include <limits.h>
24602#else
24603# include <assert.h>
24604#endif
24605		     Syntax error
24606_ACEOF
24607if ac_fn_c_try_cpp "$LINENO"; then :
24608
24609else
24610  # Broken: fails on valid input.
24611continue
24612fi
24613rm -f conftest.err conftest.i conftest.$ac_ext
24614
24615  # OK, works on sane cases.  Now check whether nonexistent headers
24616  # can be detected and how.
24617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24618/* end confdefs.h.  */
24619#include <ac_nonexistent.h>
24620_ACEOF
24621if ac_fn_c_try_cpp "$LINENO"; then :
24622  # Broken: success on invalid input.
24623continue
24624else
24625  # Passes both tests.
24626ac_preproc_ok=:
24627break
24628fi
24629rm -f conftest.err conftest.i conftest.$ac_ext
24630
24631done
24632# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24633rm -f conftest.i conftest.err conftest.$ac_ext
24634if $ac_preproc_ok; then :
24635  break
24636fi
24637
24638    done
24639    ac_cv_prog_CPP=$CPP
24640
24641fi
24642  CPP=$ac_cv_prog_CPP
24643else
24644  ac_cv_prog_CPP=$CPP
24645fi
24646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24647$as_echo "$CPP" >&6; }
24648ac_preproc_ok=false
24649for ac_c_preproc_warn_flag in '' yes
24650do
24651  # Use a header file that comes with gcc, so configuring glibc
24652  # with a fresh cross-compiler works.
24653  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24654  # <limits.h> exists even on freestanding compilers.
24655  # On the NeXT, cc -E runs the code through the compiler's parser,
24656  # not just through cpp. "Syntax error" is here to catch this case.
24657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24658/* end confdefs.h.  */
24659#ifdef __STDC__
24660# include <limits.h>
24661#else
24662# include <assert.h>
24663#endif
24664		     Syntax error
24665_ACEOF
24666if ac_fn_c_try_cpp "$LINENO"; then :
24667
24668else
24669  # Broken: fails on valid input.
24670continue
24671fi
24672rm -f conftest.err conftest.i conftest.$ac_ext
24673
24674  # OK, works on sane cases.  Now check whether nonexistent headers
24675  # can be detected and how.
24676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24677/* end confdefs.h.  */
24678#include <ac_nonexistent.h>
24679_ACEOF
24680if ac_fn_c_try_cpp "$LINENO"; then :
24681  # Broken: success on invalid input.
24682continue
24683else
24684  # Passes both tests.
24685ac_preproc_ok=:
24686break
24687fi
24688rm -f conftest.err conftest.i conftest.$ac_ext
24689
24690done
24691# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24692rm -f conftest.i conftest.err conftest.$ac_ext
24693if $ac_preproc_ok; then :
24694
24695else
24696  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24698as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24699See \`config.log' for more details" "$LINENO" 5; }
24700fi
24701
24702ac_ext=cpp
24703ac_cpp='$CXXCPP $CPPFLAGS'
24704ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24705ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24706ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24707
24708
24709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24710
24711  # First separate the path from the arguments. This will split at the first
24712  # space.
24713  complete="$CPP"
24714  path="${complete%% *}"
24715  tmp="$complete EOL"
24716  arguments="${tmp#* }"
24717
24718  # Input might be given as Windows format, start by converting to
24719  # unix format.
24720  new_path=`$CYGPATH -u "$path"`
24721
24722  # Now try to locate executable using which
24723  new_path=`$WHICH "$new_path" 2> /dev/null`
24724  # bat and cmd files are not always considered executable in cygwin causing which
24725  # to not find them
24726  if test "x$new_path" = x \
24727           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24728           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24729    new_path=`$CYGPATH -u "$path"`
24730  fi
24731  if test "x$new_path" = x; then
24732    # Oops. Which didn't find the executable.
24733    # The splitting of arguments from the executable at a space might have been incorrect,
24734    # since paths with space are more likely in Windows. Give it another try with the whole
24735    # argument.
24736    path="$complete"
24737    arguments="EOL"
24738    new_path=`$CYGPATH -u "$path"`
24739    new_path=`$WHICH "$new_path" 2> /dev/null`
24740    # bat and cmd files are not always considered executable in cygwin causing which
24741    # to not find them
24742    if test "x$new_path" = x \
24743             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24744             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24745      new_path=`$CYGPATH -u "$path"`
24746    fi
24747    if test "x$new_path" = x; then
24748      # It's still not found. Now this is an unrecoverable error.
24749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24750$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24751      has_space=`$ECHO "$complete" | $GREP " "`
24752      if test "x$has_space" != x; then
24753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24755      fi
24756      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24757    fi
24758  fi
24759
24760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24763  # "foo.exe" is OK but "foo" is an error.
24764  #
24765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24766  # It is also a way to make sure we got the proper file name for the real test later on.
24767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24768  if test "x$test_shortpath" = x; then
24769    # Short path failed, file does not exist as specified.
24770    # Try adding .exe or .cmd
24771    if test -f "${new_path}.exe"; then
24772       input_to_shortpath="${new_path}.exe"
24773    elif test -f "${new_path}.cmd"; then
24774       input_to_shortpath="${new_path}.cmd"
24775    else
24776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24777$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24778      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24779$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24780      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24781    fi
24782  else
24783    input_to_shortpath="$new_path"
24784  fi
24785
24786  # Call helper function which possibly converts this using DOS-style short mode.
24787  # If so, the updated path is stored in $new_path.
24788  new_path="$input_to_shortpath"
24789
24790  input_path="$input_to_shortpath"
24791  # Check if we need to convert this using DOS-style short mode. If the path
24792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24793  # take no chances and rewrite it.
24794  # Note: m4 eats our [], so we need to use [ and ] instead.
24795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24796  if test "x$has_forbidden_chars" != x; then
24797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24801      # Going to short mode and back again did indeed matter. Since short mode is
24802      # case insensitive, let's make it lowercase to improve readability.
24803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24804      # Now convert it back to Unix-stile (cygpath)
24805      input_path=`$CYGPATH -u "$shortmode_path"`
24806      new_path="$input_path"
24807    fi
24808  fi
24809
24810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24811  if test "x$test_cygdrive_prefix" = x; then
24812    # As a simple fix, exclude /usr/bin since it's not a real path.
24813    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24815      # a path prefixed by /cygdrive for fixpath to work.
24816      new_path="$CYGWIN_ROOT_PATH$input_path"
24817    fi
24818  fi
24819
24820  # remove trailing .exe if any
24821  new_path="${new_path/%.exe/}"
24822
24823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24824
24825  # First separate the path from the arguments. This will split at the first
24826  # space.
24827  complete="$CPP"
24828  path="${complete%% *}"
24829  tmp="$complete EOL"
24830  arguments="${tmp#* }"
24831
24832  # Input might be given as Windows format, start by converting to
24833  # unix format.
24834  new_path="$path"
24835
24836  windows_path="$new_path"
24837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24838    unix_path=`$CYGPATH -u "$windows_path"`
24839    new_path="$unix_path"
24840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24842    new_path="$unix_path"
24843  fi
24844
24845
24846  # Now try to locate executable using which
24847  new_path=`$WHICH "$new_path" 2> /dev/null`
24848
24849  if test "x$new_path" = x; then
24850    # Oops. Which didn't find the executable.
24851    # The splitting of arguments from the executable at a space might have been incorrect,
24852    # since paths with space are more likely in Windows. Give it another try with the whole
24853    # argument.
24854    path="$complete"
24855    arguments="EOL"
24856    new_path="$path"
24857
24858  windows_path="$new_path"
24859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24860    unix_path=`$CYGPATH -u "$windows_path"`
24861    new_path="$unix_path"
24862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24864    new_path="$unix_path"
24865  fi
24866
24867
24868    new_path=`$WHICH "$new_path" 2> /dev/null`
24869
24870    if test "x$new_path" = x; then
24871      # It's still not found. Now this is an unrecoverable error.
24872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24873$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24874      has_space=`$ECHO "$complete" | $GREP " "`
24875      if test "x$has_space" != x; then
24876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24878      fi
24879      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24880    fi
24881  fi
24882
24883  # Now new_path has a complete unix path to the binary
24884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24885    # Keep paths in /bin as-is, but remove trailing .exe if any
24886    new_path="${new_path/%.exe/}"
24887    # Do not save /bin paths to all_fixpath_prefixes!
24888  else
24889    # Not in mixed or Windows style, start by that.
24890    new_path=`cmd //c echo $new_path`
24891
24892  input_path="$new_path"
24893  # Check if we need to convert this using DOS-style short mode. If the path
24894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24895  # take no chances and rewrite it.
24896  # Note: m4 eats our [], so we need to use [ and ] instead.
24897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24898  if test "x$has_forbidden_chars" != x; then
24899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24901  fi
24902
24903    # Output is in $new_path
24904
24905  windows_path="$new_path"
24906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24907    unix_path=`$CYGPATH -u "$windows_path"`
24908    new_path="$unix_path"
24909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24911    new_path="$unix_path"
24912  fi
24913
24914    # remove trailing .exe if any
24915    new_path="${new_path/%.exe/}"
24916
24917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24919  fi
24920
24921  else
24922    # We're on a posix platform. Hooray! :)
24923    # First separate the path from the arguments. This will split at the first
24924    # space.
24925    complete="$CPP"
24926    path="${complete%% *}"
24927    tmp="$complete EOL"
24928    arguments="${tmp#* }"
24929
24930    # Cannot rely on the command "which" here since it doesn't always work.
24931    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24932    if test -z "$is_absolute_path"; then
24933      # Path to executable is not absolute. Find it.
24934      IFS_save="$IFS"
24935      IFS=:
24936      for p in $PATH; do
24937        if test -f "$p/$path" && test -x "$p/$path"; then
24938          new_path="$p/$path"
24939          break
24940        fi
24941      done
24942      IFS="$IFS_save"
24943    else
24944      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24945$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24946      new_path="$path"
24947    fi
24948
24949    if test "x$new_path" = x; then
24950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24951$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24952        has_space=`$ECHO "$complete" | $GREP " "`
24953        if test "x$has_space" != x; then
24954          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24955$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24956        fi
24957        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24958      fi
24959  fi
24960
24961      # Now join together the path and the arguments once again
24962      if test "x$arguments" != xEOL; then
24963        new_complete="$new_path ${arguments% *}"
24964      else
24965        new_complete="$new_path"
24966      fi
24967
24968  if test "x$complete" != "x$new_complete"; then
24969      CPP="$new_complete"
24970      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24971$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24972    fi
24973
24974
24975ac_ext=cpp
24976ac_cpp='$CXXCPP $CPPFLAGS'
24977ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24978ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24979ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24981$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24982if test -z "$CXXCPP"; then
24983  if ${ac_cv_prog_CXXCPP+:} false; then :
24984  $as_echo_n "(cached) " >&6
24985else
24986      # Double quotes because CXXCPP needs to be expanded
24987    for CXXCPP in "$CXX -E" "/lib/cpp"
24988    do
24989      ac_preproc_ok=false
24990for ac_cxx_preproc_warn_flag in '' yes
24991do
24992  # Use a header file that comes with gcc, so configuring glibc
24993  # with a fresh cross-compiler works.
24994  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24995  # <limits.h> exists even on freestanding compilers.
24996  # On the NeXT, cc -E runs the code through the compiler's parser,
24997  # not just through cpp. "Syntax error" is here to catch this case.
24998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24999/* end confdefs.h.  */
25000#ifdef __STDC__
25001# include <limits.h>
25002#else
25003# include <assert.h>
25004#endif
25005		     Syntax error
25006_ACEOF
25007if ac_fn_cxx_try_cpp "$LINENO"; then :
25008
25009else
25010  # Broken: fails on valid input.
25011continue
25012fi
25013rm -f conftest.err conftest.i conftest.$ac_ext
25014
25015  # OK, works on sane cases.  Now check whether nonexistent headers
25016  # can be detected and how.
25017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25018/* end confdefs.h.  */
25019#include <ac_nonexistent.h>
25020_ACEOF
25021if ac_fn_cxx_try_cpp "$LINENO"; then :
25022  # Broken: success on invalid input.
25023continue
25024else
25025  # Passes both tests.
25026ac_preproc_ok=:
25027break
25028fi
25029rm -f conftest.err conftest.i conftest.$ac_ext
25030
25031done
25032# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25033rm -f conftest.i conftest.err conftest.$ac_ext
25034if $ac_preproc_ok; then :
25035  break
25036fi
25037
25038    done
25039    ac_cv_prog_CXXCPP=$CXXCPP
25040
25041fi
25042  CXXCPP=$ac_cv_prog_CXXCPP
25043else
25044  ac_cv_prog_CXXCPP=$CXXCPP
25045fi
25046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25047$as_echo "$CXXCPP" >&6; }
25048ac_preproc_ok=false
25049for ac_cxx_preproc_warn_flag in '' yes
25050do
25051  # Use a header file that comes with gcc, so configuring glibc
25052  # with a fresh cross-compiler works.
25053  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25054  # <limits.h> exists even on freestanding compilers.
25055  # On the NeXT, cc -E runs the code through the compiler's parser,
25056  # not just through cpp. "Syntax error" is here to catch this case.
25057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25058/* end confdefs.h.  */
25059#ifdef __STDC__
25060# include <limits.h>
25061#else
25062# include <assert.h>
25063#endif
25064		     Syntax error
25065_ACEOF
25066if ac_fn_cxx_try_cpp "$LINENO"; then :
25067
25068else
25069  # Broken: fails on valid input.
25070continue
25071fi
25072rm -f conftest.err conftest.i conftest.$ac_ext
25073
25074  # OK, works on sane cases.  Now check whether nonexistent headers
25075  # can be detected and how.
25076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25077/* end confdefs.h.  */
25078#include <ac_nonexistent.h>
25079_ACEOF
25080if ac_fn_cxx_try_cpp "$LINENO"; then :
25081  # Broken: success on invalid input.
25082continue
25083else
25084  # Passes both tests.
25085ac_preproc_ok=:
25086break
25087fi
25088rm -f conftest.err conftest.i conftest.$ac_ext
25089
25090done
25091# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25092rm -f conftest.i conftest.err conftest.$ac_ext
25093if $ac_preproc_ok; then :
25094
25095else
25096  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25098as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25099See \`config.log' for more details" "$LINENO" 5; }
25100fi
25101
25102ac_ext=cpp
25103ac_cpp='$CXXCPP $CPPFLAGS'
25104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25107
25108
25109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110
25111  # First separate the path from the arguments. This will split at the first
25112  # space.
25113  complete="$CXXCPP"
25114  path="${complete%% *}"
25115  tmp="$complete EOL"
25116  arguments="${tmp#* }"
25117
25118  # Input might be given as Windows format, start by converting to
25119  # unix format.
25120  new_path=`$CYGPATH -u "$path"`
25121
25122  # Now try to locate executable using which
25123  new_path=`$WHICH "$new_path" 2> /dev/null`
25124  # bat and cmd files are not always considered executable in cygwin causing which
25125  # to not find them
25126  if test "x$new_path" = x \
25127           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25128           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25129    new_path=`$CYGPATH -u "$path"`
25130  fi
25131  if test "x$new_path" = x; then
25132    # Oops. Which didn't find the executable.
25133    # The splitting of arguments from the executable at a space might have been incorrect,
25134    # since paths with space are more likely in Windows. Give it another try with the whole
25135    # argument.
25136    path="$complete"
25137    arguments="EOL"
25138    new_path=`$CYGPATH -u "$path"`
25139    new_path=`$WHICH "$new_path" 2> /dev/null`
25140    # bat and cmd files are not always considered executable in cygwin causing which
25141    # to not find them
25142    if test "x$new_path" = x \
25143             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25144             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25145      new_path=`$CYGPATH -u "$path"`
25146    fi
25147    if test "x$new_path" = x; then
25148      # It's still not found. Now this is an unrecoverable error.
25149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25150$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25151      has_space=`$ECHO "$complete" | $GREP " "`
25152      if test "x$has_space" != x; then
25153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25155      fi
25156      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25157    fi
25158  fi
25159
25160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25163  # "foo.exe" is OK but "foo" is an error.
25164  #
25165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25166  # It is also a way to make sure we got the proper file name for the real test later on.
25167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25168  if test "x$test_shortpath" = x; then
25169    # Short path failed, file does not exist as specified.
25170    # Try adding .exe or .cmd
25171    if test -f "${new_path}.exe"; then
25172       input_to_shortpath="${new_path}.exe"
25173    elif test -f "${new_path}.cmd"; then
25174       input_to_shortpath="${new_path}.cmd"
25175    else
25176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25177$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25178      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25179$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25180      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25181    fi
25182  else
25183    input_to_shortpath="$new_path"
25184  fi
25185
25186  # Call helper function which possibly converts this using DOS-style short mode.
25187  # If so, the updated path is stored in $new_path.
25188  new_path="$input_to_shortpath"
25189
25190  input_path="$input_to_shortpath"
25191  # Check if we need to convert this using DOS-style short mode. If the path
25192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25193  # take no chances and rewrite it.
25194  # Note: m4 eats our [], so we need to use [ and ] instead.
25195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25196  if test "x$has_forbidden_chars" != x; then
25197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25201      # Going to short mode and back again did indeed matter. Since short mode is
25202      # case insensitive, let's make it lowercase to improve readability.
25203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25204      # Now convert it back to Unix-stile (cygpath)
25205      input_path=`$CYGPATH -u "$shortmode_path"`
25206      new_path="$input_path"
25207    fi
25208  fi
25209
25210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25211  if test "x$test_cygdrive_prefix" = x; then
25212    # As a simple fix, exclude /usr/bin since it's not a real path.
25213    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25215      # a path prefixed by /cygdrive for fixpath to work.
25216      new_path="$CYGWIN_ROOT_PATH$input_path"
25217    fi
25218  fi
25219
25220  # remove trailing .exe if any
25221  new_path="${new_path/%.exe/}"
25222
25223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25224
25225  # First separate the path from the arguments. This will split at the first
25226  # space.
25227  complete="$CXXCPP"
25228  path="${complete%% *}"
25229  tmp="$complete EOL"
25230  arguments="${tmp#* }"
25231
25232  # Input might be given as Windows format, start by converting to
25233  # unix format.
25234  new_path="$path"
25235
25236  windows_path="$new_path"
25237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25238    unix_path=`$CYGPATH -u "$windows_path"`
25239    new_path="$unix_path"
25240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25242    new_path="$unix_path"
25243  fi
25244
25245
25246  # Now try to locate executable using which
25247  new_path=`$WHICH "$new_path" 2> /dev/null`
25248
25249  if test "x$new_path" = x; then
25250    # Oops. Which didn't find the executable.
25251    # The splitting of arguments from the executable at a space might have been incorrect,
25252    # since paths with space are more likely in Windows. Give it another try with the whole
25253    # argument.
25254    path="$complete"
25255    arguments="EOL"
25256    new_path="$path"
25257
25258  windows_path="$new_path"
25259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25260    unix_path=`$CYGPATH -u "$windows_path"`
25261    new_path="$unix_path"
25262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25264    new_path="$unix_path"
25265  fi
25266
25267
25268    new_path=`$WHICH "$new_path" 2> /dev/null`
25269
25270    if test "x$new_path" = x; then
25271      # It's still not found. Now this is an unrecoverable error.
25272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25273$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25274      has_space=`$ECHO "$complete" | $GREP " "`
25275      if test "x$has_space" != x; then
25276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25278      fi
25279      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25280    fi
25281  fi
25282
25283  # Now new_path has a complete unix path to the binary
25284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25285    # Keep paths in /bin as-is, but remove trailing .exe if any
25286    new_path="${new_path/%.exe/}"
25287    # Do not save /bin paths to all_fixpath_prefixes!
25288  else
25289    # Not in mixed or Windows style, start by that.
25290    new_path=`cmd //c echo $new_path`
25291
25292  input_path="$new_path"
25293  # Check if we need to convert this using DOS-style short mode. If the path
25294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25295  # take no chances and rewrite it.
25296  # Note: m4 eats our [], so we need to use [ and ] instead.
25297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25298  if test "x$has_forbidden_chars" != x; then
25299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25301  fi
25302
25303    # Output is in $new_path
25304
25305  windows_path="$new_path"
25306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25307    unix_path=`$CYGPATH -u "$windows_path"`
25308    new_path="$unix_path"
25309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25311    new_path="$unix_path"
25312  fi
25313
25314    # remove trailing .exe if any
25315    new_path="${new_path/%.exe/}"
25316
25317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25319  fi
25320
25321  else
25322    # We're on a posix platform. Hooray! :)
25323    # First separate the path from the arguments. This will split at the first
25324    # space.
25325    complete="$CXXCPP"
25326    path="${complete%% *}"
25327    tmp="$complete EOL"
25328    arguments="${tmp#* }"
25329
25330    # Cannot rely on the command "which" here since it doesn't always work.
25331    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25332    if test -z "$is_absolute_path"; then
25333      # Path to executable is not absolute. Find it.
25334      IFS_save="$IFS"
25335      IFS=:
25336      for p in $PATH; do
25337        if test -f "$p/$path" && test -x "$p/$path"; then
25338          new_path="$p/$path"
25339          break
25340        fi
25341      done
25342      IFS="$IFS_save"
25343    else
25344      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25345$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25346      new_path="$path"
25347    fi
25348
25349    if test "x$new_path" = x; then
25350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25351$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25352        has_space=`$ECHO "$complete" | $GREP " "`
25353        if test "x$has_space" != x; then
25354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25356        fi
25357        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25358      fi
25359  fi
25360
25361      # Now join together the path and the arguments once again
25362      if test "x$arguments" != xEOL; then
25363        new_complete="$new_path ${arguments% *}"
25364      else
25365        new_complete="$new_path"
25366      fi
25367
25368  if test "x$complete" != "x$new_complete"; then
25369      CXXCPP="$new_complete"
25370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25371$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25372    fi
25373
25374
25375if test "x$COMPILE_TYPE" != "xcross"; then
25376    # If we are not cross compiling, use the same compilers for
25377    # building the build platform executables. The cross-compilation
25378    # case needed to be done earlier, but this can only be done after
25379    # the native tools have been localized.
25380    BUILD_CC="$CC"
25381    BUILD_CXX="$CXX"
25382    BUILD_LD="$LD"
25383fi
25384
25385# for solaris we really need solaris tools, and not gnu equivalent
25386#   these seems to normally reside in /usr/ccs/bin so add that to path before
25387#   starting to probe
25388#
25389#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25390#         so that it can be overriden --with-tools-dir
25391if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25392    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25393fi
25394
25395# Find the right assembler.
25396if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25397    # Extract the first word of "as", so it can be a program name with args.
25398set dummy as; ac_word=$2
25399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25400$as_echo_n "checking for $ac_word... " >&6; }
25401if ${ac_cv_path_AS+:} false; then :
25402  $as_echo_n "(cached) " >&6
25403else
25404  case $AS in
25405  [\\/]* | ?:[\\/]*)
25406  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25407  ;;
25408  *)
25409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25410for as_dir in $PATH
25411do
25412  IFS=$as_save_IFS
25413  test -z "$as_dir" && as_dir=.
25414    for ac_exec_ext in '' $ac_executable_extensions; do
25415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25416    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25418    break 2
25419  fi
25420done
25421  done
25422IFS=$as_save_IFS
25423
25424  ;;
25425esac
25426fi
25427AS=$ac_cv_path_AS
25428if test -n "$AS"; then
25429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25430$as_echo "$AS" >&6; }
25431else
25432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25433$as_echo "no" >&6; }
25434fi
25435
25436
25437
25438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25439
25440  # First separate the path from the arguments. This will split at the first
25441  # space.
25442  complete="$AS"
25443  path="${complete%% *}"
25444  tmp="$complete EOL"
25445  arguments="${tmp#* }"
25446
25447  # Input might be given as Windows format, start by converting to
25448  # unix format.
25449  new_path=`$CYGPATH -u "$path"`
25450
25451  # Now try to locate executable using which
25452  new_path=`$WHICH "$new_path" 2> /dev/null`
25453  # bat and cmd files are not always considered executable in cygwin causing which
25454  # to not find them
25455  if test "x$new_path" = x \
25456           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25457           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25458    new_path=`$CYGPATH -u "$path"`
25459  fi
25460  if test "x$new_path" = x; then
25461    # Oops. Which didn't find the executable.
25462    # The splitting of arguments from the executable at a space might have been incorrect,
25463    # since paths with space are more likely in Windows. Give it another try with the whole
25464    # argument.
25465    path="$complete"
25466    arguments="EOL"
25467    new_path=`$CYGPATH -u "$path"`
25468    new_path=`$WHICH "$new_path" 2> /dev/null`
25469    # bat and cmd files are not always considered executable in cygwin causing which
25470    # to not find them
25471    if test "x$new_path" = x \
25472             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25473             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25474      new_path=`$CYGPATH -u "$path"`
25475    fi
25476    if test "x$new_path" = x; then
25477      # It's still not found. Now this is an unrecoverable error.
25478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25479$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25480      has_space=`$ECHO "$complete" | $GREP " "`
25481      if test "x$has_space" != x; then
25482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25484      fi
25485      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25486    fi
25487  fi
25488
25489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25492  # "foo.exe" is OK but "foo" is an error.
25493  #
25494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25495  # It is also a way to make sure we got the proper file name for the real test later on.
25496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25497  if test "x$test_shortpath" = x; then
25498    # Short path failed, file does not exist as specified.
25499    # Try adding .exe or .cmd
25500    if test -f "${new_path}.exe"; then
25501       input_to_shortpath="${new_path}.exe"
25502    elif test -f "${new_path}.cmd"; then
25503       input_to_shortpath="${new_path}.cmd"
25504    else
25505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25506$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25509      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25510    fi
25511  else
25512    input_to_shortpath="$new_path"
25513  fi
25514
25515  # Call helper function which possibly converts this using DOS-style short mode.
25516  # If so, the updated path is stored in $new_path.
25517  new_path="$input_to_shortpath"
25518
25519  input_path="$input_to_shortpath"
25520  # Check if we need to convert this using DOS-style short mode. If the path
25521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25522  # take no chances and rewrite it.
25523  # Note: m4 eats our [], so we need to use [ and ] instead.
25524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25525  if test "x$has_forbidden_chars" != x; then
25526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25530      # Going to short mode and back again did indeed matter. Since short mode is
25531      # case insensitive, let's make it lowercase to improve readability.
25532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25533      # Now convert it back to Unix-stile (cygpath)
25534      input_path=`$CYGPATH -u "$shortmode_path"`
25535      new_path="$input_path"
25536    fi
25537  fi
25538
25539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25540  if test "x$test_cygdrive_prefix" = x; then
25541    # As a simple fix, exclude /usr/bin since it's not a real path.
25542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25544      # a path prefixed by /cygdrive for fixpath to work.
25545      new_path="$CYGWIN_ROOT_PATH$input_path"
25546    fi
25547  fi
25548
25549  # remove trailing .exe if any
25550  new_path="${new_path/%.exe/}"
25551
25552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25553
25554  # First separate the path from the arguments. This will split at the first
25555  # space.
25556  complete="$AS"
25557  path="${complete%% *}"
25558  tmp="$complete EOL"
25559  arguments="${tmp#* }"
25560
25561  # Input might be given as Windows format, start by converting to
25562  # unix format.
25563  new_path="$path"
25564
25565  windows_path="$new_path"
25566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25567    unix_path=`$CYGPATH -u "$windows_path"`
25568    new_path="$unix_path"
25569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25571    new_path="$unix_path"
25572  fi
25573
25574
25575  # Now try to locate executable using which
25576  new_path=`$WHICH "$new_path" 2> /dev/null`
25577
25578  if test "x$new_path" = x; then
25579    # Oops. Which didn't find the executable.
25580    # The splitting of arguments from the executable at a space might have been incorrect,
25581    # since paths with space are more likely in Windows. Give it another try with the whole
25582    # argument.
25583    path="$complete"
25584    arguments="EOL"
25585    new_path="$path"
25586
25587  windows_path="$new_path"
25588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25589    unix_path=`$CYGPATH -u "$windows_path"`
25590    new_path="$unix_path"
25591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25593    new_path="$unix_path"
25594  fi
25595
25596
25597    new_path=`$WHICH "$new_path" 2> /dev/null`
25598
25599    if test "x$new_path" = x; then
25600      # It's still not found. Now this is an unrecoverable error.
25601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25602$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25603      has_space=`$ECHO "$complete" | $GREP " "`
25604      if test "x$has_space" != x; then
25605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25607      fi
25608      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25609    fi
25610  fi
25611
25612  # Now new_path has a complete unix path to the binary
25613  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25614    # Keep paths in /bin as-is, but remove trailing .exe if any
25615    new_path="${new_path/%.exe/}"
25616    # Do not save /bin paths to all_fixpath_prefixes!
25617  else
25618    # Not in mixed or Windows style, start by that.
25619    new_path=`cmd //c echo $new_path`
25620
25621  input_path="$new_path"
25622  # Check if we need to convert this using DOS-style short mode. If the path
25623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25624  # take no chances and rewrite it.
25625  # Note: m4 eats our [], so we need to use [ and ] instead.
25626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25627  if test "x$has_forbidden_chars" != x; then
25628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25630  fi
25631
25632    # Output is in $new_path
25633
25634  windows_path="$new_path"
25635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25636    unix_path=`$CYGPATH -u "$windows_path"`
25637    new_path="$unix_path"
25638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25640    new_path="$unix_path"
25641  fi
25642
25643    # remove trailing .exe if any
25644    new_path="${new_path/%.exe/}"
25645
25646    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25647    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25648  fi
25649
25650  else
25651    # We're on a posix platform. Hooray! :)
25652    # First separate the path from the arguments. This will split at the first
25653    # space.
25654    complete="$AS"
25655    path="${complete%% *}"
25656    tmp="$complete EOL"
25657    arguments="${tmp#* }"
25658
25659    # Cannot rely on the command "which" here since it doesn't always work.
25660    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25661    if test -z "$is_absolute_path"; then
25662      # Path to executable is not absolute. Find it.
25663      IFS_save="$IFS"
25664      IFS=:
25665      for p in $PATH; do
25666        if test -f "$p/$path" && test -x "$p/$path"; then
25667          new_path="$p/$path"
25668          break
25669        fi
25670      done
25671      IFS="$IFS_save"
25672    else
25673      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25674$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25675      new_path="$path"
25676    fi
25677
25678    if test "x$new_path" = x; then
25679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25680$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25681        has_space=`$ECHO "$complete" | $GREP " "`
25682        if test "x$has_space" != x; then
25683          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25685        fi
25686        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25687      fi
25688  fi
25689
25690      # Now join together the path and the arguments once again
25691      if test "x$arguments" != xEOL; then
25692        new_complete="$new_path ${arguments% *}"
25693      else
25694        new_complete="$new_path"
25695      fi
25696
25697  if test "x$complete" != "x$new_complete"; then
25698      AS="$new_complete"
25699      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25700$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25701    fi
25702
25703else
25704    AS="$CC -c"
25705fi
25706
25707
25708if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25709    # Extract the first word of "nm", so it can be a program name with args.
25710set dummy nm; ac_word=$2
25711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25712$as_echo_n "checking for $ac_word... " >&6; }
25713if ${ac_cv_path_NM+:} false; then :
25714  $as_echo_n "(cached) " >&6
25715else
25716  case $NM in
25717  [\\/]* | ?:[\\/]*)
25718  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25719  ;;
25720  *)
25721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25722for as_dir in $PATH
25723do
25724  IFS=$as_save_IFS
25725  test -z "$as_dir" && as_dir=.
25726    for ac_exec_ext in '' $ac_executable_extensions; do
25727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25728    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25730    break 2
25731  fi
25732done
25733  done
25734IFS=$as_save_IFS
25735
25736  ;;
25737esac
25738fi
25739NM=$ac_cv_path_NM
25740if test -n "$NM"; then
25741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25742$as_echo "$NM" >&6; }
25743else
25744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25745$as_echo "no" >&6; }
25746fi
25747
25748
25749
25750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25751
25752  # First separate the path from the arguments. This will split at the first
25753  # space.
25754  complete="$NM"
25755  path="${complete%% *}"
25756  tmp="$complete EOL"
25757  arguments="${tmp#* }"
25758
25759  # Input might be given as Windows format, start by converting to
25760  # unix format.
25761  new_path=`$CYGPATH -u "$path"`
25762
25763  # Now try to locate executable using which
25764  new_path=`$WHICH "$new_path" 2> /dev/null`
25765  # bat and cmd files are not always considered executable in cygwin causing which
25766  # to not find them
25767  if test "x$new_path" = x \
25768           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25769           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25770    new_path=`$CYGPATH -u "$path"`
25771  fi
25772  if test "x$new_path" = x; then
25773    # Oops. Which didn't find the executable.
25774    # The splitting of arguments from the executable at a space might have been incorrect,
25775    # since paths with space are more likely in Windows. Give it another try with the whole
25776    # argument.
25777    path="$complete"
25778    arguments="EOL"
25779    new_path=`$CYGPATH -u "$path"`
25780    new_path=`$WHICH "$new_path" 2> /dev/null`
25781    # bat and cmd files are not always considered executable in cygwin causing which
25782    # to not find them
25783    if test "x$new_path" = x \
25784             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25785             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25786      new_path=`$CYGPATH -u "$path"`
25787    fi
25788    if test "x$new_path" = x; then
25789      # It's still not found. Now this is an unrecoverable error.
25790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25791$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25792      has_space=`$ECHO "$complete" | $GREP " "`
25793      if test "x$has_space" != x; then
25794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25796      fi
25797      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25798    fi
25799  fi
25800
25801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25804  # "foo.exe" is OK but "foo" is an error.
25805  #
25806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25807  # It is also a way to make sure we got the proper file name for the real test later on.
25808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25809  if test "x$test_shortpath" = x; then
25810    # Short path failed, file does not exist as specified.
25811    # Try adding .exe or .cmd
25812    if test -f "${new_path}.exe"; then
25813       input_to_shortpath="${new_path}.exe"
25814    elif test -f "${new_path}.cmd"; then
25815       input_to_shortpath="${new_path}.cmd"
25816    else
25817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25818$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25821      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25822    fi
25823  else
25824    input_to_shortpath="$new_path"
25825  fi
25826
25827  # Call helper function which possibly converts this using DOS-style short mode.
25828  # If so, the updated path is stored in $new_path.
25829  new_path="$input_to_shortpath"
25830
25831  input_path="$input_to_shortpath"
25832  # Check if we need to convert this using DOS-style short mode. If the path
25833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25834  # take no chances and rewrite it.
25835  # Note: m4 eats our [], so we need to use [ and ] instead.
25836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25837  if test "x$has_forbidden_chars" != x; then
25838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25842      # Going to short mode and back again did indeed matter. Since short mode is
25843      # case insensitive, let's make it lowercase to improve readability.
25844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25845      # Now convert it back to Unix-stile (cygpath)
25846      input_path=`$CYGPATH -u "$shortmode_path"`
25847      new_path="$input_path"
25848    fi
25849  fi
25850
25851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25852  if test "x$test_cygdrive_prefix" = x; then
25853    # As a simple fix, exclude /usr/bin since it's not a real path.
25854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25856      # a path prefixed by /cygdrive for fixpath to work.
25857      new_path="$CYGWIN_ROOT_PATH$input_path"
25858    fi
25859  fi
25860
25861  # remove trailing .exe if any
25862  new_path="${new_path/%.exe/}"
25863
25864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865
25866  # First separate the path from the arguments. This will split at the first
25867  # space.
25868  complete="$NM"
25869  path="${complete%% *}"
25870  tmp="$complete EOL"
25871  arguments="${tmp#* }"
25872
25873  # Input might be given as Windows format, start by converting to
25874  # unix format.
25875  new_path="$path"
25876
25877  windows_path="$new_path"
25878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25879    unix_path=`$CYGPATH -u "$windows_path"`
25880    new_path="$unix_path"
25881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25883    new_path="$unix_path"
25884  fi
25885
25886
25887  # Now try to locate executable using which
25888  new_path=`$WHICH "$new_path" 2> /dev/null`
25889
25890  if test "x$new_path" = x; then
25891    # Oops. Which didn't find the executable.
25892    # The splitting of arguments from the executable at a space might have been incorrect,
25893    # since paths with space are more likely in Windows. Give it another try with the whole
25894    # argument.
25895    path="$complete"
25896    arguments="EOL"
25897    new_path="$path"
25898
25899  windows_path="$new_path"
25900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25901    unix_path=`$CYGPATH -u "$windows_path"`
25902    new_path="$unix_path"
25903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25905    new_path="$unix_path"
25906  fi
25907
25908
25909    new_path=`$WHICH "$new_path" 2> /dev/null`
25910
25911    if test "x$new_path" = x; then
25912      # It's still not found. Now this is an unrecoverable error.
25913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25914$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25915      has_space=`$ECHO "$complete" | $GREP " "`
25916      if test "x$has_space" != x; then
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25919      fi
25920      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25921    fi
25922  fi
25923
25924  # Now new_path has a complete unix path to the binary
25925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25926    # Keep paths in /bin as-is, but remove trailing .exe if any
25927    new_path="${new_path/%.exe/}"
25928    # Do not save /bin paths to all_fixpath_prefixes!
25929  else
25930    # Not in mixed or Windows style, start by that.
25931    new_path=`cmd //c echo $new_path`
25932
25933  input_path="$new_path"
25934  # Check if we need to convert this using DOS-style short mode. If the path
25935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25936  # take no chances and rewrite it.
25937  # Note: m4 eats our [], so we need to use [ and ] instead.
25938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25939  if test "x$has_forbidden_chars" != x; then
25940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25942  fi
25943
25944    # Output is in $new_path
25945
25946  windows_path="$new_path"
25947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25948    unix_path=`$CYGPATH -u "$windows_path"`
25949    new_path="$unix_path"
25950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25952    new_path="$unix_path"
25953  fi
25954
25955    # remove trailing .exe if any
25956    new_path="${new_path/%.exe/}"
25957
25958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25960  fi
25961
25962  else
25963    # We're on a posix platform. Hooray! :)
25964    # First separate the path from the arguments. This will split at the first
25965    # space.
25966    complete="$NM"
25967    path="${complete%% *}"
25968    tmp="$complete EOL"
25969    arguments="${tmp#* }"
25970
25971    # Cannot rely on the command "which" here since it doesn't always work.
25972    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25973    if test -z "$is_absolute_path"; then
25974      # Path to executable is not absolute. Find it.
25975      IFS_save="$IFS"
25976      IFS=:
25977      for p in $PATH; do
25978        if test -f "$p/$path" && test -x "$p/$path"; then
25979          new_path="$p/$path"
25980          break
25981        fi
25982      done
25983      IFS="$IFS_save"
25984    else
25985      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25986$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25987      new_path="$path"
25988    fi
25989
25990    if test "x$new_path" = x; then
25991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25992$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25993        has_space=`$ECHO "$complete" | $GREP " "`
25994        if test "x$has_space" != x; then
25995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25997        fi
25998        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25999      fi
26000  fi
26001
26002      # Now join together the path and the arguments once again
26003      if test "x$arguments" != xEOL; then
26004        new_complete="$new_path ${arguments% *}"
26005      else
26006        new_complete="$new_path"
26007      fi
26008
26009  if test "x$complete" != "x$new_complete"; then
26010      NM="$new_complete"
26011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26012$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26013    fi
26014
26015    # Extract the first word of "gnm", so it can be a program name with args.
26016set dummy gnm; ac_word=$2
26017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26018$as_echo_n "checking for $ac_word... " >&6; }
26019if ${ac_cv_path_GNM+:} false; then :
26020  $as_echo_n "(cached) " >&6
26021else
26022  case $GNM in
26023  [\\/]* | ?:[\\/]*)
26024  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26025  ;;
26026  *)
26027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26028for as_dir in $PATH
26029do
26030  IFS=$as_save_IFS
26031  test -z "$as_dir" && as_dir=.
26032    for ac_exec_ext in '' $ac_executable_extensions; do
26033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26034    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26036    break 2
26037  fi
26038done
26039  done
26040IFS=$as_save_IFS
26041
26042  ;;
26043esac
26044fi
26045GNM=$ac_cv_path_GNM
26046if test -n "$GNM"; then
26047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26048$as_echo "$GNM" >&6; }
26049else
26050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26051$as_echo "no" >&6; }
26052fi
26053
26054
26055
26056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26057
26058  # First separate the path from the arguments. This will split at the first
26059  # space.
26060  complete="$GNM"
26061  path="${complete%% *}"
26062  tmp="$complete EOL"
26063  arguments="${tmp#* }"
26064
26065  # Input might be given as Windows format, start by converting to
26066  # unix format.
26067  new_path=`$CYGPATH -u "$path"`
26068
26069  # Now try to locate executable using which
26070  new_path=`$WHICH "$new_path" 2> /dev/null`
26071  # bat and cmd files are not always considered executable in cygwin causing which
26072  # to not find them
26073  if test "x$new_path" = x \
26074           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26075           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26076    new_path=`$CYGPATH -u "$path"`
26077  fi
26078  if test "x$new_path" = x; then
26079    # Oops. Which didn't find the executable.
26080    # The splitting of arguments from the executable at a space might have been incorrect,
26081    # since paths with space are more likely in Windows. Give it another try with the whole
26082    # argument.
26083    path="$complete"
26084    arguments="EOL"
26085    new_path=`$CYGPATH -u "$path"`
26086    new_path=`$WHICH "$new_path" 2> /dev/null`
26087    # bat and cmd files are not always considered executable in cygwin causing which
26088    # to not find them
26089    if test "x$new_path" = x \
26090             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26091             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26092      new_path=`$CYGPATH -u "$path"`
26093    fi
26094    if test "x$new_path" = x; then
26095      # It's still not found. Now this is an unrecoverable error.
26096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26097$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26098      has_space=`$ECHO "$complete" | $GREP " "`
26099      if test "x$has_space" != x; then
26100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26102      fi
26103      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26104    fi
26105  fi
26106
26107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26110  # "foo.exe" is OK but "foo" is an error.
26111  #
26112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26113  # It is also a way to make sure we got the proper file name for the real test later on.
26114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26115  if test "x$test_shortpath" = x; then
26116    # Short path failed, file does not exist as specified.
26117    # Try adding .exe or .cmd
26118    if test -f "${new_path}.exe"; then
26119       input_to_shortpath="${new_path}.exe"
26120    elif test -f "${new_path}.cmd"; then
26121       input_to_shortpath="${new_path}.cmd"
26122    else
26123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26124$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26125      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26126$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26127      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26128    fi
26129  else
26130    input_to_shortpath="$new_path"
26131  fi
26132
26133  # Call helper function which possibly converts this using DOS-style short mode.
26134  # If so, the updated path is stored in $new_path.
26135  new_path="$input_to_shortpath"
26136
26137  input_path="$input_to_shortpath"
26138  # Check if we need to convert this using DOS-style short mode. If the path
26139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26140  # take no chances and rewrite it.
26141  # Note: m4 eats our [], so we need to use [ and ] instead.
26142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26143  if test "x$has_forbidden_chars" != x; then
26144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26148      # Going to short mode and back again did indeed matter. Since short mode is
26149      # case insensitive, let's make it lowercase to improve readability.
26150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26151      # Now convert it back to Unix-stile (cygpath)
26152      input_path=`$CYGPATH -u "$shortmode_path"`
26153      new_path="$input_path"
26154    fi
26155  fi
26156
26157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26158  if test "x$test_cygdrive_prefix" = x; then
26159    # As a simple fix, exclude /usr/bin since it's not a real path.
26160    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26162      # a path prefixed by /cygdrive for fixpath to work.
26163      new_path="$CYGWIN_ROOT_PATH$input_path"
26164    fi
26165  fi
26166
26167  # remove trailing .exe if any
26168  new_path="${new_path/%.exe/}"
26169
26170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26171
26172  # First separate the path from the arguments. This will split at the first
26173  # space.
26174  complete="$GNM"
26175  path="${complete%% *}"
26176  tmp="$complete EOL"
26177  arguments="${tmp#* }"
26178
26179  # Input might be given as Windows format, start by converting to
26180  # unix format.
26181  new_path="$path"
26182
26183  windows_path="$new_path"
26184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26185    unix_path=`$CYGPATH -u "$windows_path"`
26186    new_path="$unix_path"
26187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26189    new_path="$unix_path"
26190  fi
26191
26192
26193  # Now try to locate executable using which
26194  new_path=`$WHICH "$new_path" 2> /dev/null`
26195
26196  if test "x$new_path" = x; then
26197    # Oops. Which didn't find the executable.
26198    # The splitting of arguments from the executable at a space might have been incorrect,
26199    # since paths with space are more likely in Windows. Give it another try with the whole
26200    # argument.
26201    path="$complete"
26202    arguments="EOL"
26203    new_path="$path"
26204
26205  windows_path="$new_path"
26206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26207    unix_path=`$CYGPATH -u "$windows_path"`
26208    new_path="$unix_path"
26209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26211    new_path="$unix_path"
26212  fi
26213
26214
26215    new_path=`$WHICH "$new_path" 2> /dev/null`
26216
26217    if test "x$new_path" = x; then
26218      # It's still not found. Now this is an unrecoverable error.
26219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26220$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26221      has_space=`$ECHO "$complete" | $GREP " "`
26222      if test "x$has_space" != x; then
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26225      fi
26226      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26227    fi
26228  fi
26229
26230  # Now new_path has a complete unix path to the binary
26231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26232    # Keep paths in /bin as-is, but remove trailing .exe if any
26233    new_path="${new_path/%.exe/}"
26234    # Do not save /bin paths to all_fixpath_prefixes!
26235  else
26236    # Not in mixed or Windows style, start by that.
26237    new_path=`cmd //c echo $new_path`
26238
26239  input_path="$new_path"
26240  # Check if we need to convert this using DOS-style short mode. If the path
26241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26242  # take no chances and rewrite it.
26243  # Note: m4 eats our [], so we need to use [ and ] instead.
26244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26245  if test "x$has_forbidden_chars" != x; then
26246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26248  fi
26249
26250    # Output is in $new_path
26251
26252  windows_path="$new_path"
26253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26254    unix_path=`$CYGPATH -u "$windows_path"`
26255    new_path="$unix_path"
26256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26258    new_path="$unix_path"
26259  fi
26260
26261    # remove trailing .exe if any
26262    new_path="${new_path/%.exe/}"
26263
26264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26266  fi
26267
26268  else
26269    # We're on a posix platform. Hooray! :)
26270    # First separate the path from the arguments. This will split at the first
26271    # space.
26272    complete="$GNM"
26273    path="${complete%% *}"
26274    tmp="$complete EOL"
26275    arguments="${tmp#* }"
26276
26277    # Cannot rely on the command "which" here since it doesn't always work.
26278    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26279    if test -z "$is_absolute_path"; then
26280      # Path to executable is not absolute. Find it.
26281      IFS_save="$IFS"
26282      IFS=:
26283      for p in $PATH; do
26284        if test -f "$p/$path" && test -x "$p/$path"; then
26285          new_path="$p/$path"
26286          break
26287        fi
26288      done
26289      IFS="$IFS_save"
26290    else
26291      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26292$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26293      new_path="$path"
26294    fi
26295
26296    if test "x$new_path" = x; then
26297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26298$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26299        has_space=`$ECHO "$complete" | $GREP " "`
26300        if test "x$has_space" != x; then
26301          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26302$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26303        fi
26304        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26305      fi
26306  fi
26307
26308      # Now join together the path and the arguments once again
26309      if test "x$arguments" != xEOL; then
26310        new_complete="$new_path ${arguments% *}"
26311      else
26312        new_complete="$new_path"
26313      fi
26314
26315  if test "x$complete" != "x$new_complete"; then
26316      GNM="$new_complete"
26317      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26318$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26319    fi
26320
26321    # Extract the first word of "strip", so it can be a program name with args.
26322set dummy strip; ac_word=$2
26323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26324$as_echo_n "checking for $ac_word... " >&6; }
26325if ${ac_cv_path_STRIP+:} false; then :
26326  $as_echo_n "(cached) " >&6
26327else
26328  case $STRIP in
26329  [\\/]* | ?:[\\/]*)
26330  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26331  ;;
26332  *)
26333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26334for as_dir in $PATH
26335do
26336  IFS=$as_save_IFS
26337  test -z "$as_dir" && as_dir=.
26338    for ac_exec_ext in '' $ac_executable_extensions; do
26339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26340    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26342    break 2
26343  fi
26344done
26345  done
26346IFS=$as_save_IFS
26347
26348  ;;
26349esac
26350fi
26351STRIP=$ac_cv_path_STRIP
26352if test -n "$STRIP"; then
26353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26354$as_echo "$STRIP" >&6; }
26355else
26356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26357$as_echo "no" >&6; }
26358fi
26359
26360
26361
26362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26363
26364  # First separate the path from the arguments. This will split at the first
26365  # space.
26366  complete="$STRIP"
26367  path="${complete%% *}"
26368  tmp="$complete EOL"
26369  arguments="${tmp#* }"
26370
26371  # Input might be given as Windows format, start by converting to
26372  # unix format.
26373  new_path=`$CYGPATH -u "$path"`
26374
26375  # Now try to locate executable using which
26376  new_path=`$WHICH "$new_path" 2> /dev/null`
26377  # bat and cmd files are not always considered executable in cygwin causing which
26378  # to not find them
26379  if test "x$new_path" = x \
26380           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26381           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26382    new_path=`$CYGPATH -u "$path"`
26383  fi
26384  if test "x$new_path" = x; then
26385    # Oops. Which didn't find the executable.
26386    # The splitting of arguments from the executable at a space might have been incorrect,
26387    # since paths with space are more likely in Windows. Give it another try with the whole
26388    # argument.
26389    path="$complete"
26390    arguments="EOL"
26391    new_path=`$CYGPATH -u "$path"`
26392    new_path=`$WHICH "$new_path" 2> /dev/null`
26393    # bat and cmd files are not always considered executable in cygwin causing which
26394    # to not find them
26395    if test "x$new_path" = x \
26396             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26397             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26398      new_path=`$CYGPATH -u "$path"`
26399    fi
26400    if test "x$new_path" = x; then
26401      # It's still not found. Now this is an unrecoverable error.
26402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26403$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26404      has_space=`$ECHO "$complete" | $GREP " "`
26405      if test "x$has_space" != x; then
26406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26408      fi
26409      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26410    fi
26411  fi
26412
26413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26416  # "foo.exe" is OK but "foo" is an error.
26417  #
26418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26419  # It is also a way to make sure we got the proper file name for the real test later on.
26420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26421  if test "x$test_shortpath" = x; then
26422    # Short path failed, file does not exist as specified.
26423    # Try adding .exe or .cmd
26424    if test -f "${new_path}.exe"; then
26425       input_to_shortpath="${new_path}.exe"
26426    elif test -f "${new_path}.cmd"; then
26427       input_to_shortpath="${new_path}.cmd"
26428    else
26429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26430$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26433      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26434    fi
26435  else
26436    input_to_shortpath="$new_path"
26437  fi
26438
26439  # Call helper function which possibly converts this using DOS-style short mode.
26440  # If so, the updated path is stored in $new_path.
26441  new_path="$input_to_shortpath"
26442
26443  input_path="$input_to_shortpath"
26444  # Check if we need to convert this using DOS-style short mode. If the path
26445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26446  # take no chances and rewrite it.
26447  # Note: m4 eats our [], so we need to use [ and ] instead.
26448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26449  if test "x$has_forbidden_chars" != x; then
26450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26454      # Going to short mode and back again did indeed matter. Since short mode is
26455      # case insensitive, let's make it lowercase to improve readability.
26456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26457      # Now convert it back to Unix-stile (cygpath)
26458      input_path=`$CYGPATH -u "$shortmode_path"`
26459      new_path="$input_path"
26460    fi
26461  fi
26462
26463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26464  if test "x$test_cygdrive_prefix" = x; then
26465    # As a simple fix, exclude /usr/bin since it's not a real path.
26466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26468      # a path prefixed by /cygdrive for fixpath to work.
26469      new_path="$CYGWIN_ROOT_PATH$input_path"
26470    fi
26471  fi
26472
26473  # remove trailing .exe if any
26474  new_path="${new_path/%.exe/}"
26475
26476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26477
26478  # First separate the path from the arguments. This will split at the first
26479  # space.
26480  complete="$STRIP"
26481  path="${complete%% *}"
26482  tmp="$complete EOL"
26483  arguments="${tmp#* }"
26484
26485  # Input might be given as Windows format, start by converting to
26486  # unix format.
26487  new_path="$path"
26488
26489  windows_path="$new_path"
26490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26491    unix_path=`$CYGPATH -u "$windows_path"`
26492    new_path="$unix_path"
26493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26495    new_path="$unix_path"
26496  fi
26497
26498
26499  # Now try to locate executable using which
26500  new_path=`$WHICH "$new_path" 2> /dev/null`
26501
26502  if test "x$new_path" = x; then
26503    # Oops. Which didn't find the executable.
26504    # The splitting of arguments from the executable at a space might have been incorrect,
26505    # since paths with space are more likely in Windows. Give it another try with the whole
26506    # argument.
26507    path="$complete"
26508    arguments="EOL"
26509    new_path="$path"
26510
26511  windows_path="$new_path"
26512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26513    unix_path=`$CYGPATH -u "$windows_path"`
26514    new_path="$unix_path"
26515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26517    new_path="$unix_path"
26518  fi
26519
26520
26521    new_path=`$WHICH "$new_path" 2> /dev/null`
26522
26523    if test "x$new_path" = x; then
26524      # It's still not found. Now this is an unrecoverable error.
26525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26526$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26527      has_space=`$ECHO "$complete" | $GREP " "`
26528      if test "x$has_space" != x; then
26529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26531      fi
26532      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26533    fi
26534  fi
26535
26536  # Now new_path has a complete unix path to the binary
26537  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26538    # Keep paths in /bin as-is, but remove trailing .exe if any
26539    new_path="${new_path/%.exe/}"
26540    # Do not save /bin paths to all_fixpath_prefixes!
26541  else
26542    # Not in mixed or Windows style, start by that.
26543    new_path=`cmd //c echo $new_path`
26544
26545  input_path="$new_path"
26546  # Check if we need to convert this using DOS-style short mode. If the path
26547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26548  # take no chances and rewrite it.
26549  # Note: m4 eats our [], so we need to use [ and ] instead.
26550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26551  if test "x$has_forbidden_chars" != x; then
26552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26554  fi
26555
26556    # Output is in $new_path
26557
26558  windows_path="$new_path"
26559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26560    unix_path=`$CYGPATH -u "$windows_path"`
26561    new_path="$unix_path"
26562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26564    new_path="$unix_path"
26565  fi
26566
26567    # remove trailing .exe if any
26568    new_path="${new_path/%.exe/}"
26569
26570    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26571    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26572  fi
26573
26574  else
26575    # We're on a posix platform. Hooray! :)
26576    # First separate the path from the arguments. This will split at the first
26577    # space.
26578    complete="$STRIP"
26579    path="${complete%% *}"
26580    tmp="$complete EOL"
26581    arguments="${tmp#* }"
26582
26583    # Cannot rely on the command "which" here since it doesn't always work.
26584    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26585    if test -z "$is_absolute_path"; then
26586      # Path to executable is not absolute. Find it.
26587      IFS_save="$IFS"
26588      IFS=:
26589      for p in $PATH; do
26590        if test -f "$p/$path" && test -x "$p/$path"; then
26591          new_path="$p/$path"
26592          break
26593        fi
26594      done
26595      IFS="$IFS_save"
26596    else
26597      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26598$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26599      new_path="$path"
26600    fi
26601
26602    if test "x$new_path" = x; then
26603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26604$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26605        has_space=`$ECHO "$complete" | $GREP " "`
26606        if test "x$has_space" != x; then
26607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26609        fi
26610        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26611      fi
26612  fi
26613
26614      # Now join together the path and the arguments once again
26615      if test "x$arguments" != xEOL; then
26616        new_complete="$new_path ${arguments% *}"
26617      else
26618        new_complete="$new_path"
26619      fi
26620
26621  if test "x$complete" != "x$new_complete"; then
26622      STRIP="$new_complete"
26623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26624$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26625    fi
26626
26627    # Extract the first word of "mcs", so it can be a program name with args.
26628set dummy mcs; ac_word=$2
26629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26630$as_echo_n "checking for $ac_word... " >&6; }
26631if ${ac_cv_path_MCS+:} false; then :
26632  $as_echo_n "(cached) " >&6
26633else
26634  case $MCS in
26635  [\\/]* | ?:[\\/]*)
26636  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26637  ;;
26638  *)
26639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26640for as_dir in $PATH
26641do
26642  IFS=$as_save_IFS
26643  test -z "$as_dir" && as_dir=.
26644    for ac_exec_ext in '' $ac_executable_extensions; do
26645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26646    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26648    break 2
26649  fi
26650done
26651  done
26652IFS=$as_save_IFS
26653
26654  ;;
26655esac
26656fi
26657MCS=$ac_cv_path_MCS
26658if test -n "$MCS"; then
26659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26660$as_echo "$MCS" >&6; }
26661else
26662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26663$as_echo "no" >&6; }
26664fi
26665
26666
26667
26668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26669
26670  # First separate the path from the arguments. This will split at the first
26671  # space.
26672  complete="$MCS"
26673  path="${complete%% *}"
26674  tmp="$complete EOL"
26675  arguments="${tmp#* }"
26676
26677  # Input might be given as Windows format, start by converting to
26678  # unix format.
26679  new_path=`$CYGPATH -u "$path"`
26680
26681  # Now try to locate executable using which
26682  new_path=`$WHICH "$new_path" 2> /dev/null`
26683  # bat and cmd files are not always considered executable in cygwin causing which
26684  # to not find them
26685  if test "x$new_path" = x \
26686           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26687           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26688    new_path=`$CYGPATH -u "$path"`
26689  fi
26690  if test "x$new_path" = x; then
26691    # Oops. Which didn't find the executable.
26692    # The splitting of arguments from the executable at a space might have been incorrect,
26693    # since paths with space are more likely in Windows. Give it another try with the whole
26694    # argument.
26695    path="$complete"
26696    arguments="EOL"
26697    new_path=`$CYGPATH -u "$path"`
26698    new_path=`$WHICH "$new_path" 2> /dev/null`
26699    # bat and cmd files are not always considered executable in cygwin causing which
26700    # to not find them
26701    if test "x$new_path" = x \
26702             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26703             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26704      new_path=`$CYGPATH -u "$path"`
26705    fi
26706    if test "x$new_path" = x; then
26707      # It's still not found. Now this is an unrecoverable error.
26708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26709$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26710      has_space=`$ECHO "$complete" | $GREP " "`
26711      if test "x$has_space" != x; then
26712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26714      fi
26715      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26716    fi
26717  fi
26718
26719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26722  # "foo.exe" is OK but "foo" is an error.
26723  #
26724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26725  # It is also a way to make sure we got the proper file name for the real test later on.
26726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26727  if test "x$test_shortpath" = x; then
26728    # Short path failed, file does not exist as specified.
26729    # Try adding .exe or .cmd
26730    if test -f "${new_path}.exe"; then
26731       input_to_shortpath="${new_path}.exe"
26732    elif test -f "${new_path}.cmd"; then
26733       input_to_shortpath="${new_path}.cmd"
26734    else
26735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26736$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26739      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26740    fi
26741  else
26742    input_to_shortpath="$new_path"
26743  fi
26744
26745  # Call helper function which possibly converts this using DOS-style short mode.
26746  # If so, the updated path is stored in $new_path.
26747  new_path="$input_to_shortpath"
26748
26749  input_path="$input_to_shortpath"
26750  # Check if we need to convert this using DOS-style short mode. If the path
26751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26752  # take no chances and rewrite it.
26753  # Note: m4 eats our [], so we need to use [ and ] instead.
26754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26755  if test "x$has_forbidden_chars" != x; then
26756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26760      # Going to short mode and back again did indeed matter. Since short mode is
26761      # case insensitive, let's make it lowercase to improve readability.
26762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26763      # Now convert it back to Unix-stile (cygpath)
26764      input_path=`$CYGPATH -u "$shortmode_path"`
26765      new_path="$input_path"
26766    fi
26767  fi
26768
26769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26770  if test "x$test_cygdrive_prefix" = x; then
26771    # As a simple fix, exclude /usr/bin since it's not a real path.
26772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26774      # a path prefixed by /cygdrive for fixpath to work.
26775      new_path="$CYGWIN_ROOT_PATH$input_path"
26776    fi
26777  fi
26778
26779  # remove trailing .exe if any
26780  new_path="${new_path/%.exe/}"
26781
26782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26783
26784  # First separate the path from the arguments. This will split at the first
26785  # space.
26786  complete="$MCS"
26787  path="${complete%% *}"
26788  tmp="$complete EOL"
26789  arguments="${tmp#* }"
26790
26791  # Input might be given as Windows format, start by converting to
26792  # unix format.
26793  new_path="$path"
26794
26795  windows_path="$new_path"
26796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26797    unix_path=`$CYGPATH -u "$windows_path"`
26798    new_path="$unix_path"
26799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26801    new_path="$unix_path"
26802  fi
26803
26804
26805  # Now try to locate executable using which
26806  new_path=`$WHICH "$new_path" 2> /dev/null`
26807
26808  if test "x$new_path" = x; then
26809    # Oops. Which didn't find the executable.
26810    # The splitting of arguments from the executable at a space might have been incorrect,
26811    # since paths with space are more likely in Windows. Give it another try with the whole
26812    # argument.
26813    path="$complete"
26814    arguments="EOL"
26815    new_path="$path"
26816
26817  windows_path="$new_path"
26818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26819    unix_path=`$CYGPATH -u "$windows_path"`
26820    new_path="$unix_path"
26821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26823    new_path="$unix_path"
26824  fi
26825
26826
26827    new_path=`$WHICH "$new_path" 2> /dev/null`
26828
26829    if test "x$new_path" = x; then
26830      # It's still not found. Now this is an unrecoverable error.
26831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26832$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26833      has_space=`$ECHO "$complete" | $GREP " "`
26834      if test "x$has_space" != x; then
26835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26837      fi
26838      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26839    fi
26840  fi
26841
26842  # Now new_path has a complete unix path to the binary
26843  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26844    # Keep paths in /bin as-is, but remove trailing .exe if any
26845    new_path="${new_path/%.exe/}"
26846    # Do not save /bin paths to all_fixpath_prefixes!
26847  else
26848    # Not in mixed or Windows style, start by that.
26849    new_path=`cmd //c echo $new_path`
26850
26851  input_path="$new_path"
26852  # Check if we need to convert this using DOS-style short mode. If the path
26853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26854  # take no chances and rewrite it.
26855  # Note: m4 eats our [], so we need to use [ and ] instead.
26856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26857  if test "x$has_forbidden_chars" != x; then
26858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26860  fi
26861
26862    # Output is in $new_path
26863
26864  windows_path="$new_path"
26865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26866    unix_path=`$CYGPATH -u "$windows_path"`
26867    new_path="$unix_path"
26868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26870    new_path="$unix_path"
26871  fi
26872
26873    # remove trailing .exe if any
26874    new_path="${new_path/%.exe/}"
26875
26876    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26877    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26878  fi
26879
26880  else
26881    # We're on a posix platform. Hooray! :)
26882    # First separate the path from the arguments. This will split at the first
26883    # space.
26884    complete="$MCS"
26885    path="${complete%% *}"
26886    tmp="$complete EOL"
26887    arguments="${tmp#* }"
26888
26889    # Cannot rely on the command "which" here since it doesn't always work.
26890    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26891    if test -z "$is_absolute_path"; then
26892      # Path to executable is not absolute. Find it.
26893      IFS_save="$IFS"
26894      IFS=:
26895      for p in $PATH; do
26896        if test -f "$p/$path" && test -x "$p/$path"; then
26897          new_path="$p/$path"
26898          break
26899        fi
26900      done
26901      IFS="$IFS_save"
26902    else
26903      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26904$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26905      new_path="$path"
26906    fi
26907
26908    if test "x$new_path" = x; then
26909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26910$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26911        has_space=`$ECHO "$complete" | $GREP " "`
26912        if test "x$has_space" != x; then
26913          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26915        fi
26916        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26917      fi
26918  fi
26919
26920      # Now join together the path and the arguments once again
26921      if test "x$arguments" != xEOL; then
26922        new_complete="$new_path ${arguments% *}"
26923      else
26924        new_complete="$new_path"
26925      fi
26926
26927  if test "x$complete" != "x$new_complete"; then
26928      MCS="$new_complete"
26929      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26930$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26931    fi
26932
26933elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26934    if test -n "$ac_tool_prefix"; then
26935  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26936set dummy ${ac_tool_prefix}nm; ac_word=$2
26937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26938$as_echo_n "checking for $ac_word... " >&6; }
26939if ${ac_cv_prog_NM+:} false; then :
26940  $as_echo_n "(cached) " >&6
26941else
26942  if test -n "$NM"; then
26943  ac_cv_prog_NM="$NM" # Let the user override the test.
26944else
26945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26946for as_dir in $PATH
26947do
26948  IFS=$as_save_IFS
26949  test -z "$as_dir" && as_dir=.
26950    for ac_exec_ext in '' $ac_executable_extensions; do
26951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26952    ac_cv_prog_NM="${ac_tool_prefix}nm"
26953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26954    break 2
26955  fi
26956done
26957  done
26958IFS=$as_save_IFS
26959
26960fi
26961fi
26962NM=$ac_cv_prog_NM
26963if test -n "$NM"; then
26964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26965$as_echo "$NM" >&6; }
26966else
26967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26968$as_echo "no" >&6; }
26969fi
26970
26971
26972fi
26973if test -z "$ac_cv_prog_NM"; then
26974  ac_ct_NM=$NM
26975  # Extract the first word of "nm", so it can be a program name with args.
26976set dummy nm; ac_word=$2
26977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26978$as_echo_n "checking for $ac_word... " >&6; }
26979if ${ac_cv_prog_ac_ct_NM+:} false; then :
26980  $as_echo_n "(cached) " >&6
26981else
26982  if test -n "$ac_ct_NM"; then
26983  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26984else
26985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26986for as_dir in $PATH
26987do
26988  IFS=$as_save_IFS
26989  test -z "$as_dir" && as_dir=.
26990    for ac_exec_ext in '' $ac_executable_extensions; do
26991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26992    ac_cv_prog_ac_ct_NM="nm"
26993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26994    break 2
26995  fi
26996done
26997  done
26998IFS=$as_save_IFS
26999
27000fi
27001fi
27002ac_ct_NM=$ac_cv_prog_ac_ct_NM
27003if test -n "$ac_ct_NM"; then
27004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27005$as_echo "$ac_ct_NM" >&6; }
27006else
27007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27008$as_echo "no" >&6; }
27009fi
27010
27011  if test "x$ac_ct_NM" = x; then
27012    NM=""
27013  else
27014    case $cross_compiling:$ac_tool_warned in
27015yes:)
27016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27018ac_tool_warned=yes ;;
27019esac
27020    NM=$ac_ct_NM
27021  fi
27022else
27023  NM="$ac_cv_prog_NM"
27024fi
27025
27026
27027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27028
27029  # First separate the path from the arguments. This will split at the first
27030  # space.
27031  complete="$NM"
27032  path="${complete%% *}"
27033  tmp="$complete EOL"
27034  arguments="${tmp#* }"
27035
27036  # Input might be given as Windows format, start by converting to
27037  # unix format.
27038  new_path=`$CYGPATH -u "$path"`
27039
27040  # Now try to locate executable using which
27041  new_path=`$WHICH "$new_path" 2> /dev/null`
27042  # bat and cmd files are not always considered executable in cygwin causing which
27043  # to not find them
27044  if test "x$new_path" = x \
27045           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27046           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27047    new_path=`$CYGPATH -u "$path"`
27048  fi
27049  if test "x$new_path" = x; then
27050    # Oops. Which didn't find the executable.
27051    # The splitting of arguments from the executable at a space might have been incorrect,
27052    # since paths with space are more likely in Windows. Give it another try with the whole
27053    # argument.
27054    path="$complete"
27055    arguments="EOL"
27056    new_path=`$CYGPATH -u "$path"`
27057    new_path=`$WHICH "$new_path" 2> /dev/null`
27058    # bat and cmd files are not always considered executable in cygwin causing which
27059    # to not find them
27060    if test "x$new_path" = x \
27061             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27062             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27063      new_path=`$CYGPATH -u "$path"`
27064    fi
27065    if test "x$new_path" = x; then
27066      # It's still not found. Now this is an unrecoverable error.
27067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27068$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27069      has_space=`$ECHO "$complete" | $GREP " "`
27070      if test "x$has_space" != x; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27073      fi
27074      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27075    fi
27076  fi
27077
27078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27081  # "foo.exe" is OK but "foo" is an error.
27082  #
27083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27084  # It is also a way to make sure we got the proper file name for the real test later on.
27085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27086  if test "x$test_shortpath" = x; then
27087    # Short path failed, file does not exist as specified.
27088    # Try adding .exe or .cmd
27089    if test -f "${new_path}.exe"; then
27090       input_to_shortpath="${new_path}.exe"
27091    elif test -f "${new_path}.cmd"; then
27092       input_to_shortpath="${new_path}.cmd"
27093    else
27094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27095$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27098      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27099    fi
27100  else
27101    input_to_shortpath="$new_path"
27102  fi
27103
27104  # Call helper function which possibly converts this using DOS-style short mode.
27105  # If so, the updated path is stored in $new_path.
27106  new_path="$input_to_shortpath"
27107
27108  input_path="$input_to_shortpath"
27109  # Check if we need to convert this using DOS-style short mode. If the path
27110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27111  # take no chances and rewrite it.
27112  # Note: m4 eats our [], so we need to use [ and ] instead.
27113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27114  if test "x$has_forbidden_chars" != x; then
27115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27119      # Going to short mode and back again did indeed matter. Since short mode is
27120      # case insensitive, let's make it lowercase to improve readability.
27121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27122      # Now convert it back to Unix-stile (cygpath)
27123      input_path=`$CYGPATH -u "$shortmode_path"`
27124      new_path="$input_path"
27125    fi
27126  fi
27127
27128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27129  if test "x$test_cygdrive_prefix" = x; then
27130    # As a simple fix, exclude /usr/bin since it's not a real path.
27131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27133      # a path prefixed by /cygdrive for fixpath to work.
27134      new_path="$CYGWIN_ROOT_PATH$input_path"
27135    fi
27136  fi
27137
27138  # remove trailing .exe if any
27139  new_path="${new_path/%.exe/}"
27140
27141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27142
27143  # First separate the path from the arguments. This will split at the first
27144  # space.
27145  complete="$NM"
27146  path="${complete%% *}"
27147  tmp="$complete EOL"
27148  arguments="${tmp#* }"
27149
27150  # Input might be given as Windows format, start by converting to
27151  # unix format.
27152  new_path="$path"
27153
27154  windows_path="$new_path"
27155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27156    unix_path=`$CYGPATH -u "$windows_path"`
27157    new_path="$unix_path"
27158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27160    new_path="$unix_path"
27161  fi
27162
27163
27164  # Now try to locate executable using which
27165  new_path=`$WHICH "$new_path" 2> /dev/null`
27166
27167  if test "x$new_path" = x; then
27168    # Oops. Which didn't find the executable.
27169    # The splitting of arguments from the executable at a space might have been incorrect,
27170    # since paths with space are more likely in Windows. Give it another try with the whole
27171    # argument.
27172    path="$complete"
27173    arguments="EOL"
27174    new_path="$path"
27175
27176  windows_path="$new_path"
27177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27178    unix_path=`$CYGPATH -u "$windows_path"`
27179    new_path="$unix_path"
27180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27182    new_path="$unix_path"
27183  fi
27184
27185
27186    new_path=`$WHICH "$new_path" 2> /dev/null`
27187
27188    if test "x$new_path" = x; then
27189      # It's still not found. Now this is an unrecoverable error.
27190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27191$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27192      has_space=`$ECHO "$complete" | $GREP " "`
27193      if test "x$has_space" != x; then
27194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27196      fi
27197      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27198    fi
27199  fi
27200
27201  # Now new_path has a complete unix path to the binary
27202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27203    # Keep paths in /bin as-is, but remove trailing .exe if any
27204    new_path="${new_path/%.exe/}"
27205    # Do not save /bin paths to all_fixpath_prefixes!
27206  else
27207    # Not in mixed or Windows style, start by that.
27208    new_path=`cmd //c echo $new_path`
27209
27210  input_path="$new_path"
27211  # Check if we need to convert this using DOS-style short mode. If the path
27212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27213  # take no chances and rewrite it.
27214  # Note: m4 eats our [], so we need to use [ and ] instead.
27215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27216  if test "x$has_forbidden_chars" != x; then
27217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27219  fi
27220
27221    # Output is in $new_path
27222
27223  windows_path="$new_path"
27224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27225    unix_path=`$CYGPATH -u "$windows_path"`
27226    new_path="$unix_path"
27227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27229    new_path="$unix_path"
27230  fi
27231
27232    # remove trailing .exe if any
27233    new_path="${new_path/%.exe/}"
27234
27235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27237  fi
27238
27239  else
27240    # We're on a posix platform. Hooray! :)
27241    # First separate the path from the arguments. This will split at the first
27242    # space.
27243    complete="$NM"
27244    path="${complete%% *}"
27245    tmp="$complete EOL"
27246    arguments="${tmp#* }"
27247
27248    # Cannot rely on the command "which" here since it doesn't always work.
27249    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27250    if test -z "$is_absolute_path"; then
27251      # Path to executable is not absolute. Find it.
27252      IFS_save="$IFS"
27253      IFS=:
27254      for p in $PATH; do
27255        if test -f "$p/$path" && test -x "$p/$path"; then
27256          new_path="$p/$path"
27257          break
27258        fi
27259      done
27260      IFS="$IFS_save"
27261    else
27262      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27263$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27264      new_path="$path"
27265    fi
27266
27267    if test "x$new_path" = x; then
27268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27269$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27270        has_space=`$ECHO "$complete" | $GREP " "`
27271        if test "x$has_space" != x; then
27272          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27273$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27274        fi
27275        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27276      fi
27277  fi
27278
27279      # Now join together the path and the arguments once again
27280      if test "x$arguments" != xEOL; then
27281        new_complete="$new_path ${arguments% *}"
27282      else
27283        new_complete="$new_path"
27284      fi
27285
27286  if test "x$complete" != "x$new_complete"; then
27287      NM="$new_complete"
27288      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27289$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27290    fi
27291
27292    GNM="$NM"
27293
27294    if test -n "$ac_tool_prefix"; then
27295  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27296set dummy ${ac_tool_prefix}strip; ac_word=$2
27297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27298$as_echo_n "checking for $ac_word... " >&6; }
27299if ${ac_cv_prog_STRIP+:} false; then :
27300  $as_echo_n "(cached) " >&6
27301else
27302  if test -n "$STRIP"; then
27303  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27304else
27305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27306for as_dir in $PATH
27307do
27308  IFS=$as_save_IFS
27309  test -z "$as_dir" && as_dir=.
27310    for ac_exec_ext in '' $ac_executable_extensions; do
27311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27312    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27314    break 2
27315  fi
27316done
27317  done
27318IFS=$as_save_IFS
27319
27320fi
27321fi
27322STRIP=$ac_cv_prog_STRIP
27323if test -n "$STRIP"; then
27324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27325$as_echo "$STRIP" >&6; }
27326else
27327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27328$as_echo "no" >&6; }
27329fi
27330
27331
27332fi
27333if test -z "$ac_cv_prog_STRIP"; then
27334  ac_ct_STRIP=$STRIP
27335  # Extract the first word of "strip", so it can be a program name with args.
27336set dummy strip; ac_word=$2
27337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27338$as_echo_n "checking for $ac_word... " >&6; }
27339if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27340  $as_echo_n "(cached) " >&6
27341else
27342  if test -n "$ac_ct_STRIP"; then
27343  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27344else
27345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27346for as_dir in $PATH
27347do
27348  IFS=$as_save_IFS
27349  test -z "$as_dir" && as_dir=.
27350    for ac_exec_ext in '' $ac_executable_extensions; do
27351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27352    ac_cv_prog_ac_ct_STRIP="strip"
27353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27354    break 2
27355  fi
27356done
27357  done
27358IFS=$as_save_IFS
27359
27360fi
27361fi
27362ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27363if test -n "$ac_ct_STRIP"; then
27364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27365$as_echo "$ac_ct_STRIP" >&6; }
27366else
27367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27368$as_echo "no" >&6; }
27369fi
27370
27371  if test "x$ac_ct_STRIP" = x; then
27372    STRIP=""
27373  else
27374    case $cross_compiling:$ac_tool_warned in
27375yes:)
27376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27378ac_tool_warned=yes ;;
27379esac
27380    STRIP=$ac_ct_STRIP
27381  fi
27382else
27383  STRIP="$ac_cv_prog_STRIP"
27384fi
27385
27386
27387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27388
27389  # First separate the path from the arguments. This will split at the first
27390  # space.
27391  complete="$STRIP"
27392  path="${complete%% *}"
27393  tmp="$complete EOL"
27394  arguments="${tmp#* }"
27395
27396  # Input might be given as Windows format, start by converting to
27397  # unix format.
27398  new_path=`$CYGPATH -u "$path"`
27399
27400  # Now try to locate executable using which
27401  new_path=`$WHICH "$new_path" 2> /dev/null`
27402  # bat and cmd files are not always considered executable in cygwin causing which
27403  # to not find them
27404  if test "x$new_path" = x \
27405           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27406           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27407    new_path=`$CYGPATH -u "$path"`
27408  fi
27409  if test "x$new_path" = x; then
27410    # Oops. Which didn't find the executable.
27411    # The splitting of arguments from the executable at a space might have been incorrect,
27412    # since paths with space are more likely in Windows. Give it another try with the whole
27413    # argument.
27414    path="$complete"
27415    arguments="EOL"
27416    new_path=`$CYGPATH -u "$path"`
27417    new_path=`$WHICH "$new_path" 2> /dev/null`
27418    # bat and cmd files are not always considered executable in cygwin causing which
27419    # to not find them
27420    if test "x$new_path" = x \
27421             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27422             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27423      new_path=`$CYGPATH -u "$path"`
27424    fi
27425    if test "x$new_path" = x; then
27426      # It's still not found. Now this is an unrecoverable error.
27427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27428$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27429      has_space=`$ECHO "$complete" | $GREP " "`
27430      if test "x$has_space" != x; then
27431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27433      fi
27434      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27435    fi
27436  fi
27437
27438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27441  # "foo.exe" is OK but "foo" is an error.
27442  #
27443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27444  # It is also a way to make sure we got the proper file name for the real test later on.
27445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27446  if test "x$test_shortpath" = x; then
27447    # Short path failed, file does not exist as specified.
27448    # Try adding .exe or .cmd
27449    if test -f "${new_path}.exe"; then
27450       input_to_shortpath="${new_path}.exe"
27451    elif test -f "${new_path}.cmd"; then
27452       input_to_shortpath="${new_path}.cmd"
27453    else
27454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27455$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27456      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27457$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27458      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27459    fi
27460  else
27461    input_to_shortpath="$new_path"
27462  fi
27463
27464  # Call helper function which possibly converts this using DOS-style short mode.
27465  # If so, the updated path is stored in $new_path.
27466  new_path="$input_to_shortpath"
27467
27468  input_path="$input_to_shortpath"
27469  # Check if we need to convert this using DOS-style short mode. If the path
27470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27471  # take no chances and rewrite it.
27472  # Note: m4 eats our [], so we need to use [ and ] instead.
27473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27474  if test "x$has_forbidden_chars" != x; then
27475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27479      # Going to short mode and back again did indeed matter. Since short mode is
27480      # case insensitive, let's make it lowercase to improve readability.
27481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27482      # Now convert it back to Unix-stile (cygpath)
27483      input_path=`$CYGPATH -u "$shortmode_path"`
27484      new_path="$input_path"
27485    fi
27486  fi
27487
27488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27489  if test "x$test_cygdrive_prefix" = x; then
27490    # As a simple fix, exclude /usr/bin since it's not a real path.
27491    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27493      # a path prefixed by /cygdrive for fixpath to work.
27494      new_path="$CYGWIN_ROOT_PATH$input_path"
27495    fi
27496  fi
27497
27498  # remove trailing .exe if any
27499  new_path="${new_path/%.exe/}"
27500
27501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27502
27503  # First separate the path from the arguments. This will split at the first
27504  # space.
27505  complete="$STRIP"
27506  path="${complete%% *}"
27507  tmp="$complete EOL"
27508  arguments="${tmp#* }"
27509
27510  # Input might be given as Windows format, start by converting to
27511  # unix format.
27512  new_path="$path"
27513
27514  windows_path="$new_path"
27515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27516    unix_path=`$CYGPATH -u "$windows_path"`
27517    new_path="$unix_path"
27518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27520    new_path="$unix_path"
27521  fi
27522
27523
27524  # Now try to locate executable using which
27525  new_path=`$WHICH "$new_path" 2> /dev/null`
27526
27527  if test "x$new_path" = x; then
27528    # Oops. Which didn't find the executable.
27529    # The splitting of arguments from the executable at a space might have been incorrect,
27530    # since paths with space are more likely in Windows. Give it another try with the whole
27531    # argument.
27532    path="$complete"
27533    arguments="EOL"
27534    new_path="$path"
27535
27536  windows_path="$new_path"
27537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27538    unix_path=`$CYGPATH -u "$windows_path"`
27539    new_path="$unix_path"
27540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27542    new_path="$unix_path"
27543  fi
27544
27545
27546    new_path=`$WHICH "$new_path" 2> /dev/null`
27547
27548    if test "x$new_path" = x; then
27549      # It's still not found. Now this is an unrecoverable error.
27550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27551$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27552      has_space=`$ECHO "$complete" | $GREP " "`
27553      if test "x$has_space" != x; then
27554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27556      fi
27557      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27558    fi
27559  fi
27560
27561  # Now new_path has a complete unix path to the binary
27562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27563    # Keep paths in /bin as-is, but remove trailing .exe if any
27564    new_path="${new_path/%.exe/}"
27565    # Do not save /bin paths to all_fixpath_prefixes!
27566  else
27567    # Not in mixed or Windows style, start by that.
27568    new_path=`cmd //c echo $new_path`
27569
27570  input_path="$new_path"
27571  # Check if we need to convert this using DOS-style short mode. If the path
27572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27573  # take no chances and rewrite it.
27574  # Note: m4 eats our [], so we need to use [ and ] instead.
27575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27576  if test "x$has_forbidden_chars" != x; then
27577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27579  fi
27580
27581    # Output is in $new_path
27582
27583  windows_path="$new_path"
27584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27585    unix_path=`$CYGPATH -u "$windows_path"`
27586    new_path="$unix_path"
27587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27589    new_path="$unix_path"
27590  fi
27591
27592    # remove trailing .exe if any
27593    new_path="${new_path/%.exe/}"
27594
27595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27597  fi
27598
27599  else
27600    # We're on a posix platform. Hooray! :)
27601    # First separate the path from the arguments. This will split at the first
27602    # space.
27603    complete="$STRIP"
27604    path="${complete%% *}"
27605    tmp="$complete EOL"
27606    arguments="${tmp#* }"
27607
27608    # Cannot rely on the command "which" here since it doesn't always work.
27609    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27610    if test -z "$is_absolute_path"; then
27611      # Path to executable is not absolute. Find it.
27612      IFS_save="$IFS"
27613      IFS=:
27614      for p in $PATH; do
27615        if test -f "$p/$path" && test -x "$p/$path"; then
27616          new_path="$p/$path"
27617          break
27618        fi
27619      done
27620      IFS="$IFS_save"
27621    else
27622      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27623$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27624      new_path="$path"
27625    fi
27626
27627    if test "x$new_path" = x; then
27628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27629$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27630        has_space=`$ECHO "$complete" | $GREP " "`
27631        if test "x$has_space" != x; then
27632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27634        fi
27635        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27636      fi
27637  fi
27638
27639      # Now join together the path and the arguments once again
27640      if test "x$arguments" != xEOL; then
27641        new_complete="$new_path ${arguments% *}"
27642      else
27643        new_complete="$new_path"
27644      fi
27645
27646  if test "x$complete" != "x$new_complete"; then
27647      STRIP="$new_complete"
27648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27649$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27650    fi
27651
27652fi
27653
27654# objcopy is used for moving debug symbols to separate files when
27655# full debug symbols are enabled.
27656if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27657    if test -n "$ac_tool_prefix"; then
27658  for ac_prog in gobjcopy objcopy
27659  do
27660    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27661set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27663$as_echo_n "checking for $ac_word... " >&6; }
27664if ${ac_cv_prog_OBJCOPY+:} false; then :
27665  $as_echo_n "(cached) " >&6
27666else
27667  if test -n "$OBJCOPY"; then
27668  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27669else
27670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27671for as_dir in $PATH
27672do
27673  IFS=$as_save_IFS
27674  test -z "$as_dir" && as_dir=.
27675    for ac_exec_ext in '' $ac_executable_extensions; do
27676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27677    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27679    break 2
27680  fi
27681done
27682  done
27683IFS=$as_save_IFS
27684
27685fi
27686fi
27687OBJCOPY=$ac_cv_prog_OBJCOPY
27688if test -n "$OBJCOPY"; then
27689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27690$as_echo "$OBJCOPY" >&6; }
27691else
27692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27693$as_echo "no" >&6; }
27694fi
27695
27696
27697    test -n "$OBJCOPY" && break
27698  done
27699fi
27700if test -z "$OBJCOPY"; then
27701  ac_ct_OBJCOPY=$OBJCOPY
27702  for ac_prog in gobjcopy objcopy
27703do
27704  # Extract the first word of "$ac_prog", so it can be a program name with args.
27705set dummy $ac_prog; ac_word=$2
27706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27707$as_echo_n "checking for $ac_word... " >&6; }
27708if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27709  $as_echo_n "(cached) " >&6
27710else
27711  if test -n "$ac_ct_OBJCOPY"; then
27712  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27713else
27714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27715for as_dir in $PATH
27716do
27717  IFS=$as_save_IFS
27718  test -z "$as_dir" && as_dir=.
27719    for ac_exec_ext in '' $ac_executable_extensions; do
27720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27721    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27723    break 2
27724  fi
27725done
27726  done
27727IFS=$as_save_IFS
27728
27729fi
27730fi
27731ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27732if test -n "$ac_ct_OBJCOPY"; then
27733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27734$as_echo "$ac_ct_OBJCOPY" >&6; }
27735else
27736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27737$as_echo "no" >&6; }
27738fi
27739
27740
27741  test -n "$ac_ct_OBJCOPY" && break
27742done
27743
27744  if test "x$ac_ct_OBJCOPY" = x; then
27745    OBJCOPY=""
27746  else
27747    case $cross_compiling:$ac_tool_warned in
27748yes:)
27749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27751ac_tool_warned=yes ;;
27752esac
27753    OBJCOPY=$ac_ct_OBJCOPY
27754  fi
27755fi
27756
27757    # Only call fixup if objcopy was found.
27758    if test -n "$OBJCOPY"; then
27759
27760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27761
27762  # First separate the path from the arguments. This will split at the first
27763  # space.
27764  complete="$OBJCOPY"
27765  path="${complete%% *}"
27766  tmp="$complete EOL"
27767  arguments="${tmp#* }"
27768
27769  # Input might be given as Windows format, start by converting to
27770  # unix format.
27771  new_path=`$CYGPATH -u "$path"`
27772
27773  # Now try to locate executable using which
27774  new_path=`$WHICH "$new_path" 2> /dev/null`
27775  # bat and cmd files are not always considered executable in cygwin causing which
27776  # to not find them
27777  if test "x$new_path" = x \
27778           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27779           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27780    new_path=`$CYGPATH -u "$path"`
27781  fi
27782  if test "x$new_path" = x; then
27783    # Oops. Which didn't find the executable.
27784    # The splitting of arguments from the executable at a space might have been incorrect,
27785    # since paths with space are more likely in Windows. Give it another try with the whole
27786    # argument.
27787    path="$complete"
27788    arguments="EOL"
27789    new_path=`$CYGPATH -u "$path"`
27790    new_path=`$WHICH "$new_path" 2> /dev/null`
27791    # bat and cmd files are not always considered executable in cygwin causing which
27792    # to not find them
27793    if test "x$new_path" = x \
27794             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27795             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27796      new_path=`$CYGPATH -u "$path"`
27797    fi
27798    if test "x$new_path" = x; then
27799      # It's still not found. Now this is an unrecoverable error.
27800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27801$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27802      has_space=`$ECHO "$complete" | $GREP " "`
27803      if test "x$has_space" != x; then
27804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27806      fi
27807      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27808    fi
27809  fi
27810
27811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27814  # "foo.exe" is OK but "foo" is an error.
27815  #
27816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27817  # It is also a way to make sure we got the proper file name for the real test later on.
27818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27819  if test "x$test_shortpath" = x; then
27820    # Short path failed, file does not exist as specified.
27821    # Try adding .exe or .cmd
27822    if test -f "${new_path}.exe"; then
27823       input_to_shortpath="${new_path}.exe"
27824    elif test -f "${new_path}.cmd"; then
27825       input_to_shortpath="${new_path}.cmd"
27826    else
27827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27828$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27829      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27830$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27831      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27832    fi
27833  else
27834    input_to_shortpath="$new_path"
27835  fi
27836
27837  # Call helper function which possibly converts this using DOS-style short mode.
27838  # If so, the updated path is stored in $new_path.
27839  new_path="$input_to_shortpath"
27840
27841  input_path="$input_to_shortpath"
27842  # Check if we need to convert this using DOS-style short mode. If the path
27843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27844  # take no chances and rewrite it.
27845  # Note: m4 eats our [], so we need to use [ and ] instead.
27846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27847  if test "x$has_forbidden_chars" != x; then
27848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27852      # Going to short mode and back again did indeed matter. Since short mode is
27853      # case insensitive, let's make it lowercase to improve readability.
27854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27855      # Now convert it back to Unix-stile (cygpath)
27856      input_path=`$CYGPATH -u "$shortmode_path"`
27857      new_path="$input_path"
27858    fi
27859  fi
27860
27861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27862  if test "x$test_cygdrive_prefix" = x; then
27863    # As a simple fix, exclude /usr/bin since it's not a real path.
27864    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27866      # a path prefixed by /cygdrive for fixpath to work.
27867      new_path="$CYGWIN_ROOT_PATH$input_path"
27868    fi
27869  fi
27870
27871  # remove trailing .exe if any
27872  new_path="${new_path/%.exe/}"
27873
27874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27875
27876  # First separate the path from the arguments. This will split at the first
27877  # space.
27878  complete="$OBJCOPY"
27879  path="${complete%% *}"
27880  tmp="$complete EOL"
27881  arguments="${tmp#* }"
27882
27883  # Input might be given as Windows format, start by converting to
27884  # unix format.
27885  new_path="$path"
27886
27887  windows_path="$new_path"
27888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27889    unix_path=`$CYGPATH -u "$windows_path"`
27890    new_path="$unix_path"
27891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27893    new_path="$unix_path"
27894  fi
27895
27896
27897  # Now try to locate executable using which
27898  new_path=`$WHICH "$new_path" 2> /dev/null`
27899
27900  if test "x$new_path" = x; then
27901    # Oops. Which didn't find the executable.
27902    # The splitting of arguments from the executable at a space might have been incorrect,
27903    # since paths with space are more likely in Windows. Give it another try with the whole
27904    # argument.
27905    path="$complete"
27906    arguments="EOL"
27907    new_path="$path"
27908
27909  windows_path="$new_path"
27910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27911    unix_path=`$CYGPATH -u "$windows_path"`
27912    new_path="$unix_path"
27913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27915    new_path="$unix_path"
27916  fi
27917
27918
27919    new_path=`$WHICH "$new_path" 2> /dev/null`
27920
27921    if test "x$new_path" = x; then
27922      # It's still not found. Now this is an unrecoverable error.
27923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27924$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27925      has_space=`$ECHO "$complete" | $GREP " "`
27926      if test "x$has_space" != x; then
27927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27929      fi
27930      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27931    fi
27932  fi
27933
27934  # Now new_path has a complete unix path to the binary
27935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27936    # Keep paths in /bin as-is, but remove trailing .exe if any
27937    new_path="${new_path/%.exe/}"
27938    # Do not save /bin paths to all_fixpath_prefixes!
27939  else
27940    # Not in mixed or Windows style, start by that.
27941    new_path=`cmd //c echo $new_path`
27942
27943  input_path="$new_path"
27944  # Check if we need to convert this using DOS-style short mode. If the path
27945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27946  # take no chances and rewrite it.
27947  # Note: m4 eats our [], so we need to use [ and ] instead.
27948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27949  if test "x$has_forbidden_chars" != x; then
27950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27952  fi
27953
27954    # Output is in $new_path
27955
27956  windows_path="$new_path"
27957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27958    unix_path=`$CYGPATH -u "$windows_path"`
27959    new_path="$unix_path"
27960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27962    new_path="$unix_path"
27963  fi
27964
27965    # remove trailing .exe if any
27966    new_path="${new_path/%.exe/}"
27967
27968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27970  fi
27971
27972  else
27973    # We're on a posix platform. Hooray! :)
27974    # First separate the path from the arguments. This will split at the first
27975    # space.
27976    complete="$OBJCOPY"
27977    path="${complete%% *}"
27978    tmp="$complete EOL"
27979    arguments="${tmp#* }"
27980
27981    # Cannot rely on the command "which" here since it doesn't always work.
27982    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27983    if test -z "$is_absolute_path"; then
27984      # Path to executable is not absolute. Find it.
27985      IFS_save="$IFS"
27986      IFS=:
27987      for p in $PATH; do
27988        if test -f "$p/$path" && test -x "$p/$path"; then
27989          new_path="$p/$path"
27990          break
27991        fi
27992      done
27993      IFS="$IFS_save"
27994    else
27995      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27996$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27997      new_path="$path"
27998    fi
27999
28000    if test "x$new_path" = x; then
28001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28002$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28003        has_space=`$ECHO "$complete" | $GREP " "`
28004        if test "x$has_space" != x; then
28005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28007        fi
28008        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28009      fi
28010  fi
28011
28012      # Now join together the path and the arguments once again
28013      if test "x$arguments" != xEOL; then
28014        new_complete="$new_path ${arguments% *}"
28015      else
28016        new_complete="$new_path"
28017      fi
28018
28019  if test "x$complete" != "x$new_complete"; then
28020      OBJCOPY="$new_complete"
28021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28022$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28023    fi
28024
28025    fi
28026fi
28027
28028if test -n "$ac_tool_prefix"; then
28029  for ac_prog in gobjdump objdump
28030  do
28031    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28034$as_echo_n "checking for $ac_word... " >&6; }
28035if ${ac_cv_prog_OBJDUMP+:} false; then :
28036  $as_echo_n "(cached) " >&6
28037else
28038  if test -n "$OBJDUMP"; then
28039  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28040else
28041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28042for as_dir in $PATH
28043do
28044  IFS=$as_save_IFS
28045  test -z "$as_dir" && as_dir=.
28046    for ac_exec_ext in '' $ac_executable_extensions; do
28047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28048    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28050    break 2
28051  fi
28052done
28053  done
28054IFS=$as_save_IFS
28055
28056fi
28057fi
28058OBJDUMP=$ac_cv_prog_OBJDUMP
28059if test -n "$OBJDUMP"; then
28060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28061$as_echo "$OBJDUMP" >&6; }
28062else
28063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28064$as_echo "no" >&6; }
28065fi
28066
28067
28068    test -n "$OBJDUMP" && break
28069  done
28070fi
28071if test -z "$OBJDUMP"; then
28072  ac_ct_OBJDUMP=$OBJDUMP
28073  for ac_prog in gobjdump objdump
28074do
28075  # Extract the first word of "$ac_prog", so it can be a program name with args.
28076set dummy $ac_prog; ac_word=$2
28077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28078$as_echo_n "checking for $ac_word... " >&6; }
28079if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28080  $as_echo_n "(cached) " >&6
28081else
28082  if test -n "$ac_ct_OBJDUMP"; then
28083  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28084else
28085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28086for as_dir in $PATH
28087do
28088  IFS=$as_save_IFS
28089  test -z "$as_dir" && as_dir=.
28090    for ac_exec_ext in '' $ac_executable_extensions; do
28091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28092    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28094    break 2
28095  fi
28096done
28097  done
28098IFS=$as_save_IFS
28099
28100fi
28101fi
28102ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28103if test -n "$ac_ct_OBJDUMP"; then
28104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28105$as_echo "$ac_ct_OBJDUMP" >&6; }
28106else
28107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28108$as_echo "no" >&6; }
28109fi
28110
28111
28112  test -n "$ac_ct_OBJDUMP" && break
28113done
28114
28115  if test "x$ac_ct_OBJDUMP" = x; then
28116    OBJDUMP=""
28117  else
28118    case $cross_compiling:$ac_tool_warned in
28119yes:)
28120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28122ac_tool_warned=yes ;;
28123esac
28124    OBJDUMP=$ac_ct_OBJDUMP
28125  fi
28126fi
28127
28128if test "x$OBJDUMP" != x; then
28129  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28130
28131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132
28133  # First separate the path from the arguments. This will split at the first
28134  # space.
28135  complete="$OBJDUMP"
28136  path="${complete%% *}"
28137  tmp="$complete EOL"
28138  arguments="${tmp#* }"
28139
28140  # Input might be given as Windows format, start by converting to
28141  # unix format.
28142  new_path=`$CYGPATH -u "$path"`
28143
28144  # Now try to locate executable using which
28145  new_path=`$WHICH "$new_path" 2> /dev/null`
28146  # bat and cmd files are not always considered executable in cygwin causing which
28147  # to not find them
28148  if test "x$new_path" = x \
28149           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28150           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28151    new_path=`$CYGPATH -u "$path"`
28152  fi
28153  if test "x$new_path" = x; then
28154    # Oops. Which didn't find the executable.
28155    # The splitting of arguments from the executable at a space might have been incorrect,
28156    # since paths with space are more likely in Windows. Give it another try with the whole
28157    # argument.
28158    path="$complete"
28159    arguments="EOL"
28160    new_path=`$CYGPATH -u "$path"`
28161    new_path=`$WHICH "$new_path" 2> /dev/null`
28162    # bat and cmd files are not always considered executable in cygwin causing which
28163    # to not find them
28164    if test "x$new_path" = x \
28165             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28166             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28167      new_path=`$CYGPATH -u "$path"`
28168    fi
28169    if test "x$new_path" = x; then
28170      # It's still not found. Now this is an unrecoverable error.
28171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28172$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28173      has_space=`$ECHO "$complete" | $GREP " "`
28174      if test "x$has_space" != x; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28177      fi
28178      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28179    fi
28180  fi
28181
28182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28185  # "foo.exe" is OK but "foo" is an error.
28186  #
28187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28188  # It is also a way to make sure we got the proper file name for the real test later on.
28189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28190  if test "x$test_shortpath" = x; then
28191    # Short path failed, file does not exist as specified.
28192    # Try adding .exe or .cmd
28193    if test -f "${new_path}.exe"; then
28194       input_to_shortpath="${new_path}.exe"
28195    elif test -f "${new_path}.cmd"; then
28196       input_to_shortpath="${new_path}.cmd"
28197    else
28198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28199$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28200      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28201$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28202      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28203    fi
28204  else
28205    input_to_shortpath="$new_path"
28206  fi
28207
28208  # Call helper function which possibly converts this using DOS-style short mode.
28209  # If so, the updated path is stored in $new_path.
28210  new_path="$input_to_shortpath"
28211
28212  input_path="$input_to_shortpath"
28213  # Check if we need to convert this using DOS-style short mode. If the path
28214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28215  # take no chances and rewrite it.
28216  # Note: m4 eats our [], so we need to use [ and ] instead.
28217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28218  if test "x$has_forbidden_chars" != x; then
28219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28223      # Going to short mode and back again did indeed matter. Since short mode is
28224      # case insensitive, let's make it lowercase to improve readability.
28225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28226      # Now convert it back to Unix-stile (cygpath)
28227      input_path=`$CYGPATH -u "$shortmode_path"`
28228      new_path="$input_path"
28229    fi
28230  fi
28231
28232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28233  if test "x$test_cygdrive_prefix" = x; then
28234    # As a simple fix, exclude /usr/bin since it's not a real path.
28235    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28237      # a path prefixed by /cygdrive for fixpath to work.
28238      new_path="$CYGWIN_ROOT_PATH$input_path"
28239    fi
28240  fi
28241
28242  # remove trailing .exe if any
28243  new_path="${new_path/%.exe/}"
28244
28245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28246
28247  # First separate the path from the arguments. This will split at the first
28248  # space.
28249  complete="$OBJDUMP"
28250  path="${complete%% *}"
28251  tmp="$complete EOL"
28252  arguments="${tmp#* }"
28253
28254  # Input might be given as Windows format, start by converting to
28255  # unix format.
28256  new_path="$path"
28257
28258  windows_path="$new_path"
28259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28260    unix_path=`$CYGPATH -u "$windows_path"`
28261    new_path="$unix_path"
28262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28264    new_path="$unix_path"
28265  fi
28266
28267
28268  # Now try to locate executable using which
28269  new_path=`$WHICH "$new_path" 2> /dev/null`
28270
28271  if test "x$new_path" = x; then
28272    # Oops. Which didn't find the executable.
28273    # The splitting of arguments from the executable at a space might have been incorrect,
28274    # since paths with space are more likely in Windows. Give it another try with the whole
28275    # argument.
28276    path="$complete"
28277    arguments="EOL"
28278    new_path="$path"
28279
28280  windows_path="$new_path"
28281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28282    unix_path=`$CYGPATH -u "$windows_path"`
28283    new_path="$unix_path"
28284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28286    new_path="$unix_path"
28287  fi
28288
28289
28290    new_path=`$WHICH "$new_path" 2> /dev/null`
28291
28292    if test "x$new_path" = x; then
28293      # It's still not found. Now this is an unrecoverable error.
28294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28295$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28296      has_space=`$ECHO "$complete" | $GREP " "`
28297      if test "x$has_space" != x; then
28298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28300      fi
28301      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28302    fi
28303  fi
28304
28305  # Now new_path has a complete unix path to the binary
28306  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28307    # Keep paths in /bin as-is, but remove trailing .exe if any
28308    new_path="${new_path/%.exe/}"
28309    # Do not save /bin paths to all_fixpath_prefixes!
28310  else
28311    # Not in mixed or Windows style, start by that.
28312    new_path=`cmd //c echo $new_path`
28313
28314  input_path="$new_path"
28315  # Check if we need to convert this using DOS-style short mode. If the path
28316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28317  # take no chances and rewrite it.
28318  # Note: m4 eats our [], so we need to use [ and ] instead.
28319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28320  if test "x$has_forbidden_chars" != x; then
28321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28323  fi
28324
28325    # Output is in $new_path
28326
28327  windows_path="$new_path"
28328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28329    unix_path=`$CYGPATH -u "$windows_path"`
28330    new_path="$unix_path"
28331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28333    new_path="$unix_path"
28334  fi
28335
28336    # remove trailing .exe if any
28337    new_path="${new_path/%.exe/}"
28338
28339    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28340    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28341  fi
28342
28343  else
28344    # We're on a posix platform. Hooray! :)
28345    # First separate the path from the arguments. This will split at the first
28346    # space.
28347    complete="$OBJDUMP"
28348    path="${complete%% *}"
28349    tmp="$complete EOL"
28350    arguments="${tmp#* }"
28351
28352    # Cannot rely on the command "which" here since it doesn't always work.
28353    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28354    if test -z "$is_absolute_path"; then
28355      # Path to executable is not absolute. Find it.
28356      IFS_save="$IFS"
28357      IFS=:
28358      for p in $PATH; do
28359        if test -f "$p/$path" && test -x "$p/$path"; then
28360          new_path="$p/$path"
28361          break
28362        fi
28363      done
28364      IFS="$IFS_save"
28365    else
28366      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28367$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28368      new_path="$path"
28369    fi
28370
28371    if test "x$new_path" = x; then
28372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28373$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28374        has_space=`$ECHO "$complete" | $GREP " "`
28375        if test "x$has_space" != x; then
28376          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28377$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28378        fi
28379        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28380      fi
28381  fi
28382
28383      # Now join together the path and the arguments once again
28384      if test "x$arguments" != xEOL; then
28385        new_complete="$new_path ${arguments% *}"
28386      else
28387        new_complete="$new_path"
28388      fi
28389
28390  if test "x$complete" != "x$new_complete"; then
28391      OBJDUMP="$new_complete"
28392      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28393$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28394    fi
28395
28396fi
28397
28398if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28399   # Extract the first word of "lipo", so it can be a program name with args.
28400set dummy lipo; ac_word=$2
28401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28402$as_echo_n "checking for $ac_word... " >&6; }
28403if ${ac_cv_path_LIPO+:} false; then :
28404  $as_echo_n "(cached) " >&6
28405else
28406  case $LIPO in
28407  [\\/]* | ?:[\\/]*)
28408  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28409  ;;
28410  *)
28411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28412for as_dir in $PATH
28413do
28414  IFS=$as_save_IFS
28415  test -z "$as_dir" && as_dir=.
28416    for ac_exec_ext in '' $ac_executable_extensions; do
28417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28418    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28420    break 2
28421  fi
28422done
28423  done
28424IFS=$as_save_IFS
28425
28426  ;;
28427esac
28428fi
28429LIPO=$ac_cv_path_LIPO
28430if test -n "$LIPO"; then
28431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28432$as_echo "$LIPO" >&6; }
28433else
28434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28435$as_echo "no" >&6; }
28436fi
28437
28438
28439
28440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28441
28442  # First separate the path from the arguments. This will split at the first
28443  # space.
28444  complete="$LIPO"
28445  path="${complete%% *}"
28446  tmp="$complete EOL"
28447  arguments="${tmp#* }"
28448
28449  # Input might be given as Windows format, start by converting to
28450  # unix format.
28451  new_path=`$CYGPATH -u "$path"`
28452
28453  # Now try to locate executable using which
28454  new_path=`$WHICH "$new_path" 2> /dev/null`
28455  # bat and cmd files are not always considered executable in cygwin causing which
28456  # to not find them
28457  if test "x$new_path" = x \
28458           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28459           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28460    new_path=`$CYGPATH -u "$path"`
28461  fi
28462  if test "x$new_path" = x; then
28463    # Oops. Which didn't find the executable.
28464    # The splitting of arguments from the executable at a space might have been incorrect,
28465    # since paths with space are more likely in Windows. Give it another try with the whole
28466    # argument.
28467    path="$complete"
28468    arguments="EOL"
28469    new_path=`$CYGPATH -u "$path"`
28470    new_path=`$WHICH "$new_path" 2> /dev/null`
28471    # bat and cmd files are not always considered executable in cygwin causing which
28472    # to not find them
28473    if test "x$new_path" = x \
28474             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28475             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28476      new_path=`$CYGPATH -u "$path"`
28477    fi
28478    if test "x$new_path" = x; then
28479      # It's still not found. Now this is an unrecoverable error.
28480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28481$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28482      has_space=`$ECHO "$complete" | $GREP " "`
28483      if test "x$has_space" != x; then
28484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28486      fi
28487      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28488    fi
28489  fi
28490
28491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28494  # "foo.exe" is OK but "foo" is an error.
28495  #
28496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28497  # It is also a way to make sure we got the proper file name for the real test later on.
28498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28499  if test "x$test_shortpath" = x; then
28500    # Short path failed, file does not exist as specified.
28501    # Try adding .exe or .cmd
28502    if test -f "${new_path}.exe"; then
28503       input_to_shortpath="${new_path}.exe"
28504    elif test -f "${new_path}.cmd"; then
28505       input_to_shortpath="${new_path}.cmd"
28506    else
28507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28508$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28509      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28510$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28511      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28512    fi
28513  else
28514    input_to_shortpath="$new_path"
28515  fi
28516
28517  # Call helper function which possibly converts this using DOS-style short mode.
28518  # If so, the updated path is stored in $new_path.
28519  new_path="$input_to_shortpath"
28520
28521  input_path="$input_to_shortpath"
28522  # Check if we need to convert this using DOS-style short mode. If the path
28523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28524  # take no chances and rewrite it.
28525  # Note: m4 eats our [], so we need to use [ and ] instead.
28526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28527  if test "x$has_forbidden_chars" != x; then
28528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28532      # Going to short mode and back again did indeed matter. Since short mode is
28533      # case insensitive, let's make it lowercase to improve readability.
28534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28535      # Now convert it back to Unix-stile (cygpath)
28536      input_path=`$CYGPATH -u "$shortmode_path"`
28537      new_path="$input_path"
28538    fi
28539  fi
28540
28541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28542  if test "x$test_cygdrive_prefix" = x; then
28543    # As a simple fix, exclude /usr/bin since it's not a real path.
28544    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28546      # a path prefixed by /cygdrive for fixpath to work.
28547      new_path="$CYGWIN_ROOT_PATH$input_path"
28548    fi
28549  fi
28550
28551  # remove trailing .exe if any
28552  new_path="${new_path/%.exe/}"
28553
28554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28555
28556  # First separate the path from the arguments. This will split at the first
28557  # space.
28558  complete="$LIPO"
28559  path="${complete%% *}"
28560  tmp="$complete EOL"
28561  arguments="${tmp#* }"
28562
28563  # Input might be given as Windows format, start by converting to
28564  # unix format.
28565  new_path="$path"
28566
28567  windows_path="$new_path"
28568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28569    unix_path=`$CYGPATH -u "$windows_path"`
28570    new_path="$unix_path"
28571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28573    new_path="$unix_path"
28574  fi
28575
28576
28577  # Now try to locate executable using which
28578  new_path=`$WHICH "$new_path" 2> /dev/null`
28579
28580  if test "x$new_path" = x; then
28581    # Oops. Which didn't find the executable.
28582    # The splitting of arguments from the executable at a space might have been incorrect,
28583    # since paths with space are more likely in Windows. Give it another try with the whole
28584    # argument.
28585    path="$complete"
28586    arguments="EOL"
28587    new_path="$path"
28588
28589  windows_path="$new_path"
28590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28591    unix_path=`$CYGPATH -u "$windows_path"`
28592    new_path="$unix_path"
28593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28595    new_path="$unix_path"
28596  fi
28597
28598
28599    new_path=`$WHICH "$new_path" 2> /dev/null`
28600
28601    if test "x$new_path" = x; then
28602      # It's still not found. Now this is an unrecoverable error.
28603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28604$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28605      has_space=`$ECHO "$complete" | $GREP " "`
28606      if test "x$has_space" != x; then
28607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28609      fi
28610      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28611    fi
28612  fi
28613
28614  # Now new_path has a complete unix path to the binary
28615  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28616    # Keep paths in /bin as-is, but remove trailing .exe if any
28617    new_path="${new_path/%.exe/}"
28618    # Do not save /bin paths to all_fixpath_prefixes!
28619  else
28620    # Not in mixed or Windows style, start by that.
28621    new_path=`cmd //c echo $new_path`
28622
28623  input_path="$new_path"
28624  # Check if we need to convert this using DOS-style short mode. If the path
28625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626  # take no chances and rewrite it.
28627  # Note: m4 eats our [], so we need to use [ and ] instead.
28628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28629  if test "x$has_forbidden_chars" != x; then
28630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28632  fi
28633
28634    # Output is in $new_path
28635
28636  windows_path="$new_path"
28637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28638    unix_path=`$CYGPATH -u "$windows_path"`
28639    new_path="$unix_path"
28640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28642    new_path="$unix_path"
28643  fi
28644
28645    # remove trailing .exe if any
28646    new_path="${new_path/%.exe/}"
28647
28648    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28649    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28650  fi
28651
28652  else
28653    # We're on a posix platform. Hooray! :)
28654    # First separate the path from the arguments. This will split at the first
28655    # space.
28656    complete="$LIPO"
28657    path="${complete%% *}"
28658    tmp="$complete EOL"
28659    arguments="${tmp#* }"
28660
28661    # Cannot rely on the command "which" here since it doesn't always work.
28662    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28663    if test -z "$is_absolute_path"; then
28664      # Path to executable is not absolute. Find it.
28665      IFS_save="$IFS"
28666      IFS=:
28667      for p in $PATH; do
28668        if test -f "$p/$path" && test -x "$p/$path"; then
28669          new_path="$p/$path"
28670          break
28671        fi
28672      done
28673      IFS="$IFS_save"
28674    else
28675      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28676$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28677      new_path="$path"
28678    fi
28679
28680    if test "x$new_path" = x; then
28681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28682$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28683        has_space=`$ECHO "$complete" | $GREP " "`
28684        if test "x$has_space" != x; then
28685          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28686$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28687        fi
28688        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28689      fi
28690  fi
28691
28692      # Now join together the path and the arguments once again
28693      if test "x$arguments" != xEOL; then
28694        new_complete="$new_path ${arguments% *}"
28695      else
28696        new_complete="$new_path"
28697      fi
28698
28699  if test "x$complete" != "x$new_complete"; then
28700      LIPO="$new_complete"
28701      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28702$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28703    fi
28704
28705fi
28706
28707
28708
28709# Restore old path without tools dir
28710PATH="$OLD_PATH"
28711
28712
28713# FIXME: Currently we must test this after paths but before flags. Fix!
28714
28715# And we can test some aspects on the target using configure macros.
28716
28717
28718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28719$as_echo_n "checking for ANSI C header files... " >&6; }
28720if ${ac_cv_header_stdc+:} false; then :
28721  $as_echo_n "(cached) " >&6
28722else
28723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28724/* end confdefs.h.  */
28725#include <stdlib.h>
28726#include <stdarg.h>
28727#include <string.h>
28728#include <float.h>
28729
28730int
28731main ()
28732{
28733
28734  ;
28735  return 0;
28736}
28737_ACEOF
28738if ac_fn_cxx_try_compile "$LINENO"; then :
28739  ac_cv_header_stdc=yes
28740else
28741  ac_cv_header_stdc=no
28742fi
28743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28744
28745if test $ac_cv_header_stdc = yes; then
28746  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28748/* end confdefs.h.  */
28749#include <string.h>
28750
28751_ACEOF
28752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28753  $EGREP "memchr" >/dev/null 2>&1; then :
28754
28755else
28756  ac_cv_header_stdc=no
28757fi
28758rm -f conftest*
28759
28760fi
28761
28762if test $ac_cv_header_stdc = yes; then
28763  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28765/* end confdefs.h.  */
28766#include <stdlib.h>
28767
28768_ACEOF
28769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28770  $EGREP "free" >/dev/null 2>&1; then :
28771
28772else
28773  ac_cv_header_stdc=no
28774fi
28775rm -f conftest*
28776
28777fi
28778
28779if test $ac_cv_header_stdc = yes; then
28780  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28781  if test "$cross_compiling" = yes; then :
28782  :
28783else
28784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28785/* end confdefs.h.  */
28786#include <ctype.h>
28787#include <stdlib.h>
28788#if ((' ' & 0x0FF) == 0x020)
28789# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28790# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28791#else
28792# define ISLOWER(c) \
28793		   (('a' <= (c) && (c) <= 'i') \
28794		     || ('j' <= (c) && (c) <= 'r') \
28795		     || ('s' <= (c) && (c) <= 'z'))
28796# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28797#endif
28798
28799#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28800int
28801main ()
28802{
28803  int i;
28804  for (i = 0; i < 256; i++)
28805    if (XOR (islower (i), ISLOWER (i))
28806	|| toupper (i) != TOUPPER (i))
28807      return 2;
28808  return 0;
28809}
28810_ACEOF
28811if ac_fn_cxx_try_run "$LINENO"; then :
28812
28813else
28814  ac_cv_header_stdc=no
28815fi
28816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28817  conftest.$ac_objext conftest.beam conftest.$ac_ext
28818fi
28819
28820fi
28821fi
28822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28823$as_echo "$ac_cv_header_stdc" >&6; }
28824if test $ac_cv_header_stdc = yes; then
28825
28826$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28827
28828fi
28829
28830# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28831for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28832		  inttypes.h stdint.h unistd.h
28833do :
28834  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28835ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28836"
28837if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28838  cat >>confdefs.h <<_ACEOF
28839#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28840_ACEOF
28841
28842fi
28843
28844done
28845
28846
28847
28848###############################################################################
28849#
28850# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28851# (The JVM can use 32 or 64 bit Java pointers but that decision
28852# is made at runtime.)
28853#
28854
28855if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28856  # Always specify -m flags on Solaris
28857
28858  # keep track of c/cxx flags that we added outselves...
28859  #   to prevent emitting warning...
28860  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28861
28862
28863  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28864  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28865  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28866
28867  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28868  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28869  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28870
28871elif test "x$COMPILE_TYPE" = xreduced; then
28872  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28873    # Specify -m if running reduced on other Posix platforms
28874
28875  # keep track of c/cxx flags that we added outselves...
28876  #   to prevent emitting warning...
28877  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28878
28879
28880  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28881  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28882  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28883
28884  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28885  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28886  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28887
28888  fi
28889fi
28890
28891# Make compilation sanity check
28892for ac_header in stdio.h
28893do :
28894  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28895if test "x$ac_cv_header_stdio_h" = xyes; then :
28896  cat >>confdefs.h <<_ACEOF
28897#define HAVE_STDIO_H 1
28898_ACEOF
28899
28900else
28901
28902  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28903$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28904  if test "x$COMPILE_TYPE" = xreduced; then
28905    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28906$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28907  elif test "x$COMPILE_TYPE" = xcross; then
28908    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28909$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28910  fi
28911  as_fn_error $? "Cannot continue." "$LINENO" 5
28912
28913fi
28914
28915done
28916
28917
28918# The cast to long int works around a bug in the HP C Compiler
28919# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28920# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28921# This bug is HP SR number 8606223364.
28922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28923$as_echo_n "checking size of int *... " >&6; }
28924if ${ac_cv_sizeof_int_p+:} false; then :
28925  $as_echo_n "(cached) " >&6
28926else
28927  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28928
28929else
28930  if test "$ac_cv_type_int_p" = yes; then
28931     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28933as_fn_error 77 "cannot compute sizeof (int *)
28934See \`config.log' for more details" "$LINENO" 5; }
28935   else
28936     ac_cv_sizeof_int_p=0
28937   fi
28938fi
28939
28940fi
28941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28942$as_echo "$ac_cv_sizeof_int_p" >&6; }
28943
28944
28945
28946cat >>confdefs.h <<_ACEOF
28947#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28948_ACEOF
28949
28950
28951
28952if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28953  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28954  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28955fi
28956
28957if test "x$SIZEOF_INT_P" = x; then
28958    # The test failed, lets stick to the assumed value.
28959    { $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
28960$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28961else
28962    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28963
28964    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28965        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
28966    fi
28967fi
28968
28969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28970$as_echo_n "checking for target address size... " >&6; }
28971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28972$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28973
28974
28975###############################################################################
28976#
28977# Is the target little of big endian?
28978#
28979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28980$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28981if ${ac_cv_c_bigendian+:} false; then :
28982  $as_echo_n "(cached) " >&6
28983else
28984  ac_cv_c_bigendian=unknown
28985    # See if we're dealing with a universal compiler.
28986    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28987/* end confdefs.h.  */
28988#ifndef __APPLE_CC__
28989	       not a universal capable compiler
28990	     #endif
28991	     typedef int dummy;
28992
28993_ACEOF
28994if ac_fn_cxx_try_compile "$LINENO"; then :
28995
28996	# Check for potential -arch flags.  It is not universal unless
28997	# there are at least two -arch flags with different values.
28998	ac_arch=
28999	ac_prev=
29000	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29001	 if test -n "$ac_prev"; then
29002	   case $ac_word in
29003	     i?86 | x86_64 | ppc | ppc64)
29004	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29005		 ac_arch=$ac_word
29006	       else
29007		 ac_cv_c_bigendian=universal
29008		 break
29009	       fi
29010	       ;;
29011	   esac
29012	   ac_prev=
29013	 elif test "x$ac_word" = "x-arch"; then
29014	   ac_prev=arch
29015	 fi
29016       done
29017fi
29018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29019    if test $ac_cv_c_bigendian = unknown; then
29020      # See if sys/param.h defines the BYTE_ORDER macro.
29021      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29022/* end confdefs.h.  */
29023#include <sys/types.h>
29024	     #include <sys/param.h>
29025
29026int
29027main ()
29028{
29029#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29030		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29031		     && LITTLE_ENDIAN)
29032	      bogus endian macros
29033	     #endif
29034
29035  ;
29036  return 0;
29037}
29038_ACEOF
29039if ac_fn_cxx_try_compile "$LINENO"; then :
29040  # It does; now see whether it defined to BIG_ENDIAN or not.
29041	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29042/* end confdefs.h.  */
29043#include <sys/types.h>
29044		#include <sys/param.h>
29045
29046int
29047main ()
29048{
29049#if BYTE_ORDER != BIG_ENDIAN
29050		 not big endian
29051		#endif
29052
29053  ;
29054  return 0;
29055}
29056_ACEOF
29057if ac_fn_cxx_try_compile "$LINENO"; then :
29058  ac_cv_c_bigendian=yes
29059else
29060  ac_cv_c_bigendian=no
29061fi
29062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29063fi
29064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29065    fi
29066    if test $ac_cv_c_bigendian = unknown; then
29067      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29068      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29069/* end confdefs.h.  */
29070#include <limits.h>
29071
29072int
29073main ()
29074{
29075#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29076	      bogus endian macros
29077	     #endif
29078
29079  ;
29080  return 0;
29081}
29082_ACEOF
29083if ac_fn_cxx_try_compile "$LINENO"; then :
29084  # It does; now see whether it defined to _BIG_ENDIAN or not.
29085	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29086/* end confdefs.h.  */
29087#include <limits.h>
29088
29089int
29090main ()
29091{
29092#ifndef _BIG_ENDIAN
29093		 not big endian
29094		#endif
29095
29096  ;
29097  return 0;
29098}
29099_ACEOF
29100if ac_fn_cxx_try_compile "$LINENO"; then :
29101  ac_cv_c_bigendian=yes
29102else
29103  ac_cv_c_bigendian=no
29104fi
29105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29106fi
29107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29108    fi
29109    if test $ac_cv_c_bigendian = unknown; then
29110      # Compile a test program.
29111      if test "$cross_compiling" = yes; then :
29112  # Try to guess by grepping values from an object file.
29113	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29114/* end confdefs.h.  */
29115short int ascii_mm[] =
29116		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29117		short int ascii_ii[] =
29118		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29119		int use_ascii (int i) {
29120		  return ascii_mm[i] + ascii_ii[i];
29121		}
29122		short int ebcdic_ii[] =
29123		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29124		short int ebcdic_mm[] =
29125		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29126		int use_ebcdic (int i) {
29127		  return ebcdic_mm[i] + ebcdic_ii[i];
29128		}
29129		extern int foo;
29130
29131int
29132main ()
29133{
29134return use_ascii (foo) == use_ebcdic (foo);
29135  ;
29136  return 0;
29137}
29138_ACEOF
29139if ac_fn_cxx_try_compile "$LINENO"; then :
29140  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29141	      ac_cv_c_bigendian=yes
29142	    fi
29143	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29144	      if test "$ac_cv_c_bigendian" = unknown; then
29145		ac_cv_c_bigendian=no
29146	      else
29147		# finding both strings is unlikely to happen, but who knows?
29148		ac_cv_c_bigendian=unknown
29149	      fi
29150	    fi
29151fi
29152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29153else
29154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29155/* end confdefs.h.  */
29156$ac_includes_default
29157int
29158main ()
29159{
29160
29161	     /* Are we little or big endian?  From Harbison&Steele.  */
29162	     union
29163	     {
29164	       long int l;
29165	       char c[sizeof (long int)];
29166	     } u;
29167	     u.l = 1;
29168	     return u.c[sizeof (long int) - 1] == 1;
29169
29170  ;
29171  return 0;
29172}
29173_ACEOF
29174if ac_fn_cxx_try_run "$LINENO"; then :
29175  ac_cv_c_bigendian=no
29176else
29177  ac_cv_c_bigendian=yes
29178fi
29179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29180  conftest.$ac_objext conftest.beam conftest.$ac_ext
29181fi
29182
29183    fi
29184fi
29185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29186$as_echo "$ac_cv_c_bigendian" >&6; }
29187 case $ac_cv_c_bigendian in #(
29188   yes)
29189     ENDIAN="big";; #(
29190   no)
29191     ENDIAN="little" ;; #(
29192   universal)
29193     ENDIAN="universal_endianness"
29194     ;; #(
29195   *)
29196     ENDIAN="unknown" ;;
29197 esac
29198
29199
29200if test "x$ENDIAN" = xuniversal_endianness; then
29201    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29202fi
29203if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29204    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
29205fi
29206
29207
29208# Configure flags for the tools
29209
29210
29211###############################################################################
29212#
29213# How to compile shared libraries.
29214#
29215
29216if test "x$GCC" = xyes; then
29217    COMPILER_NAME=gcc
29218    PICFLAG="-fPIC"
29219    LIBRARY_PREFIX=lib
29220    SHARED_LIBRARY='lib$1.so'
29221    STATIC_LIBRARY='lib$1.a'
29222    SHARED_LIBRARY_FLAGS="-shared"
29223    SHARED_LIBRARY_SUFFIX='.so'
29224    STATIC_LIBRARY_SUFFIX='.a'
29225    OBJ_SUFFIX='.o'
29226    EXE_SUFFIX=''
29227    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29228    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29229    C_FLAG_REORDER=''
29230    CXX_FLAG_REORDER=''
29231    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29232    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29233    LD="$CC"
29234    LDEXE="$CC"
29235    LDCXX="$CXX"
29236    LDEXECXX="$CXX"
29237    POST_STRIP_CMD="$STRIP -g"
29238
29239    # Linking is different on MacOSX
29240    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29241        # Might change in the future to clang.
29242        COMPILER_NAME=gcc
29243        SHARED_LIBRARY='lib$1.dylib'
29244        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29245        SHARED_LIBRARY_SUFFIX='.dylib'
29246        EXE_SUFFIX=''
29247        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29248        SET_SHARED_LIBRARY_MAPFILE=''
29249        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29250        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29251        POST_STRIP_CMD="$STRIP -S"
29252    fi
29253else
29254    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29255        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29256        COMPILER_NAME=ossc
29257        PICFLAG="-KPIC"
29258        LIBRARY_PREFIX=lib
29259        SHARED_LIBRARY='lib$1.so'
29260        STATIC_LIBRARY='lib$1.a'
29261        SHARED_LIBRARY_FLAGS="-G"
29262        SHARED_LIBRARY_SUFFIX='.so'
29263        STATIC_LIBRARY_SUFFIX='.a'
29264        OBJ_SUFFIX='.o'
29265        EXE_SUFFIX=''
29266        SET_SHARED_LIBRARY_NAME=''
29267        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29268	C_FLAG_REORDER='-xF'
29269	CXX_FLAG_REORDER='-xF'
29270        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29271        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29272        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29273        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29274        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29275        POST_STRIP_CMD="$STRIP -x"
29276        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29277    fi
29278    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29279        # If it is not gcc, then assume it is the MS Visual Studio compiler
29280        COMPILER_NAME=cl
29281        PICFLAG=""
29282        LIBRARY_PREFIX=
29283        SHARED_LIBRARY='$1.dll'
29284        STATIC_LIBRARY='$1.lib'
29285        SHARED_LIBRARY_FLAGS="-LD"
29286        SHARED_LIBRARY_SUFFIX='.dll'
29287        STATIC_LIBRARY_SUFFIX='.lib'
29288        OBJ_SUFFIX='.obj'
29289        EXE_SUFFIX='.exe'
29290        SET_SHARED_LIBRARY_NAME=''
29291        SET_SHARED_LIBRARY_MAPFILE=''
29292        SET_SHARED_LIBRARY_ORIGIN=''
29293        SET_EXECUTABLE_ORIGIN=''
29294    fi
29295fi
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315# The (cross) compiler is now configured, we can now test capabilities
29316# of the target platform.
29317
29318
29319
29320###############################################################################
29321#
29322# Setup the opt flags for different compilers
29323# and different operating systems.
29324#
29325
29326#
29327# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29328#
29329if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29330    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29331    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29332    CFLAGS="$CFLAGS -mstackrealign"
29333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29334$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29335    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29336/* end confdefs.h.  */
29337int main() { return 0; }
29338_ACEOF
29339if ac_fn_cxx_try_link "$LINENO"; then :
29340
29341		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29342$as_echo "yes" >&6; }
29343
29344else
29345
29346		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29347$as_echo "no" >&6; }
29348	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29349
29350fi
29351rm -f core conftest.err conftest.$ac_objext \
29352    conftest$ac_exeext conftest.$ac_ext
29353fi
29354
29355C_FLAG_DEPS="-MMD -MF"
29356CXX_FLAG_DEPS="-MMD -MF"
29357
29358case $COMPILER_TYPE in
29359  CC )
29360    case $COMPILER_NAME in
29361      gcc )
29362      	case $OPENJDK_TARGET_OS in
29363	  macosx )
29364	    # On MacOSX we optimize for size, something
29365	    # we should do for all platforms?
29366	    C_O_FLAG_HI="-Os"
29367	    C_O_FLAG_NORM="-Os"
29368	    C_O_FLAG_NONE=""
29369	    ;;
29370	  *)
29371	    C_O_FLAG_HI="-O3"
29372	    C_O_FLAG_NORM="-O2"
29373	    C_O_FLAG_NONE="-O0"
29374	    ;;
29375	esac
29376        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29377        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29378        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29379        CFLAGS_DEBUG_SYMBOLS="-g"
29380        CXXFLAGS_DEBUG_SYMBOLS="-g"
29381        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29382            CFLAGS_DEBUG_SYMBOLS="-g1"
29383            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29384        fi
29385        ;;
29386      ossc )
29387        #
29388        # Forte has different names for this with their C++ compiler...
29389        #
29390        C_FLAG_DEPS="-xMMD -xMF"
29391        CXX_FLAG_DEPS="-xMMD -xMF"
29392
29393        # Extra options used with HIGHEST
29394        #
29395        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29396        #          done with care, there are some assumptions below that need to
29397        #          be understood about the use of pointers, and IEEE behavior.
29398        #
29399        # Use non-standard floating point mode (not IEEE 754)
29400        CC_HIGHEST="$CC_HIGHEST -fns"
29401        # Do some simplification of floating point arithmetic (not IEEE 754)
29402        CC_HIGHEST="$CC_HIGHEST -fsimple"
29403        # Use single precision floating point with 'float'
29404        CC_HIGHEST="$CC_HIGHEST -fsingle"
29405        # Assume memory references via basic pointer types do not alias
29406        #   (Source with excessing pointer casting and data access with mixed
29407        #    pointer types are not recommended)
29408        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29409        # Use intrinsic or inline versions for math/std functions
29410        #   (If you expect perfect errno behavior, do not use this)
29411        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29412        # Loop data dependency optimizations (need -xO3 or higher)
29413        CC_HIGHEST="$CC_HIGHEST -xdepend"
29414        # Pointer parameters to functions do not overlap
29415        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29416        #    If you pass in multiple pointers to the same data, do not use this)
29417        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29418        # Inline some library routines
29419        #   (If you expect perfect errno behavior, do not use this)
29420        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29421        # Use optimized math routines
29422        #   (If you expect perfect errno behavior, do not use this)
29423        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29424        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29425
29426        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29427          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29428          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29429        fi
29430
29431        case $OPENJDK_TARGET_CPU_ARCH in
29432          x86)
29433            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29434            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29435            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29436            C_O_FLAG_NONE="-xregs=no%frameptr"
29437            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29438            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29439            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29440            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29441            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29442               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29443               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29444            fi
29445            ;;
29446          sparc)
29447            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29448            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29449            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29450            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29451            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29452            C_O_FLAG_NONE=""
29453            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29454            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29455            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29456            CXX_O_FLAG_NONE=""
29457            ;;
29458        esac
29459
29460    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29461    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29462    esac
29463    ;;
29464  CL )
29465    C_O_FLAG_HIGHEST="-O2"
29466    C_O_FLAG_HI="-O1"
29467    C_O_FLAG_NORM="-O1"
29468    C_O_FLAG_NONE="-Od"
29469    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29470    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29471    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29472    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29473    ;;
29474esac
29475
29476if test -z "$C_O_FLAG_HIGHEST"; then
29477   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29478fi
29479
29480if test -z "$CXX_O_FLAG_HIGHEST"; then
29481   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29482fi
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29498   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29499$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29500fi
29501
29502if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29503   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29504$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29505fi
29506
29507if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29508   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29509$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29510fi
29511
29512
29513# Check whether --with-extra-cflags was given.
29514if test "${with_extra_cflags+set}" = set; then :
29515  withval=$with_extra_cflags;
29516fi
29517
29518
29519
29520# Check whether --with-extra-cxxflags was given.
29521if test "${with_extra_cxxflags+set}" = set; then :
29522  withval=$with_extra_cxxflags;
29523fi
29524
29525
29526
29527# Check whether --with-extra-ldflags was given.
29528if test "${with_extra_ldflags+set}" = set; then :
29529  withval=$with_extra_ldflags;
29530fi
29531
29532
29533CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29534CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29535LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29536
29537# Hotspot needs these set in their legacy form
29538LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29539LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29540LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29541
29542
29543
29544
29545
29546###############################################################################
29547#
29548# Now setup the CFLAGS and LDFLAGS for the JDK build.
29549# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29550#
29551case $COMPILER_NAME in
29552      gcc )
29553      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29554                          -pipe \
29555                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29556	  case $OPENJDK_TARGET_CPU_ARCH in
29557	  arm )
29558            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29559	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29560	  ;;
29561	  ppc )
29562            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29563	  ;;
29564	  * )
29565	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29566	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29567          ;;
29568	  esac
29569          ;;
29570      ossc )
29571          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29572          case $OPENJDK_TARGET_CPU_ARCH in
29573          x86 )
29574            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29575       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29576          ;;
29577          esac
29578
29579      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29580      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29581
29582          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29583          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29584          ;;
29585      cl )
29586          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29587               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29588	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29589	       -DWIN32 -DIAL"
29590          case $OPENJDK_TARGET_CPU in
29591              x86 )
29592                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29593                  ;;
29594              x86_64 )
29595                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29596                  ;;
29597          esac
29598          ;;
29599esac
29600
29601###############################################################################
29602
29603# Adjust flags according to debug level.
29604case $DEBUG_LEVEL in
29605      fastdebug )
29606              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29607              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29608	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29609	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29610	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29611	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29612              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29613              ;;
29614      slowdebug )
29615              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29616              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29617	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29618	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29619	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29620	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29621              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29622              ;;
29623esac
29624
29625CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29626
29627# The package path is used only on macosx?
29628PACKAGE_PATH=/opt/local
29629
29630
29631if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29632    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29633    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29634    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29635    #   Note: -Dmacro         is the same as    #define macro 1
29636    #         -Dmacro=	    is the same as    #define macro
29637    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29638        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29639    else
29640        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29641    fi
29642else
29643    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29644fi
29645if test "x$OPENJDK_TARGET_OS" = xlinux; then
29646    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29647fi
29648if test "x$OPENJDK_TARGET_OS" = xwindows; then
29649    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29650fi
29651if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29652    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29653fi
29654if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29655    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29656    # Setting these parameters makes it an error to link to macosx APIs that are
29657    # newer than the given OS version and makes the linked binaries compatible even
29658    # if built on a newer version of the OS.
29659    # The expected format is X.Y.Z
29660    MACOSX_VERSION_MIN=10.7.0
29661
29662    # The macro takes the version with no dots, ex: 1070
29663    # Let the flags variables get resolved in make for easier override on make
29664    # command line.
29665    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29666    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29667fi
29668if test "x$OPENJDK_TARGET_OS" = xbsd; then
29669    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29670fi
29671if test "x$DEBUG_LEVEL" = xrelease; then
29672    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29673    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29674        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29675    fi
29676else
29677    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29678fi
29679
29680CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29681CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29682
29683CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29684        -I${JDK_OUTPUTDIR}/include \
29685        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29686        -I${JDK_TOPDIR}/src/share/javavm/export \
29687        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29688        -I${JDK_TOPDIR}/src/share/native/common \
29689        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29690
29691# The shared libraries are compiled using the picflag.
29692CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29693CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29694
29695# Executable flags
29696CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29697CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29698
29699# Now this is odd. The JDK native libraries have to link against libjvm.so
29700# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29701# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29702# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29703# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29704# libraries will link to whatever is in memory. Yuck.
29705#
29706# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29707if test "x$COMPILER_NAME" = xcl; then
29708    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29709    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29710        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29711    fi
29712    # TODO: make -debug optional "--disable-full-debug-symbols"
29713    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29714    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29715    LDFLAGS_JDKLIB_SUFFIX=""
29716    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29717        LDFLAGS_STACK_SIZE=1048576
29718    else
29719        LDFLAGS_STACK_SIZE=327680
29720    fi
29721    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29722else
29723    if test "x$COMPILER_NAME" = xgcc; then
29724        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29725        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29726        if test -n "$HAS_GNU_HASH"; then
29727            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29728        fi
29729        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29730          # And since we now know that the linker is gnu, then add -z defs, to forbid
29731          # undefined symbols in object files.
29732          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29733          if test "x$DEBUG_LEVEL" = "xrelease"; then
29734              # When building release libraries, tell the linker optimize them.
29735              # Should this be supplied to the OSS linker as well?
29736              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29737          fi
29738        fi
29739    fi
29740    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29741                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29742
29743    # On some platforms (mac) the linker warns about non existing -L dirs.
29744    # Add server first if available. Linking aginst client does not always produce the same results.
29745    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29746    # Default to server for other variants.
29747    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29748        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29749    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29750        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29751    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29752        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29753    else
29754        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29755    fi
29756
29757    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29758    if test "x$COMPILER_NAME" = xossc; then
29759        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29760    fi
29761
29762    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29763    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29764        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29765    fi
29766fi
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782  # Some Zero and Shark settings.
29783  # ZERO_ARCHFLAG tells the compiler which mode to build for
29784  case "${OPENJDK_TARGET_CPU}" in
29785    s390)
29786      ZERO_ARCHFLAG="-m31"
29787      ;;
29788    *)
29789      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29790  esac
29791
29792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29793$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29794  supports=yes
29795
29796  saved_cflags="$CFLAGS"
29797  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29798  ac_ext=c
29799ac_cpp='$CPP $CPPFLAGS'
29800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29802ac_compiler_gnu=$ac_cv_c_compiler_gnu
29803
29804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29805/* end confdefs.h.  */
29806
29807    int i;
29808
29809_ACEOF
29810if ac_fn_c_try_compile "$LINENO"; then :
29811
29812else
29813  supports=no
29814fi
29815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29816  ac_ext=cpp
29817ac_cpp='$CXXCPP $CPPFLAGS'
29818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29821
29822  CFLAGS="$saved_cflags"
29823
29824  saved_cxxflags="$CXXFLAGS"
29825  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29826  ac_ext=cpp
29827ac_cpp='$CXXCPP $CPPFLAGS'
29828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29831
29832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29833/* end confdefs.h.  */
29834
29835    int i;
29836
29837_ACEOF
29838if ac_fn_cxx_try_compile "$LINENO"; then :
29839
29840else
29841  supports=no
29842fi
29843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29844  ac_ext=cpp
29845ac_cpp='$CXXCPP $CPPFLAGS'
29846ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29847ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29848ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29849
29850  CXXFLAGS="$saved_cxxflags"
29851
29852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29853$as_echo "$supports" >&6; }
29854  if test "x$supports" = "xyes" ; then
29855    :
29856  else
29857    ZERO_ARCHFLAG=""
29858  fi
29859
29860
29861
29862  # Check that the compiler supports -mX flags
29863  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29864
29865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29866$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29867  supports=yes
29868
29869  saved_cflags="$CFLAGS"
29870  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29871  ac_ext=c
29872ac_cpp='$CPP $CPPFLAGS'
29873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29875ac_compiler_gnu=$ac_cv_c_compiler_gnu
29876
29877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29878/* end confdefs.h.  */
29879
29880    int i;
29881
29882_ACEOF
29883if ac_fn_c_try_compile "$LINENO"; then :
29884
29885else
29886  supports=no
29887fi
29888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29889  ac_ext=cpp
29890ac_cpp='$CXXCPP $CPPFLAGS'
29891ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29892ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29893ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29894
29895  CFLAGS="$saved_cflags"
29896
29897  saved_cxxflags="$CXXFLAGS"
29898  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29899  ac_ext=cpp
29900ac_cpp='$CXXCPP $CPPFLAGS'
29901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29904
29905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29906/* end confdefs.h.  */
29907
29908    int i;
29909
29910_ACEOF
29911if ac_fn_cxx_try_compile "$LINENO"; then :
29912
29913else
29914  supports=no
29915fi
29916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29917  ac_ext=cpp
29918ac_cpp='$CXXCPP $CPPFLAGS'
29919ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29920ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29921ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29922
29923  CXXFLAGS="$saved_cxxflags"
29924
29925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29926$as_echo "$supports" >&6; }
29927  if test "x$supports" = "xyes" ; then
29928    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29929  else
29930    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29931  fi
29932
29933
29934
29935
29936  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
29937  USING_BROKEN_SUSE_LD=no
29938  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
29939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
29940$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
29941    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
29942    echo "int main() { }" > main.c
29943    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
29944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29945$as_echo "no" >&6; }
29946      USING_BROKEN_SUSE_LD=no
29947    else
29948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29949$as_echo "yes" >&6; }
29950      USING_BROKEN_SUSE_LD=yes
29951    fi
29952    rm -rf version-script.map main.c
29953  fi
29954
29955
29956
29957# Setup debug symbols (need objcopy from the toolchain for that)
29958
29959#
29960# ENABLE_DEBUG_SYMBOLS
29961# This must be done after the toolchain is setup, since we're looking at objcopy.
29962#
29963# Check whether --enable-debug-symbols was given.
29964if test "${enable_debug_symbols+set}" = set; then :
29965  enableval=$enable_debug_symbols;
29966fi
29967
29968
29969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29970$as_echo_n "checking if we should generate debug symbols... " >&6; }
29971
29972if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29973   # explicit enabling of enable-debug-symbols and can't find objcopy
29974   #   this is an error
29975   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29976fi
29977
29978if test "x$enable_debug_symbols" = "xyes"; then
29979  ENABLE_DEBUG_SYMBOLS=true
29980elif test "x$enable_debug_symbols" = "xno"; then
29981  ENABLE_DEBUG_SYMBOLS=false
29982else
29983  # default on macosx is false
29984  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29985    ENABLE_DEBUG_SYMBOLS=false
29986  # Default is on if objcopy is found, otherwise off
29987  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29988    ENABLE_DEBUG_SYMBOLS=true
29989  else
29990    ENABLE_DEBUG_SYMBOLS=false
29991  fi
29992fi
29993
29994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29995$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29996
29997#
29998# ZIP_DEBUGINFO_FILES
29999#
30000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30001$as_echo_n "checking if we should zip debug-info files... " >&6; }
30002# Check whether --enable-zip-debug-info was given.
30003if test "${enable_zip_debug_info+set}" = set; then :
30004  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30005else
30006  enable_zip_debug_info="yes"
30007fi
30008
30009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30010$as_echo "${enable_zip_debug_info}" >&6; }
30011
30012if test "x${enable_zip_debug_info}" = "xno"; then
30013   ZIP_DEBUGINFO_FILES=false
30014else
30015   ZIP_DEBUGINFO_FILES=true
30016fi
30017
30018
30019
30020
30021
30022
30023
30024###############################################################################
30025#
30026# Check dependencies for external and internal libraries.
30027#
30028###############################################################################
30029
30030
30031
30032###############################################################################
30033#
30034# OS specific settings that we never will need to probe.
30035#
30036if test "x$OPENJDK_TARGET_OS" = xlinux; then
30037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30038$as_echo_n "checking what is not needed on Linux?... " >&6; }
30039    PULSE_NOT_NEEDED=yes
30040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30041$as_echo "pulse" >&6; }
30042fi
30043
30044if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30046$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30047    ALSA_NOT_NEEDED=yes
30048    PULSE_NOT_NEEDED=yes
30049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30050$as_echo "alsa pulse" >&6; }
30051fi
30052
30053if test "x$OPENJDK_TARGET_OS" = xwindows; then
30054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30055$as_echo_n "checking what is not needed on Windows?... " >&6; }
30056    CUPS_NOT_NEEDED=yes
30057    ALSA_NOT_NEEDED=yes
30058    PULSE_NOT_NEEDED=yes
30059    X11_NOT_NEEDED=yes
30060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30061$as_echo "alsa cups pulse x11" >&6; }
30062fi
30063
30064if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30066$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30067    ALSA_NOT_NEEDED=yes
30068    PULSE_NOT_NEEDED=yes
30069    X11_NOT_NEEDED=yes
30070    FREETYPE2_NOT_NEEDED=yes
30071    # If the java runtime framework is disabled, then we need X11.
30072    # This will be adjusted below.
30073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30074$as_echo "alsa pulse x11" >&6; }
30075fi
30076
30077if test "x$OPENJDK_TARGET_OS" = xbsd; then
30078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30079$as_echo_n "checking what is not needed on bsd?... " >&6; }
30080    ALSA_NOT_NEEDED=yes
30081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30082$as_echo "alsa" >&6; }
30083fi
30084
30085if test "x$OPENJDK" = "xfalse"; then
30086    FREETYPE2_NOT_NEEDED=yes
30087fi
30088
30089if test "x$SUPPORT_HEADFUL" = xno; then
30090    X11_NOT_NEEDED=yes
30091fi
30092
30093###############################################################################
30094#
30095# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30096# that uses this API.
30097#
30098# Check whether --enable-macosx-runtime-support was given.
30099if test "${enable_macosx_runtime_support+set}" = set; then :
30100  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30101else
30102  MACOSX_RUNTIME_SUPPORT="no"
30103fi
30104
30105
30106USE_MACOSX_RUNTIME_SUPPORT=no
30107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30108$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30109if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30110    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30111        MACOSX_RUNTIME_SUPPORT=yes
30112        USE_MACOSX_RUNTIME_SUPPORT=yes
30113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30114$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30115    else
30116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30117$as_echo "yes, but explicitly disabled." >&6; }
30118    fi
30119else
30120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30121$as_echo "no" >&6; }
30122fi
30123
30124if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30126$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30127    X11_NOT_NEEDED=
30128    FREETYPE2_NOT_NEEDED=
30129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30130$as_echo "alsa pulse" >&6; }
30131fi
30132
30133
30134
30135###############################################################################
30136#
30137# Check for X Windows
30138#
30139
30140# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30141# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30142# --x-libraries for the sysroot, if that seems to be correct.
30143if test "x$SYS_ROOT" != "x/"; then
30144  if test "x$x_includes" = xNONE; then
30145    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30146      x_includes="$SYS_ROOT/usr/X11R6/include"
30147    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30148      x_includes="$SYS_ROOT/usr/include"
30149    fi
30150  fi
30151  if test "x$x_libraries" = xNONE; then
30152    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30153      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30154    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30155      x_libraries="$SYS_ROOT/usr/lib64"
30156    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30157      x_libraries="$SYS_ROOT/usr/lib"
30158    fi
30159  fi
30160fi
30161
30162# Now let autoconf do it's magic
30163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30164$as_echo_n "checking for X... " >&6; }
30165
30166
30167# Check whether --with-x was given.
30168if test "${with_x+set}" = set; then :
30169  withval=$with_x;
30170fi
30171
30172# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30173if test "x$with_x" = xno; then
30174  # The user explicitly disabled X.
30175  have_x=disabled
30176else
30177  case $x_includes,$x_libraries in #(
30178    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30179    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30180  $as_echo_n "(cached) " >&6
30181else
30182  # One or both of the vars are not set, and there is no cached value.
30183ac_x_includes=no ac_x_libraries=no
30184rm -f -r conftest.dir
30185if mkdir conftest.dir; then
30186  cd conftest.dir
30187  cat >Imakefile <<'_ACEOF'
30188incroot:
30189	@echo incroot='${INCROOT}'
30190usrlibdir:
30191	@echo usrlibdir='${USRLIBDIR}'
30192libdir:
30193	@echo libdir='${LIBDIR}'
30194_ACEOF
30195  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30196    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30197    for ac_var in incroot usrlibdir libdir; do
30198      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30199    done
30200    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30201    for ac_extension in a so sl dylib la dll; do
30202      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30203	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30204	ac_im_usrlibdir=$ac_im_libdir; break
30205      fi
30206    done
30207    # Screen out bogus values from the imake configuration.  They are
30208    # bogus both because they are the default anyway, and because
30209    # using them would break gcc on systems where it needs fixed includes.
30210    case $ac_im_incroot in
30211	/usr/include) ac_x_includes= ;;
30212	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30213    esac
30214    case $ac_im_usrlibdir in
30215	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30216	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30217    esac
30218  fi
30219  cd ..
30220  rm -f -r conftest.dir
30221fi
30222
30223# Standard set of common directories for X headers.
30224# Check X11 before X11Rn because it is often a symlink to the current release.
30225ac_x_header_dirs='
30226/usr/X11/include
30227/usr/X11R7/include
30228/usr/X11R6/include
30229/usr/X11R5/include
30230/usr/X11R4/include
30231
30232/usr/include/X11
30233/usr/include/X11R7
30234/usr/include/X11R6
30235/usr/include/X11R5
30236/usr/include/X11R4
30237
30238/usr/local/X11/include
30239/usr/local/X11R7/include
30240/usr/local/X11R6/include
30241/usr/local/X11R5/include
30242/usr/local/X11R4/include
30243
30244/usr/local/include/X11
30245/usr/local/include/X11R7
30246/usr/local/include/X11R6
30247/usr/local/include/X11R5
30248/usr/local/include/X11R4
30249
30250/usr/X386/include
30251/usr/x386/include
30252/usr/XFree86/include/X11
30253
30254/usr/include
30255/usr/local/include
30256/usr/unsupported/include
30257/usr/athena/include
30258/usr/local/x11r5/include
30259/usr/lpp/Xamples/include
30260
30261/usr/openwin/include
30262/usr/openwin/share/include'
30263
30264if test "$ac_x_includes" = no; then
30265  # Guess where to find include files, by looking for Xlib.h.
30266  # First, try using that file with no special directory specified.
30267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30268/* end confdefs.h.  */
30269#include <X11/Xlib.h>
30270_ACEOF
30271if ac_fn_cxx_try_cpp "$LINENO"; then :
30272  # We can compile using X headers with no special include directory.
30273ac_x_includes=
30274else
30275  for ac_dir in $ac_x_header_dirs; do
30276  if test -r "$ac_dir/X11/Xlib.h"; then
30277    ac_x_includes=$ac_dir
30278    break
30279  fi
30280done
30281fi
30282rm -f conftest.err conftest.i conftest.$ac_ext
30283fi # $ac_x_includes = no
30284
30285if test "$ac_x_libraries" = no; then
30286  # Check for the libraries.
30287  # See if we find them without any special options.
30288  # Don't add to $LIBS permanently.
30289  ac_save_LIBS=$LIBS
30290  LIBS="-lX11 $LIBS"
30291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30292/* end confdefs.h.  */
30293#include <X11/Xlib.h>
30294int
30295main ()
30296{
30297XrmInitialize ()
30298  ;
30299  return 0;
30300}
30301_ACEOF
30302if ac_fn_cxx_try_link "$LINENO"; then :
30303  LIBS=$ac_save_LIBS
30304# We can link X programs with no special library path.
30305ac_x_libraries=
30306else
30307  LIBS=$ac_save_LIBS
30308for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30309do
30310  # Don't even attempt the hair of trying to link an X program!
30311  for ac_extension in a so sl dylib la dll; do
30312    if test -r "$ac_dir/libX11.$ac_extension"; then
30313      ac_x_libraries=$ac_dir
30314      break 2
30315    fi
30316  done
30317done
30318fi
30319rm -f core conftest.err conftest.$ac_objext \
30320    conftest$ac_exeext conftest.$ac_ext
30321fi # $ac_x_libraries = no
30322
30323case $ac_x_includes,$ac_x_libraries in #(
30324  no,* | *,no | *\'*)
30325    # Didn't find X, or a directory has "'" in its name.
30326    ac_cv_have_x="have_x=no";; #(
30327  *)
30328    # Record where we found X for the cache.
30329    ac_cv_have_x="have_x=yes\
30330	ac_x_includes='$ac_x_includes'\
30331	ac_x_libraries='$ac_x_libraries'"
30332esac
30333fi
30334;; #(
30335    *) have_x=yes;;
30336  esac
30337  eval "$ac_cv_have_x"
30338fi # $with_x != no
30339
30340if test "$have_x" != yes; then
30341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30342$as_echo "$have_x" >&6; }
30343  no_x=yes
30344else
30345  # If each of the values was on the command line, it overrides each guess.
30346  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30347  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30348  # Update the cache value to reflect the command line values.
30349  ac_cv_have_x="have_x=yes\
30350	ac_x_includes='$x_includes'\
30351	ac_x_libraries='$x_libraries'"
30352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30353$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30354fi
30355
30356if test "$no_x" = yes; then
30357  # Not all programs may use this symbol, but it does not hurt to define it.
30358
30359$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30360
30361  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30362else
30363  if test -n "$x_includes"; then
30364    X_CFLAGS="$X_CFLAGS -I$x_includes"
30365  fi
30366
30367  # It would also be nice to do this for all -L options, not just this one.
30368  if test -n "$x_libraries"; then
30369    X_LIBS="$X_LIBS -L$x_libraries"
30370    # For Solaris; some versions of Sun CC require a space after -R and
30371    # others require no space.  Words are not sufficient . . . .
30372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30373$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30374    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30375    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30376    ac_cxx_werror_flag=yes
30377    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30378/* end confdefs.h.  */
30379
30380int
30381main ()
30382{
30383
30384  ;
30385  return 0;
30386}
30387_ACEOF
30388if ac_fn_cxx_try_link "$LINENO"; then :
30389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30390$as_echo "no" >&6; }
30391       X_LIBS="$X_LIBS -R$x_libraries"
30392else
30393  LIBS="$ac_xsave_LIBS -R $x_libraries"
30394       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30395/* end confdefs.h.  */
30396
30397int
30398main ()
30399{
30400
30401  ;
30402  return 0;
30403}
30404_ACEOF
30405if ac_fn_cxx_try_link "$LINENO"; then :
30406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30407$as_echo "yes" >&6; }
30408	  X_LIBS="$X_LIBS -R $x_libraries"
30409else
30410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30411$as_echo "neither works" >&6; }
30412fi
30413rm -f core conftest.err conftest.$ac_objext \
30414    conftest$ac_exeext conftest.$ac_ext
30415fi
30416rm -f core conftest.err conftest.$ac_objext \
30417    conftest$ac_exeext conftest.$ac_ext
30418    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30419    LIBS=$ac_xsave_LIBS
30420  fi
30421
30422  # Check for system-dependent libraries X programs must link with.
30423  # Do this before checking for the system-independent R6 libraries
30424  # (-lICE), since we may need -lsocket or whatever for X linking.
30425
30426  if test "$ISC" = yes; then
30427    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30428  else
30429    # Martyn Johnson says this is needed for Ultrix, if the X
30430    # libraries were built with DECnet support.  And Karl Berry says
30431    # the Alpha needs dnet_stub (dnet does not exist).
30432    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30433    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30434/* end confdefs.h.  */
30435
30436/* Override any GCC internal prototype to avoid an error.
30437   Use char because int might match the return type of a GCC
30438   builtin and then its argument prototype would still apply.  */
30439#ifdef __cplusplus
30440extern "C"
30441#endif
30442char XOpenDisplay ();
30443int
30444main ()
30445{
30446return XOpenDisplay ();
30447  ;
30448  return 0;
30449}
30450_ACEOF
30451if ac_fn_cxx_try_link "$LINENO"; then :
30452
30453else
30454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30455$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30456if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30457  $as_echo_n "(cached) " >&6
30458else
30459  ac_check_lib_save_LIBS=$LIBS
30460LIBS="-ldnet  $LIBS"
30461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30462/* end confdefs.h.  */
30463
30464/* Override any GCC internal prototype to avoid an error.
30465   Use char because int might match the return type of a GCC
30466   builtin and then its argument prototype would still apply.  */
30467#ifdef __cplusplus
30468extern "C"
30469#endif
30470char dnet_ntoa ();
30471int
30472main ()
30473{
30474return dnet_ntoa ();
30475  ;
30476  return 0;
30477}
30478_ACEOF
30479if ac_fn_cxx_try_link "$LINENO"; then :
30480  ac_cv_lib_dnet_dnet_ntoa=yes
30481else
30482  ac_cv_lib_dnet_dnet_ntoa=no
30483fi
30484rm -f core conftest.err conftest.$ac_objext \
30485    conftest$ac_exeext conftest.$ac_ext
30486LIBS=$ac_check_lib_save_LIBS
30487fi
30488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30489$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30490if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30491  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30492fi
30493
30494    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30496$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30497if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30498  $as_echo_n "(cached) " >&6
30499else
30500  ac_check_lib_save_LIBS=$LIBS
30501LIBS="-ldnet_stub  $LIBS"
30502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30503/* end confdefs.h.  */
30504
30505/* Override any GCC internal prototype to avoid an error.
30506   Use char because int might match the return type of a GCC
30507   builtin and then its argument prototype would still apply.  */
30508#ifdef __cplusplus
30509extern "C"
30510#endif
30511char dnet_ntoa ();
30512int
30513main ()
30514{
30515return dnet_ntoa ();
30516  ;
30517  return 0;
30518}
30519_ACEOF
30520if ac_fn_cxx_try_link "$LINENO"; then :
30521  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30522else
30523  ac_cv_lib_dnet_stub_dnet_ntoa=no
30524fi
30525rm -f core conftest.err conftest.$ac_objext \
30526    conftest$ac_exeext conftest.$ac_ext
30527LIBS=$ac_check_lib_save_LIBS
30528fi
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30530$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30531if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30532  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30533fi
30534
30535    fi
30536fi
30537rm -f core conftest.err conftest.$ac_objext \
30538    conftest$ac_exeext conftest.$ac_ext
30539    LIBS="$ac_xsave_LIBS"
30540
30541    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30542    # to get the SysV transport functions.
30543    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30544    # needs -lnsl.
30545    # The nsl library prevents programs from opening the X display
30546    # on Irix 5.2, according to T.E. Dickey.
30547    # The functions gethostbyname, getservbyname, and inet_addr are
30548    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30549    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30550if test "x$ac_cv_func_gethostbyname" = xyes; then :
30551
30552fi
30553
30554    if test $ac_cv_func_gethostbyname = no; then
30555      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30556$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30557if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30558  $as_echo_n "(cached) " >&6
30559else
30560  ac_check_lib_save_LIBS=$LIBS
30561LIBS="-lnsl  $LIBS"
30562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30563/* end confdefs.h.  */
30564
30565/* Override any GCC internal prototype to avoid an error.
30566   Use char because int might match the return type of a GCC
30567   builtin and then its argument prototype would still apply.  */
30568#ifdef __cplusplus
30569extern "C"
30570#endif
30571char gethostbyname ();
30572int
30573main ()
30574{
30575return gethostbyname ();
30576  ;
30577  return 0;
30578}
30579_ACEOF
30580if ac_fn_cxx_try_link "$LINENO"; then :
30581  ac_cv_lib_nsl_gethostbyname=yes
30582else
30583  ac_cv_lib_nsl_gethostbyname=no
30584fi
30585rm -f core conftest.err conftest.$ac_objext \
30586    conftest$ac_exeext conftest.$ac_ext
30587LIBS=$ac_check_lib_save_LIBS
30588fi
30589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30590$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30591if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30592  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30593fi
30594
30595      if test $ac_cv_lib_nsl_gethostbyname = no; then
30596	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30597$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30598if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30599  $as_echo_n "(cached) " >&6
30600else
30601  ac_check_lib_save_LIBS=$LIBS
30602LIBS="-lbsd  $LIBS"
30603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30604/* end confdefs.h.  */
30605
30606/* Override any GCC internal prototype to avoid an error.
30607   Use char because int might match the return type of a GCC
30608   builtin and then its argument prototype would still apply.  */
30609#ifdef __cplusplus
30610extern "C"
30611#endif
30612char gethostbyname ();
30613int
30614main ()
30615{
30616return gethostbyname ();
30617  ;
30618  return 0;
30619}
30620_ACEOF
30621if ac_fn_cxx_try_link "$LINENO"; then :
30622  ac_cv_lib_bsd_gethostbyname=yes
30623else
30624  ac_cv_lib_bsd_gethostbyname=no
30625fi
30626rm -f core conftest.err conftest.$ac_objext \
30627    conftest$ac_exeext conftest.$ac_ext
30628LIBS=$ac_check_lib_save_LIBS
30629fi
30630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30631$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30632if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30633  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30634fi
30635
30636      fi
30637    fi
30638
30639    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30640    # socket/setsockopt and other routines are undefined under SCO ODT
30641    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30642    # on later versions), says Simon Leinen: it contains gethostby*
30643    # variants that don't use the name server (or something).  -lsocket
30644    # must be given before -lnsl if both are needed.  We assume that
30645    # if connect needs -lnsl, so does gethostbyname.
30646    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30647if test "x$ac_cv_func_connect" = xyes; then :
30648
30649fi
30650
30651    if test $ac_cv_func_connect = no; then
30652      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30653$as_echo_n "checking for connect in -lsocket... " >&6; }
30654if ${ac_cv_lib_socket_connect+:} false; then :
30655  $as_echo_n "(cached) " >&6
30656else
30657  ac_check_lib_save_LIBS=$LIBS
30658LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30660/* end confdefs.h.  */
30661
30662/* Override any GCC internal prototype to avoid an error.
30663   Use char because int might match the return type of a GCC
30664   builtin and then its argument prototype would still apply.  */
30665#ifdef __cplusplus
30666extern "C"
30667#endif
30668char connect ();
30669int
30670main ()
30671{
30672return connect ();
30673  ;
30674  return 0;
30675}
30676_ACEOF
30677if ac_fn_cxx_try_link "$LINENO"; then :
30678  ac_cv_lib_socket_connect=yes
30679else
30680  ac_cv_lib_socket_connect=no
30681fi
30682rm -f core conftest.err conftest.$ac_objext \
30683    conftest$ac_exeext conftest.$ac_ext
30684LIBS=$ac_check_lib_save_LIBS
30685fi
30686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30687$as_echo "$ac_cv_lib_socket_connect" >&6; }
30688if test "x$ac_cv_lib_socket_connect" = xyes; then :
30689  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30690fi
30691
30692    fi
30693
30694    # Guillermo Gomez says -lposix is necessary on A/UX.
30695    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30696if test "x$ac_cv_func_remove" = xyes; then :
30697
30698fi
30699
30700    if test $ac_cv_func_remove = no; then
30701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30702$as_echo_n "checking for remove in -lposix... " >&6; }
30703if ${ac_cv_lib_posix_remove+:} false; then :
30704  $as_echo_n "(cached) " >&6
30705else
30706  ac_check_lib_save_LIBS=$LIBS
30707LIBS="-lposix  $LIBS"
30708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30709/* end confdefs.h.  */
30710
30711/* Override any GCC internal prototype to avoid an error.
30712   Use char because int might match the return type of a GCC
30713   builtin and then its argument prototype would still apply.  */
30714#ifdef __cplusplus
30715extern "C"
30716#endif
30717char remove ();
30718int
30719main ()
30720{
30721return remove ();
30722  ;
30723  return 0;
30724}
30725_ACEOF
30726if ac_fn_cxx_try_link "$LINENO"; then :
30727  ac_cv_lib_posix_remove=yes
30728else
30729  ac_cv_lib_posix_remove=no
30730fi
30731rm -f core conftest.err conftest.$ac_objext \
30732    conftest$ac_exeext conftest.$ac_ext
30733LIBS=$ac_check_lib_save_LIBS
30734fi
30735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30736$as_echo "$ac_cv_lib_posix_remove" >&6; }
30737if test "x$ac_cv_lib_posix_remove" = xyes; then :
30738  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30739fi
30740
30741    fi
30742
30743    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30744    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30745if test "x$ac_cv_func_shmat" = xyes; then :
30746
30747fi
30748
30749    if test $ac_cv_func_shmat = no; then
30750      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30751$as_echo_n "checking for shmat in -lipc... " >&6; }
30752if ${ac_cv_lib_ipc_shmat+:} false; then :
30753  $as_echo_n "(cached) " >&6
30754else
30755  ac_check_lib_save_LIBS=$LIBS
30756LIBS="-lipc  $LIBS"
30757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30758/* end confdefs.h.  */
30759
30760/* Override any GCC internal prototype to avoid an error.
30761   Use char because int might match the return type of a GCC
30762   builtin and then its argument prototype would still apply.  */
30763#ifdef __cplusplus
30764extern "C"
30765#endif
30766char shmat ();
30767int
30768main ()
30769{
30770return shmat ();
30771  ;
30772  return 0;
30773}
30774_ACEOF
30775if ac_fn_cxx_try_link "$LINENO"; then :
30776  ac_cv_lib_ipc_shmat=yes
30777else
30778  ac_cv_lib_ipc_shmat=no
30779fi
30780rm -f core conftest.err conftest.$ac_objext \
30781    conftest$ac_exeext conftest.$ac_ext
30782LIBS=$ac_check_lib_save_LIBS
30783fi
30784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30785$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30786if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30787  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30788fi
30789
30790    fi
30791  fi
30792
30793  # Check for libraries that X11R6 Xt/Xaw programs need.
30794  ac_save_LDFLAGS=$LDFLAGS
30795  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30796  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30797  # check for ICE first), but we must link in the order -lSM -lICE or
30798  # we get undefined symbols.  So assume we have SM if we have ICE.
30799  # These have to be linked with before -lX11, unlike the other
30800  # libraries we check for below, so use a different variable.
30801  # John Interrante, Karl Berry
30802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30803$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30804if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30805  $as_echo_n "(cached) " >&6
30806else
30807  ac_check_lib_save_LIBS=$LIBS
30808LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30810/* end confdefs.h.  */
30811
30812/* Override any GCC internal prototype to avoid an error.
30813   Use char because int might match the return type of a GCC
30814   builtin and then its argument prototype would still apply.  */
30815#ifdef __cplusplus
30816extern "C"
30817#endif
30818char IceConnectionNumber ();
30819int
30820main ()
30821{
30822return IceConnectionNumber ();
30823  ;
30824  return 0;
30825}
30826_ACEOF
30827if ac_fn_cxx_try_link "$LINENO"; then :
30828  ac_cv_lib_ICE_IceConnectionNumber=yes
30829else
30830  ac_cv_lib_ICE_IceConnectionNumber=no
30831fi
30832rm -f core conftest.err conftest.$ac_objext \
30833    conftest$ac_exeext conftest.$ac_ext
30834LIBS=$ac_check_lib_save_LIBS
30835fi
30836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30837$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30838if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30839  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30840fi
30841
30842  LDFLAGS=$ac_save_LDFLAGS
30843
30844fi
30845
30846
30847# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30848# this doesn't make sense so we remove it.
30849if test "x$COMPILE_TYPE" = xcross; then
30850  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30851fi
30852
30853if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30854
30855    # Print a helpful message on how to acquire the necessary build dependency.
30856    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30857    MISSING_DEPENDENCY=x11
30858    PKGHANDLER_COMMAND=
30859
30860    case $PKGHANDLER in
30861	apt-get)
30862                apt_help     $MISSING_DEPENDENCY ;;
30863    yum)
30864                yum_help     $MISSING_DEPENDENCY ;;
30865	port)
30866                port_help    $MISSING_DEPENDENCY ;;
30867	pkgutil)
30868                pkgutil_help $MISSING_DEPENDENCY ;;
30869	pkgadd)
30870                pkgadd_help  $MISSING_DEPENDENCY ;;
30871    * )
30872      break ;;
30873    esac
30874
30875    if test "x$PKGHANDLER_COMMAND" != x; then
30876        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30877    fi
30878
30879    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30880fi
30881
30882# Some of the old makefiles require a setting of OPENWIN_HOME
30883# Since the X11R6 directory has disappeared on later Linuxes,
30884# we need to probe for it.
30885if test "x$OPENJDK_TARGET_OS" = xlinux; then
30886    if test -d "$SYS_ROOT/usr/X11R6"; then
30887        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30888    elif test -d "$SYS_ROOT/usr/include/X11"; then
30889        OPENWIN_HOME="$SYS_ROOT/usr"
30890    fi
30891fi
30892if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30893    OPENWIN_HOME="/usr/openwin"
30894fi
30895
30896
30897
30898#
30899# Weird Sol10 something check...TODO change to try compile
30900#
30901if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30902  if test "`uname -r`" = "5.10"; then
30903     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30904     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30905     fi
30906  fi
30907fi
30908
30909ac_ext=c
30910ac_cpp='$CPP $CPPFLAGS'
30911ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30912ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30913ac_compiler_gnu=$ac_cv_c_compiler_gnu
30914
30915OLD_CFLAGS="$CFLAGS"
30916CFLAGS="$CFLAGS $X_CFLAGS"
30917
30918# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30919for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30920do :
30921  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30922ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30923                   # include <X11/Xutil.h>
30924
30925"
30926if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30927  cat >>confdefs.h <<_ACEOF
30928#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30929_ACEOF
30930 X11_A_OK=yes
30931else
30932  X11_A_OK=no; break
30933fi
30934
30935done
30936
30937
30938CFLAGS="$OLD_CFLAGS"
30939ac_ext=cpp
30940ac_cpp='$CXXCPP $CPPFLAGS'
30941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30944
30945
30946if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30947
30948    # Print a helpful message on how to acquire the necessary build dependency.
30949    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30950    MISSING_DEPENDENCY=x11
30951    PKGHANDLER_COMMAND=
30952
30953    case $PKGHANDLER in
30954	apt-get)
30955                apt_help     $MISSING_DEPENDENCY ;;
30956    yum)
30957                yum_help     $MISSING_DEPENDENCY ;;
30958	port)
30959                port_help    $MISSING_DEPENDENCY ;;
30960	pkgutil)
30961                pkgutil_help $MISSING_DEPENDENCY ;;
30962	pkgadd)
30963                pkgadd_help  $MISSING_DEPENDENCY ;;
30964    * )
30965      break ;;
30966    esac
30967
30968    if test "x$PKGHANDLER_COMMAND" != x; then
30969        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30970    fi
30971
30972    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30973fi
30974
30975
30976
30977
30978
30979
30980###############################################################################
30981#
30982# The common unix printing system cups is used to print from java.
30983#
30984
30985# Check whether --with-cups was given.
30986if test "${with_cups+set}" = set; then :
30987  withval=$with_cups;
30988fi
30989
30990
30991# Check whether --with-cups-include was given.
30992if test "${with_cups_include+set}" = set; then :
30993  withval=$with_cups_include;
30994fi
30995
30996
30997if test "x$CUPS_NOT_NEEDED" = xyes; then
30998	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30999		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31000$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31001	fi
31002	CUPS_CFLAGS=
31003else
31004	CUPS_FOUND=no
31005
31006	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31007	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31008	fi
31009
31010	if test "x${with_cups}" != x; then
31011	    CUPS_CFLAGS="-I${with_cups}/include"
31012	    CUPS_FOUND=yes
31013	fi
31014	if test "x${with_cups_include}" != x; then
31015	    CUPS_CFLAGS="-I${with_cups_include}"
31016	    CUPS_FOUND=yes
31017	fi
31018	if test "x$CUPS_FOUND" = xno; then
31019
31020
31021    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31022        # Source the builddeps file again, to make sure it uses the latest variables!
31023        . $builddepsfile
31024        # Look for a target and build machine specific resource!
31025        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31026        if test "x$resource" = x; then
31027            # Ok, lets instead look for a target specific resource
31028            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31029        fi
31030        if test "x$resource" = x; then
31031            # Ok, lets instead look for a build specific resource
31032            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31033        fi
31034        if test "x$resource" = x; then
31035            # Ok, lets instead look for a generic resource
31036            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31037            resource=${builddep_cups}
31038        fi
31039        if test "x$resource" != x; then
31040            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31041$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31042	    # If the resource in the builddeps.conf file is an existing directory,
31043	    # for example /java/linux/cups
31044	    if test -d ${resource}; then
31045	       depdir=${resource}
31046	    else
31047
31048# cups is for example mymodule
31049# $resource is for example libs/general/libmymod_1_2_3.zip
31050# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31051# $with_builddeps_dir is for example /localhome/builddeps
31052# depdir is the name of the variable into which we store the depdir, eg MYMOD
31053# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31054# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31055    filename=`basename $resource`
31056    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31057    filebase=${filename%%.*}
31058    extension=${filename#*.}
31059    installdir=$with_builddeps_dir/$filebase
31060    if test ! -f $installdir/$filename.unpacked; then
31061        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31062$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31063        if test ! -d $installdir; then
31064            mkdir -p $installdir
31065        fi
31066        if test ! -d $installdir; then
31067            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31068        fi
31069        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31070        touch $tmpfile
31071        if test ! -f $tmpfile; then
31072            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31073        fi
31074
31075    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31076    # $tmpfile is the local file name for the downloaded file.
31077    VALID_TOOL=no
31078    if test "x$BDEPS_FTP" = xwget; then
31079       VALID_TOOL=yes
31080       wget -O $tmpfile $with_builddeps_server/$resource
31081    fi
31082    if test "x$BDEPS_FTP" = xlftp; then
31083       VALID_TOOL=yes
31084       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31085    fi
31086    if test "x$BDEPS_FTP" = xftp; then
31087        VALID_TOOL=yes
31088        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31089        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31090        FTPUSERPWD=${FTPSERVER%%@*}
31091        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31092            FTPUSER=${userpwd%%:*}
31093            FTPPWD=${userpwd#*@}
31094            FTPSERVER=${FTPSERVER#*@}
31095        else
31096            FTPUSER=ftp
31097            FTPPWD=ftp
31098        fi
31099        # the "pass" command does not work on some
31100        # ftp clients (read ftp.exe) but if it works,
31101        # passive mode is better!
31102        (\
31103            echo "user $FTPUSER $FTPPWD"        ;\
31104            echo "pass"                         ;\
31105            echo "bin"                          ;\
31106            echo "get $FTPPATH $tmpfile"              ;\
31107        ) | ftp -in $FTPSERVER
31108    fi
31109    if test "x$VALID_TOOL" != xyes; then
31110       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31111    fi
31112
31113        mv $tmpfile $installdir/$filename
31114        if test ! -s $installdir/$filename; then
31115            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31116        fi
31117        case "$extension" in
31118            zip)  echo "Unzipping $installdir/$filename..."
31119               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31120            ;;
31121            tar.gz) echo "Untaring $installdir/$filename..."
31122               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31123            ;;
31124            tgz) echo "Untaring $installdir/$filename..."
31125               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31126            ;;
31127            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31128            ;;
31129        esac
31130    fi
31131    if test -f $installdir/$filename.unpacked; then
31132        depdir=$installdir
31133    fi
31134
31135	    fi
31136            # Source the builddeps file again, because in the previous command, the depdir
31137            # was updated to point at the current build dependency install directory.
31138            . $builddepsfile
31139            # Now extract variables from the builddeps.conf files.
31140            theroot=${builddep_cups_ROOT}
31141            thecflags=${builddep_cups_CFLAGS}
31142            thelibs=${builddep_cups_LIBS}
31143            if test "x$depdir" = x; then
31144                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31145            fi
31146            CUPS=$depdir
31147            if test "x$theroot" != x; then
31148               CUPS="$theroot"
31149            fi
31150            if test "x$thecflags" != x; then
31151               CUPS_CFLAGS="$thecflags"
31152            fi
31153            if test "x$thelibs" != x; then
31154               CUPS_LIBS="$thelibs"
31155            fi
31156            CUPS_FOUND=yes
31157
31158        fi
31159
31160    fi
31161
31162	fi
31163	if test "x$CUPS_FOUND" = xno; then
31164	    # Are the cups headers installed in the default /usr/include location?
31165	    for ac_header in cups/cups.h cups/ppd.h
31166do :
31167  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31168ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31169if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31170  cat >>confdefs.h <<_ACEOF
31171#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31172_ACEOF
31173 CUPS_FOUND=yes
31174	                      CUPS_CFLAGS=
31175	                      DEFAULT_CUPS=yes
31176fi
31177
31178done
31179
31180	fi
31181	if test "x$CUPS_FOUND" = xno; then
31182	    # Getting nervous now? Lets poke around for standard Solaris third-party
31183	    # package installation locations.
31184	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31185$as_echo_n "checking for cups headers... " >&6; }
31186	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31187	       # An SFW package seems to be installed!
31188	       CUPS_FOUND=yes
31189	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31190	    elif test -s /opt/csw/include/cups/cups.h; then
31191	       # A CSW package seems to be installed!
31192	       CUPS_FOUND=yes
31193	       CUPS_CFLAGS="-I/opt/csw/include"
31194	    fi
31195	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31196$as_echo "$CUPS_FOUND" >&6; }
31197	fi
31198	if test "x$CUPS_FOUND" = xno; then
31199
31200    # Print a helpful message on how to acquire the necessary build dependency.
31201    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31202    MISSING_DEPENDENCY=cups
31203    PKGHANDLER_COMMAND=
31204
31205    case $PKGHANDLER in
31206	apt-get)
31207                apt_help     $MISSING_DEPENDENCY ;;
31208    yum)
31209                yum_help     $MISSING_DEPENDENCY ;;
31210	port)
31211                port_help    $MISSING_DEPENDENCY ;;
31212	pkgutil)
31213                pkgutil_help $MISSING_DEPENDENCY ;;
31214	pkgadd)
31215                pkgadd_help  $MISSING_DEPENDENCY ;;
31216    * )
31217      break ;;
31218    esac
31219
31220    if test "x$PKGHANDLER_COMMAND" != x; then
31221        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31222    fi
31223
31224	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31225	fi
31226fi
31227
31228
31229
31230
31231
31232
31233###############################################################################
31234#
31235# The ubiquitous freetype2 library is used to render fonts.
31236#
31237
31238# Check whether --with-freetype was given.
31239if test "${with_freetype+set}" = set; then :
31240  withval=$with_freetype;
31241fi
31242
31243
31244# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31245USING_SYSTEM_FT_LIB=false
31246
31247if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31248	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31249		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31250$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31251	fi
31252	FREETYPE2_CFLAGS=
31253	FREETYPE2_LIBS=
31254        FREETYPE2_LIB_PATH=
31255else
31256	FREETYPE2_FOUND=no
31257
31258	if test "x$with_freetype" != x; then
31259
31260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31261
31262  # Input might be given as Windows format, start by converting to
31263  # unix format.
31264  path="$with_freetype"
31265  new_path=`$CYGPATH -u "$path"`
31266
31267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31270  # "foo.exe" is OK but "foo" is an error.
31271  #
31272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31273  # It is also a way to make sure we got the proper file name for the real test later on.
31274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31275  if test "x$test_shortpath" = x; then
31276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31277$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31278    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31279  fi
31280
31281  # Call helper function which possibly converts this using DOS-style short mode.
31282  # If so, the updated path is stored in $new_path.
31283
31284  input_path="$new_path"
31285  # Check if we need to convert this using DOS-style short mode. If the path
31286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31287  # take no chances and rewrite it.
31288  # Note: m4 eats our [], so we need to use [ and ] instead.
31289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31290  if test "x$has_forbidden_chars" != x; then
31291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31295      # Going to short mode and back again did indeed matter. Since short mode is
31296      # case insensitive, let's make it lowercase to improve readability.
31297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31298      # Now convert it back to Unix-stile (cygpath)
31299      input_path=`$CYGPATH -u "$shortmode_path"`
31300      new_path="$input_path"
31301    fi
31302  fi
31303
31304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31305  if test "x$test_cygdrive_prefix" = x; then
31306    # As a simple fix, exclude /usr/bin since it's not a real path.
31307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31309      # a path prefixed by /cygdrive for fixpath to work.
31310      new_path="$CYGWIN_ROOT_PATH$input_path"
31311    fi
31312  fi
31313
31314
31315  if test "x$path" != "x$new_path"; then
31316    with_freetype="$new_path"
31317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31318$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31319  fi
31320
31321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31322
31323  path="$with_freetype"
31324  has_colon=`$ECHO $path | $GREP ^.:`
31325  new_path="$path"
31326  if test "x$has_colon" = x; then
31327    # Not in mixed or Windows style, start by that.
31328    new_path=`cmd //c echo $path`
31329  fi
31330
31331
31332  input_path="$new_path"
31333  # Check if we need to convert this using DOS-style short mode. If the path
31334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31335  # take no chances and rewrite it.
31336  # Note: m4 eats our [], so we need to use [ and ] instead.
31337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31338  if test "x$has_forbidden_chars" != x; then
31339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31341  fi
31342
31343
31344  windows_path="$new_path"
31345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31346    unix_path=`$CYGPATH -u "$windows_path"`
31347    new_path="$unix_path"
31348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31350    new_path="$unix_path"
31351  fi
31352
31353  if test "x$path" != "x$new_path"; then
31354    with_freetype="$new_path"
31355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31356$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31357  fi
31358
31359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31361
31362  else
31363    # We're on a posix platform. Hooray! :)
31364    path="$with_freetype"
31365    has_space=`$ECHO "$path" | $GREP " "`
31366    if test "x$has_space" != x; then
31367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31368$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31369      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31370    fi
31371
31372    # Use eval to expand a potential ~
31373    eval path="$path"
31374    if test ! -f "$path" && test ! -d "$path"; then
31375      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31376    fi
31377
31378    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31379  fi
31380
31381	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31382            FREETYPE2_LIB_PATH="$with_freetype/lib"
31383            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31384                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31385                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31386            fi
31387            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31388                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31389            fi
31390	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31391            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31392                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31393            fi
31394 	    FREETYPE2_FOUND=yes
31395   	    if test "x$FREETYPE2_FOUND" = xyes; then
31396	        # Verify that the directories exist
31397                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31398		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31399		fi
31400	        # List the contents of the lib.
31401		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31402                if test "x$FREETYPELIB" = x; then
31403		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31404		fi
31405	        # Check one h-file
31406                if ! test -s "$with_freetype/include/ft2build.h"; then
31407		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31408		fi
31409            fi
31410        fi
31411	if test "x$FREETYPE2_FOUND" = xno; then
31412
31413
31414    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31415        # Source the builddeps file again, to make sure it uses the latest variables!
31416        . $builddepsfile
31417        # Look for a target and build machine specific resource!
31418        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31419        if test "x$resource" = x; then
31420            # Ok, lets instead look for a target specific resource
31421            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31422        fi
31423        if test "x$resource" = x; then
31424            # Ok, lets instead look for a build specific resource
31425            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31426        fi
31427        if test "x$resource" = x; then
31428            # Ok, lets instead look for a generic resource
31429            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31430            resource=${builddep_freetype2}
31431        fi
31432        if test "x$resource" != x; then
31433            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31434$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31435	    # If the resource in the builddeps.conf file is an existing directory,
31436	    # for example /java/linux/cups
31437	    if test -d ${resource}; then
31438	       depdir=${resource}
31439	    else
31440
31441# freetype2 is for example mymodule
31442# $resource is for example libs/general/libmymod_1_2_3.zip
31443# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31444# $with_builddeps_dir is for example /localhome/builddeps
31445# depdir is the name of the variable into which we store the depdir, eg MYMOD
31446# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31447# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31448    filename=`basename $resource`
31449    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31450    filebase=${filename%%.*}
31451    extension=${filename#*.}
31452    installdir=$with_builddeps_dir/$filebase
31453    if test ! -f $installdir/$filename.unpacked; then
31454        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31455$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31456        if test ! -d $installdir; then
31457            mkdir -p $installdir
31458        fi
31459        if test ! -d $installdir; then
31460            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31461        fi
31462        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31463        touch $tmpfile
31464        if test ! -f $tmpfile; then
31465            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31466        fi
31467
31468    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31469    # $tmpfile is the local file name for the downloaded file.
31470    VALID_TOOL=no
31471    if test "x$BDEPS_FTP" = xwget; then
31472       VALID_TOOL=yes
31473       wget -O $tmpfile $with_builddeps_server/$resource
31474    fi
31475    if test "x$BDEPS_FTP" = xlftp; then
31476       VALID_TOOL=yes
31477       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31478    fi
31479    if test "x$BDEPS_FTP" = xftp; then
31480        VALID_TOOL=yes
31481        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31482        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31483        FTPUSERPWD=${FTPSERVER%%@*}
31484        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31485            FTPUSER=${userpwd%%:*}
31486            FTPPWD=${userpwd#*@}
31487            FTPSERVER=${FTPSERVER#*@}
31488        else
31489            FTPUSER=ftp
31490            FTPPWD=ftp
31491        fi
31492        # the "pass" command does not work on some
31493        # ftp clients (read ftp.exe) but if it works,
31494        # passive mode is better!
31495        (\
31496            echo "user $FTPUSER $FTPPWD"        ;\
31497            echo "pass"                         ;\
31498            echo "bin"                          ;\
31499            echo "get $FTPPATH $tmpfile"              ;\
31500        ) | ftp -in $FTPSERVER
31501    fi
31502    if test "x$VALID_TOOL" != xyes; then
31503       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31504    fi
31505
31506        mv $tmpfile $installdir/$filename
31507        if test ! -s $installdir/$filename; then
31508            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31509        fi
31510        case "$extension" in
31511            zip)  echo "Unzipping $installdir/$filename..."
31512               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31513            ;;
31514            tar.gz) echo "Untaring $installdir/$filename..."
31515               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31516            ;;
31517            tgz) echo "Untaring $installdir/$filename..."
31518               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31519            ;;
31520            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31521            ;;
31522        esac
31523    fi
31524    if test -f $installdir/$filename.unpacked; then
31525        depdir=$installdir
31526    fi
31527
31528	    fi
31529            # Source the builddeps file again, because in the previous command, the depdir
31530            # was updated to point at the current build dependency install directory.
31531            . $builddepsfile
31532            # Now extract variables from the builddeps.conf files.
31533            theroot=${builddep_freetype2_ROOT}
31534            thecflags=${builddep_freetype2_CFLAGS}
31535            thelibs=${builddep_freetype2_LIBS}
31536            if test "x$depdir" = x; then
31537                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31538            fi
31539            FREETYPE2=$depdir
31540            if test "x$theroot" != x; then
31541               FREETYPE2="$theroot"
31542            fi
31543            if test "x$thecflags" != x; then
31544               FREETYPE2_CFLAGS="$thecflags"
31545            fi
31546            if test "x$thelibs" != x; then
31547               FREETYPE2_LIBS="$thelibs"
31548            fi
31549            FREETYPE2_FOUND=yes
31550            else FREETYPE2_FOUND=no
31551
31552        fi
31553        else FREETYPE2_FOUND=no
31554
31555    fi
31556
31557            USING_SYSTEM_FT_LIB=true
31558	fi
31559	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31560            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31561
31562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31563
31564  # Input might be given as Windows format, start by converting to
31565  # unix format.
31566  path="$FREETYPELOCATION"
31567  new_path=`$CYGPATH -u "$path"`
31568
31569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31572  # "foo.exe" is OK but "foo" is an error.
31573  #
31574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31575  # It is also a way to make sure we got the proper file name for the real test later on.
31576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31577  if test "x$test_shortpath" = x; then
31578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31579$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31580    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31581  fi
31582
31583  # Call helper function which possibly converts this using DOS-style short mode.
31584  # If so, the updated path is stored in $new_path.
31585
31586  input_path="$new_path"
31587  # Check if we need to convert this using DOS-style short mode. If the path
31588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31589  # take no chances and rewrite it.
31590  # Note: m4 eats our [], so we need to use [ and ] instead.
31591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31592  if test "x$has_forbidden_chars" != x; then
31593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31597      # Going to short mode and back again did indeed matter. Since short mode is
31598      # case insensitive, let's make it lowercase to improve readability.
31599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31600      # Now convert it back to Unix-stile (cygpath)
31601      input_path=`$CYGPATH -u "$shortmode_path"`
31602      new_path="$input_path"
31603    fi
31604  fi
31605
31606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31607  if test "x$test_cygdrive_prefix" = x; then
31608    # As a simple fix, exclude /usr/bin since it's not a real path.
31609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31611      # a path prefixed by /cygdrive for fixpath to work.
31612      new_path="$CYGWIN_ROOT_PATH$input_path"
31613    fi
31614  fi
31615
31616
31617  if test "x$path" != "x$new_path"; then
31618    FREETYPELOCATION="$new_path"
31619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31620$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31621  fi
31622
31623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31624
31625  path="$FREETYPELOCATION"
31626  has_colon=`$ECHO $path | $GREP ^.:`
31627  new_path="$path"
31628  if test "x$has_colon" = x; then
31629    # Not in mixed or Windows style, start by that.
31630    new_path=`cmd //c echo $path`
31631  fi
31632
31633
31634  input_path="$new_path"
31635  # Check if we need to convert this using DOS-style short mode. If the path
31636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31637  # take no chances and rewrite it.
31638  # Note: m4 eats our [], so we need to use [ and ] instead.
31639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31640  if test "x$has_forbidden_chars" != x; then
31641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31643  fi
31644
31645
31646  windows_path="$new_path"
31647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31648    unix_path=`$CYGPATH -u "$windows_path"`
31649    new_path="$unix_path"
31650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31652    new_path="$unix_path"
31653  fi
31654
31655  if test "x$path" != "x$new_path"; then
31656    FREETYPELOCATION="$new_path"
31657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31658$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31659  fi
31660
31661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31663
31664  else
31665    # We're on a posix platform. Hooray! :)
31666    path="$FREETYPELOCATION"
31667    has_space=`$ECHO "$path" | $GREP " "`
31668    if test "x$has_space" != x; then
31669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31670$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31671      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31672    fi
31673
31674    # Use eval to expand a potential ~
31675    eval path="$path"
31676    if test ! -f "$path" && test ! -d "$path"; then
31677      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31678    fi
31679
31680    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31681  fi
31682
31683	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31684$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31685	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31686	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31687	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31688 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31689                if ! test -s "$FREETYPE2_LIBS"; then
31690		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31691		fi
31692                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31693		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31694		fi
31695                USING_SYSTEM_FT_LIB=true
31696                FREETYPE2_FOUND=yes
31697	    fi
31698	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31699$as_echo "$FREETYPE2_FOUND" >&6; }
31700        fi
31701	if test "x$FREETYPE2_FOUND" = xno; then
31702
31703pkg_failed=no
31704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31705$as_echo_n "checking for FREETYPE2... " >&6; }
31706
31707if test -n "$FREETYPE2_CFLAGS"; then
31708    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31709 elif test -n "$PKG_CONFIG"; then
31710    if test -n "$PKG_CONFIG" && \
31711    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31712  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31713  ac_status=$?
31714  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31715  test $ac_status = 0; }; then
31716  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31717else
31718  pkg_failed=yes
31719fi
31720 else
31721    pkg_failed=untried
31722fi
31723if test -n "$FREETYPE2_LIBS"; then
31724    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31725 elif test -n "$PKG_CONFIG"; then
31726    if test -n "$PKG_CONFIG" && \
31727    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31728  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31729  ac_status=$?
31730  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31731  test $ac_status = 0; }; then
31732  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31733else
31734  pkg_failed=yes
31735fi
31736 else
31737    pkg_failed=untried
31738fi
31739
31740
31741
31742if test $pkg_failed = yes; then
31743
31744if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31745        _pkg_short_errors_supported=yes
31746else
31747        _pkg_short_errors_supported=no
31748fi
31749        if test $_pkg_short_errors_supported = yes; then
31750	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31751        else
31752	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31753        fi
31754	# Put the nasty error message in config.log where it belongs
31755	echo "$FREETYPE2_PKG_ERRORS" >&5
31756
31757	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31758$as_echo "no" >&6; }
31759                FREETYPE2_FOUND=no
31760elif test $pkg_failed = untried; then
31761	FREETYPE2_FOUND=no
31762else
31763	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31764	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31766$as_echo "yes" >&6; }
31767	FREETYPE2_FOUND=yes
31768fi
31769            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31770            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31771            USING_SYSTEM_FT_LIB=true
31772            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31773            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31774              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31775            fi
31776	fi
31777	if test "x$FREETYPE2_FOUND" = xno; then
31778	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31779$as_echo_n "checking for freetype in some standard locations... " >&6; }
31780
31781	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31782	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31783	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31784	    fi
31785	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31786	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31787	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31788	    fi
31789
31790	    PREV_CXXCFLAGS="$CXXFLAGS"
31791	    PREV_LDFLAGS="$LDFLAGS"
31792	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31793	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31794	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31795/* end confdefs.h.  */
31796#include<ft2build.h>
31797	                    #include FT_FREETYPE_H
31798	                   int main() { return 0; }
31799
31800_ACEOF
31801if ac_fn_cxx_try_link "$LINENO"; then :
31802
31803	                      # Yes, the default cflags and libs did the trick.
31804	                      FREETYPE2_FOUND=yes
31805	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31806	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31807
31808else
31809
31810	                      FREETYPE2_FOUND=no
31811
31812fi
31813rm -f core conftest.err conftest.$ac_objext \
31814    conftest$ac_exeext conftest.$ac_ext
31815            CXXCFLAGS="$PREV_CXXFLAGS"
31816	    LDFLAGS="$PREV_LDFLAGS"
31817	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31818$as_echo "$FREETYPE2_FOUND" >&6; }
31819            USING_SYSTEM_FT_LIB=true
31820	fi
31821	if test "x$FREETYPE2_FOUND" = xno; then
31822
31823    # Print a helpful message on how to acquire the necessary build dependency.
31824    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31825    MISSING_DEPENDENCY=freetype2
31826    PKGHANDLER_COMMAND=
31827
31828    case $PKGHANDLER in
31829	apt-get)
31830                apt_help     $MISSING_DEPENDENCY ;;
31831    yum)
31832                yum_help     $MISSING_DEPENDENCY ;;
31833	port)
31834                port_help    $MISSING_DEPENDENCY ;;
31835	pkgutil)
31836                pkgutil_help $MISSING_DEPENDENCY ;;
31837	pkgadd)
31838                pkgadd_help  $MISSING_DEPENDENCY ;;
31839    * )
31840      break ;;
31841    esac
31842
31843    if test "x$PKGHANDLER_COMMAND" != x; then
31844        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31845    fi
31846
31847		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31848	fi
31849
31850        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31851            # AC_CHECK_LIB does not support use of cl.exe
31852            PREV_LDFLAGS="$LDFLAGS"
31853            LDFLAGS="$FREETYPE2_LIBS"
31854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31855$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31856if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31857  $as_echo_n "(cached) " >&6
31858else
31859  ac_check_lib_save_LIBS=$LIBS
31860LIBS="-lfreetype  $LIBS"
31861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31862/* end confdefs.h.  */
31863
31864/* Override any GCC internal prototype to avoid an error.
31865   Use char because int might match the return type of a GCC
31866   builtin and then its argument prototype would still apply.  */
31867#ifdef __cplusplus
31868extern "C"
31869#endif
31870char FT_Init_FreeType ();
31871int
31872main ()
31873{
31874return FT_Init_FreeType ();
31875  ;
31876  return 0;
31877}
31878_ACEOF
31879if ac_fn_cxx_try_link "$LINENO"; then :
31880  ac_cv_lib_freetype_FT_Init_FreeType=yes
31881else
31882  ac_cv_lib_freetype_FT_Init_FreeType=no
31883fi
31884rm -f core conftest.err conftest.$ac_objext \
31885    conftest$ac_exeext conftest.$ac_ext
31886LIBS=$ac_check_lib_save_LIBS
31887fi
31888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31889$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31890if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31891  FREETYPE2_FOUND=true
31892else
31893  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31894fi
31895
31896            LDFLAGS="$PREV_LDFLAGS"
31897        fi
31898fi
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908###############################################################################
31909#
31910# Check for alsa headers and libraries. Used on Linux/GNU systems.
31911#
31912
31913# Check whether --with-alsa was given.
31914if test "${with_alsa+set}" = set; then :
31915  withval=$with_alsa;
31916fi
31917
31918
31919# Check whether --with-alsa-include was given.
31920if test "${with_alsa_include+set}" = set; then :
31921  withval=$with_alsa_include;
31922fi
31923
31924
31925# Check whether --with-alsa-lib was given.
31926if test "${with_alsa_lib+set}" = set; then :
31927  withval=$with_alsa_lib;
31928fi
31929
31930
31931if test "x$ALSA_NOT_NEEDED" = xyes; then
31932	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31933		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31934$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31935	fi
31936	ALSA_CFLAGS=
31937	ALSA_LIBS=
31938else
31939	ALSA_FOUND=no
31940
31941	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31942	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31943	fi
31944
31945	if test "x${with_alsa}" != x; then
31946	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31947	    ALSA_CFLAGS="-I${with_alsa}/include"
31948	    ALSA_FOUND=yes
31949	fi
31950	if test "x${with_alsa_include}" != x; then
31951	    ALSA_CFLAGS="-I${with_alsa_include}"
31952	    ALSA_FOUND=yes
31953	fi
31954	if test "x${with_alsa_lib}" != x; then
31955	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31956	    ALSA_FOUND=yes
31957	fi
31958	if test "x$ALSA_FOUND" = xno; then
31959
31960
31961    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31962        # Source the builddeps file again, to make sure it uses the latest variables!
31963        . $builddepsfile
31964        # Look for a target and build machine specific resource!
31965        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31966        if test "x$resource" = x; then
31967            # Ok, lets instead look for a target specific resource
31968            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31969        fi
31970        if test "x$resource" = x; then
31971            # Ok, lets instead look for a build specific resource
31972            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31973        fi
31974        if test "x$resource" = x; then
31975            # Ok, lets instead look for a generic resource
31976            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31977            resource=${builddep_alsa}
31978        fi
31979        if test "x$resource" != x; then
31980            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31981$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31982	    # If the resource in the builddeps.conf file is an existing directory,
31983	    # for example /java/linux/cups
31984	    if test -d ${resource}; then
31985	       depdir=${resource}
31986	    else
31987
31988# alsa is for example mymodule
31989# $resource is for example libs/general/libmymod_1_2_3.zip
31990# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31991# $with_builddeps_dir is for example /localhome/builddeps
31992# depdir is the name of the variable into which we store the depdir, eg MYMOD
31993# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31994# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31995    filename=`basename $resource`
31996    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31997    filebase=${filename%%.*}
31998    extension=${filename#*.}
31999    installdir=$with_builddeps_dir/$filebase
32000    if test ! -f $installdir/$filename.unpacked; then
32001        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32002$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32003        if test ! -d $installdir; then
32004            mkdir -p $installdir
32005        fi
32006        if test ! -d $installdir; then
32007            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
32008        fi
32009        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32010        touch $tmpfile
32011        if test ! -f $tmpfile; then
32012            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
32013        fi
32014
32015    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32016    # $tmpfile is the local file name for the downloaded file.
32017    VALID_TOOL=no
32018    if test "x$BDEPS_FTP" = xwget; then
32019       VALID_TOOL=yes
32020       wget -O $tmpfile $with_builddeps_server/$resource
32021    fi
32022    if test "x$BDEPS_FTP" = xlftp; then
32023       VALID_TOOL=yes
32024       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32025    fi
32026    if test "x$BDEPS_FTP" = xftp; then
32027        VALID_TOOL=yes
32028        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32029        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32030        FTPUSERPWD=${FTPSERVER%%@*}
32031        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32032            FTPUSER=${userpwd%%:*}
32033            FTPPWD=${userpwd#*@}
32034            FTPSERVER=${FTPSERVER#*@}
32035        else
32036            FTPUSER=ftp
32037            FTPPWD=ftp
32038        fi
32039        # the "pass" command does not work on some
32040        # ftp clients (read ftp.exe) but if it works,
32041        # passive mode is better!
32042        (\
32043            echo "user $FTPUSER $FTPPWD"        ;\
32044            echo "pass"                         ;\
32045            echo "bin"                          ;\
32046            echo "get $FTPPATH $tmpfile"              ;\
32047        ) | ftp -in $FTPSERVER
32048    fi
32049    if test "x$VALID_TOOL" != xyes; then
32050       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32051    fi
32052
32053        mv $tmpfile $installdir/$filename
32054        if test ! -s $installdir/$filename; then
32055            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32056        fi
32057        case "$extension" in
32058            zip)  echo "Unzipping $installdir/$filename..."
32059               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32060            ;;
32061            tar.gz) echo "Untaring $installdir/$filename..."
32062               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32063            ;;
32064            tgz) echo "Untaring $installdir/$filename..."
32065               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32066            ;;
32067            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32068            ;;
32069        esac
32070    fi
32071    if test -f $installdir/$filename.unpacked; then
32072        depdir=$installdir
32073    fi
32074
32075	    fi
32076            # Source the builddeps file again, because in the previous command, the depdir
32077            # was updated to point at the current build dependency install directory.
32078            . $builddepsfile
32079            # Now extract variables from the builddeps.conf files.
32080            theroot=${builddep_alsa_ROOT}
32081            thecflags=${builddep_alsa_CFLAGS}
32082            thelibs=${builddep_alsa_LIBS}
32083            if test "x$depdir" = x; then
32084                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32085            fi
32086            ALSA=$depdir
32087            if test "x$theroot" != x; then
32088               ALSA="$theroot"
32089            fi
32090            if test "x$thecflags" != x; then
32091               ALSA_CFLAGS="$thecflags"
32092            fi
32093            if test "x$thelibs" != x; then
32094               ALSA_LIBS="$thelibs"
32095            fi
32096            ALSA_FOUND=yes
32097            else ALSA_FOUND=no
32098
32099        fi
32100        else ALSA_FOUND=no
32101
32102    fi
32103
32104	fi
32105	if test "x$ALSA_FOUND" = xno; then
32106
32107pkg_failed=no
32108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32109$as_echo_n "checking for ALSA... " >&6; }
32110
32111if test -n "$ALSA_CFLAGS"; then
32112    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32113 elif test -n "$PKG_CONFIG"; then
32114    if test -n "$PKG_CONFIG" && \
32115    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32116  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32117  ac_status=$?
32118  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32119  test $ac_status = 0; }; then
32120  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32121else
32122  pkg_failed=yes
32123fi
32124 else
32125    pkg_failed=untried
32126fi
32127if test -n "$ALSA_LIBS"; then
32128    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32129 elif test -n "$PKG_CONFIG"; then
32130    if test -n "$PKG_CONFIG" && \
32131    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32132  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32133  ac_status=$?
32134  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32135  test $ac_status = 0; }; then
32136  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32137else
32138  pkg_failed=yes
32139fi
32140 else
32141    pkg_failed=untried
32142fi
32143
32144
32145
32146if test $pkg_failed = yes; then
32147
32148if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32149        _pkg_short_errors_supported=yes
32150else
32151        _pkg_short_errors_supported=no
32152fi
32153        if test $_pkg_short_errors_supported = yes; then
32154	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32155        else
32156	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32157        fi
32158	# Put the nasty error message in config.log where it belongs
32159	echo "$ALSA_PKG_ERRORS" >&5
32160
32161	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32162$as_echo "no" >&6; }
32163                ALSA_FOUND=no
32164elif test $pkg_failed = untried; then
32165	ALSA_FOUND=no
32166else
32167	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32168	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32170$as_echo "yes" >&6; }
32171	ALSA_FOUND=yes
32172fi
32173	fi
32174	if test "x$ALSA_FOUND" = xno; then
32175	    for ac_header in alsa/asoundlib.h
32176do :
32177  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32178if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32179  cat >>confdefs.h <<_ACEOF
32180#define HAVE_ALSA_ASOUNDLIB_H 1
32181_ACEOF
32182 ALSA_FOUND=yes
32183	                      ALSA_CFLAGS=-Iignoreme
32184	                      ALSA_LIBS=-lasound
32185	                      DEFAULT_ALSA=yes
32186else
32187  ALSA_FOUND=no
32188fi
32189
32190done
32191
32192	fi
32193	if test "x$ALSA_FOUND" = xno; then
32194
32195    # Print a helpful message on how to acquire the necessary build dependency.
32196    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32197    MISSING_DEPENDENCY=alsa
32198    PKGHANDLER_COMMAND=
32199
32200    case $PKGHANDLER in
32201	apt-get)
32202                apt_help     $MISSING_DEPENDENCY ;;
32203    yum)
32204                yum_help     $MISSING_DEPENDENCY ;;
32205	port)
32206                port_help    $MISSING_DEPENDENCY ;;
32207	pkgutil)
32208                pkgutil_help $MISSING_DEPENDENCY ;;
32209	pkgadd)
32210                pkgadd_help  $MISSING_DEPENDENCY ;;
32211    * )
32212      break ;;
32213    esac
32214
32215    if test "x$PKGHANDLER_COMMAND" != x; then
32216        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32217    fi
32218
32219	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32220	fi
32221fi
32222
32223
32224
32225
32226
32227
32228
32229###############################################################################
32230#
32231# Check for the jpeg library
32232#
32233
32234USE_EXTERNAL_LIBJPEG=true
32235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32236$as_echo_n "checking for main in -ljpeg... " >&6; }
32237if ${ac_cv_lib_jpeg_main+:} false; then :
32238  $as_echo_n "(cached) " >&6
32239else
32240  ac_check_lib_save_LIBS=$LIBS
32241LIBS="-ljpeg  $LIBS"
32242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32243/* end confdefs.h.  */
32244
32245
32246int
32247main ()
32248{
32249return main ();
32250  ;
32251  return 0;
32252}
32253_ACEOF
32254if ac_fn_cxx_try_link "$LINENO"; then :
32255  ac_cv_lib_jpeg_main=yes
32256else
32257  ac_cv_lib_jpeg_main=no
32258fi
32259rm -f core conftest.err conftest.$ac_objext \
32260    conftest$ac_exeext conftest.$ac_ext
32261LIBS=$ac_check_lib_save_LIBS
32262fi
32263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32264$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32265if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32266  cat >>confdefs.h <<_ACEOF
32267#define HAVE_LIBJPEG 1
32268_ACEOF
32269
32270  LIBS="-ljpeg $LIBS"
32271
32272else
32273   USE_EXTERNAL_LIBJPEG=false
32274               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32275$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32276
32277fi
32278
32279
32280
32281###############################################################################
32282#
32283# Check for the gif library
32284#
32285
32286
32287# Check whether --with-giflib was given.
32288if test "${with_giflib+set}" = set; then :
32289  withval=$with_giflib;
32290fi
32291
32292
32293
32294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32295$as_echo_n "checking for which giflib to use... " >&6; }
32296
32297# default is bundled
32298DEFAULT_GIFLIB=bundled
32299
32300#
32301# if user didn't specify, use DEFAULT_GIFLIB
32302#
32303if test "x${with_giflib}" = "x"; then
32304    with_giflib=${DEFAULT_GIFLIB}
32305fi
32306
32307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32308$as_echo "${with_giflib}" >&6; }
32309
32310if test "x${with_giflib}" = "xbundled"; then
32311    USE_EXTERNAL_LIBGIF=false
32312elif test "x${with_giflib}" = "xsystem"; then
32313    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32314if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32315
32316else
32317   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32318fi
32319
32320
32321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32322$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32323if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32324  $as_echo_n "(cached) " >&6
32325else
32326  ac_check_lib_save_LIBS=$LIBS
32327LIBS="-lgif  $LIBS"
32328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32329/* end confdefs.h.  */
32330
32331/* Override any GCC internal prototype to avoid an error.
32332   Use char because int might match the return type of a GCC
32333   builtin and then its argument prototype would still apply.  */
32334#ifdef __cplusplus
32335extern "C"
32336#endif
32337char DGifGetCode ();
32338int
32339main ()
32340{
32341return DGifGetCode ();
32342  ;
32343  return 0;
32344}
32345_ACEOF
32346if ac_fn_cxx_try_link "$LINENO"; then :
32347  ac_cv_lib_gif_DGifGetCode=yes
32348else
32349  ac_cv_lib_gif_DGifGetCode=no
32350fi
32351rm -f core conftest.err conftest.$ac_objext \
32352    conftest$ac_exeext conftest.$ac_ext
32353LIBS=$ac_check_lib_save_LIBS
32354fi
32355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32356$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32357if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32358  cat >>confdefs.h <<_ACEOF
32359#define HAVE_LIBGIF 1
32360_ACEOF
32361
32362  LIBS="-lgif $LIBS"
32363
32364else
32365   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32366fi
32367
32368
32369    USE_EXTERNAL_LIBGIF=true
32370else
32371    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32372fi
32373
32374
32375###############################################################################
32376#
32377# Check for the zlib library
32378#
32379
32380
32381# Check whether --with-zlib was given.
32382if test "${with_zlib+set}" = set; then :
32383  withval=$with_zlib;
32384fi
32385
32386
32387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32388$as_echo_n "checking for compress in -lz... " >&6; }
32389if ${ac_cv_lib_z_compress+:} false; then :
32390  $as_echo_n "(cached) " >&6
32391else
32392  ac_check_lib_save_LIBS=$LIBS
32393LIBS="-lz  $LIBS"
32394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32395/* end confdefs.h.  */
32396
32397/* Override any GCC internal prototype to avoid an error.
32398   Use char because int might match the return type of a GCC
32399   builtin and then its argument prototype would still apply.  */
32400#ifdef __cplusplus
32401extern "C"
32402#endif
32403char compress ();
32404int
32405main ()
32406{
32407return compress ();
32408  ;
32409  return 0;
32410}
32411_ACEOF
32412if ac_fn_cxx_try_link "$LINENO"; then :
32413  ac_cv_lib_z_compress=yes
32414else
32415  ac_cv_lib_z_compress=no
32416fi
32417rm -f core conftest.err conftest.$ac_objext \
32418    conftest$ac_exeext conftest.$ac_ext
32419LIBS=$ac_check_lib_save_LIBS
32420fi
32421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32422$as_echo "$ac_cv_lib_z_compress" >&6; }
32423if test "x$ac_cv_lib_z_compress" = xyes; then :
32424   ZLIB_FOUND=yes
32425else
32426   ZLIB_FOUND=no
32427fi
32428
32429
32430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32431$as_echo_n "checking for which zlib to use... " >&6; }
32432
32433DEFAULT_ZLIB=bundled
32434if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32435#
32436# On macosx default is system...on others default is
32437#
32438    DEFAULT_ZLIB=system
32439fi
32440
32441if test "x${ZLIB_FOUND}" != "xyes"; then
32442#
32443# If we don't find any system...set default to bundled
32444#
32445    DEFAULT_ZLIB=bundled
32446fi
32447
32448#
32449# If user didn't specify, use DEFAULT_ZLIB
32450#
32451if test "x${with_zlib}" = "x"; then
32452    with_zlib=${DEFAULT_ZLIB}
32453fi
32454
32455if test "x${with_zlib}" = "xbundled"; then
32456    USE_EXTERNAL_LIBZ=false
32457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32458$as_echo "bundled" >&6; }
32459elif test "x${with_zlib}" = "xsystem"; then
32460    if test "x${ZLIB_FOUND}" = "xyes"; then
32461        USE_EXTERNAL_LIBZ=true
32462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32463$as_echo "system" >&6; }
32464    else
32465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32466$as_echo "system not found" >&6; }
32467        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32468    fi
32469else
32470    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32471fi
32472
32473
32474
32475###############################################################################
32476LIBZIP_CAN_USE_MMAP=true
32477
32478
32479
32480###############################################################################
32481#
32482# Check if altzone exists in time.h
32483#
32484
32485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32486/* end confdefs.h.  */
32487#include <time.h>
32488int
32489main ()
32490{
32491return (int)altzone;
32492  ;
32493  return 0;
32494}
32495_ACEOF
32496if ac_fn_cxx_try_link "$LINENO"; then :
32497  has_altzone=yes
32498else
32499  has_altzone=no
32500fi
32501rm -f core conftest.err conftest.$ac_objext \
32502    conftest$ac_exeext conftest.$ac_ext
32503if test "x$has_altzone" = xyes; then
32504
32505$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32506
32507fi
32508
32509###############################################################################
32510#
32511# Check the maths library
32512#
32513
32514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32515$as_echo_n "checking for cos in -lm... " >&6; }
32516if ${ac_cv_lib_m_cos+:} false; then :
32517  $as_echo_n "(cached) " >&6
32518else
32519  ac_check_lib_save_LIBS=$LIBS
32520LIBS="-lm  $LIBS"
32521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32522/* end confdefs.h.  */
32523
32524/* Override any GCC internal prototype to avoid an error.
32525   Use char because int might match the return type of a GCC
32526   builtin and then its argument prototype would still apply.  */
32527#ifdef __cplusplus
32528extern "C"
32529#endif
32530char cos ();
32531int
32532main ()
32533{
32534return cos ();
32535  ;
32536  return 0;
32537}
32538_ACEOF
32539if ac_fn_cxx_try_link "$LINENO"; then :
32540  ac_cv_lib_m_cos=yes
32541else
32542  ac_cv_lib_m_cos=no
32543fi
32544rm -f core conftest.err conftest.$ac_objext \
32545    conftest$ac_exeext conftest.$ac_ext
32546LIBS=$ac_check_lib_save_LIBS
32547fi
32548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32549$as_echo "$ac_cv_lib_m_cos" >&6; }
32550if test "x$ac_cv_lib_m_cos" = xyes; then :
32551  cat >>confdefs.h <<_ACEOF
32552#define HAVE_LIBM 1
32553_ACEOF
32554
32555  LIBS="-lm $LIBS"
32556
32557else
32558
32559                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32560$as_echo "$as_me: Maths library was not found" >&6;}
32561
32562fi
32563
32564
32565
32566###############################################################################
32567#
32568# Check for libdl.so
32569
32570save_LIBS="$LIBS"
32571LIBS=""
32572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32573$as_echo_n "checking for dlopen in -ldl... " >&6; }
32574if ${ac_cv_lib_dl_dlopen+:} false; then :
32575  $as_echo_n "(cached) " >&6
32576else
32577  ac_check_lib_save_LIBS=$LIBS
32578LIBS="-ldl  $LIBS"
32579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32580/* end confdefs.h.  */
32581
32582/* Override any GCC internal prototype to avoid an error.
32583   Use char because int might match the return type of a GCC
32584   builtin and then its argument prototype would still apply.  */
32585#ifdef __cplusplus
32586extern "C"
32587#endif
32588char dlopen ();
32589int
32590main ()
32591{
32592return dlopen ();
32593  ;
32594  return 0;
32595}
32596_ACEOF
32597if ac_fn_cxx_try_link "$LINENO"; then :
32598  ac_cv_lib_dl_dlopen=yes
32599else
32600  ac_cv_lib_dl_dlopen=no
32601fi
32602rm -f core conftest.err conftest.$ac_objext \
32603    conftest$ac_exeext conftest.$ac_ext
32604LIBS=$ac_check_lib_save_LIBS
32605fi
32606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32607$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32608if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32609  cat >>confdefs.h <<_ACEOF
32610#define HAVE_LIBDL 1
32611_ACEOF
32612
32613  LIBS="-ldl $LIBS"
32614
32615fi
32616
32617LIBDL="$LIBS"
32618
32619LIBS="$save_LIBS"
32620
32621
32622
32623###############################################################################
32624#
32625# statically link libstdc++ before C++ ABI is stablized on Linux unless
32626# dynamic build is configured on command line.
32627#
32628
32629# Check whether --with-stdc++lib was given.
32630if test "${with_stdc__lib+set}" = set; then :
32631  withval=$with_stdc__lib;
32632    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32633        && test "x$with_stdc__lib" != xdefault; then
32634      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32635    fi
32636
32637else
32638  with_stdc__lib=default
32639
32640fi
32641
32642
32643if test "x$OPENJDK_TARGET_OS" = xlinux; then
32644    # Test if -lstdc++ works.
32645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32646$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32647    ac_ext=cpp
32648ac_cpp='$CXXCPP $CPPFLAGS'
32649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32652
32653    OLD_CXXFLAGS="$CXXFLAGS"
32654    CXXFLAGS="$CXXFLAGS -lstdc++"
32655    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32656/* end confdefs.h.  */
32657
32658int
32659main ()
32660{
32661return 0;
32662  ;
32663  return 0;
32664}
32665_ACEOF
32666if ac_fn_cxx_try_link "$LINENO"; then :
32667  has_dynamic_libstdcxx=yes
32668else
32669  has_dynamic_libstdcxx=no
32670fi
32671rm -f core conftest.err conftest.$ac_objext \
32672    conftest$ac_exeext conftest.$ac_ext
32673    CXXFLAGS="$OLD_CXXFLAGS"
32674    ac_ext=cpp
32675ac_cpp='$CXXCPP $CPPFLAGS'
32676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32679
32680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32681$as_echo "$has_dynamic_libstdcxx" >&6; }
32682
32683    # Test if stdc++ can be linked statically.
32684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32685$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32686    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32687    ac_ext=cpp
32688ac_cpp='$CXXCPP $CPPFLAGS'
32689ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32690ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32691ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32692
32693    OLD_LIBS="$LIBS"
32694    OLD_CXX="$CXX"
32695    LIBS="$STATIC_STDCXX_FLAGS"
32696    CXX="$CC"
32697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32698/* end confdefs.h.  */
32699
32700int
32701main ()
32702{
32703return 0;
32704  ;
32705  return 0;
32706}
32707_ACEOF
32708if ac_fn_cxx_try_link "$LINENO"; then :
32709  has_static_libstdcxx=yes
32710else
32711  has_static_libstdcxx=no
32712fi
32713rm -f core conftest.err conftest.$ac_objext \
32714    conftest$ac_exeext conftest.$ac_ext
32715    LIBS="$OLD_LIBS"
32716    CXX="$OLD_CXX"
32717    ac_ext=cpp
32718ac_cpp='$CXXCPP $CPPFLAGS'
32719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32722
32723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32724$as_echo "$has_static_libstdcxx" >&6; }
32725
32726    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32727        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32728    fi
32729
32730    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32731        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32732    fi
32733
32734    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32735        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32736    fi
32737
32738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32739$as_echo_n "checking how to link with libstdc++... " >&6; }
32740    # If dynamic was requested, it's available since it would fail above otherwise.
32741    # If dynamic wasn't requested, go with static unless it isn't available.
32742    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32743        LIBCXX="$LIBCXX -lstdc++"
32744        LDCXX="$CXX"
32745        STATIC_CXX_SETTING="STATIC_CXX=false"
32746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32747$as_echo "dynamic" >&6; }
32748    else
32749        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32750        LDCXX="$CC"
32751        STATIC_CXX_SETTING="STATIC_CXX=true"
32752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32753$as_echo "static" >&6; }
32754    fi
32755fi
32756
32757
32758if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32759    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32760
32761pkg_failed=no
32762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32763$as_echo_n "checking for LIBFFI... " >&6; }
32764
32765if test -n "$LIBFFI_CFLAGS"; then
32766    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32767 elif test -n "$PKG_CONFIG"; then
32768    if test -n "$PKG_CONFIG" && \
32769    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32770  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32771  ac_status=$?
32772  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32773  test $ac_status = 0; }; then
32774  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32775else
32776  pkg_failed=yes
32777fi
32778 else
32779    pkg_failed=untried
32780fi
32781if test -n "$LIBFFI_LIBS"; then
32782    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32783 elif test -n "$PKG_CONFIG"; then
32784    if test -n "$PKG_CONFIG" && \
32785    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32786  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32787  ac_status=$?
32788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32789  test $ac_status = 0; }; then
32790  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32791else
32792  pkg_failed=yes
32793fi
32794 else
32795    pkg_failed=untried
32796fi
32797
32798
32799
32800if test $pkg_failed = yes; then
32801
32802if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32803        _pkg_short_errors_supported=yes
32804else
32805        _pkg_short_errors_supported=no
32806fi
32807        if test $_pkg_short_errors_supported = yes; then
32808	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32809        else
32810	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32811        fi
32812	# Put the nasty error message in config.log where it belongs
32813	echo "$LIBFFI_PKG_ERRORS" >&5
32814
32815	as_fn_error $? "Package requirements (libffi) were not met:
32816
32817$LIBFFI_PKG_ERRORS
32818
32819Consider adjusting the PKG_CONFIG_PATH environment variable if you
32820installed software in a non-standard prefix.
32821
32822Alternatively, you may set the environment variables LIBFFI_CFLAGS
32823and LIBFFI_LIBS to avoid the need to call pkg-config.
32824See the pkg-config man page for more details.
32825" "$LINENO" 5
32826elif test $pkg_failed = untried; then
32827	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32829as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32830is in your PATH or set the PKG_CONFIG environment variable to the full
32831path to pkg-config.
32832
32833Alternatively, you may set the environment variables LIBFFI_CFLAGS
32834and LIBFFI_LIBS to avoid the need to call pkg-config.
32835See the pkg-config man page for more details.
32836
32837To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32838See \`config.log' for more details" "$LINENO" 5; }
32839else
32840	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32841	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32843$as_echo "yes" >&6; }
32844	:
32845fi
32846
32847fi
32848
32849if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32850    # Extract the first word of "llvm-config", so it can be a program name with args.
32851set dummy llvm-config; ac_word=$2
32852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32853$as_echo_n "checking for $ac_word... " >&6; }
32854if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32855  $as_echo_n "(cached) " >&6
32856else
32857  if test -n "$LLVM_CONFIG"; then
32858  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32859else
32860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32861for as_dir in $PATH
32862do
32863  IFS=$as_save_IFS
32864  test -z "$as_dir" && as_dir=.
32865    for ac_exec_ext in '' $ac_executable_extensions; do
32866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32867    ac_cv_prog_LLVM_CONFIG="llvm-config"
32868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32869    break 2
32870  fi
32871done
32872  done
32873IFS=$as_save_IFS
32874
32875fi
32876fi
32877LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32878if test -n "$LLVM_CONFIG"; then
32879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32880$as_echo "$LLVM_CONFIG" >&6; }
32881else
32882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32883$as_echo "no" >&6; }
32884fi
32885
32886
32887
32888    if test "x$LLVM_CONFIG" != xllvm-config; then
32889        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32890    fi
32891
32892    llvm_components="jit mcjit engine nativecodegen native"
32893    unset LLVM_CFLAGS
32894    for flag in $("$LLVM_CONFIG" --cxxflags); do
32895      if echo "${flag}" | grep -q '^-[ID]'; then
32896        if test "${flag}" != "-D_DEBUG" ; then
32897          if test "${LLVM_CFLAGS}" != "" ; then
32898            LLVM_CFLAGS="${LLVM_CFLAGS} "
32899          fi
32900          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32901        fi
32902      fi
32903    done
32904    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32905    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32906
32907    unset LLVM_LDFLAGS
32908    for flag in $("${LLVM_CONFIG}" --ldflags); do
32909      if echo "${flag}" | grep -q '^-L'; then
32910        if test "${LLVM_LDFLAGS}" != ""; then
32911          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32912        fi
32913        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32914      fi
32915    done
32916
32917    unset LLVM_LIBS
32918    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32919      if echo "${flag}" | grep -q '^-l'; then
32920        if test "${LLVM_LIBS}" != ""; then
32921          LLVM_LIBS="${LLVM_LIBS} "
32922        fi
32923        LLVM_LIBS="${LLVM_LIBS}${flag}"
32924      fi
32925    done
32926
32927
32928
32929
32930fi
32931
32932# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32933if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32934    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32935fi
32936
32937# TODO better (platform agnostic) test
32938if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32939    LIBCXX="-lstdc++"
32940fi
32941
32942
32943
32944
32945
32946# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32947
32948# When using cygwin or msys, we need a wrapper binary that renames
32949# /cygdrive/c/ arguments into c:/ arguments and peeks into
32950# @files and rewrites these too! This wrapper binary is
32951# called fixpath.
32952FIXPATH=
32953if test "x$OPENJDK_BUILD_OS" = xwindows; then
32954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32955$as_echo_n "checking if fixpath can be created... " >&6; }
32956    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32957    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32958    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32959      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32960      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32961      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32962      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32963    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32964      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32965      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32966
32967      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32968      # @ was chosen as separator to minimize risk of other tools messing around with it
32969      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32970      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32971
32972      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32973    fi
32974    rm -f $OUTPUT_ROOT/fixpath*
32975    cd $OUTPUT_ROOT
32976    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32977    cd $CURDIR
32978
32979    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32981$as_echo "no" >&6; }
32982        cat $OUTPUT_ROOT/fixpath1.log
32983        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32984    fi
32985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32986$as_echo "yes" >&6; }
32987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32988$as_echo_n "checking if fixpath.exe works... " >&6; }
32989    cd $OUTPUT_ROOT
32990    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32991    cd $CURDIR
32992    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32994$as_echo "no" >&6; }
32995        cat $OUTPUT_ROOT/fixpath2.log
32996        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32997    fi
32998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32999$as_echo "yes" >&6; }
33000    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33001fi
33002
33003
33004
33005
33006###############################################################################
33007#
33008# We need to do some final tweaking, when everything else is done.
33009#
33010###############################################################################
33011
33012
33013HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33014
33015
33016# The name of the Service Agent jar.
33017SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33018if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33019  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33020fi
33021
33022
33023
33024
33025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
33026$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
33027
33028if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33029    ENABLE_INTREE_EC=yes
33030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33031$as_echo "yes" >&6; }
33032else
33033    ENABLE_INTREE_EC=no
33034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33035$as_echo "no" >&6; }
33036fi
33037
33038
33039
33040
33041###############################################################################
33042#
33043# Configure parts of the build that only affect the build performance,
33044# not the result.
33045#
33046###############################################################################
33047
33048
33049  # How many cores do we have on this build system?
33050
33051# Check whether --with-num-cores was given.
33052if test "${with_num_cores+set}" = set; then :
33053  withval=$with_num_cores;
33054fi
33055
33056  if test "x$with_num_cores" = x; then
33057    # The number of cores were not specified, try to probe them.
33058
33059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33060$as_echo_n "checking for number of cores... " >&6; }
33061    NUM_CORES=1
33062    FOUND_CORES=no
33063
33064    if test -f /proc/cpuinfo; then
33065        # Looks like a Linux (or cygwin) system
33066        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33067        FOUND_CORES=yes
33068    elif test -x /usr/sbin/psrinfo; then
33069        # Looks like a Solaris system
33070        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33071        FOUND_CORES=yes
33072    elif test -x /usr/sbin/system_profiler; then
33073        # Looks like a MacOSX system
33074        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33075        FOUND_CORES=yes
33076    elif test -n "$NUMBER_OF_PROCESSORS"; then
33077        # On windows, look in the env
33078        NUM_CORES=$NUMBER_OF_PROCESSORS
33079        FOUND_CORES=yes
33080    fi
33081
33082    if test "x$FOUND_CORES" = xyes; then
33083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33084$as_echo "$NUM_CORES" >&6; }
33085    else
33086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33087$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33089$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33090    fi
33091
33092
33093  else
33094    NUM_CORES=$with_num_cores
33095  fi
33096
33097
33098
33099  # How much memory do we have on this build system?
33100
33101# Check whether --with-memory-size was given.
33102if test "${with_memory_size+set}" = set; then :
33103  withval=$with_memory_size;
33104fi
33105
33106  if test "x$with_memory_size" = x; then
33107    # The memory size was not specified, try to probe it.
33108
33109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33110$as_echo_n "checking for memory size... " >&6; }
33111    # Default to 1024 MB
33112    MEMORY_SIZE=1024
33113    FOUND_MEM=no
33114
33115    if test -f /proc/meminfo; then
33116        # Looks like a Linux (or cygwin) system
33117        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33118        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33119        FOUND_MEM=yes
33120    elif test -x /usr/sbin/prtconf; then
33121        # Looks like a Solaris system
33122        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33123        FOUND_MEM=yes
33124    elif test -x /usr/sbin/system_profiler; then
33125        # Looks like a MacOSX system
33126        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33127        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33128        FOUND_MEM=yes
33129    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33130        # Windows, but without cygwin
33131        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33132        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33133        FOUND_MEM=yes
33134    fi
33135
33136    if test "x$FOUND_MEM" = xyes; then
33137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33138$as_echo "$MEMORY_SIZE MB" >&6; }
33139    else
33140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33141$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33143$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33144    fi
33145
33146  else
33147    MEMORY_SIZE=$with_memory_size
33148  fi
33149
33150
33151
33152  # Provide a decent default number of parallel jobs for make depending on
33153  # number of cores, amount of memory and machine architecture.
33154
33155# Check whether --with-jobs was given.
33156if test "${with_jobs+set}" = set; then :
33157  withval=$with_jobs;
33158fi
33159
33160  if test "x$with_jobs" = x; then
33161    # Number of jobs was not specified, calculate.
33162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33163$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33164    # Approximate memory in GB, rounding up a bit.
33165    memory_gb=`expr $MEMORY_SIZE / 1100`
33166    # Pick the lowest of memory in gb and number of cores.
33167    if test "$memory_gb" -lt "$NUM_CORES"; then
33168      JOBS="$memory_gb"
33169    else
33170      JOBS="$NUM_CORES"
33171      # On bigger machines, leave some room for other processes to run
33172      if test "$JOBS" -gt "4"; then
33173        JOBS=`expr $JOBS '*' 90 / 100`
33174      fi
33175    fi
33176    # Cap number of jobs to 16
33177    if test "$JOBS" -gt "16"; then
33178      JOBS=16
33179    fi
33180    if test "$JOBS" -eq "0"; then
33181      JOBS=1
33182    fi
33183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33184$as_echo "$JOBS" >&6; }
33185  else
33186    JOBS=$with_jobs
33187  fi
33188
33189
33190
33191# Setup smart javac (after cores and memory have been setup)
33192
33193
33194# Check whether --with-sjavac-server-java was given.
33195if test "${with_sjavac_server_java+set}" = set; then :
33196  withval=$with_sjavac_server_java;
33197fi
33198
33199
33200if test "x$with_sjavac_server_java" != x; then
33201    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33202    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33203    if test "x$FOUND_VERSION" = x; then
33204        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33205    fi
33206else
33207    SJAVAC_SERVER_JAVA=""
33208    # Hotspot specific options.
33209
33210    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33211    $ECHO "Command: $JAVA -verbosegc -version" >&5
33212    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33213    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33214    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33215    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33216        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33217	JVM_ARG_OK=true
33218    else
33219	$ECHO "Arg failed:" >&5
33220	$ECHO "$OUTPUT" >&5
33221	JVM_ARG_OK=false
33222    fi
33223
33224    # JRockit specific options.
33225
33226    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33227    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33228    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33229    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33230    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33231    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33232        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33233	JVM_ARG_OK=true
33234    else
33235	$ECHO "Arg failed:" >&5
33236	$ECHO "$OUTPUT" >&5
33237	JVM_ARG_OK=false
33238    fi
33239
33240    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33241fi
33242
33243
33244if test "$MEMORY_SIZE" -gt "2500"; then
33245
33246    $ECHO "Check if jvm arg is ok: -d64" >&5
33247    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33248    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33249    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33250    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33251    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33252        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33253	JVM_ARG_OK=true
33254    else
33255	$ECHO "Arg failed:" >&5
33256	$ECHO "$OUTPUT" >&5
33257	JVM_ARG_OK=false
33258    fi
33259
33260    if test "$JVM_ARG_OK" = true; then
33261        JVM_64BIT=true
33262	JVM_ARG_OK=false
33263    fi
33264    fi
33265
33266if test "$JVM_64BIT" = true; then
33267    if test "$MEMORY_SIZE" -gt "17000"; then
33268
33269    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33270    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33271    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33272    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33273    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33274    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33275        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33276	JVM_ARG_OK=true
33277    else
33278	$ECHO "Arg failed:" >&5
33279	$ECHO "$OUTPUT" >&5
33280	JVM_ARG_OK=false
33281    fi
33282
33283    fi
33284    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33285
33286    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33287    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33288    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33289    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33290    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33291    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33292        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33293	JVM_ARG_OK=true
33294    else
33295	$ECHO "Arg failed:" >&5
33296	$ECHO "$OUTPUT" >&5
33297	JVM_ARG_OK=false
33298    fi
33299
33300    fi
33301    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33302
33303    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33304    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33305    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33306    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33307    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33308    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33309        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33310	JVM_ARG_OK=true
33311    else
33312	$ECHO "Arg failed:" >&5
33313	$ECHO "$OUTPUT" >&5
33314	JVM_ARG_OK=false
33315    fi
33316
33317    fi
33318    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33319
33320    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33321    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33322    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33323    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33324    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33325    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33326        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33327	JVM_ARG_OK=true
33328    else
33329	$ECHO "Arg failed:" >&5
33330	$ECHO "$OUTPUT" >&5
33331	JVM_ARG_OK=false
33332    fi
33333
33334    fi
33335fi
33336if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33337
33338    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33339    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33340    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33341    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33342    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33343    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33344        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33345	JVM_ARG_OK=true
33346    else
33347	$ECHO "Arg failed:" >&5
33348	$ECHO "$OUTPUT" >&5
33349	JVM_ARG_OK=false
33350    fi
33351
33352fi
33353if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33354
33355    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33356    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33357    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33358    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33359    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33360    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33361        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33362	JVM_ARG_OK=true
33363    else
33364	$ECHO "Arg failed:" >&5
33365	$ECHO "$OUTPUT" >&5
33366	JVM_ARG_OK=false
33367    fi
33368
33369fi
33370if test "$JVM_ARG_OK" = false; then
33371
33372    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33373    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33374    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33375    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33376    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33377    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33378        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33379	JVM_ARG_OK=true
33380    else
33381	$ECHO "Arg failed:" >&5
33382	$ECHO "$OUTPUT" >&5
33383	JVM_ARG_OK=false
33384    fi
33385
33386fi
33387
33388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33389$as_echo_n "checking whether to use sjavac... " >&6; }
33390# Check whether --enable-sjavac was given.
33391if test "${enable_sjavac+set}" = set; then :
33392  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33393else
33394  ENABLE_SJAVAC='no'
33395fi
33396
33397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33398$as_echo "$ENABLE_SJAVAC" >&6; }
33399
33400
33401if test "x$ENABLE_SJAVAC" = xyes; then
33402    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33403else
33404    SJAVAC_SERVER_DIR=
33405fi
33406
33407
33408
33409
33410# Can the C/C++ compiler use precompiled headers?
33411
33412
33413###############################################################################
33414#
33415# Can the C/C++ compiler use precompiled headers?
33416#
33417# Check whether --enable-precompiled-headers was given.
33418if test "${enable_precompiled_headers+set}" = set; then :
33419  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33420else
33421  ENABLE_PRECOMPH=yes
33422fi
33423
33424
33425USE_PRECOMPILED_HEADER=1
33426if test "x$ENABLE_PRECOMPH" = xno; then
33427    USE_PRECOMPILED_HEADER=0
33428fi
33429
33430if test "x$ENABLE_PRECOMPH" = xyes; then
33431    # Check that the compiler actually supports precomp headers.
33432    if test "x$GCC" = xyes; then
33433         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33434$as_echo_n "checking that precompiled headers work... " >&6; }
33435         echo "int alfa();" > conftest.h
33436         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33437         if test ! -f conftest.hpp.gch; then
33438             USE_PRECOMPILED_HEADER=0
33439             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33440$as_echo "no" >&6; }
33441         else
33442             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33443$as_echo "yes" >&6; }
33444         fi
33445         rm -f conftest.h conftest.hpp.gch
33446    fi
33447fi
33448
33449
33450
33451
33452# Setup use of ccache, if available
33453
33454    # Check whether --enable-ccache was given.
33455if test "${enable_ccache+set}" = set; then :
33456  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33457else
33458  ENABLE_CCACHE=yes
33459fi
33460
33461    if test "x$ENABLE_CCACHE" = xyes; then
33462        OLD_PATH="$PATH"
33463        if test "x$TOOLS_DIR" != x; then
33464          PATH=$TOOLS_DIR:$PATH
33465        fi
33466        # Extract the first word of "ccache", so it can be a program name with args.
33467set dummy ccache; ac_word=$2
33468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33469$as_echo_n "checking for $ac_word... " >&6; }
33470if ${ac_cv_path_CCACHE+:} false; then :
33471  $as_echo_n "(cached) " >&6
33472else
33473  case $CCACHE in
33474  [\\/]* | ?:[\\/]*)
33475  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33476  ;;
33477  *)
33478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33479for as_dir in $PATH
33480do
33481  IFS=$as_save_IFS
33482  test -z "$as_dir" && as_dir=.
33483    for ac_exec_ext in '' $ac_executable_extensions; do
33484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33485    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33487    break 2
33488  fi
33489done
33490  done
33491IFS=$as_save_IFS
33492
33493  ;;
33494esac
33495fi
33496CCACHE=$ac_cv_path_CCACHE
33497if test -n "$CCACHE"; then
33498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33499$as_echo "$CCACHE" >&6; }
33500else
33501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33502$as_echo "no" >&6; }
33503fi
33504
33505
33506        PATH="$OLD_PATH"
33507    else
33508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33509$as_echo_n "checking for ccache... " >&6; }
33510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33511$as_echo "explicitly disabled" >&6; }
33512        CCACHE=
33513    fi
33514
33515
33516
33517# Check whether --with-ccache-dir was given.
33518if test "${with_ccache_dir+set}" = set; then :
33519  withval=$with_ccache_dir;
33520fi
33521
33522
33523    if test "x$with_ccache_dir" != x; then
33524        # When using a non home ccache directory, assume the use is to share ccache files
33525        # with other users. Thus change the umask.
33526        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33527    fi
33528    CCACHE_FOUND=""
33529    if test "x$CCACHE" != x; then
33530
33531    if test "x$CCACHE" != x; then
33532        CCACHE_FOUND="true"
33533        # Only use ccache if it is 3.1.4 or later, which supports
33534        # precompiled headers.
33535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33536$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33537        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33538        if test "x$HAS_GOOD_CCACHE" = x; then
33539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33540$as_echo "no, disabling ccache" >&6; }
33541            CCACHE=
33542        else
33543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33544$as_echo "yes" >&6; }
33545            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33546$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33547            PUSHED_FLAGS="$CXXFLAGS"
33548            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33549            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33550/* end confdefs.h.  */
33551
33552int
33553main ()
33554{
33555
33556  ;
33557  return 0;
33558}
33559_ACEOF
33560if ac_fn_cxx_try_compile "$LINENO"; then :
33561  CC_KNOWS_CCACHE_TRICK=yes
33562else
33563  CC_KNOWS_CCACHE_TRICK=no
33564fi
33565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33566            CXXFLAGS="$PUSHED_FLAGS"
33567            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33568                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33569$as_echo "yes" >&6; }
33570            else
33571                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33572$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33573                CCACHE=
33574            fi
33575        fi
33576    fi
33577
33578    if test "x$CCACHE" != x; then
33579        CCACHE_SLOPPINESS=time_macros
33580        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33581        CCACHE_FLAGS=-fpch-preprocess
33582
33583        if test "x$SET_CCACHE_DIR" != x; then
33584            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33585	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33586        fi
33587    fi
33588
33589    fi
33590
33591
33592###############################################################################
33593#
33594# And now the finish...
33595#
33596###############################################################################
33597
33598# Check for some common pitfalls
33599
33600  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33601    file_to_test="$SRC_ROOT/LICENSE"
33602    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33603      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
33604    fi
33605  fi
33606
33607
33608
33609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33610$as_echo_n "checking if build directory is on local disk... " >&6; }
33611
33612	# df -l lists only local disks; if the given directory is not found then
33613	# a non-zero exit code is given
33614  if test "x$DF" = x; then
33615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33616      # msys does not have df; use Windows "net use" instead.
33617      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33618      if test "x$IS_NETWORK_DISK" = x; then
33619        OUTPUT_DIR_IS_LOCAL="yes"
33620      else
33621        OUTPUT_DIR_IS_LOCAL="no"
33622      fi
33623    else
33624      # No df here, say it's local
33625      OUTPUT_DIR_IS_LOCAL="yes"
33626    fi
33627  else
33628    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33629      OUTPUT_DIR_IS_LOCAL="yes"
33630    else
33631      OUTPUT_DIR_IS_LOCAL="no"
33632    fi
33633  fi
33634
33635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33636$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33637
33638
33639
33640# Check if the user has any old-style ALT_ variables set.
33641FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33642
33643# Before generating output files, test if they exist. If they do, this is a reconfigure.
33644# Since we can't properly handle the dependencies for this, warn the user about the situation
33645if test -e $OUTPUT_ROOT/spec.gmk; then
33646  IS_RECONFIGURE=yes
33647else
33648  IS_RECONFIGURE=no
33649fi
33650
33651if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33652  HIDE_PERFORMANCE_HINTS=yes
33653else
33654  HIDE_PERFORMANCE_HINTS=no
33655  # Hide it the next time around...
33656  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33657fi
33658
33659
33660
33661# At the end, call the custom hook. (Dummy macro if no custom sources available)
33662
33663
33664# We're messing a bit with internal autoconf variables to put the config.status
33665# in the output directory instead of the current directory.
33666CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33667# Create the actual output files. Now the main work of configure is done.
33668cat >confcache <<\_ACEOF
33669# This file is a shell script that caches the results of configure
33670# tests run on this system so they can be shared between configure
33671# scripts and configure runs, see configure's option --config-cache.
33672# It is not useful on other systems.  If it contains results you don't
33673# want to keep, you may remove or edit it.
33674#
33675# config.status only pays attention to the cache file if you give it
33676# the --recheck option to rerun configure.
33677#
33678# `ac_cv_env_foo' variables (set or unset) will be overridden when
33679# loading this file, other *unset* `ac_cv_foo' will be assigned the
33680# following values.
33681
33682_ACEOF
33683
33684# The following way of writing the cache mishandles newlines in values,
33685# but we know of no workaround that is simple, portable, and efficient.
33686# So, we kill variables containing newlines.
33687# Ultrix sh set writes to stderr and can't be redirected directly,
33688# and sets the high bit in the cache file unless we assign to the vars.
33689(
33690  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33691    eval ac_val=\$$ac_var
33692    case $ac_val in #(
33693    *${as_nl}*)
33694      case $ac_var in #(
33695      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33696$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33697      esac
33698      case $ac_var in #(
33699      _ | IFS | as_nl) ;; #(
33700      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33701      *) { eval $ac_var=; unset $ac_var;} ;;
33702      esac ;;
33703    esac
33704  done
33705
33706  (set) 2>&1 |
33707    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33708    *${as_nl}ac_space=\ *)
33709      # `set' does not quote correctly, so add quotes: double-quote
33710      # substitution turns \\\\ into \\, and sed turns \\ into \.
33711      sed -n \
33712	"s/'/'\\\\''/g;
33713	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33714      ;; #(
33715    *)
33716      # `set' quotes correctly as required by POSIX, so do not add quotes.
33717      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33718      ;;
33719    esac |
33720    sort
33721) |
33722  sed '
33723     /^ac_cv_env_/b end
33724     t clear
33725     :clear
33726     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33727     t end
33728     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33729     :end' >>confcache
33730if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33731  if test -w "$cache_file"; then
33732    if test "x$cache_file" != "x/dev/null"; then
33733      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33734$as_echo "$as_me: updating cache $cache_file" >&6;}
33735      if test ! -f "$cache_file" || test -h "$cache_file"; then
33736	cat confcache >"$cache_file"
33737      else
33738        case $cache_file in #(
33739        */* | ?:*)
33740	  mv -f confcache "$cache_file"$$ &&
33741	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33742        *)
33743	  mv -f confcache "$cache_file" ;;
33744	esac
33745      fi
33746    fi
33747  else
33748    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33749$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33750  fi
33751fi
33752rm -f confcache
33753
33754test "x$prefix" = xNONE && prefix=$ac_default_prefix
33755# Let make expand exec_prefix.
33756test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33757
33758DEFS=-DHAVE_CONFIG_H
33759
33760ac_libobjs=
33761ac_ltlibobjs=
33762U=
33763for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33764  # 1. Remove the extension, and $U if already installed.
33765  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33766  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33767  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33768  #    will be set to the directory where LIBOBJS objects are built.
33769  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33770  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33771done
33772LIBOBJS=$ac_libobjs
33773
33774LTLIBOBJS=$ac_ltlibobjs
33775
33776
33777
33778: "${CONFIG_STATUS=./config.status}"
33779ac_write_fail=0
33780ac_clean_files_save=$ac_clean_files
33781ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33782{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33783$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33784as_write_fail=0
33785cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33786#! $SHELL
33787# Generated by $as_me.
33788# Run this file to recreate the current configuration.
33789# Compiler output produced by configure, useful for debugging
33790# configure, is in config.log if it exists.
33791
33792debug=false
33793ac_cs_recheck=false
33794ac_cs_silent=false
33795
33796SHELL=\${CONFIG_SHELL-$SHELL}
33797export SHELL
33798_ASEOF
33799cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33800## -------------------- ##
33801## M4sh Initialization. ##
33802## -------------------- ##
33803
33804# Be more Bourne compatible
33805DUALCASE=1; export DUALCASE # for MKS sh
33806if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33807  emulate sh
33808  NULLCMD=:
33809  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33810  # is contrary to our usage.  Disable this feature.
33811  alias -g '${1+"$@"}'='"$@"'
33812  setopt NO_GLOB_SUBST
33813else
33814  case `(set -o) 2>/dev/null` in #(
33815  *posix*) :
33816    set -o posix ;; #(
33817  *) :
33818     ;;
33819esac
33820fi
33821
33822
33823as_nl='
33824'
33825export as_nl
33826# Printing a long string crashes Solaris 7 /usr/bin/printf.
33827as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33828as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33829as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33830# Prefer a ksh shell builtin over an external printf program on Solaris,
33831# but without wasting forks for bash or zsh.
33832if test -z "$BASH_VERSION$ZSH_VERSION" \
33833    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33834  as_echo='print -r --'
33835  as_echo_n='print -rn --'
33836elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33837  as_echo='printf %s\n'
33838  as_echo_n='printf %s'
33839else
33840  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33841    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33842    as_echo_n='/usr/ucb/echo -n'
33843  else
33844    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33845    as_echo_n_body='eval
33846      arg=$1;
33847      case $arg in #(
33848      *"$as_nl"*)
33849	expr "X$arg" : "X\\(.*\\)$as_nl";
33850	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33851      esac;
33852      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33853    '
33854    export as_echo_n_body
33855    as_echo_n='sh -c $as_echo_n_body as_echo'
33856  fi
33857  export as_echo_body
33858  as_echo='sh -c $as_echo_body as_echo'
33859fi
33860
33861# The user is always right.
33862if test "${PATH_SEPARATOR+set}" != set; then
33863  PATH_SEPARATOR=:
33864  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33865    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33866      PATH_SEPARATOR=';'
33867  }
33868fi
33869
33870
33871# IFS
33872# We need space, tab and new line, in precisely that order.  Quoting is
33873# there to prevent editors from complaining about space-tab.
33874# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33875# splitting by setting IFS to empty value.)
33876IFS=" ""	$as_nl"
33877
33878# Find who we are.  Look in the path if we contain no directory separator.
33879as_myself=
33880case $0 in #((
33881  *[\\/]* ) as_myself=$0 ;;
33882  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33883for as_dir in $PATH
33884do
33885  IFS=$as_save_IFS
33886  test -z "$as_dir" && as_dir=.
33887    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33888  done
33889IFS=$as_save_IFS
33890
33891     ;;
33892esac
33893# We did not find ourselves, most probably we were run as `sh COMMAND'
33894# in which case we are not to be found in the path.
33895if test "x$as_myself" = x; then
33896  as_myself=$0
33897fi
33898if test ! -f "$as_myself"; then
33899  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33900  exit 1
33901fi
33902
33903# Unset variables that we do not need and which cause bugs (e.g. in
33904# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33905# suppresses any "Segmentation fault" message there.  '((' could
33906# trigger a bug in pdksh 5.2.14.
33907for as_var in BASH_ENV ENV MAIL MAILPATH
33908do eval test x\${$as_var+set} = xset \
33909  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33910done
33911PS1='$ '
33912PS2='> '
33913PS4='+ '
33914
33915# NLS nuisances.
33916LC_ALL=C
33917export LC_ALL
33918LANGUAGE=C
33919export LANGUAGE
33920
33921# CDPATH.
33922(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33923
33924
33925# as_fn_error STATUS ERROR [LINENO LOG_FD]
33926# ----------------------------------------
33927# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33928# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33929# script with STATUS, using 1 if that was 0.
33930as_fn_error ()
33931{
33932  as_status=$1; test $as_status -eq 0 && as_status=1
33933  if test "$4"; then
33934    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33935    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33936  fi
33937  $as_echo "$as_me: error: $2" >&2
33938  as_fn_exit $as_status
33939} # as_fn_error
33940
33941
33942# as_fn_set_status STATUS
33943# -----------------------
33944# Set $? to STATUS, without forking.
33945as_fn_set_status ()
33946{
33947  return $1
33948} # as_fn_set_status
33949
33950# as_fn_exit STATUS
33951# -----------------
33952# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33953as_fn_exit ()
33954{
33955  set +e
33956  as_fn_set_status $1
33957  exit $1
33958} # as_fn_exit
33959
33960# as_fn_unset VAR
33961# ---------------
33962# Portably unset VAR.
33963as_fn_unset ()
33964{
33965  { eval $1=; unset $1;}
33966}
33967as_unset=as_fn_unset
33968# as_fn_append VAR VALUE
33969# ----------------------
33970# Append the text in VALUE to the end of the definition contained in VAR. Take
33971# advantage of any shell optimizations that allow amortized linear growth over
33972# repeated appends, instead of the typical quadratic growth present in naive
33973# implementations.
33974if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33975  eval 'as_fn_append ()
33976  {
33977    eval $1+=\$2
33978  }'
33979else
33980  as_fn_append ()
33981  {
33982    eval $1=\$$1\$2
33983  }
33984fi # as_fn_append
33985
33986# as_fn_arith ARG...
33987# ------------------
33988# Perform arithmetic evaluation on the ARGs, and store the result in the
33989# global $as_val. Take advantage of shells that can avoid forks. The arguments
33990# must be portable across $(()) and expr.
33991if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33992  eval 'as_fn_arith ()
33993  {
33994    as_val=$(( $* ))
33995  }'
33996else
33997  as_fn_arith ()
33998  {
33999    as_val=`expr "$@" || test $? -eq 1`
34000  }
34001fi # as_fn_arith
34002
34003
34004if expr a : '\(a\)' >/dev/null 2>&1 &&
34005   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34006  as_expr=expr
34007else
34008  as_expr=false
34009fi
34010
34011if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34012  as_basename=basename
34013else
34014  as_basename=false
34015fi
34016
34017if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34018  as_dirname=dirname
34019else
34020  as_dirname=false
34021fi
34022
34023as_me=`$as_basename -- "$0" ||
34024$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34025	 X"$0" : 'X\(//\)$' \| \
34026	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34027$as_echo X/"$0" |
34028    sed '/^.*\/\([^/][^/]*\)\/*$/{
34029	    s//\1/
34030	    q
34031	  }
34032	  /^X\/\(\/\/\)$/{
34033	    s//\1/
34034	    q
34035	  }
34036	  /^X\/\(\/\).*/{
34037	    s//\1/
34038	    q
34039	  }
34040	  s/.*/./; q'`
34041
34042# Avoid depending upon Character Ranges.
34043as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34044as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34045as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34046as_cr_digits='0123456789'
34047as_cr_alnum=$as_cr_Letters$as_cr_digits
34048
34049ECHO_C= ECHO_N= ECHO_T=
34050case `echo -n x` in #(((((
34051-n*)
34052  case `echo 'xy\c'` in
34053  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34054  xy)  ECHO_C='\c';;
34055  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34056       ECHO_T='	';;
34057  esac;;
34058*)
34059  ECHO_N='-n';;
34060esac
34061
34062rm -f conf$$ conf$$.exe conf$$.file
34063if test -d conf$$.dir; then
34064  rm -f conf$$.dir/conf$$.file
34065else
34066  rm -f conf$$.dir
34067  mkdir conf$$.dir 2>/dev/null
34068fi
34069if (echo >conf$$.file) 2>/dev/null; then
34070  if ln -s conf$$.file conf$$ 2>/dev/null; then
34071    as_ln_s='ln -s'
34072    # ... but there are two gotchas:
34073    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34074    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34075    # In both cases, we have to default to `cp -pR'.
34076    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34077      as_ln_s='cp -pR'
34078  elif ln conf$$.file conf$$ 2>/dev/null; then
34079    as_ln_s=ln
34080  else
34081    as_ln_s='cp -pR'
34082  fi
34083else
34084  as_ln_s='cp -pR'
34085fi
34086rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34087rmdir conf$$.dir 2>/dev/null
34088
34089
34090# as_fn_mkdir_p
34091# -------------
34092# Create "$as_dir" as a directory, including parents if necessary.
34093as_fn_mkdir_p ()
34094{
34095
34096  case $as_dir in #(
34097  -*) as_dir=./$as_dir;;
34098  esac
34099  test -d "$as_dir" || eval $as_mkdir_p || {
34100    as_dirs=
34101    while :; do
34102      case $as_dir in #(
34103      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34104      *) as_qdir=$as_dir;;
34105      esac
34106      as_dirs="'$as_qdir' $as_dirs"
34107      as_dir=`$as_dirname -- "$as_dir" ||
34108$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34109	 X"$as_dir" : 'X\(//\)[^/]' \| \
34110	 X"$as_dir" : 'X\(//\)$' \| \
34111	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34112$as_echo X"$as_dir" |
34113    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34114	    s//\1/
34115	    q
34116	  }
34117	  /^X\(\/\/\)[^/].*/{
34118	    s//\1/
34119	    q
34120	  }
34121	  /^X\(\/\/\)$/{
34122	    s//\1/
34123	    q
34124	  }
34125	  /^X\(\/\).*/{
34126	    s//\1/
34127	    q
34128	  }
34129	  s/.*/./; q'`
34130      test -d "$as_dir" && break
34131    done
34132    test -z "$as_dirs" || eval "mkdir $as_dirs"
34133  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34134
34135
34136} # as_fn_mkdir_p
34137if mkdir -p . 2>/dev/null; then
34138  as_mkdir_p='mkdir -p "$as_dir"'
34139else
34140  test -d ./-p && rmdir ./-p
34141  as_mkdir_p=false
34142fi
34143
34144
34145# as_fn_executable_p FILE
34146# -----------------------
34147# Test if FILE is an executable regular file.
34148as_fn_executable_p ()
34149{
34150  test -f "$1" && test -x "$1"
34151} # as_fn_executable_p
34152as_test_x='test -x'
34153as_executable_p=as_fn_executable_p
34154
34155# Sed expression to map a string onto a valid CPP name.
34156as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34157
34158# Sed expression to map a string onto a valid variable name.
34159as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34160
34161
34162exec 6>&1
34163## ----------------------------------- ##
34164## Main body of $CONFIG_STATUS script. ##
34165## ----------------------------------- ##
34166_ASEOF
34167test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34168
34169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34170# Save the log message, to keep $0 and so on meaningful, and to
34171# report actual input values of CONFIG_FILES etc. instead of their
34172# values after options handling.
34173ac_log="
34174This file was extended by OpenJDK $as_me jdk8, which was
34175generated by GNU Autoconf 2.69.  Invocation command line was
34176
34177  CONFIG_FILES    = $CONFIG_FILES
34178  CONFIG_HEADERS  = $CONFIG_HEADERS
34179  CONFIG_LINKS    = $CONFIG_LINKS
34180  CONFIG_COMMANDS = $CONFIG_COMMANDS
34181  $ $0 $@
34182
34183on `(hostname || uname -n) 2>/dev/null | sed 1q`
34184"
34185
34186_ACEOF
34187
34188case $ac_config_files in *"
34189"*) set x $ac_config_files; shift; ac_config_files=$*;;
34190esac
34191
34192case $ac_config_headers in *"
34193"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34194esac
34195
34196
34197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34198# Files that config.status was made for.
34199config_files="$ac_config_files"
34200config_headers="$ac_config_headers"
34201
34202_ACEOF
34203
34204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34205ac_cs_usage="\
34206\`$as_me' instantiates files and other configuration actions
34207from templates according to the current configuration.  Unless the files
34208and actions are specified as TAGs, all are instantiated by default.
34209
34210Usage: $0 [OPTION]... [TAG]...
34211
34212  -h, --help       print this help, then exit
34213  -V, --version    print version number and configuration settings, then exit
34214      --config     print configuration, then exit
34215  -q, --quiet, --silent
34216                   do not print progress messages
34217  -d, --debug      don't remove temporary files
34218      --recheck    update $as_me by reconfiguring in the same conditions
34219      --file=FILE[:TEMPLATE]
34220                   instantiate the configuration file FILE
34221      --header=FILE[:TEMPLATE]
34222                   instantiate the configuration header FILE
34223
34224Configuration files:
34225$config_files
34226
34227Configuration headers:
34228$config_headers
34229
34230Report bugs to <build-dev@openjdk.java.net>.
34231OpenJDK home page: <http://openjdk.java.net>."
34232
34233_ACEOF
34234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34235ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34236ac_cs_version="\\
34237OpenJDK config.status jdk8
34238configured by $0, generated by GNU Autoconf 2.69,
34239  with options \\"\$ac_cs_config\\"
34240
34241Copyright (C) 2012 Free Software Foundation, Inc.
34242This config.status script is free software; the Free Software Foundation
34243gives unlimited permission to copy, distribute and modify it."
34244
34245ac_pwd='$ac_pwd'
34246srcdir='$srcdir'
34247AWK='$AWK'
34248test -n "\$AWK" || AWK=awk
34249_ACEOF
34250
34251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34252# The default lists apply if the user does not specify any file.
34253ac_need_defaults=:
34254while test $# != 0
34255do
34256  case $1 in
34257  --*=?*)
34258    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34259    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34260    ac_shift=:
34261    ;;
34262  --*=)
34263    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34264    ac_optarg=
34265    ac_shift=:
34266    ;;
34267  *)
34268    ac_option=$1
34269    ac_optarg=$2
34270    ac_shift=shift
34271    ;;
34272  esac
34273
34274  case $ac_option in
34275  # Handling of the options.
34276  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34277    ac_cs_recheck=: ;;
34278  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34279    $as_echo "$ac_cs_version"; exit ;;
34280  --config | --confi | --conf | --con | --co | --c )
34281    $as_echo "$ac_cs_config"; exit ;;
34282  --debug | --debu | --deb | --de | --d | -d )
34283    debug=: ;;
34284  --file | --fil | --fi | --f )
34285    $ac_shift
34286    case $ac_optarg in
34287    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34288    '') as_fn_error $? "missing file argument" ;;
34289    esac
34290    as_fn_append CONFIG_FILES " '$ac_optarg'"
34291    ac_need_defaults=false;;
34292  --header | --heade | --head | --hea )
34293    $ac_shift
34294    case $ac_optarg in
34295    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34296    esac
34297    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34298    ac_need_defaults=false;;
34299  --he | --h)
34300    # Conflict between --help and --header
34301    as_fn_error $? "ambiguous option: \`$1'
34302Try \`$0 --help' for more information.";;
34303  --help | --hel | -h )
34304    $as_echo "$ac_cs_usage"; exit ;;
34305  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34306  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34307    ac_cs_silent=: ;;
34308
34309  # This is an error.
34310  -*) as_fn_error $? "unrecognized option: \`$1'
34311Try \`$0 --help' for more information." ;;
34312
34313  *) as_fn_append ac_config_targets " $1"
34314     ac_need_defaults=false ;;
34315
34316  esac
34317  shift
34318done
34319
34320ac_configure_extra_args=
34321
34322if $ac_cs_silent; then
34323  exec 6>/dev/null
34324  ac_configure_extra_args="$ac_configure_extra_args --silent"
34325fi
34326
34327_ACEOF
34328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34329if \$ac_cs_recheck; then
34330  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34331  shift
34332  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34333  CONFIG_SHELL='$SHELL'
34334  export CONFIG_SHELL
34335  exec "\$@"
34336fi
34337
34338_ACEOF
34339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34340exec 5>>config.log
34341{
34342  echo
34343  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34344## Running $as_me. ##
34345_ASBOX
34346  $as_echo "$ac_log"
34347} >&5
34348
34349_ACEOF
34350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34351_ACEOF
34352
34353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34354
34355# Handling of arguments.
34356for ac_config_target in $ac_config_targets
34357do
34358  case $ac_config_target in
34359    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34360    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34361    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34362    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34363    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34364    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34365    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34366
34367  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34368  esac
34369done
34370
34371
34372# If the user did not use the arguments to specify the items to instantiate,
34373# then the envvar interface is used.  Set only those that are not.
34374# We use the long form for the default assignment because of an extremely
34375# bizarre bug on SunOS 4.1.3.
34376if $ac_need_defaults; then
34377  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34378  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34379fi
34380
34381# Have a temporary directory for convenience.  Make it in the build tree
34382# simply because there is no reason against having it here, and in addition,
34383# creating and moving files from /tmp can sometimes cause problems.
34384# Hook for its removal unless debugging.
34385# Note that there is a small window in which the directory will not be cleaned:
34386# after its creation but before its name has been assigned to `$tmp'.
34387$debug ||
34388{
34389  tmp= ac_tmp=
34390  trap 'exit_status=$?
34391  : "${ac_tmp:=$tmp}"
34392  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34393' 0
34394  trap 'as_fn_exit 1' 1 2 13 15
34395}
34396# Create a (secure) tmp directory for tmp files.
34397
34398{
34399  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34400  test -d "$tmp"
34401}  ||
34402{
34403  tmp=./conf$$-$RANDOM
34404  (umask 077 && mkdir "$tmp")
34405} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34406ac_tmp=$tmp
34407
34408# Set up the scripts for CONFIG_FILES section.
34409# No need to generate them if there are no CONFIG_FILES.
34410# This happens for instance with `./config.status config.h'.
34411if test -n "$CONFIG_FILES"; then
34412
34413
34414ac_cr=`echo X | tr X '\015'`
34415# On cygwin, bash can eat \r inside `` if the user requested igncr.
34416# But we know of no other shell where ac_cr would be empty at this
34417# point, so we can use a bashism as a fallback.
34418if test "x$ac_cr" = x; then
34419  eval ac_cr=\$\'\\r\'
34420fi
34421ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34422if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34423  ac_cs_awk_cr='\\r'
34424else
34425  ac_cs_awk_cr=$ac_cr
34426fi
34427
34428echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34429_ACEOF
34430
34431
34432{
34433  echo "cat >conf$$subs.awk <<_ACEOF" &&
34434  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34435  echo "_ACEOF"
34436} >conf$$subs.sh ||
34437  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34438ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34439ac_delim='%!_!# '
34440for ac_last_try in false false false false false :; do
34441  . ./conf$$subs.sh ||
34442    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34443
34444  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34445  if test $ac_delim_n = $ac_delim_num; then
34446    break
34447  elif $ac_last_try; then
34448    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34449  else
34450    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34451  fi
34452done
34453rm -f conf$$subs.sh
34454
34455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34456cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34457_ACEOF
34458sed -n '
34459h
34460s/^/S["/; s/!.*/"]=/
34461p
34462g
34463s/^[^!]*!//
34464:repl
34465t repl
34466s/'"$ac_delim"'$//
34467t delim
34468:nl
34469h
34470s/\(.\{148\}\)..*/\1/
34471t more1
34472s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34473p
34474n
34475b repl
34476:more1
34477s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34478p
34479g
34480s/.\{148\}//
34481t nl
34482:delim
34483h
34484s/\(.\{148\}\)..*/\1/
34485t more2
34486s/["\\]/\\&/g; s/^/"/; s/$/"/
34487p
34488b
34489:more2
34490s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34491p
34492g
34493s/.\{148\}//
34494t delim
34495' <conf$$subs.awk | sed '
34496/^[^""]/{
34497  N
34498  s/\n//
34499}
34500' >>$CONFIG_STATUS || ac_write_fail=1
34501rm -f conf$$subs.awk
34502cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34503_ACAWK
34504cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34505  for (key in S) S_is_set[key] = 1
34506  FS = ""
34507
34508}
34509{
34510  line = $ 0
34511  nfields = split(line, field, "@")
34512  substed = 0
34513  len = length(field[1])
34514  for (i = 2; i < nfields; i++) {
34515    key = field[i]
34516    keylen = length(key)
34517    if (S_is_set[key]) {
34518      value = S[key]
34519      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34520      len += length(value) + length(field[++i])
34521      substed = 1
34522    } else
34523      len += 1 + keylen
34524  }
34525
34526  print line
34527}
34528
34529_ACAWK
34530_ACEOF
34531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34532if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34533  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34534else
34535  cat
34536fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34537  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34538_ACEOF
34539
34540# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34541# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34542# trailing colons and then remove the whole line if VPATH becomes empty
34543# (actually we leave an empty line to preserve line numbers).
34544if test "x$srcdir" = x.; then
34545  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34546h
34547s///
34548s/^/:/
34549s/[	 ]*$/:/
34550s/:\$(srcdir):/:/g
34551s/:\${srcdir}:/:/g
34552s/:@srcdir@:/:/g
34553s/^:*//
34554s/:*$//
34555x
34556s/\(=[	 ]*\).*/\1/
34557G
34558s/\n//
34559s/^[^=]*=[	 ]*$//
34560}'
34561fi
34562
34563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34564fi # test -n "$CONFIG_FILES"
34565
34566# Set up the scripts for CONFIG_HEADERS section.
34567# No need to generate them if there are no CONFIG_HEADERS.
34568# This happens for instance with `./config.status Makefile'.
34569if test -n "$CONFIG_HEADERS"; then
34570cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34571BEGIN {
34572_ACEOF
34573
34574# Transform confdefs.h into an awk script `defines.awk', embedded as
34575# here-document in config.status, that substitutes the proper values into
34576# config.h.in to produce config.h.
34577
34578# Create a delimiter string that does not exist in confdefs.h, to ease
34579# handling of long lines.
34580ac_delim='%!_!# '
34581for ac_last_try in false false :; do
34582  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34583  if test -z "$ac_tt"; then
34584    break
34585  elif $ac_last_try; then
34586    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34587  else
34588    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34589  fi
34590done
34591
34592# For the awk script, D is an array of macro values keyed by name,
34593# likewise P contains macro parameters if any.  Preserve backslash
34594# newline sequences.
34595
34596ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34597sed -n '
34598s/.\{148\}/&'"$ac_delim"'/g
34599t rset
34600:rset
34601s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34602t def
34603d
34604:def
34605s/\\$//
34606t bsnl
34607s/["\\]/\\&/g
34608s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34609D["\1"]=" \3"/p
34610s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34611d
34612:bsnl
34613s/["\\]/\\&/g
34614s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34615D["\1"]=" \3\\\\\\n"\\/p
34616t cont
34617s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34618t cont
34619d
34620:cont
34621n
34622s/.\{148\}/&'"$ac_delim"'/g
34623t clear
34624:clear
34625s/\\$//
34626t bsnlc
34627s/["\\]/\\&/g; s/^/"/; s/$/"/p
34628d
34629:bsnlc
34630s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34631b cont
34632' <confdefs.h | sed '
34633s/'"$ac_delim"'/"\\\
34634"/g' >>$CONFIG_STATUS || ac_write_fail=1
34635
34636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34637  for (key in D) D_is_set[key] = 1
34638  FS = ""
34639}
34640/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34641  line = \$ 0
34642  split(line, arg, " ")
34643  if (arg[1] == "#") {
34644    defundef = arg[2]
34645    mac1 = arg[3]
34646  } else {
34647    defundef = substr(arg[1], 2)
34648    mac1 = arg[2]
34649  }
34650  split(mac1, mac2, "(") #)
34651  macro = mac2[1]
34652  prefix = substr(line, 1, index(line, defundef) - 1)
34653  if (D_is_set[macro]) {
34654    # Preserve the white space surrounding the "#".
34655    print prefix "define", macro P[macro] D[macro]
34656    next
34657  } else {
34658    # Replace #undef with comments.  This is necessary, for example,
34659    # in the case of _POSIX_SOURCE, which is predefined and required
34660    # on some systems where configure will not decide to define it.
34661    if (defundef == "undef") {
34662      print "/*", prefix defundef, macro, "*/"
34663      next
34664    }
34665  }
34666}
34667{ print }
34668_ACAWK
34669_ACEOF
34670cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34671  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34672fi # test -n "$CONFIG_HEADERS"
34673
34674
34675eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34676shift
34677for ac_tag
34678do
34679  case $ac_tag in
34680  :[FHLC]) ac_mode=$ac_tag; continue;;
34681  esac
34682  case $ac_mode$ac_tag in
34683  :[FHL]*:*);;
34684  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34685  :[FH]-) ac_tag=-:-;;
34686  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34687  esac
34688  ac_save_IFS=$IFS
34689  IFS=:
34690  set x $ac_tag
34691  IFS=$ac_save_IFS
34692  shift
34693  ac_file=$1
34694  shift
34695
34696  case $ac_mode in
34697  :L) ac_source=$1;;
34698  :[FH])
34699    ac_file_inputs=
34700    for ac_f
34701    do
34702      case $ac_f in
34703      -) ac_f="$ac_tmp/stdin";;
34704      *) # Look for the file first in the build tree, then in the source tree
34705	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34706	 # because $ac_f cannot contain `:'.
34707	 test -f "$ac_f" ||
34708	   case $ac_f in
34709	   [\\/$]*) false;;
34710	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34711	   esac ||
34712	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34713      esac
34714      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34715      as_fn_append ac_file_inputs " '$ac_f'"
34716    done
34717
34718    # Let's still pretend it is `configure' which instantiates (i.e., don't
34719    # use $as_me), people would be surprised to read:
34720    #    /* config.h.  Generated by config.status.  */
34721    configure_input='Generated from '`
34722	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34723	`' by configure.'
34724    if test x"$ac_file" != x-; then
34725      configure_input="$ac_file.  $configure_input"
34726      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34727$as_echo "$as_me: creating $ac_file" >&6;}
34728    fi
34729    # Neutralize special characters interpreted by sed in replacement strings.
34730    case $configure_input in #(
34731    *\&* | *\|* | *\\* )
34732       ac_sed_conf_input=`$as_echo "$configure_input" |
34733       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34734    *) ac_sed_conf_input=$configure_input;;
34735    esac
34736
34737    case $ac_tag in
34738    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34739      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34740    esac
34741    ;;
34742  esac
34743
34744  ac_dir=`$as_dirname -- "$ac_file" ||
34745$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34746	 X"$ac_file" : 'X\(//\)[^/]' \| \
34747	 X"$ac_file" : 'X\(//\)$' \| \
34748	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34749$as_echo X"$ac_file" |
34750    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34751	    s//\1/
34752	    q
34753	  }
34754	  /^X\(\/\/\)[^/].*/{
34755	    s//\1/
34756	    q
34757	  }
34758	  /^X\(\/\/\)$/{
34759	    s//\1/
34760	    q
34761	  }
34762	  /^X\(\/\).*/{
34763	    s//\1/
34764	    q
34765	  }
34766	  s/.*/./; q'`
34767  as_dir="$ac_dir"; as_fn_mkdir_p
34768  ac_builddir=.
34769
34770case "$ac_dir" in
34771.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34772*)
34773  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34774  # A ".." for each directory in $ac_dir_suffix.
34775  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34776  case $ac_top_builddir_sub in
34777  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34778  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34779  esac ;;
34780esac
34781ac_abs_top_builddir=$ac_pwd
34782ac_abs_builddir=$ac_pwd$ac_dir_suffix
34783# for backward compatibility:
34784ac_top_builddir=$ac_top_build_prefix
34785
34786case $srcdir in
34787  .)  # We are building in place.
34788    ac_srcdir=.
34789    ac_top_srcdir=$ac_top_builddir_sub
34790    ac_abs_top_srcdir=$ac_pwd ;;
34791  [\\/]* | ?:[\\/]* )  # Absolute name.
34792    ac_srcdir=$srcdir$ac_dir_suffix;
34793    ac_top_srcdir=$srcdir
34794    ac_abs_top_srcdir=$srcdir ;;
34795  *) # Relative name.
34796    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34797    ac_top_srcdir=$ac_top_build_prefix$srcdir
34798    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34799esac
34800ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34801
34802
34803  case $ac_mode in
34804  :F)
34805  #
34806  # CONFIG_FILE
34807  #
34808
34809_ACEOF
34810
34811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34812# If the template does not know about datarootdir, expand it.
34813# FIXME: This hack should be removed a few years after 2.60.
34814ac_datarootdir_hack=; ac_datarootdir_seen=
34815ac_sed_dataroot='
34816/datarootdir/ {
34817  p
34818  q
34819}
34820/@datadir@/p
34821/@docdir@/p
34822/@infodir@/p
34823/@localedir@/p
34824/@mandir@/p'
34825case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34826*datarootdir*) ac_datarootdir_seen=yes;;
34827*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34828  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34829$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34830_ACEOF
34831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34832  ac_datarootdir_hack='
34833  s&@datadir@&$datadir&g
34834  s&@docdir@&$docdir&g
34835  s&@infodir@&$infodir&g
34836  s&@localedir@&$localedir&g
34837  s&@mandir@&$mandir&g
34838  s&\\\${datarootdir}&$datarootdir&g' ;;
34839esac
34840_ACEOF
34841
34842# Neutralize VPATH when `$srcdir' = `.'.
34843# Shell code in configure.ac might set extrasub.
34844# FIXME: do we really want to maintain this feature?
34845cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34846ac_sed_extra="$ac_vpsub
34847$extrasub
34848_ACEOF
34849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34850:t
34851/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34852s|@configure_input@|$ac_sed_conf_input|;t t
34853s&@top_builddir@&$ac_top_builddir_sub&;t t
34854s&@top_build_prefix@&$ac_top_build_prefix&;t t
34855s&@srcdir@&$ac_srcdir&;t t
34856s&@abs_srcdir@&$ac_abs_srcdir&;t t
34857s&@top_srcdir@&$ac_top_srcdir&;t t
34858s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34859s&@builddir@&$ac_builddir&;t t
34860s&@abs_builddir@&$ac_abs_builddir&;t t
34861s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34862$ac_datarootdir_hack
34863"
34864eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34865  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34866
34867test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34868  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34869  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34870      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34871  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34872which seems to be undefined.  Please make sure it is defined" >&5
34873$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34874which seems to be undefined.  Please make sure it is defined" >&2;}
34875
34876  rm -f "$ac_tmp/stdin"
34877  case $ac_file in
34878  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34879  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34880  esac \
34881  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34882 ;;
34883  :H)
34884  #
34885  # CONFIG_HEADER
34886  #
34887  if test x"$ac_file" != x-; then
34888    {
34889      $as_echo "/* $configure_input  */" \
34890      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34891    } >"$ac_tmp/config.h" \
34892      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34893    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34894      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34895$as_echo "$as_me: $ac_file is unchanged" >&6;}
34896    else
34897      rm -f "$ac_file"
34898      mv "$ac_tmp/config.h" "$ac_file" \
34899	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34900    fi
34901  else
34902    $as_echo "/* $configure_input  */" \
34903      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34904      || as_fn_error $? "could not create -" "$LINENO" 5
34905  fi
34906 ;;
34907
34908
34909  esac
34910
34911done # for ac_tag
34912
34913
34914as_fn_exit 0
34915_ACEOF
34916ac_clean_files=$ac_clean_files_save
34917
34918test $ac_write_fail = 0 ||
34919  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34920
34921
34922# configure is writing to config.log, and then calls config.status.
34923# config.status does its own redirection, appending to config.log.
34924# Unfortunately, on DOS this fails, as config.log is still kept open
34925# by configure, so config.status won't be able to write to it; its
34926# output is simply discarded.  So we exec the FD to /dev/null,
34927# effectively closing config.log, so it can be properly (re)opened and
34928# appended to by config.status.  When coming back to configure, we
34929# need to make the FD available again.
34930if test "$no_create" != yes; then
34931  ac_cs_success=:
34932  ac_config_status_args=
34933  test "$silent" = yes &&
34934    ac_config_status_args="$ac_config_status_args --quiet"
34935  exec 5>/dev/null
34936  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34937  exec 5>>config.log
34938  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34939  # would make configure fail if this is the last instruction.
34940  $ac_cs_success || as_fn_exit 1
34941fi
34942if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34943  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34944$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34945fi
34946
34947
34948# Make the compare script executable
34949$CHMOD +x $OUTPUT_ROOT/compare.sh
34950
34951# Finally output some useful information to the user
34952
34953# Finally output some useful information to the user
34954
34955if test "x$CCACHE_FOUND" != x; then
34956	if  test "x$HAS_GOOD_CCACHE" = x; then
34957		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34958		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34959	else
34960		CCACHE_STATUS="installed and in use"
34961	fi
34962else
34963	if test "x$GCC" = xyes; then
34964		CCACHE_STATUS="not installed (consider installing)"
34965		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34966	else
34967		CCACHE_STATUS="not available for your system"
34968	fi
34969fi
34970
34971printf "\n"
34972printf "====================================================\n"
34973printf "A new configuration has been successfully created in\n"
34974printf "$OUTPUT_ROOT\n"
34975if test "x$CONFIGURE_COMMAND_LINE" != x; then
34976	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34977else
34978	printf "using default settings.\n"
34979fi
34980
34981printf "\n"
34982printf "Configuration summary:\n"
34983printf "* Debug level:    $DEBUG_LEVEL\n"
34984printf "* JDK variant:    $JDK_VARIANT\n"
34985printf "* JVM variants:   $with_jvm_variants\n"
34986printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34987
34988printf "\n"
34989printf "Tools summary:\n"
34990if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34991  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34992fi
34993printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34994printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34995printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34996
34997printf "\n"
34998printf "Build performance summary:\n"
34999printf "* Cores to use:   $JOBS\n"
35000printf "* Memory limit:   $MEMORY_SIZE MB\n"
35001printf "* ccache status:  $CCACHE_STATUS\n"
35002printf "\n"
35003
35004if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35005	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35006	printf "$CCACHE_HELP_MSG\n"
35007
35008    # Print a helpful message on how to acquire the necessary build dependency.
35009    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35010    MISSING_DEPENDENCY=ccache
35011    PKGHANDLER_COMMAND=
35012
35013    case $PKGHANDLER in
35014	apt-get)
35015                apt_help     $MISSING_DEPENDENCY ;;
35016    yum)
35017                yum_help     $MISSING_DEPENDENCY ;;
35018	port)
35019                port_help    $MISSING_DEPENDENCY ;;
35020	pkgutil)
35021                pkgutil_help $MISSING_DEPENDENCY ;;
35022	pkgadd)
35023                pkgadd_help  $MISSING_DEPENDENCY ;;
35024    * )
35025      break ;;
35026    esac
35027
35028    if test "x$PKGHANDLER_COMMAND" != x; then
35029        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35030    fi
35031
35032	printf "$HELP_MSG\n"
35033	printf "\n"
35034fi
35035
35036if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35037	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35038	printf "will result in longer build times.\n"
35039	printf "\n"
35040fi
35041
35042if test "x$FOUND_ALT_VARIABLES" != "x"; then
35043	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35044	printf "These are not respected, and will be ignored. It is recommended\n"
35045	printf "that you clean your environment. The following variables are set:\n"
35046	printf "$FOUND_ALT_VARIABLES\n"
35047	printf "\n"
35048fi
35049
35050if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35051	printf "WARNING: Your build output directory is not on a local disk.\n"
35052	printf "This will severely degrade build performance!\n"
35053	printf "It is recommended that you create an output directory on a local disk,\n"
35054	printf "and run the configure script again from that directory.\n"
35055	printf "\n"
35056fi
35057
35058if test "x$IS_RECONFIGURE" = "xyes"; then
35059	printf "WARNING: The result of this configuration has overridden an older\n"
35060	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35061	printf "proper build. Failure to do so might result in strange build problems.\n"
35062	printf "\n"
35063fi
35064
35065