generated-configure.sh revision 793:64f52ef175a4
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712TARGET_BITS_FLAG
713JT_HOME
714JTREGEXE
715LIPO
716ac_ct_OBJDUMP
717OBJDUMP
718ac_ct_OBJCOPY
719OBJCOPY
720MCS
721STRIP
722GNM
723NM
724AS
725CXXCPP
726CPP
727COMPILER_TYPE
728RC_FLAGS
729DUMPBIN
730WINAR
731HOTSPOT_RC
732HOTSPOT_MT
733RC
734MT
735WINLD
736HOTSPOT_LD
737HOTSPOT_CXX
738ARFLAGS
739AR
740LDEXECXX
741LDCXX
742LDEXE
743LD
744ac_ct_OBJC
745OBJCFLAGS
746OBJC
747ac_ct_CXX
748CXXFLAGS
749CXX
750ac_ct_PROPER_COMPILER_CXX
751PROPER_COMPILER_CXX
752POTENTIAL_CXX
753TOOLS_DIR_CXX
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761ac_ct_PROPER_COMPILER_CC
762PROPER_COMPILER_CC
763POTENTIAL_CC
764TOOLS_DIR_CC
765BUILD_LD
766BUILD_CXX
767BUILD_CC
768MSVCR_DLL
769DXSDK_INCLUDE_PATH
770DXSDK_LIB_PATH
771VS_PATH
772VS_LIB
773VS_INCLUDE
774CYGWIN_LINK
775AR_OUT_OPTION
776LD_OUT_OPTION
777EXE_OUT_OPTION
778CC_OUT_OPTION
779BUILD_HOTSPOT
780HOTSPOT_DIST
781BUILD_OUTPUT
782OVERRIDE_SRC_ROOT
783ADD_SRC_ROOT
784JDK_TOPDIR
785NASHORN_TOPDIR
786HOTSPOT_TOPDIR
787JAXWS_TOPDIR
788JAXP_TOPDIR
789CORBA_TOPDIR
790LANGTOOLS_TOPDIR
791BOOT_JDK_JVMARGS
792JAVAC_FLAGS
793BOOT_JDK_SOURCETARGET
794BOOT_JDK
795BOOT_TOOLSJAR
796BOOT_RTJAR
797JAVA_CHECK
798JAVAC_CHECK
799COOKED_BUILD_NUMBER
800JDK_VERSION
801COPYRIGHT_YEAR
802MACOSX_BUNDLE_ID_BASE
803MACOSX_BUNDLE_NAME_BASE
804COMPANY_NAME
805JDK_RC_PLATFORM_NAME
806PRODUCT_SUFFIX
807PRODUCT_NAME
808LAUNCHER_NAME
809MILESTONE
810JDK_BUILD_NUMBER
811JDK_UPDATE_VERSION
812JDK_MICRO_VERSION
813JDK_MINOR_VERSION
814JDK_MAJOR_VERSION
815USER_RELEASE_SUFFIX
816COMPRESS_JARS
817UNLIMITED_CRYPTO
818CACERTS_FILE
819TEST_IN_BUILD
820BUILD_HEADLESS
821SUPPORT_HEADFUL
822SUPPORT_HEADLESS
823BDEPS_FTP
824BDEPS_UNZIP
825OS_VERSION_MICRO
826OS_VERSION_MINOR
827OS_VERSION_MAJOR
828PKG_CONFIG
829CODESIGN
830XATTR
831IS_GNU_TIME
832TIME
833STAT
834HG
835READELF
836OTOOL
837LDD
838ZIP
839UNZIP
840FIND_DELETE
841MAKE
842CHECK_TOOLSDIR_MAKE
843CHECK_TOOLSDIR_GMAKE
844CHECK_MAKE
845CHECK_GMAKE
846PKGHANDLER
847OUTPUT_ROOT
848CONF_NAME
849SPEC
850BUILD_VARIANT_RELEASE
851DEBUG_CLASSFILES
852FASTDEBUG
853VARIANT
854DEBUG_LEVEL
855MACOSX_UNIVERSAL
856INCLUDE_SA
857JVM_VARIANT_ZEROSHARK
858JVM_VARIANT_ZERO
859JVM_VARIANT_KERNEL
860JVM_VARIANT_MINIMAL1
861JVM_VARIANT_CLIENT
862JVM_VARIANT_SERVER
863JVM_VARIANTS
864JDK_VARIANT
865SET_OPENJDK
866BUILD_LOG_WRAPPER
867BUILD_LOG_PREVIOUS
868BUILD_LOG
869SYS_ROOT
870PATH_SEP
871SRC_ROOT
872ZERO_ARCHDEF
873DEFINE_CROSS_COMPILE_ARCH
874LP64
875OPENJDK_TARGET_OS_API_DIR
876OPENJDK_TARGET_CPU_JLI_CFLAGS
877OPENJDK_TARGET_CPU_OSARCH
878OPENJDK_TARGET_CPU_ISADIR
879OPENJDK_TARGET_CPU_LIBDIR
880OPENJDK_TARGET_CPU_LEGACY_LIB
881OPENJDK_TARGET_CPU_LEGACY
882REQUIRED_OS_VERSION
883REQUIRED_OS_NAME
884COMPILE_TYPE
885OPENJDK_TARGET_CPU_ENDIAN
886OPENJDK_TARGET_CPU_BITS
887OPENJDK_TARGET_CPU_ARCH
888OPENJDK_TARGET_CPU
889OPENJDK_TARGET_OS_API
890OPENJDK_TARGET_OS
891OPENJDK_BUILD_CPU_ENDIAN
892OPENJDK_BUILD_CPU_BITS
893OPENJDK_BUILD_CPU_ARCH
894OPENJDK_BUILD_CPU
895OPENJDK_BUILD_OS_API
896OPENJDK_BUILD_OS
897OPENJDK_BUILD_AUTOCONF_NAME
898OPENJDK_TARGET_AUTOCONF_NAME
899target_os
900target_vendor
901target_cpu
902target
903host_os
904host_vendor
905host_cpu
906host
907build_os
908build_vendor
909build_cpu
910build
911SETFILE
912DF
913READLINK
914CYGPATH
915NAWK
916SED
917FGREP
918EGREP
919GREP
920AWK
921XARGS
922WHICH
923WC
924UNIQ
925UNAME
926TR
927TOUCH
928TEE
929TAR
930TAIL
931SORT
932SH
933RM
934PRINTF
935MV
936MKTEMP
937MKDIR
938LS
939LN
940HEAD
941FIND
942FILE
943EXPR
944ECHO
945DIRNAME
946DIFF
947DATE
948CUT
949CPIO
950CP
951COMM
952CMP
953CHMOD
954CAT
955BASH
956BASENAME
957DATE_WHEN_CONFIGURED
958CONFIGURE_COMMAND_LINE
959CUSTOM_MAKE_DIR
960target_alias
961host_alias
962build_alias
963LIBS
964ECHO_T
965ECHO_N
966ECHO_C
967DEFS
968mandir
969localedir
970libdir
971psdir
972pdfdir
973dvidir
974htmldir
975infodir
976docdir
977oldincludedir
978includedir
979localstatedir
980sharedstatedir
981sysconfdir
982datadir
983datarootdir
984libexecdir
985sbindir
986bindir
987program_transform_name
988prefix
989exec_prefix
990PACKAGE_URL
991PACKAGE_BUGREPORT
992PACKAGE_STRING
993PACKAGE_VERSION
994PACKAGE_TARNAME
995PACKAGE_NAME
996PATH_SEPARATOR
997SHELL'
998ac_subst_files=''
999ac_user_opts='
1000enable_option_checking
1001with_custom_make_dir
1002with_target_bits
1003with_sys_root
1004with_tools_dir
1005with_devkit
1006enable_openjdk_only
1007with_jdk_variant
1008with_jvm_variants
1009enable_debug
1010with_debug_level
1011with_conf_name
1012with_builddeps_conf
1013with_builddeps_server
1014with_builddeps_dir
1015with_builddeps_group
1016enable_headful
1017enable_hotspot_test_in_build
1018with_cacerts_file
1019enable_unlimited_crypto
1020with_milestone
1021with_update_version
1022with_build_number
1023with_user_release_suffix
1024with_boot_jdk
1025with_boot_jdk_jvmargs
1026with_add_source_root
1027with_override_source_root
1028with_adds_and_overrides
1029with_override_langtools
1030with_override_corba
1031with_override_jaxp
1032with_override_jaxws
1033with_override_hotspot
1034with_override_nashorn
1035with_override_jdk
1036with_import_hotspot
1037with_msvcr_dll
1038with_dxsdk
1039with_dxsdk_lib
1040with_dxsdk_include
1041with_jtreg
1042with_extra_cflags
1043with_extra_cxxflags
1044with_extra_ldflags
1045enable_debug_symbols
1046enable_zip_debug_info
1047enable_macosx_runtime_support
1048with_x
1049with_cups
1050with_cups_include
1051with_freetype
1052with_alsa
1053with_alsa_include
1054with_alsa_lib
1055with_giflib
1056with_zlib
1057with_stdc__lib
1058with_num_cores
1059with_memory_size
1060with_jobs
1061with_sjavac_server_java
1062enable_sjavac
1063enable_precompiled_headers
1064enable_ccache
1065with_ccache_dir
1066'
1067      ac_precious_vars='build_alias
1068host_alias
1069target_alias
1070PKG_CONFIG
1071CC
1072CFLAGS
1073LDFLAGS
1074LIBS
1075CPPFLAGS
1076CXX
1077CXXFLAGS
1078CCC
1079OBJC
1080OBJCFLAGS
1081CPP
1082CXXCPP
1083XMKMF
1084FREETYPE2_CFLAGS
1085FREETYPE2_LIBS
1086ALSA_CFLAGS
1087ALSA_LIBS
1088LIBFFI_CFLAGS
1089LIBFFI_LIBS'
1090
1091
1092# Initialize some variables set by options.
1093ac_init_help=
1094ac_init_version=false
1095ac_unrecognized_opts=
1096ac_unrecognized_sep=
1097# The variables have the same names as the options, with
1098# dashes changed to underlines.
1099cache_file=/dev/null
1100exec_prefix=NONE
1101no_create=
1102no_recursion=
1103prefix=NONE
1104program_prefix=NONE
1105program_suffix=NONE
1106program_transform_name=s,x,x,
1107silent=
1108site=
1109srcdir=
1110verbose=
1111x_includes=NONE
1112x_libraries=NONE
1113
1114# Installation directory options.
1115# These are left unexpanded so users can "make install exec_prefix=/foo"
1116# and all the variables that are supposed to be based on exec_prefix
1117# by default will actually change.
1118# Use braces instead of parens because sh, perl, etc. also accept them.
1119# (The list follows the same order as the GNU Coding Standards.)
1120bindir='${exec_prefix}/bin'
1121sbindir='${exec_prefix}/sbin'
1122libexecdir='${exec_prefix}/libexec'
1123datarootdir='${prefix}/share'
1124datadir='${datarootdir}'
1125sysconfdir='${prefix}/etc'
1126sharedstatedir='${prefix}/com'
1127localstatedir='${prefix}/var'
1128includedir='${prefix}/include'
1129oldincludedir='/usr/include'
1130docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1131infodir='${datarootdir}/info'
1132htmldir='${docdir}'
1133dvidir='${docdir}'
1134pdfdir='${docdir}'
1135psdir='${docdir}'
1136libdir='${exec_prefix}/lib'
1137localedir='${datarootdir}/locale'
1138mandir='${datarootdir}/man'
1139
1140ac_prev=
1141ac_dashdash=
1142for ac_option
1143do
1144  # If the previous option needs an argument, assign it.
1145  if test -n "$ac_prev"; then
1146    eval $ac_prev=\$ac_option
1147    ac_prev=
1148    continue
1149  fi
1150
1151  case $ac_option in
1152  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1153  *=)   ac_optarg= ;;
1154  *)    ac_optarg=yes ;;
1155  esac
1156
1157  # Accept the important Cygnus configure options, so we can diagnose typos.
1158
1159  case $ac_dashdash$ac_option in
1160  --)
1161    ac_dashdash=yes ;;
1162
1163  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1164    ac_prev=bindir ;;
1165  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1166    bindir=$ac_optarg ;;
1167
1168  -build | --build | --buil | --bui | --bu)
1169    ac_prev=build_alias ;;
1170  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1171    build_alias=$ac_optarg ;;
1172
1173  -cache-file | --cache-file | --cache-fil | --cache-fi \
1174  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1175    ac_prev=cache_file ;;
1176  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1177  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1178    cache_file=$ac_optarg ;;
1179
1180  --config-cache | -C)
1181    cache_file=config.cache ;;
1182
1183  -datadir | --datadir | --datadi | --datad)
1184    ac_prev=datadir ;;
1185  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1186    datadir=$ac_optarg ;;
1187
1188  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1189  | --dataroo | --dataro | --datar)
1190    ac_prev=datarootdir ;;
1191  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1192  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1193    datarootdir=$ac_optarg ;;
1194
1195  -disable-* | --disable-*)
1196    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1197    # Reject names that are not valid shell variable names.
1198    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199      as_fn_error $? "invalid feature name: $ac_useropt"
1200    ac_useropt_orig=$ac_useropt
1201    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202    case $ac_user_opts in
1203      *"
1204"enable_$ac_useropt"
1205"*) ;;
1206      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1207	 ac_unrecognized_sep=', ';;
1208    esac
1209    eval enable_$ac_useropt=no ;;
1210
1211  -docdir | --docdir | --docdi | --doc | --do)
1212    ac_prev=docdir ;;
1213  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1214    docdir=$ac_optarg ;;
1215
1216  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1217    ac_prev=dvidir ;;
1218  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1219    dvidir=$ac_optarg ;;
1220
1221  -enable-* | --enable-*)
1222    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1223    # Reject names that are not valid shell variable names.
1224    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1225      as_fn_error $? "invalid feature name: $ac_useropt"
1226    ac_useropt_orig=$ac_useropt
1227    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228    case $ac_user_opts in
1229      *"
1230"enable_$ac_useropt"
1231"*) ;;
1232      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1233	 ac_unrecognized_sep=', ';;
1234    esac
1235    eval enable_$ac_useropt=\$ac_optarg ;;
1236
1237  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1238  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1239  | --exec | --exe | --ex)
1240    ac_prev=exec_prefix ;;
1241  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1242  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1243  | --exec=* | --exe=* | --ex=*)
1244    exec_prefix=$ac_optarg ;;
1245
1246  -gas | --gas | --ga | --g)
1247    # Obsolete; use --with-gas.
1248    with_gas=yes ;;
1249
1250  -help | --help | --hel | --he | -h)
1251    ac_init_help=long ;;
1252  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1253    ac_init_help=recursive ;;
1254  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1255    ac_init_help=short ;;
1256
1257  -host | --host | --hos | --ho)
1258    ac_prev=host_alias ;;
1259  -host=* | --host=* | --hos=* | --ho=*)
1260    host_alias=$ac_optarg ;;
1261
1262  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1263    ac_prev=htmldir ;;
1264  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1265  | --ht=*)
1266    htmldir=$ac_optarg ;;
1267
1268  -includedir | --includedir | --includedi | --included | --include \
1269  | --includ | --inclu | --incl | --inc)
1270    ac_prev=includedir ;;
1271  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1272  | --includ=* | --inclu=* | --incl=* | --inc=*)
1273    includedir=$ac_optarg ;;
1274
1275  -infodir | --infodir | --infodi | --infod | --info | --inf)
1276    ac_prev=infodir ;;
1277  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1278    infodir=$ac_optarg ;;
1279
1280  -libdir | --libdir | --libdi | --libd)
1281    ac_prev=libdir ;;
1282  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1283    libdir=$ac_optarg ;;
1284
1285  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1286  | --libexe | --libex | --libe)
1287    ac_prev=libexecdir ;;
1288  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1289  | --libexe=* | --libex=* | --libe=*)
1290    libexecdir=$ac_optarg ;;
1291
1292  -localedir | --localedir | --localedi | --localed | --locale)
1293    ac_prev=localedir ;;
1294  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1295    localedir=$ac_optarg ;;
1296
1297  -localstatedir | --localstatedir | --localstatedi | --localstated \
1298  | --localstate | --localstat | --localsta | --localst | --locals)
1299    ac_prev=localstatedir ;;
1300  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1301  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1302    localstatedir=$ac_optarg ;;
1303
1304  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1305    ac_prev=mandir ;;
1306  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1307    mandir=$ac_optarg ;;
1308
1309  -nfp | --nfp | --nf)
1310    # Obsolete; use --without-fp.
1311    with_fp=no ;;
1312
1313  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1314  | --no-cr | --no-c | -n)
1315    no_create=yes ;;
1316
1317  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1318  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1319    no_recursion=yes ;;
1320
1321  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1322  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1323  | --oldin | --oldi | --old | --ol | --o)
1324    ac_prev=oldincludedir ;;
1325  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1326  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1327  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1328    oldincludedir=$ac_optarg ;;
1329
1330  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1331    ac_prev=prefix ;;
1332  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1333    prefix=$ac_optarg ;;
1334
1335  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1336  | --program-pre | --program-pr | --program-p)
1337    ac_prev=program_prefix ;;
1338  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1339  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1340    program_prefix=$ac_optarg ;;
1341
1342  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1343  | --program-suf | --program-su | --program-s)
1344    ac_prev=program_suffix ;;
1345  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1346  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1347    program_suffix=$ac_optarg ;;
1348
1349  -program-transform-name | --program-transform-name \
1350  | --program-transform-nam | --program-transform-na \
1351  | --program-transform-n | --program-transform- \
1352  | --program-transform | --program-transfor \
1353  | --program-transfo | --program-transf \
1354  | --program-trans | --program-tran \
1355  | --progr-tra | --program-tr | --program-t)
1356    ac_prev=program_transform_name ;;
1357  -program-transform-name=* | --program-transform-name=* \
1358  | --program-transform-nam=* | --program-transform-na=* \
1359  | --program-transform-n=* | --program-transform-=* \
1360  | --program-transform=* | --program-transfor=* \
1361  | --program-transfo=* | --program-transf=* \
1362  | --program-trans=* | --program-tran=* \
1363  | --progr-tra=* | --program-tr=* | --program-t=*)
1364    program_transform_name=$ac_optarg ;;
1365
1366  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1367    ac_prev=pdfdir ;;
1368  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1369    pdfdir=$ac_optarg ;;
1370
1371  -psdir | --psdir | --psdi | --psd | --ps)
1372    ac_prev=psdir ;;
1373  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1374    psdir=$ac_optarg ;;
1375
1376  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1377  | -silent | --silent | --silen | --sile | --sil)
1378    silent=yes ;;
1379
1380  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1381    ac_prev=sbindir ;;
1382  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1383  | --sbi=* | --sb=*)
1384    sbindir=$ac_optarg ;;
1385
1386  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1387  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1388  | --sharedst | --shareds | --shared | --share | --shar \
1389  | --sha | --sh)
1390    ac_prev=sharedstatedir ;;
1391  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1392  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1393  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1394  | --sha=* | --sh=*)
1395    sharedstatedir=$ac_optarg ;;
1396
1397  -site | --site | --sit)
1398    ac_prev=site ;;
1399  -site=* | --site=* | --sit=*)
1400    site=$ac_optarg ;;
1401
1402  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1403    ac_prev=srcdir ;;
1404  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1405    srcdir=$ac_optarg ;;
1406
1407  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1408  | --syscon | --sysco | --sysc | --sys | --sy)
1409    ac_prev=sysconfdir ;;
1410  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1411  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1412    sysconfdir=$ac_optarg ;;
1413
1414  -target | --target | --targe | --targ | --tar | --ta | --t)
1415    ac_prev=target_alias ;;
1416  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1417    target_alias=$ac_optarg ;;
1418
1419  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1420    verbose=yes ;;
1421
1422  -version | --version | --versio | --versi | --vers | -V)
1423    ac_init_version=: ;;
1424
1425  -with-* | --with-*)
1426    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1427    # Reject names that are not valid shell variable names.
1428    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1429      as_fn_error $? "invalid package name: $ac_useropt"
1430    ac_useropt_orig=$ac_useropt
1431    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1432    case $ac_user_opts in
1433      *"
1434"with_$ac_useropt"
1435"*) ;;
1436      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1437	 ac_unrecognized_sep=', ';;
1438    esac
1439    eval with_$ac_useropt=\$ac_optarg ;;
1440
1441  -without-* | --without-*)
1442    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1443    # Reject names that are not valid shell variable names.
1444    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1445      as_fn_error $? "invalid package name: $ac_useropt"
1446    ac_useropt_orig=$ac_useropt
1447    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1448    case $ac_user_opts in
1449      *"
1450"with_$ac_useropt"
1451"*) ;;
1452      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1453	 ac_unrecognized_sep=', ';;
1454    esac
1455    eval with_$ac_useropt=no ;;
1456
1457  --x)
1458    # Obsolete; use --with-x.
1459    with_x=yes ;;
1460
1461  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1462  | --x-incl | --x-inc | --x-in | --x-i)
1463    ac_prev=x_includes ;;
1464  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1465  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1466    x_includes=$ac_optarg ;;
1467
1468  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1469  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1470    ac_prev=x_libraries ;;
1471  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1472  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1473    x_libraries=$ac_optarg ;;
1474
1475  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1476Try \`$0 --help' for more information"
1477    ;;
1478
1479  *=*)
1480    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1481    # Reject names that are not valid shell variable names.
1482    case $ac_envvar in #(
1483      '' | [0-9]* | *[!_$as_cr_alnum]* )
1484      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1485    esac
1486    eval $ac_envvar=\$ac_optarg
1487    export $ac_envvar ;;
1488
1489  *)
1490    # FIXME: should be removed in autoconf 3.0.
1491    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1492    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1493      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1494    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1495    ;;
1496
1497  esac
1498done
1499
1500if test -n "$ac_prev"; then
1501  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1502  as_fn_error $? "missing argument to $ac_option"
1503fi
1504
1505if test -n "$ac_unrecognized_opts"; then
1506  case $enable_option_checking in
1507    no) ;;
1508    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1509    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1510  esac
1511fi
1512
1513# Check all directory arguments for consistency.
1514for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1515		datadir sysconfdir sharedstatedir localstatedir includedir \
1516		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1517		libdir localedir mandir
1518do
1519  eval ac_val=\$$ac_var
1520  # Remove trailing slashes.
1521  case $ac_val in
1522    */ )
1523      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1524      eval $ac_var=\$ac_val;;
1525  esac
1526  # Be sure to have absolute directory names.
1527  case $ac_val in
1528    [\\/$]* | ?:[\\/]* )  continue;;
1529    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1530  esac
1531  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1532done
1533
1534# There might be people who depend on the old broken behavior: `$host'
1535# used to hold the argument of --host etc.
1536# FIXME: To remove some day.
1537build=$build_alias
1538host=$host_alias
1539target=$target_alias
1540
1541# FIXME: To remove some day.
1542if test "x$host_alias" != x; then
1543  if test "x$build_alias" = x; then
1544    cross_compiling=maybe
1545  elif test "x$build_alias" != "x$host_alias"; then
1546    cross_compiling=yes
1547  fi
1548fi
1549
1550ac_tool_prefix=
1551test -n "$host_alias" && ac_tool_prefix=$host_alias-
1552
1553test "$silent" = yes && exec 6>/dev/null
1554
1555
1556ac_pwd=`pwd` && test -n "$ac_pwd" &&
1557ac_ls_di=`ls -di .` &&
1558ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1559  as_fn_error $? "working directory cannot be determined"
1560test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1561  as_fn_error $? "pwd does not report name of working directory"
1562
1563
1564# Find the source files, if location was not specified.
1565if test -z "$srcdir"; then
1566  ac_srcdir_defaulted=yes
1567  # Try the directory containing this script, then the parent directory.
1568  ac_confdir=`$as_dirname -- "$as_myself" ||
1569$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1570	 X"$as_myself" : 'X\(//\)[^/]' \| \
1571	 X"$as_myself" : 'X\(//\)$' \| \
1572	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1573$as_echo X"$as_myself" |
1574    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1575	    s//\1/
1576	    q
1577	  }
1578	  /^X\(\/\/\)[^/].*/{
1579	    s//\1/
1580	    q
1581	  }
1582	  /^X\(\/\/\)$/{
1583	    s//\1/
1584	    q
1585	  }
1586	  /^X\(\/\).*/{
1587	    s//\1/
1588	    q
1589	  }
1590	  s/.*/./; q'`
1591  srcdir=$ac_confdir
1592  if test ! -r "$srcdir/$ac_unique_file"; then
1593    srcdir=..
1594  fi
1595else
1596  ac_srcdir_defaulted=no
1597fi
1598if test ! -r "$srcdir/$ac_unique_file"; then
1599  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1600  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1601fi
1602ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1603ac_abs_confdir=`(
1604	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1605	pwd)`
1606# When building in place, set srcdir=.
1607if test "$ac_abs_confdir" = "$ac_pwd"; then
1608  srcdir=.
1609fi
1610# Remove unnecessary trailing slashes from srcdir.
1611# Double slashes in file names in object file debugging info
1612# mess up M-x gdb in Emacs.
1613case $srcdir in
1614*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1615esac
1616for ac_var in $ac_precious_vars; do
1617  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1618  eval ac_env_${ac_var}_value=\$${ac_var}
1619  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1620  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1621done
1622
1623#
1624# Report the --help message.
1625#
1626if test "$ac_init_help" = "long"; then
1627  # Omit some internal or obsolete options to make the list less imposing.
1628  # This message is too long to be a string in the A/UX 3.1 sh.
1629  cat <<_ACEOF
1630\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1631
1632Usage: $0 [OPTION]... [VAR=VALUE]...
1633
1634To assign environment variables (e.g., CC, CFLAGS...), specify them as
1635VAR=VALUE.  See below for descriptions of some of the useful variables.
1636
1637Defaults for the options are specified in brackets.
1638
1639Configuration:
1640  -h, --help              display this help and exit
1641      --help=short        display options specific to this package
1642      --help=recursive    display the short help of all the included packages
1643  -V, --version           display version information and exit
1644  -q, --quiet, --silent   do not print \`checking ...' messages
1645      --cache-file=FILE   cache test results in FILE [disabled]
1646  -C, --config-cache      alias for \`--cache-file=config.cache'
1647  -n, --no-create         do not create output files
1648      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1649
1650Installation directories:
1651  --prefix=PREFIX         install architecture-independent files in PREFIX
1652                          [$ac_default_prefix]
1653  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1654                          [PREFIX]
1655
1656By default, \`make install' will install all the files in
1657\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1658an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1659for instance \`--prefix=\$HOME'.
1660
1661For better control, use the options below.
1662
1663Fine tuning of the installation directories:
1664  --bindir=DIR            user executables [EPREFIX/bin]
1665  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1666  --libexecdir=DIR        program executables [EPREFIX/libexec]
1667  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1668  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1669  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1670  --libdir=DIR            object code libraries [EPREFIX/lib]
1671  --includedir=DIR        C header files [PREFIX/include]
1672  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1673  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1674  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1675  --infodir=DIR           info documentation [DATAROOTDIR/info]
1676  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1677  --mandir=DIR            man documentation [DATAROOTDIR/man]
1678  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1679  --htmldir=DIR           html documentation [DOCDIR]
1680  --dvidir=DIR            dvi documentation [DOCDIR]
1681  --pdfdir=DIR            pdf documentation [DOCDIR]
1682  --psdir=DIR             ps documentation [DOCDIR]
1683_ACEOF
1684
1685  cat <<\_ACEOF
1686
1687X features:
1688  --x-includes=DIR    X include files are in DIR
1689  --x-libraries=DIR   X library files are in DIR
1690
1691System types:
1692  --build=BUILD     configure for building on BUILD [guessed]
1693  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1694  --target=TARGET   configure for building compilers for TARGET [HOST]
1695_ACEOF
1696fi
1697
1698if test -n "$ac_init_help"; then
1699  case $ac_init_help in
1700     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1701   esac
1702  cat <<\_ACEOF
1703
1704Optional Features:
1705  --disable-option-checking  ignore unrecognized --enable/--with options
1706  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1707  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1708  --enable-openjdk-only   suppress building custom source even if present
1709                          [disabled]
1710  --enable-debug          set the debug level to fastdebug (shorthand for
1711                          --with-debug-level=fastdebug) [disabled]
1712  --disable-headful       disable building headful support (graphical UI
1713                          support) [enabled]
1714  --enable-hotspot-test-in-build
1715                          run the Queens test after Hotspot build [disabled]
1716  --enable-unlimited-crypto
1717                          Enable unlimited crypto policy [disabled]
1718  --disable-debug-symbols disable generation of debug symbols [enabled]
1719  --disable-zip-debug-info
1720                          disable zipping of debug-info files [enabled]
1721  --disable-macosx-runtime-support
1722                          disable the use of MacOSX Java runtime support
1723                          framework [enabled]
1724  --enable-sjavac         use sjavac to do fast incremental compiles
1725                          [disabled]
1726  --disable-precompiled-headers
1727                          disable using precompiled headers when compiling C++
1728                          [enabled]
1729  --disable-ccache        disable using ccache to speed up recompilations
1730                          [enabled]
1731
1732Optional Packages:
1733  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1734  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1735  --with-custom-make-dir  use this directory for custom build/make files
1736  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1737                          support it), e.g. --with-target-bits=32 [guessed]
1738  --with-sys-root         pass this sys-root to the compilers and tools (for
1739                          cross-compiling)
1740  --with-tools-dir        search this directory for compilers and tools (for
1741                          cross-compiling)
1742  --with-devkit           use this directory as base for tools-dir and
1743                          sys-root (for cross-compiling)
1744  --with-jdk-variant      JDK variant to build (normal) [normal]
1745  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1746                          client, minimal1, kernel, zero, zeroshark) [server]
1747  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1748                          [release]
1749  --with-conf-name        use this as the name of the configuration [generated
1750                          from important configuration options]
1751  --with-builddeps-conf   use this configuration file for the builddeps
1752  --with-builddeps-server download and use build dependencies from this server
1753                          url
1754  --with-builddeps-dir    store downloaded build dependencies here
1755                          [/localhome/builddeps]
1756  --with-builddeps-group  chgrp the downloaded build dependencies to this
1757                          group
1758  --with-cacerts-file     specify alternative cacerts file
1759  --with-milestone        Set milestone value for build [internal]
1760  --with-update-version   Set update version value for build [b00]
1761  --with-build-number     Set build number value for build [b00]
1762  --with-user-release-suffix
1763                          Add a custom string to the version string if build
1764                          number isn't set.[username_builddateb00]
1765  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1766  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1767                          invocations of the Boot JDK, overriding the default
1768                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1769                          -enableassertions"
1770  --with-add-source-root  for each and every source directory, look in this
1771                          additional source root for the same directory; if it
1772                          exists and have files in it, include it in the build
1773  --with-override-source-root
1774                          for each and every source directory, look in this
1775                          override source root for the same directory; if it
1776                          exists, use that directory instead and ignore the
1777                          directory in the original source root
1778  --with-adds-and-overrides
1779                          use the subdirs 'adds' and 'overrides' in the
1780                          specified directory as add-source-root and
1781                          override-source-root
1782  --with-override-langtools
1783                          use this langtools dir for the build
1784  --with-override-corba   use this corba dir for the build
1785  --with-override-jaxp    use this jaxp dir for the build
1786  --with-override-jaxws   use this jaxws dir for the build
1787  --with-override-hotspot use this hotspot dir for the build
1788  --with-override-nashorn use this nashorn dir for the build
1789  --with-override-jdk     use this jdk dir for the build
1790  --with-import-hotspot   import hotspot binaries from this jdk image or
1791                          hotspot build dist dir instead of building from
1792                          source
1793  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1794                          only) [probed]
1795  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1796  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1797                          [probed]
1798  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1799                          [probed]
1800  --with-jtreg            Regression Test Harness [probed]
1801  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1802  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1803  --with-extra-ldflags    extra flags to be used when linking jdk
1804  --with-x                use the X Window System
1805  --with-cups             specify prefix directory for the cups package
1806                          (expecting the headers under PATH/include)
1807  --with-cups-include     specify directory for the cups include files
1808  --with-freetype         specify prefix directory for the freetype2 package
1809                          (expecting the libraries under PATH/lib and the
1810                          headers under PATH/include)
1811  --with-alsa             specify prefix directory for the alsa package
1812                          (expecting the libraries under PATH/lib and the
1813                          headers under PATH/include)
1814  --with-alsa-include     specify directory for the alsa include files
1815  --with-alsa-lib         specify directory for the alsa library
1816  --with-giflib           use giflib from build system or OpenJDK source
1817                          (system, bundled) [bundled]
1818  --with-zlib             use zlib from build system or OpenJDK source
1819                          (system, bundled) [bundled]
1820  --with-stdc++lib=<static>,<dynamic>,<default>
1821                          force linking of the C++ runtime on Linux to either
1822                          static or dynamic, default is static with dynamic as
1823                          fallback
1824  --with-num-cores        number of cores in the build system, e.g.
1825                          --with-num-cores=8 [probed]
1826  --with-memory-size      memory (in MB) available in the build system, e.g.
1827                          --with-memory-size=1024 [probed]
1828  --with-jobs             number of parallel jobs to let make run [calculated
1829                          based on cores and memory]
1830  --with-sjavac-server-java
1831                          use this java binary for running the sjavac
1832                          background server [Boot JDK java]
1833  --with-ccache-dir       where to store ccache files [~/.ccache]
1834
1835Some influential environment variables:
1836  PKG_CONFIG  path to pkg-config utility
1837  CC          C compiler command
1838  CFLAGS      C compiler flags
1839  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1840              nonstandard directory <lib dir>
1841  LIBS        libraries to pass to the linker, e.g. -l<library>
1842  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1843              you have headers in a nonstandard directory <include dir>
1844  CXX         C++ compiler command
1845  CXXFLAGS    C++ compiler flags
1846  OBJC        Objective C compiler command
1847  OBJCFLAGS   Objective C compiler flags
1848  CPP         C preprocessor
1849  CXXCPP      C++ preprocessor
1850  XMKMF       Path to xmkmf, Makefile generator for X Window System
1851  FREETYPE2_CFLAGS
1852              C compiler flags for FREETYPE2, overriding pkg-config
1853  FREETYPE2_LIBS
1854              linker flags for FREETYPE2, overriding pkg-config
1855  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1856  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1857  LIBFFI_CFLAGS
1858              C compiler flags for LIBFFI, overriding pkg-config
1859  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1860
1861Use these variables to override the choices made by `configure' or to help
1862it to find libraries and programs with nonstandard names/locations.
1863
1864Report bugs to <build-dev@openjdk.java.net>.
1865OpenJDK home page: <http://openjdk.java.net>.
1866_ACEOF
1867ac_status=$?
1868fi
1869
1870if test "$ac_init_help" = "recursive"; then
1871  # If there are subdirs, report their specific --help.
1872  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1873    test -d "$ac_dir" ||
1874      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1875      continue
1876    ac_builddir=.
1877
1878case "$ac_dir" in
1879.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1880*)
1881  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1882  # A ".." for each directory in $ac_dir_suffix.
1883  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1884  case $ac_top_builddir_sub in
1885  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1886  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1887  esac ;;
1888esac
1889ac_abs_top_builddir=$ac_pwd
1890ac_abs_builddir=$ac_pwd$ac_dir_suffix
1891# for backward compatibility:
1892ac_top_builddir=$ac_top_build_prefix
1893
1894case $srcdir in
1895  .)  # We are building in place.
1896    ac_srcdir=.
1897    ac_top_srcdir=$ac_top_builddir_sub
1898    ac_abs_top_srcdir=$ac_pwd ;;
1899  [\\/]* | ?:[\\/]* )  # Absolute name.
1900    ac_srcdir=$srcdir$ac_dir_suffix;
1901    ac_top_srcdir=$srcdir
1902    ac_abs_top_srcdir=$srcdir ;;
1903  *) # Relative name.
1904    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1905    ac_top_srcdir=$ac_top_build_prefix$srcdir
1906    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1907esac
1908ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1909
1910    cd "$ac_dir" || { ac_status=$?; continue; }
1911    # Check for guested configure.
1912    if test -f "$ac_srcdir/configure.gnu"; then
1913      echo &&
1914      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1915    elif test -f "$ac_srcdir/configure"; then
1916      echo &&
1917      $SHELL "$ac_srcdir/configure" --help=recursive
1918    else
1919      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1920    fi || ac_status=$?
1921    cd "$ac_pwd" || { ac_status=$?; break; }
1922  done
1923fi
1924
1925test -n "$ac_init_help" && exit $ac_status
1926if $ac_init_version; then
1927  cat <<\_ACEOF
1928OpenJDK configure jdk8
1929generated by GNU Autoconf 2.69
1930
1931Copyright (C) 2012 Free Software Foundation, Inc.
1932This configure script is free software; the Free Software Foundation
1933gives unlimited permission to copy, distribute and modify it.
1934_ACEOF
1935  exit
1936fi
1937
1938## ------------------------ ##
1939## Autoconf initialization. ##
1940## ------------------------ ##
1941
1942# ac_fn_c_try_compile LINENO
1943# --------------------------
1944# Try to compile conftest.$ac_ext, and return whether this succeeded.
1945ac_fn_c_try_compile ()
1946{
1947  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948  rm -f conftest.$ac_objext
1949  if { { ac_try="$ac_compile"
1950case "(($ac_try" in
1951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1952  *) ac_try_echo=$ac_try;;
1953esac
1954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1955$as_echo "$ac_try_echo"; } >&5
1956  (eval "$ac_compile") 2>conftest.err
1957  ac_status=$?
1958  if test -s conftest.err; then
1959    grep -v '^ *+' conftest.err >conftest.er1
1960    cat conftest.er1 >&5
1961    mv -f conftest.er1 conftest.err
1962  fi
1963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1964  test $ac_status = 0; } && {
1965	 test -z "$ac_c_werror_flag" ||
1966	 test ! -s conftest.err
1967       } && test -s conftest.$ac_objext; then :
1968  ac_retval=0
1969else
1970  $as_echo "$as_me: failed program was:" >&5
1971sed 's/^/| /' conftest.$ac_ext >&5
1972
1973	ac_retval=1
1974fi
1975  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1976  as_fn_set_status $ac_retval
1977
1978} # ac_fn_c_try_compile
1979
1980# ac_fn_cxx_try_compile LINENO
1981# ----------------------------
1982# Try to compile conftest.$ac_ext, and return whether this succeeded.
1983ac_fn_cxx_try_compile ()
1984{
1985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1986  rm -f conftest.$ac_objext
1987  if { { ac_try="$ac_compile"
1988case "(($ac_try" in
1989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1990  *) ac_try_echo=$ac_try;;
1991esac
1992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1993$as_echo "$ac_try_echo"; } >&5
1994  (eval "$ac_compile") 2>conftest.err
1995  ac_status=$?
1996  if test -s conftest.err; then
1997    grep -v '^ *+' conftest.err >conftest.er1
1998    cat conftest.er1 >&5
1999    mv -f conftest.er1 conftest.err
2000  fi
2001  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2002  test $ac_status = 0; } && {
2003	 test -z "$ac_cxx_werror_flag" ||
2004	 test ! -s conftest.err
2005       } && test -s conftest.$ac_objext; then :
2006  ac_retval=0
2007else
2008  $as_echo "$as_me: failed program was:" >&5
2009sed 's/^/| /' conftest.$ac_ext >&5
2010
2011	ac_retval=1
2012fi
2013  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2014  as_fn_set_status $ac_retval
2015
2016} # ac_fn_cxx_try_compile
2017
2018# ac_fn_objc_try_compile LINENO
2019# -----------------------------
2020# Try to compile conftest.$ac_ext, and return whether this succeeded.
2021ac_fn_objc_try_compile ()
2022{
2023  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2024  rm -f conftest.$ac_objext
2025  if { { ac_try="$ac_compile"
2026case "(($ac_try" in
2027  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2028  *) ac_try_echo=$ac_try;;
2029esac
2030eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2031$as_echo "$ac_try_echo"; } >&5
2032  (eval "$ac_compile") 2>conftest.err
2033  ac_status=$?
2034  if test -s conftest.err; then
2035    grep -v '^ *+' conftest.err >conftest.er1
2036    cat conftest.er1 >&5
2037    mv -f conftest.er1 conftest.err
2038  fi
2039  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2040  test $ac_status = 0; } && {
2041	 test -z "$ac_objc_werror_flag" ||
2042	 test ! -s conftest.err
2043       } && test -s conftest.$ac_objext; then :
2044  ac_retval=0
2045else
2046  $as_echo "$as_me: failed program was:" >&5
2047sed 's/^/| /' conftest.$ac_ext >&5
2048
2049	ac_retval=1
2050fi
2051  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2052  as_fn_set_status $ac_retval
2053
2054} # ac_fn_objc_try_compile
2055
2056# ac_fn_c_try_cpp LINENO
2057# ----------------------
2058# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2059ac_fn_c_try_cpp ()
2060{
2061  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062  if { { ac_try="$ac_cpp conftest.$ac_ext"
2063case "(($ac_try" in
2064  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2065  *) ac_try_echo=$ac_try;;
2066esac
2067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2068$as_echo "$ac_try_echo"; } >&5
2069  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2070  ac_status=$?
2071  if test -s conftest.err; then
2072    grep -v '^ *+' conftest.err >conftest.er1
2073    cat conftest.er1 >&5
2074    mv -f conftest.er1 conftest.err
2075  fi
2076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2077  test $ac_status = 0; } > conftest.i && {
2078	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2079	 test ! -s conftest.err
2080       }; then :
2081  ac_retval=0
2082else
2083  $as_echo "$as_me: failed program was:" >&5
2084sed 's/^/| /' conftest.$ac_ext >&5
2085
2086    ac_retval=1
2087fi
2088  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2089  as_fn_set_status $ac_retval
2090
2091} # ac_fn_c_try_cpp
2092
2093# ac_fn_cxx_try_cpp LINENO
2094# ------------------------
2095# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2096ac_fn_cxx_try_cpp ()
2097{
2098  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099  if { { ac_try="$ac_cpp conftest.$ac_ext"
2100case "(($ac_try" in
2101  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2102  *) ac_try_echo=$ac_try;;
2103esac
2104eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2105$as_echo "$ac_try_echo"; } >&5
2106  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2107  ac_status=$?
2108  if test -s conftest.err; then
2109    grep -v '^ *+' conftest.err >conftest.er1
2110    cat conftest.er1 >&5
2111    mv -f conftest.er1 conftest.err
2112  fi
2113  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2114  test $ac_status = 0; } > conftest.i && {
2115	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2116	 test ! -s conftest.err
2117       }; then :
2118  ac_retval=0
2119else
2120  $as_echo "$as_me: failed program was:" >&5
2121sed 's/^/| /' conftest.$ac_ext >&5
2122
2123    ac_retval=1
2124fi
2125  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2126  as_fn_set_status $ac_retval
2127
2128} # ac_fn_cxx_try_cpp
2129
2130# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2131# ---------------------------------------------------------
2132# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2133# the include files in INCLUDES and setting the cache variable VAR
2134# accordingly.
2135ac_fn_cxx_check_header_mongrel ()
2136{
2137  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2138  if eval \${$3+:} false; then :
2139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140$as_echo_n "checking for $2... " >&6; }
2141if eval \${$3+:} false; then :
2142  $as_echo_n "(cached) " >&6
2143fi
2144eval ac_res=\$$3
2145	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2146$as_echo "$ac_res" >&6; }
2147else
2148  # Is the header compilable?
2149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2150$as_echo_n "checking $2 usability... " >&6; }
2151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h.  */
2153$4
2154#include <$2>
2155_ACEOF
2156if ac_fn_cxx_try_compile "$LINENO"; then :
2157  ac_header_compiler=yes
2158else
2159  ac_header_compiler=no
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2163$as_echo "$ac_header_compiler" >&6; }
2164
2165# Is the header present?
2166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2167$as_echo_n "checking $2 presence... " >&6; }
2168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169/* end confdefs.h.  */
2170#include <$2>
2171_ACEOF
2172if ac_fn_cxx_try_cpp "$LINENO"; then :
2173  ac_header_preproc=yes
2174else
2175  ac_header_preproc=no
2176fi
2177rm -f conftest.err conftest.i conftest.$ac_ext
2178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2179$as_echo "$ac_header_preproc" >&6; }
2180
2181# So?  What about this header?
2182case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2183  yes:no: )
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2185$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2186    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2187$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2188    ;;
2189  no:yes:* )
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2191$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2193$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2195$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2197$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2199$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2200( $as_echo "## ----------------------------------------- ##
2201## Report this to build-dev@openjdk.java.net ##
2202## ----------------------------------------- ##"
2203     ) | sed "s/^/$as_me: WARNING:     /" >&2
2204    ;;
2205esac
2206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2207$as_echo_n "checking for $2... " >&6; }
2208if eval \${$3+:} false; then :
2209  $as_echo_n "(cached) " >&6
2210else
2211  eval "$3=\$ac_header_compiler"
2212fi
2213eval ac_res=\$$3
2214	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2215$as_echo "$ac_res" >&6; }
2216fi
2217  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2218
2219} # ac_fn_cxx_check_header_mongrel
2220
2221# ac_fn_cxx_try_run LINENO
2222# ------------------------
2223# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2224# that executables *can* be run.
2225ac_fn_cxx_try_run ()
2226{
2227  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2228  if { { ac_try="$ac_link"
2229case "(($ac_try" in
2230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2231  *) ac_try_echo=$ac_try;;
2232esac
2233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2234$as_echo "$ac_try_echo"; } >&5
2235  (eval "$ac_link") 2>&5
2236  ac_status=$?
2237  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2238  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2239  { { case "(($ac_try" in
2240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241  *) ac_try_echo=$ac_try;;
2242esac
2243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244$as_echo "$ac_try_echo"; } >&5
2245  (eval "$ac_try") 2>&5
2246  ac_status=$?
2247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2248  test $ac_status = 0; }; }; then :
2249  ac_retval=0
2250else
2251  $as_echo "$as_me: program exited with status $ac_status" >&5
2252       $as_echo "$as_me: failed program was:" >&5
2253sed 's/^/| /' conftest.$ac_ext >&5
2254
2255       ac_retval=$ac_status
2256fi
2257  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2258  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2259  as_fn_set_status $ac_retval
2260
2261} # ac_fn_cxx_try_run
2262
2263# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2264# ---------------------------------------------------------
2265# Tests whether HEADER exists and can be compiled using the include files in
2266# INCLUDES, setting the cache variable VAR accordingly.
2267ac_fn_cxx_check_header_compile ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2271$as_echo_n "checking for $2... " >&6; }
2272if eval \${$3+:} false; then :
2273  $as_echo_n "(cached) " >&6
2274else
2275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h.  */
2277$4
2278#include <$2>
2279_ACEOF
2280if ac_fn_cxx_try_compile "$LINENO"; then :
2281  eval "$3=yes"
2282else
2283  eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
2290  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291
2292} # ac_fn_cxx_check_header_compile
2293
2294# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2295# ----------------------------------------------
2296# Tries to find the compile-time value of EXPR in a program that includes
2297# INCLUDES, setting VAR accordingly. Returns whether the value could be
2298# computed
2299ac_fn_cxx_compute_int ()
2300{
2301  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302  if test "$cross_compiling" = yes; then
2303    # Depending upon the size, compute the lo and hi bounds.
2304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h.  */
2306$4
2307int
2308main ()
2309{
2310static int test_array [1 - 2 * !(($2) >= 0)];
2311test_array [0] = 0;
2312return test_array [0];
2313
2314  ;
2315  return 0;
2316}
2317_ACEOF
2318if ac_fn_cxx_try_compile "$LINENO"; then :
2319  ac_lo=0 ac_mid=0
2320  while :; do
2321    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h.  */
2323$4
2324int
2325main ()
2326{
2327static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2328test_array [0] = 0;
2329return test_array [0];
2330
2331  ;
2332  return 0;
2333}
2334_ACEOF
2335if ac_fn_cxx_try_compile "$LINENO"; then :
2336  ac_hi=$ac_mid; break
2337else
2338  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2339			if test $ac_lo -le $ac_mid; then
2340			  ac_lo= ac_hi=
2341			  break
2342			fi
2343			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346  done
2347else
2348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2349/* end confdefs.h.  */
2350$4
2351int
2352main ()
2353{
2354static int test_array [1 - 2 * !(($2) < 0)];
2355test_array [0] = 0;
2356return test_array [0];
2357
2358  ;
2359  return 0;
2360}
2361_ACEOF
2362if ac_fn_cxx_try_compile "$LINENO"; then :
2363  ac_hi=-1 ac_mid=-1
2364  while :; do
2365    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2366/* end confdefs.h.  */
2367$4
2368int
2369main ()
2370{
2371static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2372test_array [0] = 0;
2373return test_array [0];
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_compile "$LINENO"; then :
2380  ac_lo=$ac_mid; break
2381else
2382  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2383			if test $ac_mid -le $ac_hi; then
2384			  ac_lo= ac_hi=
2385			  break
2386			fi
2387			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390  done
2391else
2392  ac_lo= ac_hi=
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397# Binary search between lo and hi bounds.
2398while test "x$ac_lo" != "x$ac_hi"; do
2399  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2401/* end confdefs.h.  */
2402$4
2403int
2404main ()
2405{
2406static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2407test_array [0] = 0;
2408return test_array [0];
2409
2410  ;
2411  return 0;
2412}
2413_ACEOF
2414if ac_fn_cxx_try_compile "$LINENO"; then :
2415  ac_hi=$ac_mid
2416else
2417  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2418fi
2419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2420done
2421case $ac_lo in #((
2422?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2423'') ac_retval=1 ;;
2424esac
2425  else
2426    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427/* end confdefs.h.  */
2428$4
2429static long int longval () { return $2; }
2430static unsigned long int ulongval () { return $2; }
2431#include <stdio.h>
2432#include <stdlib.h>
2433int
2434main ()
2435{
2436
2437  FILE *f = fopen ("conftest.val", "w");
2438  if (! f)
2439    return 1;
2440  if (($2) < 0)
2441    {
2442      long int i = longval ();
2443      if (i != ($2))
2444	return 1;
2445      fprintf (f, "%ld", i);
2446    }
2447  else
2448    {
2449      unsigned long int i = ulongval ();
2450      if (i != ($2))
2451	return 1;
2452      fprintf (f, "%lu", i);
2453    }
2454  /* Do not output a trailing newline, as this causes \r\n confusion
2455     on some platforms.  */
2456  return ferror (f) || fclose (f) != 0;
2457
2458  ;
2459  return 0;
2460}
2461_ACEOF
2462if ac_fn_cxx_try_run "$LINENO"; then :
2463  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2464else
2465  ac_retval=1
2466fi
2467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2468  conftest.$ac_objext conftest.beam conftest.$ac_ext
2469rm -f conftest.val
2470
2471  fi
2472  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473  as_fn_set_status $ac_retval
2474
2475} # ac_fn_cxx_compute_int
2476
2477# ac_fn_cxx_try_link LINENO
2478# -------------------------
2479# Try to link conftest.$ac_ext, and return whether this succeeded.
2480ac_fn_cxx_try_link ()
2481{
2482  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483  rm -f conftest.$ac_objext conftest$ac_exeext
2484  if { { ac_try="$ac_link"
2485case "(($ac_try" in
2486  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487  *) ac_try_echo=$ac_try;;
2488esac
2489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490$as_echo "$ac_try_echo"; } >&5
2491  (eval "$ac_link") 2>conftest.err
2492  ac_status=$?
2493  if test -s conftest.err; then
2494    grep -v '^ *+' conftest.err >conftest.er1
2495    cat conftest.er1 >&5
2496    mv -f conftest.er1 conftest.err
2497  fi
2498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499  test $ac_status = 0; } && {
2500	 test -z "$ac_cxx_werror_flag" ||
2501	 test ! -s conftest.err
2502       } && test -s conftest$ac_exeext && {
2503	 test "$cross_compiling" = yes ||
2504	 test -x conftest$ac_exeext
2505       }; then :
2506  ac_retval=0
2507else
2508  $as_echo "$as_me: failed program was:" >&5
2509sed 's/^/| /' conftest.$ac_ext >&5
2510
2511	ac_retval=1
2512fi
2513  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2514  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2515  # interfere with the next link command; also delete a directory that is
2516  # left behind by Apple's compiler.  We do this before executing the actions.
2517  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2518  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519  as_fn_set_status $ac_retval
2520
2521} # ac_fn_cxx_try_link
2522
2523# ac_fn_cxx_check_func LINENO FUNC VAR
2524# ------------------------------------
2525# Tests whether FUNC exists, setting the cache variable VAR accordingly
2526ac_fn_cxx_check_func ()
2527{
2528  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530$as_echo_n "checking for $2... " >&6; }
2531if eval \${$3+:} false; then :
2532  $as_echo_n "(cached) " >&6
2533else
2534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535/* end confdefs.h.  */
2536/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2537   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2538#define $2 innocuous_$2
2539
2540/* System header to define __stub macros and hopefully few prototypes,
2541    which can conflict with char $2 (); below.
2542    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2543    <limits.h> exists even on freestanding compilers.  */
2544
2545#ifdef __STDC__
2546# include <limits.h>
2547#else
2548# include <assert.h>
2549#endif
2550
2551#undef $2
2552
2553/* Override any GCC internal prototype to avoid an error.
2554   Use char because int might match the return type of a GCC
2555   builtin and then its argument prototype would still apply.  */
2556#ifdef __cplusplus
2557extern "C"
2558#endif
2559char $2 ();
2560/* The GNU C library defines this for functions which it implements
2561    to always fail with ENOSYS.  Some functions are actually named
2562    something starting with __ and the normal name is an alias.  */
2563#if defined __stub_$2 || defined __stub___$2
2564choke me
2565#endif
2566
2567int
2568main ()
2569{
2570return $2 ();
2571  ;
2572  return 0;
2573}
2574_ACEOF
2575if ac_fn_cxx_try_link "$LINENO"; then :
2576  eval "$3=yes"
2577else
2578  eval "$3=no"
2579fi
2580rm -f core conftest.err conftest.$ac_objext \
2581    conftest$ac_exeext conftest.$ac_ext
2582fi
2583eval ac_res=\$$3
2584	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2585$as_echo "$ac_res" >&6; }
2586  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2587
2588} # ac_fn_cxx_check_func
2589
2590# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2591# -------------------------------------------------------
2592# Tests whether HEADER exists and can be compiled using the include files in
2593# INCLUDES, setting the cache variable VAR accordingly.
2594ac_fn_c_check_header_compile ()
2595{
2596  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2598$as_echo_n "checking for $2... " >&6; }
2599if eval \${$3+:} false; then :
2600  $as_echo_n "(cached) " >&6
2601else
2602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2603/* end confdefs.h.  */
2604$4
2605#include <$2>
2606_ACEOF
2607if ac_fn_c_try_compile "$LINENO"; then :
2608  eval "$3=yes"
2609else
2610  eval "$3=no"
2611fi
2612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2613fi
2614eval ac_res=\$$3
2615	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2616$as_echo "$ac_res" >&6; }
2617  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2618
2619} # ac_fn_c_check_header_compile
2620cat >config.log <<_ACEOF
2621This file contains any messages produced by compilers while
2622running configure, to aid debugging if configure makes a mistake.
2623
2624It was created by OpenJDK $as_me jdk8, which was
2625generated by GNU Autoconf 2.69.  Invocation command line was
2626
2627  $ $0 $@
2628
2629_ACEOF
2630exec 5>>config.log
2631{
2632cat <<_ASUNAME
2633## --------- ##
2634## Platform. ##
2635## --------- ##
2636
2637hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2638uname -m = `(uname -m) 2>/dev/null || echo unknown`
2639uname -r = `(uname -r) 2>/dev/null || echo unknown`
2640uname -s = `(uname -s) 2>/dev/null || echo unknown`
2641uname -v = `(uname -v) 2>/dev/null || echo unknown`
2642
2643/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2644/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2645
2646/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2647/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2648/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2649/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2650/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2651/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2652/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2653
2654_ASUNAME
2655
2656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2657for as_dir in $PATH
2658do
2659  IFS=$as_save_IFS
2660  test -z "$as_dir" && as_dir=.
2661    $as_echo "PATH: $as_dir"
2662  done
2663IFS=$as_save_IFS
2664
2665} >&5
2666
2667cat >&5 <<_ACEOF
2668
2669
2670## ----------- ##
2671## Core tests. ##
2672## ----------- ##
2673
2674_ACEOF
2675
2676
2677# Keep a trace of the command line.
2678# Strip out --no-create and --no-recursion so they do not pile up.
2679# Strip out --silent because we don't want to record it for future runs.
2680# Also quote any args containing shell meta-characters.
2681# Make two passes to allow for proper duplicate-argument suppression.
2682ac_configure_args=
2683ac_configure_args0=
2684ac_configure_args1=
2685ac_must_keep_next=false
2686for ac_pass in 1 2
2687do
2688  for ac_arg
2689  do
2690    case $ac_arg in
2691    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2692    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2693    | -silent | --silent | --silen | --sile | --sil)
2694      continue ;;
2695    *\'*)
2696      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2697    esac
2698    case $ac_pass in
2699    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2700    2)
2701      as_fn_append ac_configure_args1 " '$ac_arg'"
2702      if test $ac_must_keep_next = true; then
2703	ac_must_keep_next=false # Got value, back to normal.
2704      else
2705	case $ac_arg in
2706	  *=* | --config-cache | -C | -disable-* | --disable-* \
2707	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2708	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2709	  | -with-* | --with-* | -without-* | --without-* | --x)
2710	    case "$ac_configure_args0 " in
2711	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2712	    esac
2713	    ;;
2714	  -* ) ac_must_keep_next=true ;;
2715	esac
2716      fi
2717      as_fn_append ac_configure_args " '$ac_arg'"
2718      ;;
2719    esac
2720  done
2721done
2722{ ac_configure_args0=; unset ac_configure_args0;}
2723{ ac_configure_args1=; unset ac_configure_args1;}
2724
2725# When interrupted or exit'd, cleanup temporary files, and complete
2726# config.log.  We remove comments because anyway the quotes in there
2727# would cause problems or look ugly.
2728# WARNING: Use '\'' to represent an apostrophe within the trap.
2729# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2730trap 'exit_status=$?
2731  # Save into config.log some information that might help in debugging.
2732  {
2733    echo
2734
2735    $as_echo "## ---------------- ##
2736## Cache variables. ##
2737## ---------------- ##"
2738    echo
2739    # The following way of writing the cache mishandles newlines in values,
2740(
2741  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2742    eval ac_val=\$$ac_var
2743    case $ac_val in #(
2744    *${as_nl}*)
2745      case $ac_var in #(
2746      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2747$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2748      esac
2749      case $ac_var in #(
2750      _ | IFS | as_nl) ;; #(
2751      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2752      *) { eval $ac_var=; unset $ac_var;} ;;
2753      esac ;;
2754    esac
2755  done
2756  (set) 2>&1 |
2757    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2758    *${as_nl}ac_space=\ *)
2759      sed -n \
2760	"s/'\''/'\''\\\\'\'''\''/g;
2761	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2762      ;; #(
2763    *)
2764      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2765      ;;
2766    esac |
2767    sort
2768)
2769    echo
2770
2771    $as_echo "## ----------------- ##
2772## Output variables. ##
2773## ----------------- ##"
2774    echo
2775    for ac_var in $ac_subst_vars
2776    do
2777      eval ac_val=\$$ac_var
2778      case $ac_val in
2779      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2780      esac
2781      $as_echo "$ac_var='\''$ac_val'\''"
2782    done | sort
2783    echo
2784
2785    if test -n "$ac_subst_files"; then
2786      $as_echo "## ------------------- ##
2787## File substitutions. ##
2788## ------------------- ##"
2789      echo
2790      for ac_var in $ac_subst_files
2791      do
2792	eval ac_val=\$$ac_var
2793	case $ac_val in
2794	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2795	esac
2796	$as_echo "$ac_var='\''$ac_val'\''"
2797      done | sort
2798      echo
2799    fi
2800
2801    if test -s confdefs.h; then
2802      $as_echo "## ----------- ##
2803## confdefs.h. ##
2804## ----------- ##"
2805      echo
2806      cat confdefs.h
2807      echo
2808    fi
2809    test "$ac_signal" != 0 &&
2810      $as_echo "$as_me: caught signal $ac_signal"
2811    $as_echo "$as_me: exit $exit_status"
2812  } >&5
2813  rm -f core *.core core.conftest.* &&
2814    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2815    exit $exit_status
2816' 0
2817for ac_signal in 1 2 13 15; do
2818  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2819done
2820ac_signal=0
2821
2822# confdefs.h avoids OS command line length limits that DEFS can exceed.
2823rm -f -r conftest* confdefs.h
2824
2825$as_echo "/* confdefs.h */" > confdefs.h
2826
2827# Predefined preprocessor variables.
2828
2829cat >>confdefs.h <<_ACEOF
2830#define PACKAGE_NAME "$PACKAGE_NAME"
2831_ACEOF
2832
2833cat >>confdefs.h <<_ACEOF
2834#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2835_ACEOF
2836
2837cat >>confdefs.h <<_ACEOF
2838#define PACKAGE_VERSION "$PACKAGE_VERSION"
2839_ACEOF
2840
2841cat >>confdefs.h <<_ACEOF
2842#define PACKAGE_STRING "$PACKAGE_STRING"
2843_ACEOF
2844
2845cat >>confdefs.h <<_ACEOF
2846#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2847_ACEOF
2848
2849cat >>confdefs.h <<_ACEOF
2850#define PACKAGE_URL "$PACKAGE_URL"
2851_ACEOF
2852
2853
2854# Let the site file select an alternate cache file if it wants to.
2855# Prefer an explicitly selected file to automatically selected ones.
2856ac_site_file1=NONE
2857ac_site_file2=NONE
2858if test -n "$CONFIG_SITE"; then
2859  # We do not want a PATH search for config.site.
2860  case $CONFIG_SITE in #((
2861    -*)  ac_site_file1=./$CONFIG_SITE;;
2862    */*) ac_site_file1=$CONFIG_SITE;;
2863    *)   ac_site_file1=./$CONFIG_SITE;;
2864  esac
2865elif test "x$prefix" != xNONE; then
2866  ac_site_file1=$prefix/share/config.site
2867  ac_site_file2=$prefix/etc/config.site
2868else
2869  ac_site_file1=$ac_default_prefix/share/config.site
2870  ac_site_file2=$ac_default_prefix/etc/config.site
2871fi
2872for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2873do
2874  test "x$ac_site_file" = xNONE && continue
2875  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2876    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2877$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2878    sed 's/^/| /' "$ac_site_file" >&5
2879    . "$ac_site_file" \
2880      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2882as_fn_error $? "failed to load site script $ac_site_file
2883See \`config.log' for more details" "$LINENO" 5; }
2884  fi
2885done
2886
2887if test -r "$cache_file"; then
2888  # Some versions of bash will fail to source /dev/null (special files
2889  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2890  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2891    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2892$as_echo "$as_me: loading cache $cache_file" >&6;}
2893    case $cache_file in
2894      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2895      *)                      . "./$cache_file";;
2896    esac
2897  fi
2898else
2899  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2900$as_echo "$as_me: creating cache $cache_file" >&6;}
2901  >$cache_file
2902fi
2903
2904# Check that the precious variables saved in the cache have kept the same
2905# value.
2906ac_cache_corrupted=false
2907for ac_var in $ac_precious_vars; do
2908  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2909  eval ac_new_set=\$ac_env_${ac_var}_set
2910  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2911  eval ac_new_val=\$ac_env_${ac_var}_value
2912  case $ac_old_set,$ac_new_set in
2913    set,)
2914      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2915$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2916      ac_cache_corrupted=: ;;
2917    ,set)
2918      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2919$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2920      ac_cache_corrupted=: ;;
2921    ,);;
2922    *)
2923      if test "x$ac_old_val" != "x$ac_new_val"; then
2924	# differences in whitespace do not lead to failure.
2925	ac_old_val_w=`echo x $ac_old_val`
2926	ac_new_val_w=`echo x $ac_new_val`
2927	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2928	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2929$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2930	  ac_cache_corrupted=:
2931	else
2932	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2933$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2934	  eval $ac_var=\$ac_old_val
2935	fi
2936	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2937$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2938	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2939$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2940      fi;;
2941  esac
2942  # Pass precious variables to config.status.
2943  if test "$ac_new_set" = set; then
2944    case $ac_new_val in
2945    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2946    *) ac_arg=$ac_var=$ac_new_val ;;
2947    esac
2948    case " $ac_configure_args " in
2949      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2950      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2951    esac
2952  fi
2953done
2954if $ac_cache_corrupted; then
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2957  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2958$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2959  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2960fi
2961## -------------------- ##
2962## Main body of script. ##
2963## -------------------- ##
2964
2965ac_ext=c
2966ac_cpp='$CPP $CPPFLAGS'
2967ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2968ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2969ac_compiler_gnu=$ac_cv_c_compiler_gnu
2970
2971
2972
2973ac_aux_dir=
2974for ac_dir in build-aux "$srcdir"/build-aux; do
2975  if test -f "$ac_dir/install-sh"; then
2976    ac_aux_dir=$ac_dir
2977    ac_install_sh="$ac_aux_dir/install-sh -c"
2978    break
2979  elif 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/shtool"; then
2984    ac_aux_dir=$ac_dir
2985    ac_install_sh="$ac_aux_dir/shtool install -c"
2986    break
2987  fi
2988done
2989if test -z "$ac_aux_dir"; then
2990  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2991fi
2992
2993# These three variables are undocumented and unsupported,
2994# and are intended to be withdrawn in a future Autoconf release.
2995# They can cause serious problems if a builder's source tree is in a directory
2996# whose full name contains unusual characters.
2997ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2998ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2999ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3000
3001
3002# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3003
3004#
3005# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3006# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3007#
3008# This code is free software; you can redistribute it and/or modify it
3009# under the terms of the GNU General Public License version 2 only, as
3010# published by the Free Software Foundation.  Oracle designates this
3011# particular file as subject to the "Classpath" exception as provided
3012# by Oracle in the LICENSE file that accompanied this code.
3013#
3014# This code is distributed in the hope that it will be useful, but WITHOUT
3015# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3016# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3017# version 2 for more details (a copy is included in the LICENSE file that
3018# accompanied this code).
3019#
3020# You should have received a copy of the GNU General Public License version
3021# 2 along with this work; if not, write to the Free Software Foundation,
3022# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3023#
3024# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3025# or visit www.oracle.com if you need additional information or have any
3026# questions.
3027#
3028
3029#
3030# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3031#
3032# This program is free software; you can redistribute it and/or modify
3033# it under the terms of the GNU General Public License as published by
3034# the Free Software Foundation; either version 2 of the License, or
3035# (at your option) any later version.
3036#
3037# This program is distributed in the hope that it will be useful, but
3038# WITHOUT ANY WARRANTY; without even the implied warranty of
3039# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3040# General Public License for more details.
3041#
3042# You should have received a copy of the GNU General Public License
3043# along with this program; if not, write to the Free Software
3044# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3045#
3046# As a special exception to the GNU General Public License, if you
3047# distribute this file as part of a program that contains a
3048# configuration script generated by Autoconf, you may include it under
3049# the same distribution terms that you use for the rest of that program.
3050
3051# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3052# ----------------------------------
3053# PKG_PROG_PKG_CONFIG
3054
3055# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3056#
3057# Check to see whether a particular set of modules exists.  Similar
3058# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3059#
3060#
3061# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3062# this or PKG_CHECK_MODULES is called, or make sure to call
3063# PKG_CHECK_EXISTS manually
3064# --------------------------------------------------------------
3065
3066
3067
3068# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3069# ---------------------------------------------
3070# _PKG_CONFIG
3071
3072# _PKG_SHORT_ERRORS_SUPPORTED
3073# -----------------------------
3074# _PKG_SHORT_ERRORS_SUPPORTED
3075
3076
3077# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3078# [ACTION-IF-NOT-FOUND])
3079#
3080#
3081# Note that if there is a possibility the first call to
3082# PKG_CHECK_MODULES might not happen, you should be sure to include an
3083# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3084#
3085#
3086# --------------------------------------------------------------
3087# PKG_CHECK_MODULES
3088
3089
3090# Include these first...
3091#
3092# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3093# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3094#
3095# This code is free software; you can redistribute it and/or modify it
3096# under the terms of the GNU General Public License version 2 only, as
3097# published by the Free Software Foundation.  Oracle designates this
3098# particular file as subject to the "Classpath" exception as provided
3099# by Oracle in the LICENSE file that accompanied this code.
3100#
3101# This code is distributed in the hope that it will be useful, but WITHOUT
3102# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3103# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3104# version 2 for more details (a copy is included in the LICENSE file that
3105# accompanied this code).
3106#
3107# You should have received a copy of the GNU General Public License version
3108# 2 along with this work; if not, write to the Free Software Foundation,
3109# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3110#
3111# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3112# or visit www.oracle.com if you need additional information or have any
3113# questions.
3114#
3115
3116# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3117# If so, then append $1 to $2\
3118# Also set JVM_ARG_OK to true/false depending on outcome.
3119
3120
3121# Appends a string to a path variable, only adding the : when needed.
3122
3123
3124# This will make sure the given variable points to a full and proper
3125# path. This means:
3126# 1) There will be no spaces in the path. On posix platforms,
3127#    spaces in the path will result in an error. On Windows,
3128#    the path will be rewritten using short-style to be space-free.
3129# 2) The path will be absolute, and it will be in unix-style (on
3130#     cygwin).
3131# $1: The name of the variable to fix
3132
3133
3134# This will make sure the given variable points to a executable
3135# with a full and proper path. This means:
3136# 1) There will be no spaces in the path. On posix platforms,
3137#    spaces in the path will result in an error. On Windows,
3138#    the path will be rewritten using short-style to be space-free.
3139# 2) The path will be absolute, and it will be in unix-style (on
3140#     cygwin).
3141# Any arguments given to the executable is preserved.
3142# If the input variable does not have a directory specification, then
3143# it need to be in the PATH.
3144# $1: The name of the variable to fix
3145
3146
3147
3148
3149
3150
3151# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3152# $1: variable to check
3153# $2: executable name to print in warning (optional)
3154
3155
3156# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3157# Arguments as AC_PATH_PROG:
3158# $1: variable to set
3159# $2: executable name to look for
3160
3161
3162# Setup the most fundamental tools that relies on not much else to set up,
3163# but is used by much of the early bootstrap code.
3164
3165
3166# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3167
3168
3169
3170
3171
3172
3173
3174#%%% Simple tools %%%
3175
3176# Check if we have found a usable version of make
3177# $1: the path to a potential make binary (or empty)
3178# $2: the description on how we found this
3179
3180
3181# Goes looking for a usable version of GNU make.
3182
3183
3184
3185
3186
3187
3188# Check if build directory is on local disk. If not possible to determine,
3189# we prefer to claim it's local.
3190# Argument 1: directory to test
3191# Argument 2: what to do if it is on local disk
3192# Argument 3: what to do otherwise (remote disk or failure)
3193
3194
3195# Check that source files have basic read permissions set. This might
3196# not be the case in cygwin in certain conditions.
3197
3198
3199
3200
3201#
3202# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3203# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3204#
3205# This code is free software; you can redistribute it and/or modify it
3206# under the terms of the GNU General Public License version 2 only, as
3207# published by the Free Software Foundation.  Oracle designates this
3208# particular file as subject to the "Classpath" exception as provided
3209# by Oracle in the LICENSE file that accompanied this code.
3210#
3211# This code is distributed in the hope that it will be useful, but WITHOUT
3212# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3213# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3214# version 2 for more details (a copy is included in the LICENSE file that
3215# accompanied this code).
3216#
3217# You should have received a copy of the GNU General Public License version
3218# 2 along with this work; if not, write to the Free Software Foundation,
3219# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3220#
3221# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3222# or visit www.oracle.com if you need additional information or have any
3223# questions.
3224#
3225
3226
3227
3228
3229
3230# Helper function which possibly converts a path using DOS-style short mode.
3231# If so, the updated path is stored in $new_path.
3232# $1: The path to check
3233
3234
3235# Helper function which possibly converts a path using DOS-style short mode.
3236# If so, the updated path is stored in $new_path.
3237# $1: The path to check
3238
3239
3240# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3241# and could probably be heavily simplified. However, all changes in this
3242# area tend to need lot of testing in different scenarios, and in lack of
3243# proper unit testing, cleaning this up has not been deemed worth the effort
3244# at the moment.
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3255
3256
3257
3258
3259#
3260# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3262#
3263# This code is free software; you can redistribute it and/or modify it
3264# under the terms of the GNU General Public License version 2 only, as
3265# published by the Free Software Foundation.  Oracle designates this
3266# particular file as subject to the "Classpath" exception as provided
3267# by Oracle in the LICENSE file that accompanied this code.
3268#
3269# This code is distributed in the hope that it will be useful, but WITHOUT
3270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3272# version 2 for more details (a copy is included in the LICENSE file that
3273# accompanied this code).
3274#
3275# You should have received a copy of the GNU General Public License version
3276# 2 along with this work; if not, write to the Free Software Foundation,
3277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3278#
3279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3280# or visit www.oracle.com if you need additional information or have any
3281# questions.
3282#
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294# ... then the rest
3295#
3296# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298#
3299# This code is free software; you can redistribute it and/or modify it
3300# under the terms of the GNU General Public License version 2 only, as
3301# published by the Free Software Foundation.  Oracle designates this
3302# particular file as subject to the "Classpath" exception as provided
3303# by Oracle in the LICENSE file that accompanied this code.
3304#
3305# This code is distributed in the hope that it will be useful, but WITHOUT
3306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3308# version 2 for more details (a copy is included in the LICENSE file that
3309# accompanied this code).
3310#
3311# You should have received a copy of the GNU General Public License version
3312# 2 along with this work; if not, write to the Free Software Foundation,
3313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314#
3315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316# or visit www.oracle.com if you need additional information or have any
3317# questions.
3318#
3319
3320# Execute the check given as argument, and verify the result
3321# If the Boot JDK was previously found, do nothing
3322# $1 A command line (typically autoconf macro) to execute
3323
3324
3325# Test: Is bootjdk explicitely set by command line arguments?
3326
3327
3328# Test: Is bootjdk available from builddeps?
3329
3330
3331# Test: Is $JAVA_HOME set?
3332
3333
3334# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3335
3336
3337# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3338
3339
3340# Look for a jdk in the given path. If there are multiple, try to select the newest.
3341# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3342# $1 = Path to directory containing jdk installations.
3343# $2 = String to append to the found JDK directory to get the proper JDK home
3344
3345
3346# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3347# environmental variable as base for where to look.
3348# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3349
3350
3351# Test: Is there a JDK installed in default, well-known locations?
3352
3353
3354# Check that a command-line tool in the Boot JDK is correct
3355# $1 = name of variable to assign
3356# $2 = name of binary
3357
3358
3359###############################################################################
3360#
3361# We need a Boot JDK to bootstrap the build.
3362#
3363
3364
3365
3366
3367
3368#
3369# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3370# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3371#
3372# This code is free software; you can redistribute it and/or modify it
3373# under the terms of the GNU General Public License version 2 only, as
3374# published by the Free Software Foundation.  Oracle designates this
3375# particular file as subject to the "Classpath" exception as provided
3376# by Oracle in the LICENSE file that accompanied this code.
3377#
3378# This code is distributed in the hope that it will be useful, but WITHOUT
3379# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3380# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3381# version 2 for more details (a copy is included in the LICENSE file that
3382# accompanied this code).
3383#
3384# You should have received a copy of the GNU General Public License version
3385# 2 along with this work; if not, write to the Free Software Foundation,
3386# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3387#
3388# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3389# or visit www.oracle.com if you need additional information or have any
3390# questions.
3391#
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412#
3413# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3414# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3415#
3416# This code is free software; you can redistribute it and/or modify it
3417# under the terms of the GNU General Public License version 2 only, as
3418# published by the Free Software Foundation.  Oracle designates this
3419# particular file as subject to the "Classpath" exception as provided
3420# by Oracle in the LICENSE file that accompanied this code.
3421#
3422# This code is distributed in the hope that it will be useful, but WITHOUT
3423# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3424# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3425# version 2 for more details (a copy is included in the LICENSE file that
3426# accompanied this code).
3427#
3428# You should have received a copy of the GNU General Public License version
3429# 2 along with this work; if not, write to the Free Software Foundation,
3430# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3431#
3432# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3433# or visit www.oracle.com if you need additional information or have any
3434# questions.
3435#
3436
3437
3438
3439
3440
3441cygwin_help() {
3442    case $1 in
3443    unzip)
3444        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3445    zip)
3446        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3447    make)
3448        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3449    * )
3450       break ;;
3451    esac
3452}
3453
3454apt_help() {
3455    case $1 in
3456    devkit)
3457        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3458    openjdk)
3459        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3460    alsa)
3461        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3462    cups)
3463        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3464    freetype2)
3465        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3466    pulse)
3467        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3468    x11)
3469        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3470    ccache)
3471        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3472    * )
3473       break ;;
3474    esac
3475}
3476
3477yum_help() {
3478    case $1 in
3479    devkit)
3480        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3481    openjdk)
3482        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3483    alsa)
3484        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3485    cups)
3486        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3487    freetype2)
3488        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3489    pulse)
3490        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3491    x11)
3492        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3493    ccache)
3494        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3495    * )
3496       break ;;
3497    esac
3498}
3499
3500port_help() {
3501    PKGHANDLER_COMMAND=""
3502}
3503
3504pkgutil_help() {
3505    PKGHANDLER_COMMAND=""
3506}
3507
3508pkgadd_help() {
3509    PKGHANDLER_COMMAND=""
3510}
3511
3512
3513
3514#
3515# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3516# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3517#
3518# This code is free software; you can redistribute it and/or modify it
3519# under the terms of the GNU General Public License version 2 only, as
3520# published by the Free Software Foundation.  Oracle designates this
3521# particular file as subject to the "Classpath" exception as provided
3522# by Oracle in the LICENSE file that accompanied this code.
3523#
3524# This code is distributed in the hope that it will be useful, but WITHOUT
3525# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3526# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3527# version 2 for more details (a copy is included in the LICENSE file that
3528# accompanied this code).
3529#
3530# You should have received a copy of the GNU General Public License version
3531# 2 along with this work; if not, write to the Free Software Foundation,
3532# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3533#
3534# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3535# or visit www.oracle.com if you need additional information or have any
3536# questions.
3537#
3538
3539
3540
3541
3542
3543
3544
3545
3546###############################################################################
3547#
3548# Should we build only OpenJDK even if closed sources are present?
3549#
3550
3551
3552
3553
3554###############################################################################
3555#
3556# Setup version numbers
3557#
3558
3559
3560
3561
3562
3563
3564# Support for customization of the build process. Some build files
3565# will include counterparts from this location, if they exist. This allows
3566# for a degree of customization of the build targets and the rules/recipes
3567# to create them
3568
3569# Check whether --with-custom-make-dir was given.
3570if test "${with_custom_make_dir+set}" = set; then :
3571  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3572fi
3573
3574
3575
3576#
3577# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3578# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3579#
3580# This code is free software; you can redistribute it and/or modify it
3581# under the terms of the GNU General Public License version 2 only, as
3582# published by the Free Software Foundation.  Oracle designates this
3583# particular file as subject to the "Classpath" exception as provided
3584# by Oracle in the LICENSE file that accompanied this code.
3585#
3586# This code is distributed in the hope that it will be useful, but WITHOUT
3587# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3588# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3589# version 2 for more details (a copy is included in the LICENSE file that
3590# accompanied this code).
3591#
3592# You should have received a copy of the GNU General Public License version
3593# 2 along with this work; if not, write to the Free Software Foundation,
3594# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3595#
3596# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3597# or visit www.oracle.com if you need additional information or have any
3598# questions.
3599#
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615#
3616# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3618#
3619# This code is free software; you can redistribute it and/or modify it
3620# under the terms of the GNU General Public License version 2 only, as
3621# published by the Free Software Foundation.  Oracle designates this
3622# particular file as subject to the "Classpath" exception as provided
3623# by Oracle in the LICENSE file that accompanied this code.
3624#
3625# This code is distributed in the hope that it will be useful, but WITHOUT
3626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3628# version 2 for more details (a copy is included in the LICENSE file that
3629# accompanied this code).
3630#
3631# You should have received a copy of the GNU General Public License version
3632# 2 along with this work; if not, write to the Free Software Foundation,
3633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3634#
3635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3636# or visit www.oracle.com if you need additional information or have any
3637# questions.
3638#
3639
3640# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3641# Converts autoconf style CPU name to OpenJDK style, into
3642# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3643
3644
3645# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3646# Converts autoconf style OS name to OpenJDK style, into
3647# VAR_OS and VAR_OS_API.
3648
3649
3650# Expects $host_os $host_cpu $build_os and $build_cpu
3651# and $with_target_bits to have been setup!
3652#
3653# Translate the standard triplet(quadruplet) definition
3654# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3655# OPENJDK_BUILD_OS, etc.
3656
3657
3658# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3659# accordingly. Must be done after setting up build and target system, but before
3660# doing anything else with these values.
3661
3662
3663    # Setup the legacy variables, for controlling the old makefiles.
3664    #
3665
3666
3667
3668
3669#%%% Build and target systems %%%
3670
3671
3672
3673
3674# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3675# Add -mX to various FLAGS variables.
3676
3677
3678
3679
3680
3681
3682#
3683# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3685#
3686# This code is free software; you can redistribute it and/or modify it
3687# under the terms of the GNU General Public License version 2 only, as
3688# published by the Free Software Foundation.  Oracle designates this
3689# particular file as subject to the "Classpath" exception as provided
3690# by Oracle in the LICENSE file that accompanied this code.
3691#
3692# This code is distributed in the hope that it will be useful, but WITHOUT
3693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3695# version 2 for more details (a copy is included in the LICENSE file that
3696# accompanied this code).
3697#
3698# You should have received a copy of the GNU General Public License version
3699# 2 along with this work; if not, write to the Free Software Foundation,
3700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3701#
3702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3703# or visit www.oracle.com if you need additional information or have any
3704# questions.
3705#
3706
3707
3708
3709
3710
3711
3712
3713
3714#
3715# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3716# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3717#
3718# This code is free software; you can redistribute it and/or modify it
3719# under the terms of the GNU General Public License version 2 only, as
3720# published by the Free Software Foundation.  Oracle designates this
3721# particular file as subject to the "Classpath" exception as provided
3722# by Oracle in the LICENSE file that accompanied this code.
3723#
3724# This code is distributed in the hope that it will be useful, but WITHOUT
3725# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3726# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3727# version 2 for more details (a copy is included in the LICENSE file that
3728# accompanied this code).
3729#
3730# You should have received a copy of the GNU General Public License version
3731# 2 along with this work; if not, write to the Free Software Foundation,
3732# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3733#
3734# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3735# or visit www.oracle.com if you need additional information or have any
3736# questions.
3737#
3738
3739# $1 = compiler to test (CC or CXX)
3740# $2 = human readable name of compiler (C or C++)
3741
3742
3743
3744
3745
3746# $1 = compiler to test (CC or CXX)
3747# $2 = human readable name of compiler (C or C++)
3748# $3 = list of compiler names to search for
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3763#                                   [RUN-IF-FALSE])
3764# ------------------------------------------------------------
3765# Check that the c and c++ compilers support an argument
3766
3767
3768
3769
3770# Setup the JTREG paths
3771
3772
3773#
3774# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3775# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3776#
3777# This code is free software; you can redistribute it and/or modify it
3778# under the terms of the GNU General Public License version 2 only, as
3779# published by the Free Software Foundation.  Oracle designates this
3780# particular file as subject to the "Classpath" exception as provided
3781# by Oracle in the LICENSE file that accompanied this code.
3782#
3783# This code is distributed in the hope that it will be useful, but WITHOUT
3784# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3785# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3786# version 2 for more details (a copy is included in the LICENSE file that
3787# accompanied this code).
3788#
3789# You should have received a copy of the GNU General Public License version
3790# 2 along with this work; if not, write to the Free Software Foundation,
3791# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3792#
3793# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3794# or visit www.oracle.com if you need additional information or have any
3795# questions.
3796#
3797
3798
3799
3800
3801
3802
3803
3804# Check if the VS env variables were setup prior to running configure.
3805# If not, then find vcvarsall.bat and run it automatically, and integrate
3806# the set env variables into the spec file.
3807
3808
3809
3810# Setup the DXSDK paths
3811
3812
3813
3814
3815
3816
3817# This line needs to be here, verbatim, after all includes and the dummy hook
3818# definitions. It is replaced with custom functionality when building
3819# custom sources.
3820#CUSTOM_AUTOCONF_INCLUDE
3821
3822# Do not change or remove the following line, it is needed for consistency checks:
3823DATE_WHEN_GENERATED=1378975246
3824
3825###############################################################################
3826#
3827# Initialization / Boot-strapping
3828#
3829# The bootstrapping process needs to solve the "chicken or the egg" problem,
3830# thus it jumps back and forth, each time gaining something needed later on.
3831#
3832###############################################################################
3833
3834# Basic initialization that must happen first of all
3835
3836# Save the original command line. This is passed to us by the wrapper configure script.
3837
3838DATE_WHEN_CONFIGURED=`LANG=C date`
3839
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3841$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3842{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3843$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3844
3845
3846
3847# Start with tools that do not need have cross compilation support
3848# and can be expected to be found in the default PATH. These tools are
3849# used by configure. Nor are these tools expected to be found in the
3850# devkit from the builddeps server either, since they are
3851# needed to download the devkit.
3852
3853# First are all the simple required tools.
3854
3855    for ac_prog in basename
3856do
3857  # Extract the first word of "$ac_prog", so it can be a program name with args.
3858set dummy $ac_prog; ac_word=$2
3859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3860$as_echo_n "checking for $ac_word... " >&6; }
3861if ${ac_cv_path_BASENAME+:} false; then :
3862  $as_echo_n "(cached) " >&6
3863else
3864  case $BASENAME in
3865  [\\/]* | ?:[\\/]*)
3866  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3867  ;;
3868  *)
3869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870for as_dir in $PATH
3871do
3872  IFS=$as_save_IFS
3873  test -z "$as_dir" && as_dir=.
3874    for ac_exec_ext in '' $ac_executable_extensions; do
3875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3876    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3878    break 2
3879  fi
3880done
3881  done
3882IFS=$as_save_IFS
3883
3884  ;;
3885esac
3886fi
3887BASENAME=$ac_cv_path_BASENAME
3888if test -n "$BASENAME"; then
3889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3890$as_echo "$BASENAME" >&6; }
3891else
3892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3893$as_echo "no" >&6; }
3894fi
3895
3896
3897  test -n "$BASENAME" && break
3898done
3899
3900
3901    if test "x$BASENAME" = x; then
3902        if test "xbasename" = x; then
3903          PROG_NAME=basename
3904        else
3905          PROG_NAME=basename
3906        fi
3907        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3908$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3909        as_fn_error $? "Cannot continue" "$LINENO" 5
3910    fi
3911
3912
3913
3914    for ac_prog in bash
3915do
3916  # Extract the first word of "$ac_prog", so it can be a program name with args.
3917set dummy $ac_prog; ac_word=$2
3918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3919$as_echo_n "checking for $ac_word... " >&6; }
3920if ${ac_cv_path_BASH+:} false; then :
3921  $as_echo_n "(cached) " >&6
3922else
3923  case $BASH in
3924  [\\/]* | ?:[\\/]*)
3925  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3926  ;;
3927  *)
3928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3929for as_dir in $PATH
3930do
3931  IFS=$as_save_IFS
3932  test -z "$as_dir" && as_dir=.
3933    for ac_exec_ext in '' $ac_executable_extensions; do
3934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3935    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3937    break 2
3938  fi
3939done
3940  done
3941IFS=$as_save_IFS
3942
3943  ;;
3944esac
3945fi
3946BASH=$ac_cv_path_BASH
3947if test -n "$BASH"; then
3948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3949$as_echo "$BASH" >&6; }
3950else
3951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3952$as_echo "no" >&6; }
3953fi
3954
3955
3956  test -n "$BASH" && break
3957done
3958
3959
3960    if test "x$BASH" = x; then
3961        if test "xbash" = x; then
3962          PROG_NAME=bash
3963        else
3964          PROG_NAME=bash
3965        fi
3966        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3967$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3968        as_fn_error $? "Cannot continue" "$LINENO" 5
3969    fi
3970
3971
3972
3973    for ac_prog in cat
3974do
3975  # Extract the first word of "$ac_prog", so it can be a program name with args.
3976set dummy $ac_prog; ac_word=$2
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3978$as_echo_n "checking for $ac_word... " >&6; }
3979if ${ac_cv_path_CAT+:} false; then :
3980  $as_echo_n "(cached) " >&6
3981else
3982  case $CAT in
3983  [\\/]* | ?:[\\/]*)
3984  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3985  ;;
3986  *)
3987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3988for as_dir in $PATH
3989do
3990  IFS=$as_save_IFS
3991  test -z "$as_dir" && as_dir=.
3992    for ac_exec_ext in '' $ac_executable_extensions; do
3993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3994    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3996    break 2
3997  fi
3998done
3999  done
4000IFS=$as_save_IFS
4001
4002  ;;
4003esac
4004fi
4005CAT=$ac_cv_path_CAT
4006if test -n "$CAT"; then
4007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4008$as_echo "$CAT" >&6; }
4009else
4010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4011$as_echo "no" >&6; }
4012fi
4013
4014
4015  test -n "$CAT" && break
4016done
4017
4018
4019    if test "x$CAT" = x; then
4020        if test "xcat" = x; then
4021          PROG_NAME=cat
4022        else
4023          PROG_NAME=cat
4024        fi
4025        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4026$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4027        as_fn_error $? "Cannot continue" "$LINENO" 5
4028    fi
4029
4030
4031
4032    for ac_prog in chmod
4033do
4034  # Extract the first word of "$ac_prog", so it can be a program name with args.
4035set dummy $ac_prog; ac_word=$2
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4037$as_echo_n "checking for $ac_word... " >&6; }
4038if ${ac_cv_path_CHMOD+:} false; then :
4039  $as_echo_n "(cached) " >&6
4040else
4041  case $CHMOD in
4042  [\\/]* | ?:[\\/]*)
4043  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4044  ;;
4045  *)
4046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4047for as_dir in $PATH
4048do
4049  IFS=$as_save_IFS
4050  test -z "$as_dir" && as_dir=.
4051    for ac_exec_ext in '' $ac_executable_extensions; do
4052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4053    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4055    break 2
4056  fi
4057done
4058  done
4059IFS=$as_save_IFS
4060
4061  ;;
4062esac
4063fi
4064CHMOD=$ac_cv_path_CHMOD
4065if test -n "$CHMOD"; then
4066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4067$as_echo "$CHMOD" >&6; }
4068else
4069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4070$as_echo "no" >&6; }
4071fi
4072
4073
4074  test -n "$CHMOD" && break
4075done
4076
4077
4078    if test "x$CHMOD" = x; then
4079        if test "xchmod" = x; then
4080          PROG_NAME=chmod
4081        else
4082          PROG_NAME=chmod
4083        fi
4084        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4085$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4086        as_fn_error $? "Cannot continue" "$LINENO" 5
4087    fi
4088
4089
4090
4091    for ac_prog in cmp
4092do
4093  # Extract the first word of "$ac_prog", so it can be a program name with args.
4094set dummy $ac_prog; ac_word=$2
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4096$as_echo_n "checking for $ac_word... " >&6; }
4097if ${ac_cv_path_CMP+:} false; then :
4098  $as_echo_n "(cached) " >&6
4099else
4100  case $CMP in
4101  [\\/]* | ?:[\\/]*)
4102  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4103  ;;
4104  *)
4105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4106for as_dir in $PATH
4107do
4108  IFS=$as_save_IFS
4109  test -z "$as_dir" && as_dir=.
4110    for ac_exec_ext in '' $ac_executable_extensions; do
4111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4112    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4114    break 2
4115  fi
4116done
4117  done
4118IFS=$as_save_IFS
4119
4120  ;;
4121esac
4122fi
4123CMP=$ac_cv_path_CMP
4124if test -n "$CMP"; then
4125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4126$as_echo "$CMP" >&6; }
4127else
4128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
4130fi
4131
4132
4133  test -n "$CMP" && break
4134done
4135
4136
4137    if test "x$CMP" = x; then
4138        if test "xcmp" = x; then
4139          PROG_NAME=cmp
4140        else
4141          PROG_NAME=cmp
4142        fi
4143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4144$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4145        as_fn_error $? "Cannot continue" "$LINENO" 5
4146    fi
4147
4148
4149
4150    for ac_prog in comm
4151do
4152  # Extract the first word of "$ac_prog", so it can be a program name with args.
4153set dummy $ac_prog; ac_word=$2
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4155$as_echo_n "checking for $ac_word... " >&6; }
4156if ${ac_cv_path_COMM+:} false; then :
4157  $as_echo_n "(cached) " >&6
4158else
4159  case $COMM in
4160  [\\/]* | ?:[\\/]*)
4161  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4162  ;;
4163  *)
4164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4165for as_dir in $PATH
4166do
4167  IFS=$as_save_IFS
4168  test -z "$as_dir" && as_dir=.
4169    for ac_exec_ext in '' $ac_executable_extensions; do
4170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4171    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4173    break 2
4174  fi
4175done
4176  done
4177IFS=$as_save_IFS
4178
4179  ;;
4180esac
4181fi
4182COMM=$ac_cv_path_COMM
4183if test -n "$COMM"; then
4184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4185$as_echo "$COMM" >&6; }
4186else
4187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4188$as_echo "no" >&6; }
4189fi
4190
4191
4192  test -n "$COMM" && break
4193done
4194
4195
4196    if test "x$COMM" = x; then
4197        if test "xcomm" = x; then
4198          PROG_NAME=comm
4199        else
4200          PROG_NAME=comm
4201        fi
4202        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4203$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4204        as_fn_error $? "Cannot continue" "$LINENO" 5
4205    fi
4206
4207
4208
4209    for ac_prog in cp
4210do
4211  # Extract the first word of "$ac_prog", so it can be a program name with args.
4212set dummy $ac_prog; ac_word=$2
4213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4214$as_echo_n "checking for $ac_word... " >&6; }
4215if ${ac_cv_path_CP+:} false; then :
4216  $as_echo_n "(cached) " >&6
4217else
4218  case $CP in
4219  [\\/]* | ?:[\\/]*)
4220  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4221  ;;
4222  *)
4223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4224for as_dir in $PATH
4225do
4226  IFS=$as_save_IFS
4227  test -z "$as_dir" && as_dir=.
4228    for ac_exec_ext in '' $ac_executable_extensions; do
4229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4230    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4232    break 2
4233  fi
4234done
4235  done
4236IFS=$as_save_IFS
4237
4238  ;;
4239esac
4240fi
4241CP=$ac_cv_path_CP
4242if test -n "$CP"; then
4243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4244$as_echo "$CP" >&6; }
4245else
4246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4247$as_echo "no" >&6; }
4248fi
4249
4250
4251  test -n "$CP" && break
4252done
4253
4254
4255    if test "x$CP" = x; then
4256        if test "xcp" = x; then
4257          PROG_NAME=cp
4258        else
4259          PROG_NAME=cp
4260        fi
4261        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4262$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4263        as_fn_error $? "Cannot continue" "$LINENO" 5
4264    fi
4265
4266
4267
4268    for ac_prog in cpio
4269do
4270  # Extract the first word of "$ac_prog", so it can be a program name with args.
4271set dummy $ac_prog; ac_word=$2
4272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4273$as_echo_n "checking for $ac_word... " >&6; }
4274if ${ac_cv_path_CPIO+:} false; then :
4275  $as_echo_n "(cached) " >&6
4276else
4277  case $CPIO in
4278  [\\/]* | ?:[\\/]*)
4279  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4280  ;;
4281  *)
4282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4283for as_dir in $PATH
4284do
4285  IFS=$as_save_IFS
4286  test -z "$as_dir" && as_dir=.
4287    for ac_exec_ext in '' $ac_executable_extensions; do
4288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4289    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4291    break 2
4292  fi
4293done
4294  done
4295IFS=$as_save_IFS
4296
4297  ;;
4298esac
4299fi
4300CPIO=$ac_cv_path_CPIO
4301if test -n "$CPIO"; then
4302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4303$as_echo "$CPIO" >&6; }
4304else
4305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4306$as_echo "no" >&6; }
4307fi
4308
4309
4310  test -n "$CPIO" && break
4311done
4312
4313
4314    if test "x$CPIO" = x; then
4315        if test "xcpio" = x; then
4316          PROG_NAME=cpio
4317        else
4318          PROG_NAME=cpio
4319        fi
4320        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4321$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4322        as_fn_error $? "Cannot continue" "$LINENO" 5
4323    fi
4324
4325
4326
4327    for ac_prog in cut
4328do
4329  # Extract the first word of "$ac_prog", so it can be a program name with args.
4330set dummy $ac_prog; ac_word=$2
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4332$as_echo_n "checking for $ac_word... " >&6; }
4333if ${ac_cv_path_CUT+:} false; then :
4334  $as_echo_n "(cached) " >&6
4335else
4336  case $CUT in
4337  [\\/]* | ?:[\\/]*)
4338  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4339  ;;
4340  *)
4341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4342for as_dir in $PATH
4343do
4344  IFS=$as_save_IFS
4345  test -z "$as_dir" && as_dir=.
4346    for ac_exec_ext in '' $ac_executable_extensions; do
4347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4348    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4350    break 2
4351  fi
4352done
4353  done
4354IFS=$as_save_IFS
4355
4356  ;;
4357esac
4358fi
4359CUT=$ac_cv_path_CUT
4360if test -n "$CUT"; then
4361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4362$as_echo "$CUT" >&6; }
4363else
4364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4365$as_echo "no" >&6; }
4366fi
4367
4368
4369  test -n "$CUT" && break
4370done
4371
4372
4373    if test "x$CUT" = x; then
4374        if test "xcut" = x; then
4375          PROG_NAME=cut
4376        else
4377          PROG_NAME=cut
4378        fi
4379        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4380$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4381        as_fn_error $? "Cannot continue" "$LINENO" 5
4382    fi
4383
4384
4385
4386    for ac_prog in date
4387do
4388  # Extract the first word of "$ac_prog", so it can be a program name with args.
4389set dummy $ac_prog; ac_word=$2
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391$as_echo_n "checking for $ac_word... " >&6; }
4392if ${ac_cv_path_DATE+:} false; then :
4393  $as_echo_n "(cached) " >&6
4394else
4395  case $DATE in
4396  [\\/]* | ?:[\\/]*)
4397  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4398  ;;
4399  *)
4400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in $PATH
4402do
4403  IFS=$as_save_IFS
4404  test -z "$as_dir" && as_dir=.
4405    for ac_exec_ext in '' $ac_executable_extensions; do
4406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4407    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4409    break 2
4410  fi
4411done
4412  done
4413IFS=$as_save_IFS
4414
4415  ;;
4416esac
4417fi
4418DATE=$ac_cv_path_DATE
4419if test -n "$DATE"; then
4420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4421$as_echo "$DATE" >&6; }
4422else
4423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424$as_echo "no" >&6; }
4425fi
4426
4427
4428  test -n "$DATE" && break
4429done
4430
4431
4432    if test "x$DATE" = x; then
4433        if test "xdate" = x; then
4434          PROG_NAME=date
4435        else
4436          PROG_NAME=date
4437        fi
4438        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4439$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4440        as_fn_error $? "Cannot continue" "$LINENO" 5
4441    fi
4442
4443
4444
4445    for ac_prog in gdiff diff
4446do
4447  # Extract the first word of "$ac_prog", so it can be a program name with args.
4448set dummy $ac_prog; ac_word=$2
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4450$as_echo_n "checking for $ac_word... " >&6; }
4451if ${ac_cv_path_DIFF+:} false; then :
4452  $as_echo_n "(cached) " >&6
4453else
4454  case $DIFF in
4455  [\\/]* | ?:[\\/]*)
4456  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4457  ;;
4458  *)
4459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460for as_dir in $PATH
4461do
4462  IFS=$as_save_IFS
4463  test -z "$as_dir" && as_dir=.
4464    for ac_exec_ext in '' $ac_executable_extensions; do
4465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4466    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4468    break 2
4469  fi
4470done
4471  done
4472IFS=$as_save_IFS
4473
4474  ;;
4475esac
4476fi
4477DIFF=$ac_cv_path_DIFF
4478if test -n "$DIFF"; then
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4480$as_echo "$DIFF" >&6; }
4481else
4482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4483$as_echo "no" >&6; }
4484fi
4485
4486
4487  test -n "$DIFF" && break
4488done
4489
4490
4491    if test "x$DIFF" = x; then
4492        if test "xgdiff diff" = x; then
4493          PROG_NAME=diff
4494        else
4495          PROG_NAME=gdiff diff
4496        fi
4497        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4498$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4499        as_fn_error $? "Cannot continue" "$LINENO" 5
4500    fi
4501
4502
4503
4504    for ac_prog in dirname
4505do
4506  # Extract the first word of "$ac_prog", so it can be a program name with args.
4507set dummy $ac_prog; ac_word=$2
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509$as_echo_n "checking for $ac_word... " >&6; }
4510if ${ac_cv_path_DIRNAME+:} false; then :
4511  $as_echo_n "(cached) " >&6
4512else
4513  case $DIRNAME in
4514  [\\/]* | ?:[\\/]*)
4515  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4516  ;;
4517  *)
4518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH
4520do
4521  IFS=$as_save_IFS
4522  test -z "$as_dir" && as_dir=.
4523    for ac_exec_ext in '' $ac_executable_extensions; do
4524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4527    break 2
4528  fi
4529done
4530  done
4531IFS=$as_save_IFS
4532
4533  ;;
4534esac
4535fi
4536DIRNAME=$ac_cv_path_DIRNAME
4537if test -n "$DIRNAME"; then
4538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4539$as_echo "$DIRNAME" >&6; }
4540else
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542$as_echo "no" >&6; }
4543fi
4544
4545
4546  test -n "$DIRNAME" && break
4547done
4548
4549
4550    if test "x$DIRNAME" = x; then
4551        if test "xdirname" = x; then
4552          PROG_NAME=dirname
4553        else
4554          PROG_NAME=dirname
4555        fi
4556        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4557$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4558        as_fn_error $? "Cannot continue" "$LINENO" 5
4559    fi
4560
4561
4562
4563    for ac_prog in echo
4564do
4565  # Extract the first word of "$ac_prog", so it can be a program name with args.
4566set dummy $ac_prog; ac_word=$2
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4568$as_echo_n "checking for $ac_word... " >&6; }
4569if ${ac_cv_path_ECHO+:} false; then :
4570  $as_echo_n "(cached) " >&6
4571else
4572  case $ECHO in
4573  [\\/]* | ?:[\\/]*)
4574  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4575  ;;
4576  *)
4577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580  IFS=$as_save_IFS
4581  test -z "$as_dir" && as_dir=.
4582    for ac_exec_ext in '' $ac_executable_extensions; do
4583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4584    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4586    break 2
4587  fi
4588done
4589  done
4590IFS=$as_save_IFS
4591
4592  ;;
4593esac
4594fi
4595ECHO=$ac_cv_path_ECHO
4596if test -n "$ECHO"; then
4597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4598$as_echo "$ECHO" >&6; }
4599else
4600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4601$as_echo "no" >&6; }
4602fi
4603
4604
4605  test -n "$ECHO" && break
4606done
4607
4608
4609    if test "x$ECHO" = x; then
4610        if test "xecho" = x; then
4611          PROG_NAME=echo
4612        else
4613          PROG_NAME=echo
4614        fi
4615        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4616$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4617        as_fn_error $? "Cannot continue" "$LINENO" 5
4618    fi
4619
4620
4621
4622    for ac_prog in expr
4623do
4624  # Extract the first word of "$ac_prog", so it can be a program name with args.
4625set dummy $ac_prog; ac_word=$2
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627$as_echo_n "checking for $ac_word... " >&6; }
4628if ${ac_cv_path_EXPR+:} false; then :
4629  $as_echo_n "(cached) " >&6
4630else
4631  case $EXPR in
4632  [\\/]* | ?:[\\/]*)
4633  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4634  ;;
4635  *)
4636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4637for as_dir in $PATH
4638do
4639  IFS=$as_save_IFS
4640  test -z "$as_dir" && as_dir=.
4641    for ac_exec_ext in '' $ac_executable_extensions; do
4642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4643    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4645    break 2
4646  fi
4647done
4648  done
4649IFS=$as_save_IFS
4650
4651  ;;
4652esac
4653fi
4654EXPR=$ac_cv_path_EXPR
4655if test -n "$EXPR"; then
4656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4657$as_echo "$EXPR" >&6; }
4658else
4659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
4661fi
4662
4663
4664  test -n "$EXPR" && break
4665done
4666
4667
4668    if test "x$EXPR" = x; then
4669        if test "xexpr" = x; then
4670          PROG_NAME=expr
4671        else
4672          PROG_NAME=expr
4673        fi
4674        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4675$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4676        as_fn_error $? "Cannot continue" "$LINENO" 5
4677    fi
4678
4679
4680
4681    for ac_prog in file
4682do
4683  # Extract the first word of "$ac_prog", so it can be a program name with args.
4684set dummy $ac_prog; ac_word=$2
4685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4686$as_echo_n "checking for $ac_word... " >&6; }
4687if ${ac_cv_path_FILE+:} false; then :
4688  $as_echo_n "(cached) " >&6
4689else
4690  case $FILE in
4691  [\\/]* | ?:[\\/]*)
4692  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4693  ;;
4694  *)
4695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4696for as_dir in $PATH
4697do
4698  IFS=$as_save_IFS
4699  test -z "$as_dir" && as_dir=.
4700    for ac_exec_ext in '' $ac_executable_extensions; do
4701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4702    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4704    break 2
4705  fi
4706done
4707  done
4708IFS=$as_save_IFS
4709
4710  ;;
4711esac
4712fi
4713FILE=$ac_cv_path_FILE
4714if test -n "$FILE"; then
4715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4716$as_echo "$FILE" >&6; }
4717else
4718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
4720fi
4721
4722
4723  test -n "$FILE" && break
4724done
4725
4726
4727    if test "x$FILE" = x; then
4728        if test "xfile" = x; then
4729          PROG_NAME=file
4730        else
4731          PROG_NAME=file
4732        fi
4733        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4734$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4735        as_fn_error $? "Cannot continue" "$LINENO" 5
4736    fi
4737
4738
4739
4740    for ac_prog in find
4741do
4742  # Extract the first word of "$ac_prog", so it can be a program name with args.
4743set dummy $ac_prog; ac_word=$2
4744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4745$as_echo_n "checking for $ac_word... " >&6; }
4746if ${ac_cv_path_FIND+:} false; then :
4747  $as_echo_n "(cached) " >&6
4748else
4749  case $FIND in
4750  [\\/]* | ?:[\\/]*)
4751  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4752  ;;
4753  *)
4754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in $PATH
4756do
4757  IFS=$as_save_IFS
4758  test -z "$as_dir" && as_dir=.
4759    for ac_exec_ext in '' $ac_executable_extensions; do
4760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4761    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4763    break 2
4764  fi
4765done
4766  done
4767IFS=$as_save_IFS
4768
4769  ;;
4770esac
4771fi
4772FIND=$ac_cv_path_FIND
4773if test -n "$FIND"; then
4774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4775$as_echo "$FIND" >&6; }
4776else
4777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778$as_echo "no" >&6; }
4779fi
4780
4781
4782  test -n "$FIND" && break
4783done
4784
4785
4786    if test "x$FIND" = x; then
4787        if test "xfind" = x; then
4788          PROG_NAME=find
4789        else
4790          PROG_NAME=find
4791        fi
4792        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4793$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4794        as_fn_error $? "Cannot continue" "$LINENO" 5
4795    fi
4796
4797
4798
4799    for ac_prog in head
4800do
4801  # Extract the first word of "$ac_prog", so it can be a program name with args.
4802set dummy $ac_prog; ac_word=$2
4803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4804$as_echo_n "checking for $ac_word... " >&6; }
4805if ${ac_cv_path_HEAD+:} false; then :
4806  $as_echo_n "(cached) " >&6
4807else
4808  case $HEAD in
4809  [\\/]* | ?:[\\/]*)
4810  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4811  ;;
4812  *)
4813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4814for as_dir in $PATH
4815do
4816  IFS=$as_save_IFS
4817  test -z "$as_dir" && as_dir=.
4818    for ac_exec_ext in '' $ac_executable_extensions; do
4819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4820    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4822    break 2
4823  fi
4824done
4825  done
4826IFS=$as_save_IFS
4827
4828  ;;
4829esac
4830fi
4831HEAD=$ac_cv_path_HEAD
4832if test -n "$HEAD"; then
4833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4834$as_echo "$HEAD" >&6; }
4835else
4836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4837$as_echo "no" >&6; }
4838fi
4839
4840
4841  test -n "$HEAD" && break
4842done
4843
4844
4845    if test "x$HEAD" = x; then
4846        if test "xhead" = x; then
4847          PROG_NAME=head
4848        else
4849          PROG_NAME=head
4850        fi
4851        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4852$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4853        as_fn_error $? "Cannot continue" "$LINENO" 5
4854    fi
4855
4856
4857
4858    for ac_prog in ln
4859do
4860  # Extract the first word of "$ac_prog", so it can be a program name with args.
4861set dummy $ac_prog; ac_word=$2
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_LN+:} false; then :
4865  $as_echo_n "(cached) " >&6
4866else
4867  case $LN in
4868  [\\/]* | ?:[\\/]*)
4869  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4870  ;;
4871  *)
4872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in $PATH
4874do
4875  IFS=$as_save_IFS
4876  test -z "$as_dir" && as_dir=.
4877    for ac_exec_ext in '' $ac_executable_extensions; do
4878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4879    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881    break 2
4882  fi
4883done
4884  done
4885IFS=$as_save_IFS
4886
4887  ;;
4888esac
4889fi
4890LN=$ac_cv_path_LN
4891if test -n "$LN"; then
4892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4893$as_echo "$LN" >&6; }
4894else
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899
4900  test -n "$LN" && break
4901done
4902
4903
4904    if test "x$LN" = x; then
4905        if test "xln" = x; then
4906          PROG_NAME=ln
4907        else
4908          PROG_NAME=ln
4909        fi
4910        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4911$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4912        as_fn_error $? "Cannot continue" "$LINENO" 5
4913    fi
4914
4915
4916
4917    for ac_prog in ls
4918do
4919  # Extract the first word of "$ac_prog", so it can be a program name with args.
4920set dummy $ac_prog; ac_word=$2
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922$as_echo_n "checking for $ac_word... " >&6; }
4923if ${ac_cv_path_LS+:} false; then :
4924  $as_echo_n "(cached) " >&6
4925else
4926  case $LS in
4927  [\\/]* | ?:[\\/]*)
4928  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4929  ;;
4930  *)
4931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932for as_dir in $PATH
4933do
4934  IFS=$as_save_IFS
4935  test -z "$as_dir" && as_dir=.
4936    for ac_exec_ext in '' $ac_executable_extensions; do
4937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4938    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940    break 2
4941  fi
4942done
4943  done
4944IFS=$as_save_IFS
4945
4946  ;;
4947esac
4948fi
4949LS=$ac_cv_path_LS
4950if test -n "$LS"; then
4951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4952$as_echo "$LS" >&6; }
4953else
4954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4955$as_echo "no" >&6; }
4956fi
4957
4958
4959  test -n "$LS" && break
4960done
4961
4962
4963    if test "x$LS" = x; then
4964        if test "xls" = x; then
4965          PROG_NAME=ls
4966        else
4967          PROG_NAME=ls
4968        fi
4969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4970$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4971        as_fn_error $? "Cannot continue" "$LINENO" 5
4972    fi
4973
4974
4975
4976    for ac_prog in mkdir
4977do
4978  # Extract the first word of "$ac_prog", so it can be a program name with args.
4979set dummy $ac_prog; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_MKDIR+:} false; then :
4983  $as_echo_n "(cached) " >&6
4984else
4985  case $MKDIR in
4986  [\\/]* | ?:[\\/]*)
4987  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4988  ;;
4989  *)
4990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in $PATH
4992do
4993  IFS=$as_save_IFS
4994  test -z "$as_dir" && as_dir=.
4995    for ac_exec_ext in '' $ac_executable_extensions; do
4996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999    break 2
5000  fi
5001done
5002  done
5003IFS=$as_save_IFS
5004
5005  ;;
5006esac
5007fi
5008MKDIR=$ac_cv_path_MKDIR
5009if test -n "$MKDIR"; then
5010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5011$as_echo "$MKDIR" >&6; }
5012else
5013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017
5018  test -n "$MKDIR" && break
5019done
5020
5021
5022    if test "x$MKDIR" = x; then
5023        if test "xmkdir" = x; then
5024          PROG_NAME=mkdir
5025        else
5026          PROG_NAME=mkdir
5027        fi
5028        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5029$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5030        as_fn_error $? "Cannot continue" "$LINENO" 5
5031    fi
5032
5033
5034
5035    for ac_prog in mktemp
5036do
5037  # Extract the first word of "$ac_prog", so it can be a program name with args.
5038set dummy $ac_prog; ac_word=$2
5039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5040$as_echo_n "checking for $ac_word... " >&6; }
5041if ${ac_cv_path_MKTEMP+:} false; then :
5042  $as_echo_n "(cached) " >&6
5043else
5044  case $MKTEMP in
5045  [\\/]* | ?:[\\/]*)
5046  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5047  ;;
5048  *)
5049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5050for as_dir in $PATH
5051do
5052  IFS=$as_save_IFS
5053  test -z "$as_dir" && as_dir=.
5054    for ac_exec_ext in '' $ac_executable_extensions; do
5055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5056    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5058    break 2
5059  fi
5060done
5061  done
5062IFS=$as_save_IFS
5063
5064  ;;
5065esac
5066fi
5067MKTEMP=$ac_cv_path_MKTEMP
5068if test -n "$MKTEMP"; then
5069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5070$as_echo "$MKTEMP" >&6; }
5071else
5072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5073$as_echo "no" >&6; }
5074fi
5075
5076
5077  test -n "$MKTEMP" && break
5078done
5079
5080
5081    if test "x$MKTEMP" = x; then
5082        if test "xmktemp" = x; then
5083          PROG_NAME=mktemp
5084        else
5085          PROG_NAME=mktemp
5086        fi
5087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5088$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5089        as_fn_error $? "Cannot continue" "$LINENO" 5
5090    fi
5091
5092
5093
5094    for ac_prog in mv
5095do
5096  # Extract the first word of "$ac_prog", so it can be a program name with args.
5097set dummy $ac_prog; ac_word=$2
5098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5099$as_echo_n "checking for $ac_word... " >&6; }
5100if ${ac_cv_path_MV+:} false; then :
5101  $as_echo_n "(cached) " >&6
5102else
5103  case $MV in
5104  [\\/]* | ?:[\\/]*)
5105  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5106  ;;
5107  *)
5108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111  IFS=$as_save_IFS
5112  test -z "$as_dir" && as_dir=.
5113    for ac_exec_ext in '' $ac_executable_extensions; do
5114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5115    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5117    break 2
5118  fi
5119done
5120  done
5121IFS=$as_save_IFS
5122
5123  ;;
5124esac
5125fi
5126MV=$ac_cv_path_MV
5127if test -n "$MV"; then
5128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5129$as_echo "$MV" >&6; }
5130else
5131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5132$as_echo "no" >&6; }
5133fi
5134
5135
5136  test -n "$MV" && break
5137done
5138
5139
5140    if test "x$MV" = x; then
5141        if test "xmv" = x; then
5142          PROG_NAME=mv
5143        else
5144          PROG_NAME=mv
5145        fi
5146        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5147$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5148        as_fn_error $? "Cannot continue" "$LINENO" 5
5149    fi
5150
5151
5152
5153    for ac_prog in printf
5154do
5155  # Extract the first word of "$ac_prog", so it can be a program name with args.
5156set dummy $ac_prog; ac_word=$2
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5158$as_echo_n "checking for $ac_word... " >&6; }
5159if ${ac_cv_path_PRINTF+:} false; then :
5160  $as_echo_n "(cached) " >&6
5161else
5162  case $PRINTF in
5163  [\\/]* | ?:[\\/]*)
5164  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5165  ;;
5166  *)
5167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5168for as_dir in $PATH
5169do
5170  IFS=$as_save_IFS
5171  test -z "$as_dir" && as_dir=.
5172    for ac_exec_ext in '' $ac_executable_extensions; do
5173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5174    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5176    break 2
5177  fi
5178done
5179  done
5180IFS=$as_save_IFS
5181
5182  ;;
5183esac
5184fi
5185PRINTF=$ac_cv_path_PRINTF
5186if test -n "$PRINTF"; then
5187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5188$as_echo "$PRINTF" >&6; }
5189else
5190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5191$as_echo "no" >&6; }
5192fi
5193
5194
5195  test -n "$PRINTF" && break
5196done
5197
5198
5199    if test "x$PRINTF" = x; then
5200        if test "xprintf" = x; then
5201          PROG_NAME=printf
5202        else
5203          PROG_NAME=printf
5204        fi
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5206$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5207        as_fn_error $? "Cannot continue" "$LINENO" 5
5208    fi
5209
5210
5211
5212    for ac_prog in rm
5213do
5214  # Extract the first word of "$ac_prog", so it can be a program name with args.
5215set dummy $ac_prog; ac_word=$2
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5217$as_echo_n "checking for $ac_word... " >&6; }
5218if ${ac_cv_path_RM+:} false; then :
5219  $as_echo_n "(cached) " >&6
5220else
5221  case $RM in
5222  [\\/]* | ?:[\\/]*)
5223  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5224  ;;
5225  *)
5226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5227for as_dir in $PATH
5228do
5229  IFS=$as_save_IFS
5230  test -z "$as_dir" && as_dir=.
5231    for ac_exec_ext in '' $ac_executable_extensions; do
5232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5233    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5235    break 2
5236  fi
5237done
5238  done
5239IFS=$as_save_IFS
5240
5241  ;;
5242esac
5243fi
5244RM=$ac_cv_path_RM
5245if test -n "$RM"; then
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5247$as_echo "$RM" >&6; }
5248else
5249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5250$as_echo "no" >&6; }
5251fi
5252
5253
5254  test -n "$RM" && break
5255done
5256
5257
5258    if test "x$RM" = x; then
5259        if test "xrm" = x; then
5260          PROG_NAME=rm
5261        else
5262          PROG_NAME=rm
5263        fi
5264        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5265$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5266        as_fn_error $? "Cannot continue" "$LINENO" 5
5267    fi
5268
5269
5270
5271    for ac_prog in sh
5272do
5273  # Extract the first word of "$ac_prog", so it can be a program name with args.
5274set dummy $ac_prog; ac_word=$2
5275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5276$as_echo_n "checking for $ac_word... " >&6; }
5277if ${ac_cv_path_SH+:} false; then :
5278  $as_echo_n "(cached) " >&6
5279else
5280  case $SH in
5281  [\\/]* | ?:[\\/]*)
5282  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5283  ;;
5284  *)
5285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5286for as_dir in $PATH
5287do
5288  IFS=$as_save_IFS
5289  test -z "$as_dir" && as_dir=.
5290    for ac_exec_ext in '' $ac_executable_extensions; do
5291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5292    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5294    break 2
5295  fi
5296done
5297  done
5298IFS=$as_save_IFS
5299
5300  ;;
5301esac
5302fi
5303SH=$ac_cv_path_SH
5304if test -n "$SH"; then
5305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5306$as_echo "$SH" >&6; }
5307else
5308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309$as_echo "no" >&6; }
5310fi
5311
5312
5313  test -n "$SH" && break
5314done
5315
5316
5317    if test "x$SH" = x; then
5318        if test "xsh" = x; then
5319          PROG_NAME=sh
5320        else
5321          PROG_NAME=sh
5322        fi
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5324$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5325        as_fn_error $? "Cannot continue" "$LINENO" 5
5326    fi
5327
5328
5329
5330    for ac_prog in sort
5331do
5332  # Extract the first word of "$ac_prog", so it can be a program name with args.
5333set dummy $ac_prog; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_path_SORT+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  case $SORT in
5340  [\\/]* | ?:[\\/]*)
5341  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5342  ;;
5343  *)
5344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347  IFS=$as_save_IFS
5348  test -z "$as_dir" && as_dir=.
5349    for ac_exec_ext in '' $ac_executable_extensions; do
5350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353    break 2
5354  fi
5355done
5356  done
5357IFS=$as_save_IFS
5358
5359  ;;
5360esac
5361fi
5362SORT=$ac_cv_path_SORT
5363if test -n "$SORT"; then
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5365$as_echo "$SORT" >&6; }
5366else
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
5369fi
5370
5371
5372  test -n "$SORT" && break
5373done
5374
5375
5376    if test "x$SORT" = x; then
5377        if test "xsort" = x; then
5378          PROG_NAME=sort
5379        else
5380          PROG_NAME=sort
5381        fi
5382        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5383$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5384        as_fn_error $? "Cannot continue" "$LINENO" 5
5385    fi
5386
5387
5388
5389    for ac_prog in tail
5390do
5391  # Extract the first word of "$ac_prog", so it can be a program name with args.
5392set dummy $ac_prog; ac_word=$2
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5394$as_echo_n "checking for $ac_word... " >&6; }
5395if ${ac_cv_path_TAIL+:} false; then :
5396  $as_echo_n "(cached) " >&6
5397else
5398  case $TAIL in
5399  [\\/]* | ?:[\\/]*)
5400  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5401  ;;
5402  *)
5403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5404for as_dir in $PATH
5405do
5406  IFS=$as_save_IFS
5407  test -z "$as_dir" && as_dir=.
5408    for ac_exec_ext in '' $ac_executable_extensions; do
5409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5410    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5412    break 2
5413  fi
5414done
5415  done
5416IFS=$as_save_IFS
5417
5418  ;;
5419esac
5420fi
5421TAIL=$ac_cv_path_TAIL
5422if test -n "$TAIL"; then
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5424$as_echo "$TAIL" >&6; }
5425else
5426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428fi
5429
5430
5431  test -n "$TAIL" && break
5432done
5433
5434
5435    if test "x$TAIL" = x; then
5436        if test "xtail" = x; then
5437          PROG_NAME=tail
5438        else
5439          PROG_NAME=tail
5440        fi
5441        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5442$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5443        as_fn_error $? "Cannot continue" "$LINENO" 5
5444    fi
5445
5446
5447
5448    for ac_prog in tar
5449do
5450  # Extract the first word of "$ac_prog", so it can be a program name with args.
5451set dummy $ac_prog; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_TAR+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $TAR in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480TAR=$ac_cv_path_TAR
5481if test -n "$TAR"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5483$as_echo "$TAR" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490  test -n "$TAR" && break
5491done
5492
5493
5494    if test "x$TAR" = x; then
5495        if test "xtar" = x; then
5496          PROG_NAME=tar
5497        else
5498          PROG_NAME=tar
5499        fi
5500        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5501$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5502        as_fn_error $? "Cannot continue" "$LINENO" 5
5503    fi
5504
5505
5506
5507    for ac_prog in tee
5508do
5509  # Extract the first word of "$ac_prog", so it can be a program name with args.
5510set dummy $ac_prog; ac_word=$2
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512$as_echo_n "checking for $ac_word... " >&6; }
5513if ${ac_cv_path_TEE+:} false; then :
5514  $as_echo_n "(cached) " >&6
5515else
5516  case $TEE in
5517  [\\/]* | ?:[\\/]*)
5518  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5519  ;;
5520  *)
5521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH
5523do
5524  IFS=$as_save_IFS
5525  test -z "$as_dir" && as_dir=.
5526    for ac_exec_ext in '' $ac_executable_extensions; do
5527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530    break 2
5531  fi
5532done
5533  done
5534IFS=$as_save_IFS
5535
5536  ;;
5537esac
5538fi
5539TEE=$ac_cv_path_TEE
5540if test -n "$TEE"; then
5541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5542$as_echo "$TEE" >&6; }
5543else
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548
5549  test -n "$TEE" && break
5550done
5551
5552
5553    if test "x$TEE" = x; then
5554        if test "xtee" = x; then
5555          PROG_NAME=tee
5556        else
5557          PROG_NAME=tee
5558        fi
5559        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5560$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5561        as_fn_error $? "Cannot continue" "$LINENO" 5
5562    fi
5563
5564
5565
5566    for ac_prog in touch
5567do
5568  # Extract the first word of "$ac_prog", so it can be a program name with args.
5569set dummy $ac_prog; ac_word=$2
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5571$as_echo_n "checking for $ac_word... " >&6; }
5572if ${ac_cv_path_TOUCH+:} false; then :
5573  $as_echo_n "(cached) " >&6
5574else
5575  case $TOUCH in
5576  [\\/]* | ?:[\\/]*)
5577  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5578  ;;
5579  *)
5580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5581for as_dir in $PATH
5582do
5583  IFS=$as_save_IFS
5584  test -z "$as_dir" && as_dir=.
5585    for ac_exec_ext in '' $ac_executable_extensions; do
5586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5587    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5589    break 2
5590  fi
5591done
5592  done
5593IFS=$as_save_IFS
5594
5595  ;;
5596esac
5597fi
5598TOUCH=$ac_cv_path_TOUCH
5599if test -n "$TOUCH"; then
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5601$as_echo "$TOUCH" >&6; }
5602else
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
5605fi
5606
5607
5608  test -n "$TOUCH" && break
5609done
5610
5611
5612    if test "x$TOUCH" = x; then
5613        if test "xtouch" = x; then
5614          PROG_NAME=touch
5615        else
5616          PROG_NAME=touch
5617        fi
5618        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5619$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5620        as_fn_error $? "Cannot continue" "$LINENO" 5
5621    fi
5622
5623
5624
5625    for ac_prog in tr
5626do
5627  # Extract the first word of "$ac_prog", so it can be a program name with args.
5628set dummy $ac_prog; ac_word=$2
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5630$as_echo_n "checking for $ac_word... " >&6; }
5631if ${ac_cv_path_TR+:} false; then :
5632  $as_echo_n "(cached) " >&6
5633else
5634  case $TR in
5635  [\\/]* | ?:[\\/]*)
5636  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5637  ;;
5638  *)
5639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642  IFS=$as_save_IFS
5643  test -z "$as_dir" && as_dir=.
5644    for ac_exec_ext in '' $ac_executable_extensions; do
5645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5646    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5648    break 2
5649  fi
5650done
5651  done
5652IFS=$as_save_IFS
5653
5654  ;;
5655esac
5656fi
5657TR=$ac_cv_path_TR
5658if test -n "$TR"; then
5659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5660$as_echo "$TR" >&6; }
5661else
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667  test -n "$TR" && break
5668done
5669
5670
5671    if test "x$TR" = x; then
5672        if test "xtr" = x; then
5673          PROG_NAME=tr
5674        else
5675          PROG_NAME=tr
5676        fi
5677        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5678$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5679        as_fn_error $? "Cannot continue" "$LINENO" 5
5680    fi
5681
5682
5683
5684    for ac_prog in uname
5685do
5686  # Extract the first word of "$ac_prog", so it can be a program name with args.
5687set dummy $ac_prog; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
5690if ${ac_cv_path_UNAME+:} false; then :
5691  $as_echo_n "(cached) " >&6
5692else
5693  case $UNAME in
5694  [\\/]* | ?:[\\/]*)
5695  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5696  ;;
5697  *)
5698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5699for as_dir in $PATH
5700do
5701  IFS=$as_save_IFS
5702  test -z "$as_dir" && as_dir=.
5703    for ac_exec_ext in '' $ac_executable_extensions; do
5704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5705    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5707    break 2
5708  fi
5709done
5710  done
5711IFS=$as_save_IFS
5712
5713  ;;
5714esac
5715fi
5716UNAME=$ac_cv_path_UNAME
5717if test -n "$UNAME"; then
5718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5719$as_echo "$UNAME" >&6; }
5720else
5721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5722$as_echo "no" >&6; }
5723fi
5724
5725
5726  test -n "$UNAME" && break
5727done
5728
5729
5730    if test "x$UNAME" = x; then
5731        if test "xuname" = x; then
5732          PROG_NAME=uname
5733        else
5734          PROG_NAME=uname
5735        fi
5736        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5737$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5738        as_fn_error $? "Cannot continue" "$LINENO" 5
5739    fi
5740
5741
5742
5743    for ac_prog in uniq
5744do
5745  # Extract the first word of "$ac_prog", so it can be a program name with args.
5746set dummy $ac_prog; ac_word=$2
5747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5748$as_echo_n "checking for $ac_word... " >&6; }
5749if ${ac_cv_path_UNIQ+:} false; then :
5750  $as_echo_n "(cached) " >&6
5751else
5752  case $UNIQ in
5753  [\\/]* | ?:[\\/]*)
5754  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5755  ;;
5756  *)
5757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5758for as_dir in $PATH
5759do
5760  IFS=$as_save_IFS
5761  test -z "$as_dir" && as_dir=.
5762    for ac_exec_ext in '' $ac_executable_extensions; do
5763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5764    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5766    break 2
5767  fi
5768done
5769  done
5770IFS=$as_save_IFS
5771
5772  ;;
5773esac
5774fi
5775UNIQ=$ac_cv_path_UNIQ
5776if test -n "$UNIQ"; then
5777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5778$as_echo "$UNIQ" >&6; }
5779else
5780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
5782fi
5783
5784
5785  test -n "$UNIQ" && break
5786done
5787
5788
5789    if test "x$UNIQ" = x; then
5790        if test "xuniq" = x; then
5791          PROG_NAME=uniq
5792        else
5793          PROG_NAME=uniq
5794        fi
5795        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5796$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5797        as_fn_error $? "Cannot continue" "$LINENO" 5
5798    fi
5799
5800
5801
5802    for ac_prog in wc
5803do
5804  # Extract the first word of "$ac_prog", so it can be a program name with args.
5805set dummy $ac_prog; ac_word=$2
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
5808if ${ac_cv_path_WC+:} false; then :
5809  $as_echo_n "(cached) " >&6
5810else
5811  case $WC in
5812  [\\/]* | ?:[\\/]*)
5813  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5814  ;;
5815  *)
5816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5817for as_dir in $PATH
5818do
5819  IFS=$as_save_IFS
5820  test -z "$as_dir" && as_dir=.
5821    for ac_exec_ext in '' $ac_executable_extensions; do
5822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5823    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5825    break 2
5826  fi
5827done
5828  done
5829IFS=$as_save_IFS
5830
5831  ;;
5832esac
5833fi
5834WC=$ac_cv_path_WC
5835if test -n "$WC"; then
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5837$as_echo "$WC" >&6; }
5838else
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5840$as_echo "no" >&6; }
5841fi
5842
5843
5844  test -n "$WC" && break
5845done
5846
5847
5848    if test "x$WC" = x; then
5849        if test "xwc" = x; then
5850          PROG_NAME=wc
5851        else
5852          PROG_NAME=wc
5853        fi
5854        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5855$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5856        as_fn_error $? "Cannot continue" "$LINENO" 5
5857    fi
5858
5859
5860
5861    for ac_prog in which
5862do
5863  # Extract the first word of "$ac_prog", so it can be a program name with args.
5864set dummy $ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_path_WHICH+:} false; then :
5868  $as_echo_n "(cached) " >&6
5869else
5870  case $WHICH in
5871  [\\/]* | ?:[\\/]*)
5872  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5873  ;;
5874  *)
5875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5876for as_dir in $PATH
5877do
5878  IFS=$as_save_IFS
5879  test -z "$as_dir" && as_dir=.
5880    for ac_exec_ext in '' $ac_executable_extensions; do
5881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5882    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5884    break 2
5885  fi
5886done
5887  done
5888IFS=$as_save_IFS
5889
5890  ;;
5891esac
5892fi
5893WHICH=$ac_cv_path_WHICH
5894if test -n "$WHICH"; then
5895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5896$as_echo "$WHICH" >&6; }
5897else
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5899$as_echo "no" >&6; }
5900fi
5901
5902
5903  test -n "$WHICH" && break
5904done
5905
5906
5907    if test "x$WHICH" = x; then
5908        if test "xwhich" = x; then
5909          PROG_NAME=which
5910        else
5911          PROG_NAME=which
5912        fi
5913        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5914$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5915        as_fn_error $? "Cannot continue" "$LINENO" 5
5916    fi
5917
5918
5919
5920    for ac_prog in xargs
5921do
5922  # Extract the first word of "$ac_prog", so it can be a program name with args.
5923set dummy $ac_prog; ac_word=$2
5924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5925$as_echo_n "checking for $ac_word... " >&6; }
5926if ${ac_cv_path_XARGS+:} false; then :
5927  $as_echo_n "(cached) " >&6
5928else
5929  case $XARGS in
5930  [\\/]* | ?:[\\/]*)
5931  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5932  ;;
5933  *)
5934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5935for as_dir in $PATH
5936do
5937  IFS=$as_save_IFS
5938  test -z "$as_dir" && as_dir=.
5939    for ac_exec_ext in '' $ac_executable_extensions; do
5940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5941    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5943    break 2
5944  fi
5945done
5946  done
5947IFS=$as_save_IFS
5948
5949  ;;
5950esac
5951fi
5952XARGS=$ac_cv_path_XARGS
5953if test -n "$XARGS"; then
5954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5955$as_echo "$XARGS" >&6; }
5956else
5957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5958$as_echo "no" >&6; }
5959fi
5960
5961
5962  test -n "$XARGS" && break
5963done
5964
5965
5966    if test "x$XARGS" = x; then
5967        if test "xxargs" = x; then
5968          PROG_NAME=xargs
5969        else
5970          PROG_NAME=xargs
5971        fi
5972        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5973$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5974        as_fn_error $? "Cannot continue" "$LINENO" 5
5975    fi
5976
5977
5978
5979# Then required tools that require some special treatment.
5980for ac_prog in gawk mawk nawk awk
5981do
5982  # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_prog_AWK+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  if test -n "$AWK"; then
5990  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5991else
5992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_exec_ext in '' $ac_executable_extensions; do
5998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999    ac_cv_prog_AWK="$ac_prog"
6000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001    break 2
6002  fi
6003done
6004  done
6005IFS=$as_save_IFS
6006
6007fi
6008fi
6009AWK=$ac_cv_prog_AWK
6010if test -n "$AWK"; then
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6012$as_echo "$AWK" >&6; }
6013else
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
6016fi
6017
6018
6019  test -n "$AWK" && break
6020done
6021
6022
6023    if test "x$AWK" = x; then
6024        if test "x" = x; then
6025          PROG_NAME=awk
6026        else
6027          PROG_NAME=
6028        fi
6029        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6030$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6031        as_fn_error $? "Cannot continue" "$LINENO" 5
6032    fi
6033
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6035$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6036if ${ac_cv_path_GREP+:} false; then :
6037  $as_echo_n "(cached) " >&6
6038else
6039  if test -z "$GREP"; then
6040  ac_path_GREP_found=false
6041  # Loop through the user's path and test for each of PROGNAME-LIST
6042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6044do
6045  IFS=$as_save_IFS
6046  test -z "$as_dir" && as_dir=.
6047    for ac_prog in grep ggrep; do
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6050      as_fn_executable_p "$ac_path_GREP" || continue
6051# Check for GNU ac_path_GREP and select it if it is found.
6052  # Check for GNU $ac_path_GREP
6053case `"$ac_path_GREP" --version 2>&1` in
6054*GNU*)
6055  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6056*)
6057  ac_count=0
6058  $as_echo_n 0123456789 >"conftest.in"
6059  while :
6060  do
6061    cat "conftest.in" "conftest.in" >"conftest.tmp"
6062    mv "conftest.tmp" "conftest.in"
6063    cp "conftest.in" "conftest.nl"
6064    $as_echo 'GREP' >> "conftest.nl"
6065    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6066    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6067    as_fn_arith $ac_count + 1 && ac_count=$as_val
6068    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6069      # Best one so far, save it but keep looking for a better one
6070      ac_cv_path_GREP="$ac_path_GREP"
6071      ac_path_GREP_max=$ac_count
6072    fi
6073    # 10*(2^10) chars as input seems more than enough
6074    test $ac_count -gt 10 && break
6075  done
6076  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6077esac
6078
6079      $ac_path_GREP_found && break 3
6080    done
6081  done
6082  done
6083IFS=$as_save_IFS
6084  if test -z "$ac_cv_path_GREP"; then
6085    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6086  fi
6087else
6088  ac_cv_path_GREP=$GREP
6089fi
6090
6091fi
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6093$as_echo "$ac_cv_path_GREP" >&6; }
6094 GREP="$ac_cv_path_GREP"
6095
6096
6097
6098    if test "x$GREP" = x; then
6099        if test "x" = x; then
6100          PROG_NAME=grep
6101        else
6102          PROG_NAME=
6103        fi
6104        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6105$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6106        as_fn_error $? "Cannot continue" "$LINENO" 5
6107    fi
6108
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6110$as_echo_n "checking for egrep... " >&6; }
6111if ${ac_cv_path_EGREP+:} false; then :
6112  $as_echo_n "(cached) " >&6
6113else
6114  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6115   then ac_cv_path_EGREP="$GREP -E"
6116   else
6117     if test -z "$EGREP"; then
6118  ac_path_EGREP_found=false
6119  # Loop through the user's path and test for each of PROGNAME-LIST
6120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6122do
6123  IFS=$as_save_IFS
6124  test -z "$as_dir" && as_dir=.
6125    for ac_prog in egrep; do
6126    for ac_exec_ext in '' $ac_executable_extensions; do
6127      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6128      as_fn_executable_p "$ac_path_EGREP" || continue
6129# Check for GNU ac_path_EGREP and select it if it is found.
6130  # Check for GNU $ac_path_EGREP
6131case `"$ac_path_EGREP" --version 2>&1` in
6132*GNU*)
6133  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6134*)
6135  ac_count=0
6136  $as_echo_n 0123456789 >"conftest.in"
6137  while :
6138  do
6139    cat "conftest.in" "conftest.in" >"conftest.tmp"
6140    mv "conftest.tmp" "conftest.in"
6141    cp "conftest.in" "conftest.nl"
6142    $as_echo 'EGREP' >> "conftest.nl"
6143    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6144    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6145    as_fn_arith $ac_count + 1 && ac_count=$as_val
6146    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6147      # Best one so far, save it but keep looking for a better one
6148      ac_cv_path_EGREP="$ac_path_EGREP"
6149      ac_path_EGREP_max=$ac_count
6150    fi
6151    # 10*(2^10) chars as input seems more than enough
6152    test $ac_count -gt 10 && break
6153  done
6154  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6155esac
6156
6157      $ac_path_EGREP_found && break 3
6158    done
6159  done
6160  done
6161IFS=$as_save_IFS
6162  if test -z "$ac_cv_path_EGREP"; then
6163    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6164  fi
6165else
6166  ac_cv_path_EGREP=$EGREP
6167fi
6168
6169   fi
6170fi
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6172$as_echo "$ac_cv_path_EGREP" >&6; }
6173 EGREP="$ac_cv_path_EGREP"
6174
6175
6176
6177    if test "x$EGREP" = x; then
6178        if test "x" = x; then
6179          PROG_NAME=egrep
6180        else
6181          PROG_NAME=
6182        fi
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6184$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6185        as_fn_error $? "Cannot continue" "$LINENO" 5
6186    fi
6187
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6189$as_echo_n "checking for fgrep... " >&6; }
6190if ${ac_cv_path_FGREP+:} false; then :
6191  $as_echo_n "(cached) " >&6
6192else
6193  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6194   then ac_cv_path_FGREP="$GREP -F"
6195   else
6196     if test -z "$FGREP"; then
6197  ac_path_FGREP_found=false
6198  # Loop through the user's path and test for each of PROGNAME-LIST
6199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6201do
6202  IFS=$as_save_IFS
6203  test -z "$as_dir" && as_dir=.
6204    for ac_prog in fgrep; do
6205    for ac_exec_ext in '' $ac_executable_extensions; do
6206      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6207      as_fn_executable_p "$ac_path_FGREP" || continue
6208# Check for GNU ac_path_FGREP and select it if it is found.
6209  # Check for GNU $ac_path_FGREP
6210case `"$ac_path_FGREP" --version 2>&1` in
6211*GNU*)
6212  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6213*)
6214  ac_count=0
6215  $as_echo_n 0123456789 >"conftest.in"
6216  while :
6217  do
6218    cat "conftest.in" "conftest.in" >"conftest.tmp"
6219    mv "conftest.tmp" "conftest.in"
6220    cp "conftest.in" "conftest.nl"
6221    $as_echo 'FGREP' >> "conftest.nl"
6222    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6224    as_fn_arith $ac_count + 1 && ac_count=$as_val
6225    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6226      # Best one so far, save it but keep looking for a better one
6227      ac_cv_path_FGREP="$ac_path_FGREP"
6228      ac_path_FGREP_max=$ac_count
6229    fi
6230    # 10*(2^10) chars as input seems more than enough
6231    test $ac_count -gt 10 && break
6232  done
6233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6234esac
6235
6236      $ac_path_FGREP_found && break 3
6237    done
6238  done
6239  done
6240IFS=$as_save_IFS
6241  if test -z "$ac_cv_path_FGREP"; then
6242    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6243  fi
6244else
6245  ac_cv_path_FGREP=$FGREP
6246fi
6247
6248   fi
6249fi
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6251$as_echo "$ac_cv_path_FGREP" >&6; }
6252 FGREP="$ac_cv_path_FGREP"
6253
6254
6255
6256    if test "x$FGREP" = x; then
6257        if test "x" = x; then
6258          PROG_NAME=fgrep
6259        else
6260          PROG_NAME=
6261        fi
6262        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6263$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6264        as_fn_error $? "Cannot continue" "$LINENO" 5
6265    fi
6266
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6268$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6269if ${ac_cv_path_SED+:} false; then :
6270  $as_echo_n "(cached) " >&6
6271else
6272            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6273     for ac_i in 1 2 3 4 5 6 7; do
6274       ac_script="$ac_script$as_nl$ac_script"
6275     done
6276     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6277     { ac_script=; unset ac_script;}
6278     if test -z "$SED"; then
6279  ac_path_SED_found=false
6280  # Loop through the user's path and test for each of PROGNAME-LIST
6281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282for as_dir in $PATH
6283do
6284  IFS=$as_save_IFS
6285  test -z "$as_dir" && as_dir=.
6286    for ac_prog in sed gsed; do
6287    for ac_exec_ext in '' $ac_executable_extensions; do
6288      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6289      as_fn_executable_p "$ac_path_SED" || continue
6290# Check for GNU ac_path_SED and select it if it is found.
6291  # Check for GNU $ac_path_SED
6292case `"$ac_path_SED" --version 2>&1` in
6293*GNU*)
6294  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6295*)
6296  ac_count=0
6297  $as_echo_n 0123456789 >"conftest.in"
6298  while :
6299  do
6300    cat "conftest.in" "conftest.in" >"conftest.tmp"
6301    mv "conftest.tmp" "conftest.in"
6302    cp "conftest.in" "conftest.nl"
6303    $as_echo '' >> "conftest.nl"
6304    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6305    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6306    as_fn_arith $ac_count + 1 && ac_count=$as_val
6307    if test $ac_count -gt ${ac_path_SED_max-0}; then
6308      # Best one so far, save it but keep looking for a better one
6309      ac_cv_path_SED="$ac_path_SED"
6310      ac_path_SED_max=$ac_count
6311    fi
6312    # 10*(2^10) chars as input seems more than enough
6313    test $ac_count -gt 10 && break
6314  done
6315  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6316esac
6317
6318      $ac_path_SED_found && break 3
6319    done
6320  done
6321  done
6322IFS=$as_save_IFS
6323  if test -z "$ac_cv_path_SED"; then
6324    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6325  fi
6326else
6327  ac_cv_path_SED=$SED
6328fi
6329
6330fi
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6332$as_echo "$ac_cv_path_SED" >&6; }
6333 SED="$ac_cv_path_SED"
6334  rm -f conftest.sed
6335
6336
6337    if test "x$SED" = x; then
6338        if test "x" = x; then
6339          PROG_NAME=sed
6340        else
6341          PROG_NAME=
6342        fi
6343        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6344$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6345        as_fn_error $? "Cannot continue" "$LINENO" 5
6346    fi
6347
6348
6349for ac_prog in nawk gawk awk
6350do
6351  # Extract the first word of "$ac_prog", so it can be a program name with args.
6352set dummy $ac_prog; ac_word=$2
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354$as_echo_n "checking for $ac_word... " >&6; }
6355if ${ac_cv_path_NAWK+:} false; then :
6356  $as_echo_n "(cached) " >&6
6357else
6358  case $NAWK in
6359  [\\/]* | ?:[\\/]*)
6360  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6361  ;;
6362  *)
6363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364for as_dir in $PATH
6365do
6366  IFS=$as_save_IFS
6367  test -z "$as_dir" && as_dir=.
6368    for ac_exec_ext in '' $ac_executable_extensions; do
6369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372    break 2
6373  fi
6374done
6375  done
6376IFS=$as_save_IFS
6377
6378  ;;
6379esac
6380fi
6381NAWK=$ac_cv_path_NAWK
6382if test -n "$NAWK"; then
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6384$as_echo "$NAWK" >&6; }
6385else
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
6390
6391  test -n "$NAWK" && break
6392done
6393
6394
6395    if test "x$NAWK" = x; then
6396        if test "x" = x; then
6397          PROG_NAME=nawk
6398        else
6399          PROG_NAME=
6400        fi
6401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6403        as_fn_error $? "Cannot continue" "$LINENO" 5
6404    fi
6405
6406
6407# Always force rm.
6408RM="$RM -f"
6409
6410# pwd behaves differently on various platforms and some don't support the -L flag.
6411# Always use the bash builtin pwd to get uniform behavior.
6412THEPWDCMD=pwd
6413
6414# These are not required on all platforms
6415# Extract the first word of "cygpath", so it can be a program name with args.
6416set dummy cygpath; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if ${ac_cv_path_CYGPATH+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $CYGPATH in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6434    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445CYGPATH=$ac_cv_path_CYGPATH
6446if test -n "$CYGPATH"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6448$as_echo "$CYGPATH" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455# Extract the first word of "readlink", so it can be a program name with args.
6456set dummy readlink; ac_word=$2
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6458$as_echo_n "checking for $ac_word... " >&6; }
6459if ${ac_cv_path_READLINK+:} false; then :
6460  $as_echo_n "(cached) " >&6
6461else
6462  case $READLINK in
6463  [\\/]* | ?:[\\/]*)
6464  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6465  ;;
6466  *)
6467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6468for as_dir in $PATH
6469do
6470  IFS=$as_save_IFS
6471  test -z "$as_dir" && as_dir=.
6472    for ac_exec_ext in '' $ac_executable_extensions; do
6473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6474    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6476    break 2
6477  fi
6478done
6479  done
6480IFS=$as_save_IFS
6481
6482  ;;
6483esac
6484fi
6485READLINK=$ac_cv_path_READLINK
6486if test -n "$READLINK"; then
6487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6488$as_echo "$READLINK" >&6; }
6489else
6490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6491$as_echo "no" >&6; }
6492fi
6493
6494
6495# Extract the first word of "df", so it can be a program name with args.
6496set dummy df; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if ${ac_cv_path_DF+:} false; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $DF in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525DF=$ac_cv_path_DF
6526if test -n "$DF"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6528$as_echo "$DF" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535# Extract the first word of "SetFile", so it can be a program name with args.
6536set dummy SetFile; ac_word=$2
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6538$as_echo_n "checking for $ac_word... " >&6; }
6539if ${ac_cv_path_SETFILE+:} false; then :
6540  $as_echo_n "(cached) " >&6
6541else
6542  case $SETFILE in
6543  [\\/]* | ?:[\\/]*)
6544  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6545  ;;
6546  *)
6547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6548for as_dir in $PATH
6549do
6550  IFS=$as_save_IFS
6551  test -z "$as_dir" && as_dir=.
6552    for ac_exec_ext in '' $ac_executable_extensions; do
6553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6554    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6556    break 2
6557  fi
6558done
6559  done
6560IFS=$as_save_IFS
6561
6562  ;;
6563esac
6564fi
6565SETFILE=$ac_cv_path_SETFILE
6566if test -n "$SETFILE"; then
6567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6568$as_echo "$SETFILE" >&6; }
6569else
6570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }
6572fi
6573
6574
6575
6576
6577# Now we can determine OpenJDK build and target platforms. This is required to
6578# have early on.
6579# Make sure we can run config.sub.
6580$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6581  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6584$as_echo_n "checking build system type... " >&6; }
6585if ${ac_cv_build+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  ac_build_alias=$build_alias
6589test "x$ac_build_alias" = x &&
6590  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6591test "x$ac_build_alias" = x &&
6592  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6593ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6594  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6595
6596fi
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6598$as_echo "$ac_cv_build" >&6; }
6599case $ac_cv_build in
6600*-*-*) ;;
6601*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6602esac
6603build=$ac_cv_build
6604ac_save_IFS=$IFS; IFS='-'
6605set x $ac_cv_build
6606shift
6607build_cpu=$1
6608build_vendor=$2
6609shift; shift
6610# Remember, the first character of IFS is used to create $*,
6611# except with old shells:
6612build_os=$*
6613IFS=$ac_save_IFS
6614case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6615
6616
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6618$as_echo_n "checking host system type... " >&6; }
6619if ${ac_cv_host+:} false; then :
6620  $as_echo_n "(cached) " >&6
6621else
6622  if test "x$host_alias" = x; then
6623  ac_cv_host=$ac_cv_build
6624else
6625  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6626    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6627fi
6628
6629fi
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6631$as_echo "$ac_cv_host" >&6; }
6632case $ac_cv_host in
6633*-*-*) ;;
6634*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6635esac
6636host=$ac_cv_host
6637ac_save_IFS=$IFS; IFS='-'
6638set x $ac_cv_host
6639shift
6640host_cpu=$1
6641host_vendor=$2
6642shift; shift
6643# Remember, the first character of IFS is used to create $*,
6644# except with old shells:
6645host_os=$*
6646IFS=$ac_save_IFS
6647case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6648
6649
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6651$as_echo_n "checking target system type... " >&6; }
6652if ${ac_cv_target+:} false; then :
6653  $as_echo_n "(cached) " >&6
6654else
6655  if test "x$target_alias" = x; then
6656  ac_cv_target=$ac_cv_host
6657else
6658  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6659    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6660fi
6661
6662fi
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6664$as_echo "$ac_cv_target" >&6; }
6665case $ac_cv_target in
6666*-*-*) ;;
6667*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6668esac
6669target=$ac_cv_target
6670ac_save_IFS=$IFS; IFS='-'
6671set x $ac_cv_target
6672shift
6673target_cpu=$1
6674target_vendor=$2
6675shift; shift
6676# Remember, the first character of IFS is used to create $*,
6677# except with old shells:
6678target_os=$*
6679IFS=$ac_save_IFS
6680case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6681
6682
6683# The aliases save the names the user supplied, while $host etc.
6684# will get canonicalized.
6685test -n "$target_alias" &&
6686  test "$program_prefix$program_suffix$program_transform_name" = \
6687    NONENONEs,x,x, &&
6688  program_prefix=${target_alias}-
6689
6690# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6691# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6692# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6693# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6694# to use the configure naming style.
6695
6696
6697
6698
6699
6700    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6701    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6702    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6703    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6704    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6705    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6706
6707
6708
6709    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6710
6711  case "$build_os" in
6712    *linux*)
6713      VAR_OS=linux
6714      VAR_OS_API=posix
6715      VAR_OS_ENV=linux
6716      ;;
6717    *solaris*)
6718      VAR_OS=solaris
6719      VAR_OS_API=posix
6720      VAR_OS_ENV=solaris
6721      ;;
6722    *darwin*)
6723      VAR_OS=macosx
6724      VAR_OS_API=posix
6725      VAR_OS_ENV=macosx
6726      ;;
6727    *bsd*)
6728      VAR_OS=bsd
6729      VAR_OS_API=posix
6730      VAR_OS_ENV=bsd
6731      ;;
6732    *cygwin*)
6733      VAR_OS=windows
6734      VAR_OS_API=winapi
6735      VAR_OS_ENV=windows.cygwin
6736      ;;
6737    *mingw*)
6738      VAR_OS=windows
6739      VAR_OS_API=winapi
6740      VAR_OS_ENV=windows.msys
6741      ;;
6742    *)
6743      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6744      ;;
6745  esac
6746
6747
6748  # First argument is the cpu name from the trip/quad
6749  case "$build_cpu" in
6750    x86_64)
6751      VAR_CPU=x86_64
6752      VAR_CPU_ARCH=x86
6753      VAR_CPU_BITS=64
6754      VAR_CPU_ENDIAN=little
6755      ;;
6756    i?86)
6757      VAR_CPU=x86
6758      VAR_CPU_ARCH=x86
6759      VAR_CPU_BITS=32
6760      VAR_CPU_ENDIAN=little
6761      ;;
6762    arm*)
6763      VAR_CPU=arm
6764      VAR_CPU_ARCH=arm
6765      VAR_CPU_BITS=32
6766      VAR_CPU_ENDIAN=little
6767      ;;
6768    powerpc)
6769      VAR_CPU=ppc
6770      VAR_CPU_ARCH=ppc
6771      VAR_CPU_BITS=32
6772      VAR_CPU_ENDIAN=big
6773       ;;
6774    powerpc64)
6775      VAR_CPU=ppc64
6776      VAR_CPU_ARCH=ppc
6777      VAR_CPU_BITS=64
6778      VAR_CPU_ENDIAN=big
6779       ;;
6780    s390)
6781      VAR_CPU=s390
6782      VAR_CPU_ARCH=s390
6783      VAR_CPU_BITS=32
6784      VAR_CPU_ENDIAN=big
6785       ;;
6786    s390x)
6787      VAR_CPU=s390x
6788      VAR_CPU_ARCH=s390
6789      VAR_CPU_BITS=64
6790      VAR_CPU_ENDIAN=big
6791       ;;
6792    sparc)
6793      VAR_CPU=sparc
6794      VAR_CPU_ARCH=sparc
6795      VAR_CPU_BITS=32
6796      VAR_CPU_ENDIAN=big
6797       ;;
6798    sparcv9)
6799      VAR_CPU=sparcv9
6800      VAR_CPU_ARCH=sparc
6801      VAR_CPU_BITS=64
6802      VAR_CPU_ENDIAN=big
6803       ;;
6804    *)
6805      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6806      ;;
6807  esac
6808
6809    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6810    OPENJDK_BUILD_OS="$VAR_OS"
6811    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6812    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6813    OPENJDK_BUILD_CPU="$VAR_CPU"
6814    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6815    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6816    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6817
6818
6819
6820
6821
6822
6823
6824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6825$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6827$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6828
6829    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6830
6831  case "$host_os" in
6832    *linux*)
6833      VAR_OS=linux
6834      VAR_OS_API=posix
6835      VAR_OS_ENV=linux
6836      ;;
6837    *solaris*)
6838      VAR_OS=solaris
6839      VAR_OS_API=posix
6840      VAR_OS_ENV=solaris
6841      ;;
6842    *darwin*)
6843      VAR_OS=macosx
6844      VAR_OS_API=posix
6845      VAR_OS_ENV=macosx
6846      ;;
6847    *bsd*)
6848      VAR_OS=bsd
6849      VAR_OS_API=posix
6850      VAR_OS_ENV=bsd
6851      ;;
6852    *cygwin*)
6853      VAR_OS=windows
6854      VAR_OS_API=winapi
6855      VAR_OS_ENV=windows.cygwin
6856      ;;
6857    *mingw*)
6858      VAR_OS=windows
6859      VAR_OS_API=winapi
6860      VAR_OS_ENV=windows.msys
6861      ;;
6862    *)
6863      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6864      ;;
6865  esac
6866
6867
6868  # First argument is the cpu name from the trip/quad
6869  case "$host_cpu" in
6870    x86_64)
6871      VAR_CPU=x86_64
6872      VAR_CPU_ARCH=x86
6873      VAR_CPU_BITS=64
6874      VAR_CPU_ENDIAN=little
6875      ;;
6876    i?86)
6877      VAR_CPU=x86
6878      VAR_CPU_ARCH=x86
6879      VAR_CPU_BITS=32
6880      VAR_CPU_ENDIAN=little
6881      ;;
6882    arm*)
6883      VAR_CPU=arm
6884      VAR_CPU_ARCH=arm
6885      VAR_CPU_BITS=32
6886      VAR_CPU_ENDIAN=little
6887      ;;
6888    powerpc)
6889      VAR_CPU=ppc
6890      VAR_CPU_ARCH=ppc
6891      VAR_CPU_BITS=32
6892      VAR_CPU_ENDIAN=big
6893       ;;
6894    powerpc64)
6895      VAR_CPU=ppc64
6896      VAR_CPU_ARCH=ppc
6897      VAR_CPU_BITS=64
6898      VAR_CPU_ENDIAN=big
6899       ;;
6900    s390)
6901      VAR_CPU=s390
6902      VAR_CPU_ARCH=s390
6903      VAR_CPU_BITS=32
6904      VAR_CPU_ENDIAN=big
6905       ;;
6906    s390x)
6907      VAR_CPU=s390x
6908      VAR_CPU_ARCH=s390
6909      VAR_CPU_BITS=64
6910      VAR_CPU_ENDIAN=big
6911       ;;
6912    sparc)
6913      VAR_CPU=sparc
6914      VAR_CPU_ARCH=sparc
6915      VAR_CPU_BITS=32
6916      VAR_CPU_ENDIAN=big
6917       ;;
6918    sparcv9)
6919      VAR_CPU=sparcv9
6920      VAR_CPU_ARCH=sparc
6921      VAR_CPU_BITS=64
6922      VAR_CPU_ENDIAN=big
6923       ;;
6924    *)
6925      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6926      ;;
6927  esac
6928
6929    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6930    OPENJDK_TARGET_OS="$VAR_OS"
6931    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6932    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6933    OPENJDK_TARGET_CPU="$VAR_CPU"
6934    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6935    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6936    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6937
6938
6939
6940
6941
6942
6943
6944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6945$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6947$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6948
6949
6950
6951# Check whether --with-target-bits was given.
6952if test "${with_target_bits+set}" = set; then :
6953  withval=$with_target_bits;
6954fi
6955
6956
6957  # We have three types of compiles:
6958  # native  == normal compilation, target system == build system
6959  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6960  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6961  #
6962  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6963    # We're doing a proper cross-compilation
6964    COMPILE_TYPE="cross"
6965  else
6966    COMPILE_TYPE="native"
6967  fi
6968
6969  if test "x$with_target_bits" != x; then
6970    if test "x$COMPILE_TYPE" = "xcross"; then
6971      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6972    fi
6973
6974    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6975      # A reduced build is requested
6976      COMPILE_TYPE="reduced"
6977      OPENJDK_TARGET_CPU_BITS=32
6978      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6979        OPENJDK_TARGET_CPU=x86
6980      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6981        OPENJDK_TARGET_CPU=sparc
6982      else
6983        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6984      fi
6985    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6986      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
6987    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6988      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6989$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6990    else
6991      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6992    fi
6993  fi
6994
6995
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6997$as_echo_n "checking compilation type... " >&6; }
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6999$as_echo "$COMPILE_TYPE" >&6; }
7000
7001
7002    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7003       REQUIRED_OS_NAME=SunOS
7004       REQUIRED_OS_VERSION=5.10
7005    fi
7006    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7007       REQUIRED_OS_NAME=Linux
7008       REQUIRED_OS_VERSION=2.6
7009    fi
7010    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7011        REQUIRED_OS_NAME=Windows
7012        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7013            REQUIRED_OS_VERSION=5.2
7014        else
7015            REQUIRED_OS_VERSION=5.1
7016        fi
7017    fi
7018    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7019        REQUIRED_OS_NAME=Darwin
7020        REQUIRED_OS_VERSION=11.2
7021    fi
7022
7023
7024
7025
7026
7027    # Also store the legacy naming of the cpu.
7028    # Ie i586 and amd64 instead of x86 and x86_64
7029    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7030    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7031      OPENJDK_TARGET_CPU_LEGACY="i586"
7032    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7033      # On all platforms except MacOSX replace x86_64 with amd64.
7034      OPENJDK_TARGET_CPU_LEGACY="amd64"
7035    fi
7036
7037
7038    # And the second legacy naming of the cpu.
7039    # Ie i386 and amd64 instead of x86 and x86_64.
7040    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7041    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7042      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7043    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7044      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7045    fi
7046
7047
7048    # This is the name of the cpu (but using i386 and amd64 instead of
7049    # x86 and x86_64, respectively), preceeded by a /, to be used when
7050    # locating libraries. On macosx, it's empty, though.
7051    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7052    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7053        OPENJDK_TARGET_CPU_LIBDIR=""
7054    fi
7055
7056
7057    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7058    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7059    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7060    OPENJDK_TARGET_CPU_ISADIR=""
7061    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7062      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7063          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7064      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7065          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7066      fi
7067    fi
7068
7069
7070    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7071    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7072    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7073      # On linux only, we replace x86 with i386.
7074      OPENJDK_TARGET_CPU_OSARCH="i386"
7075    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7076      # On all platforms except macosx, we replace x86_64 with amd64.
7077      OPENJDK_TARGET_CPU_OSARCH="amd64"
7078    fi
7079
7080
7081    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7082    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7083      OPENJDK_TARGET_CPU_JLI="i386"
7084    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7085      # On all platforms except macosx, we replace x86_64 with amd64.
7086      OPENJDK_TARGET_CPU_JLI="amd64"
7087    fi
7088    # Now setup the -D flags for building libjli.
7089    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7090    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7091      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7092        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7093      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7094        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7095      fi
7096    fi
7097
7098
7099    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7100    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7101        OPENJDK_TARGET_OS_API_DIR="solaris"
7102    fi
7103    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7104        OPENJDK_TARGET_OS_API_DIR="windows"
7105    fi
7106
7107
7108    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7109        A_LP64="LP64:="
7110        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7111        # unpack200.exe
7112        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7113            ADD_LP64="-D_LP64=1"
7114        fi
7115    fi
7116    LP64=$A_LP64
7117
7118
7119    if test "x$COMPILE_TYPE" = "xcross"; then
7120      # FIXME: ... or should this include reduced builds..?
7121      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7122    else
7123      DEFINE_CROSS_COMPILE_ARCH=""
7124    fi
7125
7126
7127    # ZERO_ARCHDEF is used to enable architecture-specific code
7128    case "${OPENJDK_TARGET_CPU}" in
7129      ppc*)    ZERO_ARCHDEF=PPC   ;;
7130      s390*)   ZERO_ARCHDEF=S390  ;;
7131      sparc*)  ZERO_ARCHDEF=SPARC ;;
7132      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7133      x86)     ZERO_ARCHDEF=IA32  ;;
7134      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7135    esac
7136
7137
7138
7139
7140
7141# Continue setting up basic stuff. Most remaining code require fundamental tools.
7142
7143# Locate the directory of this script.
7144SCRIPT="$0"
7145AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7146
7147# Where is the source? It is located two levels above the configure script.
7148CURDIR="$PWD"
7149cd "$AUTOCONF_DIR/../.."
7150SRC_ROOT="`$THEPWDCMD -L`"
7151
7152if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7153  PATH_SEP=";"
7154
7155  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7156  if test $SRC_ROOT_LENGTH -gt 100; then
7157      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7158  fi
7159
7160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7162$as_echo_n "checking cygwin release... " >&6; }
7163    CYGWIN_VERSION=`$UNAME -r`
7164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7165$as_echo "$CYGWIN_VERSION" >&6; }
7166    WINDOWS_ENV_VENDOR='cygwin'
7167    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7168
7169    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7170    if test "x$CYGWIN_VERSION_OK" = x; then
7171      { $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
7172$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;}
7173      as_fn_error $? "Cannot continue" "$LINENO" 5
7174    fi
7175    if test "x$CYGPATH" = x; then
7176        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7177    fi
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7179$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7180    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7181    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7182    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7183    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7185$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7186    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7187    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7188    if test "x$test_cygdrive_prefix" = x; then
7189        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7190    fi
7191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7193$as_echo_n "checking msys release... " >&6; }
7194    MSYS_VERSION=`$UNAME -r`
7195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7196$as_echo "$MSYS_VERSION" >&6; }
7197
7198    WINDOWS_ENV_VENDOR='msys'
7199    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7200
7201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7202$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7203    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7204    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7205
7206  windows_path="$MSYS_ROOT_PATH"
7207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7208    unix_path=`$CYGPATH -u "$windows_path"`
7209    MSYS_ROOT_PATH="$unix_path"
7210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7212    MSYS_ROOT_PATH="$unix_path"
7213  fi
7214
7215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7216$as_echo "$MSYS_ROOT_PATH" >&6; }
7217    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7218  else
7219    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7220  fi
7221
7222  # Test if windows or unix (cygwin/msys) find is first in path.
7223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7224$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7225  FIND_BINARY_OUTPUT=`find --version 2>&1`
7226  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7228$as_echo "unix style" >&6; }
7229  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7231$as_echo "Windows" >&6; }
7232    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7233$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7234    { $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
7235$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7236    as_fn_error $? "Cannot continue" "$LINENO" 5
7237  else
7238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7239$as_echo "unknown" >&6; }
7240    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7241$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7242  fi
7243
7244else
7245  PATH_SEP=":"
7246fi
7247
7248
7249
7250cd "$CURDIR"
7251
7252
7253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7254
7255  # Input might be given as Windows format, start by converting to
7256  # unix format.
7257  path="$SRC_ROOT"
7258  new_path=`$CYGPATH -u "$path"`
7259
7260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7263  # "foo.exe" is OK but "foo" is an error.
7264  #
7265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7266  # It is also a way to make sure we got the proper file name for the real test later on.
7267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7268  if test "x$test_shortpath" = x; then
7269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7270$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7271    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7272  fi
7273
7274  # Call helper function which possibly converts this using DOS-style short mode.
7275  # If so, the updated path is stored in $new_path.
7276
7277  input_path="$new_path"
7278  # Check if we need to convert this using DOS-style short mode. If the path
7279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7280  # take no chances and rewrite it.
7281  # Note: m4 eats our [], so we need to use [ and ] instead.
7282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7283  if test "x$has_forbidden_chars" != x; then
7284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7288      # Going to short mode and back again did indeed matter. Since short mode is
7289      # case insensitive, let's make it lowercase to improve readability.
7290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7291      # Now convert it back to Unix-stile (cygpath)
7292      input_path=`$CYGPATH -u "$shortmode_path"`
7293      new_path="$input_path"
7294    fi
7295  fi
7296
7297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7298  if test "x$test_cygdrive_prefix" = x; then
7299    # As a simple fix, exclude /usr/bin since it's not a real path.
7300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7302      # a path prefixed by /cygdrive for fixpath to work.
7303      new_path="$CYGWIN_ROOT_PATH$input_path"
7304    fi
7305  fi
7306
7307
7308  if test "x$path" != "x$new_path"; then
7309    SRC_ROOT="$new_path"
7310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7311$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7312  fi
7313
7314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7315
7316  path="$SRC_ROOT"
7317  has_colon=`$ECHO $path | $GREP ^.:`
7318  new_path="$path"
7319  if test "x$has_colon" = x; then
7320    # Not in mixed or Windows style, start by that.
7321    new_path=`cmd //c echo $path`
7322  fi
7323
7324
7325  input_path="$new_path"
7326  # Check if we need to convert this using DOS-style short mode. If the path
7327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7328  # take no chances and rewrite it.
7329  # Note: m4 eats our [], so we need to use [ and ] instead.
7330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7331  if test "x$has_forbidden_chars" != x; then
7332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7334  fi
7335
7336
7337  windows_path="$new_path"
7338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7339    unix_path=`$CYGPATH -u "$windows_path"`
7340    new_path="$unix_path"
7341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7343    new_path="$unix_path"
7344  fi
7345
7346  if test "x$path" != "x$new_path"; then
7347    SRC_ROOT="$new_path"
7348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7349$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7350  fi
7351
7352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7354
7355  else
7356    # We're on a posix platform. Hooray! :)
7357    path="$SRC_ROOT"
7358    has_space=`$ECHO "$path" | $GREP " "`
7359    if test "x$has_space" != x; then
7360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7361$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7362      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7363    fi
7364
7365    # Use eval to expand a potential ~
7366    eval path="$path"
7367    if test ! -f "$path" && test ! -d "$path"; then
7368      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7369    fi
7370
7371    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7372  fi
7373
7374
7375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7376
7377  # Input might be given as Windows format, start by converting to
7378  # unix format.
7379  path="$CURDIR"
7380  new_path=`$CYGPATH -u "$path"`
7381
7382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7385  # "foo.exe" is OK but "foo" is an error.
7386  #
7387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7388  # It is also a way to make sure we got the proper file name for the real test later on.
7389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7390  if test "x$test_shortpath" = x; then
7391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7392$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7393    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7394  fi
7395
7396  # Call helper function which possibly converts this using DOS-style short mode.
7397  # If so, the updated path is stored in $new_path.
7398
7399  input_path="$new_path"
7400  # Check if we need to convert this using DOS-style short mode. If the path
7401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7402  # take no chances and rewrite it.
7403  # Note: m4 eats our [], so we need to use [ and ] instead.
7404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7405  if test "x$has_forbidden_chars" != x; then
7406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7410      # Going to short mode and back again did indeed matter. Since short mode is
7411      # case insensitive, let's make it lowercase to improve readability.
7412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7413      # Now convert it back to Unix-stile (cygpath)
7414      input_path=`$CYGPATH -u "$shortmode_path"`
7415      new_path="$input_path"
7416    fi
7417  fi
7418
7419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7420  if test "x$test_cygdrive_prefix" = x; then
7421    # As a simple fix, exclude /usr/bin since it's not a real path.
7422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7424      # a path prefixed by /cygdrive for fixpath to work.
7425      new_path="$CYGWIN_ROOT_PATH$input_path"
7426    fi
7427  fi
7428
7429
7430  if test "x$path" != "x$new_path"; then
7431    CURDIR="$new_path"
7432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7433$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7434  fi
7435
7436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7437
7438  path="$CURDIR"
7439  has_colon=`$ECHO $path | $GREP ^.:`
7440  new_path="$path"
7441  if test "x$has_colon" = x; then
7442    # Not in mixed or Windows style, start by that.
7443    new_path=`cmd //c echo $path`
7444  fi
7445
7446
7447  input_path="$new_path"
7448  # Check if we need to convert this using DOS-style short mode. If the path
7449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7450  # take no chances and rewrite it.
7451  # Note: m4 eats our [], so we need to use [ and ] instead.
7452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7453  if test "x$has_forbidden_chars" != x; then
7454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7456  fi
7457
7458
7459  windows_path="$new_path"
7460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7461    unix_path=`$CYGPATH -u "$windows_path"`
7462    new_path="$unix_path"
7463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7465    new_path="$unix_path"
7466  fi
7467
7468  if test "x$path" != "x$new_path"; then
7469    CURDIR="$new_path"
7470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7471$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7472  fi
7473
7474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7476
7477  else
7478    # We're on a posix platform. Hooray! :)
7479    path="$CURDIR"
7480    has_space=`$ECHO "$path" | $GREP " "`
7481    if test "x$has_space" != x; then
7482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7483$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7484      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7485    fi
7486
7487    # Use eval to expand a potential ~
7488    eval path="$path"
7489    if test ! -f "$path" && test ! -d "$path"; then
7490      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7491    fi
7492
7493    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7494  fi
7495
7496
7497if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7498    # Add extra search paths on solaris for utilities like ar and as etc...
7499    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7500fi
7501
7502# You can force the sys-root if the sys-root encoded into the cross compiler tools
7503# is not correct.
7504
7505# Check whether --with-sys-root was given.
7506if test "${with_sys_root+set}" = set; then :
7507  withval=$with_sys_root;
7508fi
7509
7510
7511if test "x$with_sys_root" != x; then
7512  SYS_ROOT=$with_sys_root
7513else
7514  SYS_ROOT=/
7515fi
7516
7517
7518
7519# Check whether --with-tools-dir was given.
7520if test "${with_tools_dir+set}" = set; then :
7521  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7522
7523fi
7524
7525
7526
7527# Check whether --with-devkit was given.
7528if test "${with_devkit+set}" = set; then :
7529  withval=$with_devkit;
7530    if test "x$with_sys_root" != x; then
7531      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7532    fi
7533
7534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7535
7536  # Input might be given as Windows format, start by converting to
7537  # unix format.
7538  path="$with_devkit"
7539  new_path=`$CYGPATH -u "$path"`
7540
7541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7544  # "foo.exe" is OK but "foo" is an error.
7545  #
7546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7547  # It is also a way to make sure we got the proper file name for the real test later on.
7548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7549  if test "x$test_shortpath" = x; then
7550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7551$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7552    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7553  fi
7554
7555  # Call helper function which possibly converts this using DOS-style short mode.
7556  # If so, the updated path is stored in $new_path.
7557
7558  input_path="$new_path"
7559  # Check if we need to convert this using DOS-style short mode. If the path
7560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7561  # take no chances and rewrite it.
7562  # Note: m4 eats our [], so we need to use [ and ] instead.
7563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7564  if test "x$has_forbidden_chars" != x; then
7565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7569      # Going to short mode and back again did indeed matter. Since short mode is
7570      # case insensitive, let's make it lowercase to improve readability.
7571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7572      # Now convert it back to Unix-stile (cygpath)
7573      input_path=`$CYGPATH -u "$shortmode_path"`
7574      new_path="$input_path"
7575    fi
7576  fi
7577
7578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7579  if test "x$test_cygdrive_prefix" = x; then
7580    # As a simple fix, exclude /usr/bin since it's not a real path.
7581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7583      # a path prefixed by /cygdrive for fixpath to work.
7584      new_path="$CYGWIN_ROOT_PATH$input_path"
7585    fi
7586  fi
7587
7588
7589  if test "x$path" != "x$new_path"; then
7590    with_devkit="$new_path"
7591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7592$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7593  fi
7594
7595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7596
7597  path="$with_devkit"
7598  has_colon=`$ECHO $path | $GREP ^.:`
7599  new_path="$path"
7600  if test "x$has_colon" = x; then
7601    # Not in mixed or Windows style, start by that.
7602    new_path=`cmd //c echo $path`
7603  fi
7604
7605
7606  input_path="$new_path"
7607  # Check if we need to convert this using DOS-style short mode. If the path
7608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7609  # take no chances and rewrite it.
7610  # Note: m4 eats our [], so we need to use [ and ] instead.
7611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7612  if test "x$has_forbidden_chars" != x; then
7613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7615  fi
7616
7617
7618  windows_path="$new_path"
7619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7620    unix_path=`$CYGPATH -u "$windows_path"`
7621    new_path="$unix_path"
7622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7624    new_path="$unix_path"
7625  fi
7626
7627  if test "x$path" != "x$new_path"; then
7628    with_devkit="$new_path"
7629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7630$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7631  fi
7632
7633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7635
7636  else
7637    # We're on a posix platform. Hooray! :)
7638    path="$with_devkit"
7639    has_space=`$ECHO "$path" | $GREP " "`
7640    if test "x$has_space" != x; then
7641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7642$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7643      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7644    fi
7645
7646    # Use eval to expand a potential ~
7647    eval path="$path"
7648    if test ! -f "$path" && test ! -d "$path"; then
7649      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7650    fi
7651
7652    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7653  fi
7654
7655
7656  if test "x$TOOLS_DIR" = x; then
7657    TOOLS_DIR="$with_devkit/bin"
7658  else
7659    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7660  fi
7661
7662    if test -d "$with_devkit/$host_alias/libc"; then
7663      SYS_ROOT=$with_devkit/$host_alias/libc
7664    elif test -d "$with_devkit/$host/sys-root"; then
7665      SYS_ROOT=$with_devkit/$host/sys-root
7666    fi
7667
7668fi
7669
7670
7671
7672# Setup default logging of stdout and stderr to build.log in the output root.
7673BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7674BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7675BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7676
7677
7678
7679
7680
7681# Check if it's a pure open build or if custom sources are to be used.
7682
7683  # Check whether --enable-openjdk-only was given.
7684if test "${enable_openjdk_only+set}" = set; then :
7685  enableval=$enable_openjdk_only;
7686else
7687  enable_openjdk_only="no"
7688fi
7689
7690
7691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7692$as_echo_n "checking for presence of closed sources... " >&6; }
7693  if test -d "$SRC_ROOT/jdk/src/closed"; then
7694    CLOSED_SOURCE_PRESENT=yes
7695  else
7696    CLOSED_SOURCE_PRESENT=no
7697  fi
7698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7699$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7700
7701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7702$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7703  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7705$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7706
7707  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7708    OPENJDK=true
7709    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7710      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7711$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7712    fi
7713  else
7714    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7715      OPENJDK=true
7716    else
7717      OPENJDK=false
7718    fi
7719  fi
7720
7721  if test "x$OPENJDK" = "xtrue"; then
7722    SET_OPENJDK="OPENJDK=true"
7723  fi
7724
7725
7726
7727
7728# These are needed to be able to create a configuration name (and thus the output directory)
7729
7730###############################################################################
7731#
7732# Check which variant of the JDK that we want to build.
7733# Currently we have:
7734#    normal:   standard edition
7735# but the custom make system may add other variants
7736#
7737# Effectively the JDK variant gives a name to a specific set of
7738# modules to compile into the JDK. In the future, these modules
7739# might even be Jigsaw modules.
7740#
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7742$as_echo_n "checking which variant of the JDK to build... " >&6; }
7743
7744# Check whether --with-jdk-variant was given.
7745if test "${with_jdk_variant+set}" = set; then :
7746  withval=$with_jdk_variant;
7747fi
7748
7749
7750if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7751    JDK_VARIANT="normal"
7752else
7753    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7754fi
7755
7756
7757
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7759$as_echo "$JDK_VARIANT" >&6; }
7760
7761
7762
7763###############################################################################
7764#
7765# Check which variants of the JVM that we want to build.
7766# Currently we have:
7767#    server: normal interpreter and a tiered C1/C2 compiler
7768#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7769#    minimal1: reduced form of client with optional VM services and features stripped out
7770#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7771#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7772#    zero: no machine code interpreter, no compiler
7773#    zeroshark: zero interpreter and shark/llvm compiler backend
7774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7775$as_echo_n "checking which variants of the JVM to build... " >&6; }
7776
7777# Check whether --with-jvm-variants was given.
7778if test "${with_jvm_variants+set}" = set; then :
7779  withval=$with_jvm_variants;
7780fi
7781
7782
7783if test "x$with_jvm_variants" = x; then
7784     with_jvm_variants="server"
7785fi
7786
7787JVM_VARIANTS=",$with_jvm_variants,"
7788TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7789
7790if test "x$TEST_VARIANTS" != "x,"; then
7791   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7792fi
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7794$as_echo "$with_jvm_variants" >&6; }
7795
7796JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7797JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7798JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7799JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7800JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7801JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7802
7803if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7804    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7805        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7806    fi
7807fi
7808if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7809    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7810        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7811    fi
7812fi
7813if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7814    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7815        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7816    fi
7817fi
7818
7819# Replace the commas with AND for use in the build directory name.
7820ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7821COUNT_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/'`
7822if test "x$COUNT_VARIANTS" != "x,1"; then
7823    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7824else
7825    BUILDING_MULTIPLE_JVM_VARIANTS=no
7826fi
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836INCLUDE_SA=true
7837if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7838    INCLUDE_SA=false
7839fi
7840if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7841    INCLUDE_SA=false
7842fi
7843
7844
7845if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7846   MACOSX_UNIVERSAL="true"
7847fi
7848
7849
7850
7851
7852
7853###############################################################################
7854#
7855# Set the debug level
7856#    release: no debug information, all optimizations, no asserts.
7857#    fastdebug: debug information (-g), all optimizations, all asserts
7858#    slowdebug: debug information (-g), no optimizations, all asserts
7859#
7860DEBUG_LEVEL="release"
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7862$as_echo_n "checking which debug level to use... " >&6; }
7863# Check whether --enable-debug was given.
7864if test "${enable_debug+set}" = set; then :
7865  enableval=$enable_debug;
7866        ENABLE_DEBUG="${enableval}"
7867        DEBUG_LEVEL="fastdebug"
7868
7869else
7870  ENABLE_DEBUG="no"
7871fi
7872
7873
7874
7875# Check whether --with-debug-level was given.
7876if test "${with_debug_level+set}" = set; then :
7877  withval=$with_debug_level;
7878        DEBUG_LEVEL="${withval}"
7879        if test "x$ENABLE_DEBUG" = xyes; then
7880			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7881        fi
7882
7883fi
7884
7885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7886$as_echo "$DEBUG_LEVEL" >&6; }
7887
7888if test "x$DEBUG_LEVEL" != xrelease && \
7889   test "x$DEBUG_LEVEL" != xfastdebug && \
7890   test "x$DEBUG_LEVEL" != xslowdebug; then
7891   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7892fi
7893
7894
7895###############################################################################
7896#
7897# Setup legacy vars/targets and new vars to deal with different debug levels.
7898#
7899
7900case $DEBUG_LEVEL in
7901      release )
7902          VARIANT="OPT"
7903          FASTDEBUG="false"
7904          DEBUG_CLASSFILES="false"
7905          BUILD_VARIANT_RELEASE=""
7906          HOTSPOT_DEBUG_LEVEL="product"
7907          HOTSPOT_EXPORT="product"
7908           ;;
7909      fastdebug )
7910          VARIANT="DBG"
7911          FASTDEBUG="true"
7912          DEBUG_CLASSFILES="true"
7913          BUILD_VARIANT_RELEASE="-fastdebug"
7914          HOTSPOT_DEBUG_LEVEL="fastdebug"
7915          HOTSPOT_EXPORT="fastdebug"
7916           ;;
7917      slowdebug )
7918          VARIANT="DBG"
7919          FASTDEBUG="false"
7920          DEBUG_CLASSFILES="true"
7921          BUILD_VARIANT_RELEASE="-debug"
7922          HOTSPOT_DEBUG_LEVEL="jvmg"
7923          HOTSPOT_EXPORT="debug"
7924           ;;
7925esac
7926
7927#####
7928# Generate the legacy makefile targets for hotspot.
7929# The hotspot api for selecting the build artifacts, really, needs to be improved.
7930# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7931# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7932# But until then ...
7933HOTSPOT_TARGET=""
7934
7935if test "x$JVM_VARIANT_SERVER" = xtrue; then
7936    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7937fi
7938
7939if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7940    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7941fi
7942
7943if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7944    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7945fi
7946
7947if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7948    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7949fi
7950
7951if test "x$JVM_VARIANT_ZERO" = xtrue; then
7952    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7953fi
7954
7955if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7956    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7957fi
7958
7959HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7960
7961# On Macosx universal binaries are produced, but they only contain
7962# 64 bit intel. This invalidates control of which jvms are built
7963# from configure, but only server is valid anyway. Fix this
7964# when hotspot makefiles are rewritten.
7965if test "x$MACOSX_UNIVERSAL" = xtrue; then
7966    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7967fi
7968
7969#####
7970
7971
7972
7973
7974
7975
7976
7977
7978# With basic setup done, call the custom early hook.
7979
7980
7981# To properly create a configuration name, we need to have the OpenJDK target
7982# and options (variants and debug level) parsed.
7983
7984
7985
7986# Check whether --with-conf-name was given.
7987if test "${with_conf_name+set}" = set; then :
7988  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7989fi
7990
7991
7992# Test from where we are running configure, in or outside of src root.
7993if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7994        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7995        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7996    # We are running configure from the src root.
7997    # Create a default ./build/target-variant-debuglevel output root.
7998    if test "x${CONF_NAME}" = x; then
7999        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8000    fi
8001    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8002    $MKDIR -p "$OUTPUT_ROOT"
8003    if test ! -d "$OUTPUT_ROOT"; then
8004        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8005    fi
8006else
8007    # We are running configure from outside of the src dir.
8008    # Then use the current directory as output dir!
8009    # If configuration is situated in normal build directory, just use the build
8010    # directory name as configuration name, otherwise use the complete path.
8011    if test "x${CONF_NAME}" = x; then
8012        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8013    fi
8014    OUTPUT_ROOT="$CURDIR"
8015
8016    # WARNING: This might be a bad thing to do. You need to be sure you want to
8017    # have a configuration in this directory. Do some sanity checks!
8018
8019    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8020      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8021      # other files
8022      files_present=`$LS $OUTPUT_ROOT`
8023      # Configure has already touched config.log and confdefs.h in the current dir when this check
8024      # is performed.
8025      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8026                                             | $TR -d '\n'`
8027      if test "x$filtered_files" != x; then
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8029$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8030        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8031$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8032        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8033$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8035$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8037$as_echo "$as_me: seriously mess up just about everything." >&6;}
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8039$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8040        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8041$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8042        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8043      fi
8044    fi
8045fi
8046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8047$as_echo_n "checking what configuration name to use... " >&6; }
8048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8049$as_echo "$CONF_NAME" >&6; }
8050
8051
8052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8053
8054  # Input might be given as Windows format, start by converting to
8055  # unix format.
8056  path="$OUTPUT_ROOT"
8057  new_path=`$CYGPATH -u "$path"`
8058
8059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8062  # "foo.exe" is OK but "foo" is an error.
8063  #
8064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8065  # It is also a way to make sure we got the proper file name for the real test later on.
8066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8067  if test "x$test_shortpath" = x; then
8068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8069$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8070    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8071  fi
8072
8073  # Call helper function which possibly converts this using DOS-style short mode.
8074  # If so, the updated path is stored in $new_path.
8075
8076  input_path="$new_path"
8077  # Check if we need to convert this using DOS-style short mode. If the path
8078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8079  # take no chances and rewrite it.
8080  # Note: m4 eats our [], so we need to use [ and ] instead.
8081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8082  if test "x$has_forbidden_chars" != x; then
8083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8087      # Going to short mode and back again did indeed matter. Since short mode is
8088      # case insensitive, let's make it lowercase to improve readability.
8089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8090      # Now convert it back to Unix-stile (cygpath)
8091      input_path=`$CYGPATH -u "$shortmode_path"`
8092      new_path="$input_path"
8093    fi
8094  fi
8095
8096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8097  if test "x$test_cygdrive_prefix" = x; then
8098    # As a simple fix, exclude /usr/bin since it's not a real path.
8099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8101      # a path prefixed by /cygdrive for fixpath to work.
8102      new_path="$CYGWIN_ROOT_PATH$input_path"
8103    fi
8104  fi
8105
8106
8107  if test "x$path" != "x$new_path"; then
8108    OUTPUT_ROOT="$new_path"
8109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8110$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8111  fi
8112
8113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8114
8115  path="$OUTPUT_ROOT"
8116  has_colon=`$ECHO $path | $GREP ^.:`
8117  new_path="$path"
8118  if test "x$has_colon" = x; then
8119    # Not in mixed or Windows style, start by that.
8120    new_path=`cmd //c echo $path`
8121  fi
8122
8123
8124  input_path="$new_path"
8125  # Check if we need to convert this using DOS-style short mode. If the path
8126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8127  # take no chances and rewrite it.
8128  # Note: m4 eats our [], so we need to use [ and ] instead.
8129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8130  if test "x$has_forbidden_chars" != x; then
8131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8133  fi
8134
8135
8136  windows_path="$new_path"
8137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8138    unix_path=`$CYGPATH -u "$windows_path"`
8139    new_path="$unix_path"
8140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8142    new_path="$unix_path"
8143  fi
8144
8145  if test "x$path" != "x$new_path"; then
8146    OUTPUT_ROOT="$new_path"
8147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8148$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8149  fi
8150
8151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8153
8154  else
8155    # We're on a posix platform. Hooray! :)
8156    path="$OUTPUT_ROOT"
8157    has_space=`$ECHO "$path" | $GREP " "`
8158    if test "x$has_space" != x; then
8159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8160$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8161      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8162    fi
8163
8164    # Use eval to expand a potential ~
8165    eval path="$path"
8166    if test ! -f "$path" && test ! -d "$path"; then
8167      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8168    fi
8169
8170    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8171  fi
8172
8173
8174SPEC=$OUTPUT_ROOT/spec.gmk
8175
8176CONF_NAME=$CONF_NAME
8177
8178OUTPUT_ROOT=$OUTPUT_ROOT
8179
8180
8181# Most of the probed defines are put into config.h
8182ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8183
8184# The spec.gmk file contains all variables for the make system.
8185ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8186
8187# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8188ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8189
8190# The bootcycle-spec.gmk file contains support for boot cycle builds.
8191ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8192
8193# The compare.sh is used to compare the build output to other builds.
8194ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8195
8196# Spec.sh is currently used by compare-objects.sh
8197ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8198
8199# The generated Makefile knows where the spec.gmk is and where the source is.
8200# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8201# which will look for generated configurations
8202ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8203
8204
8205# Save the arguments given to us
8206echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8207
8208
8209# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8210
8211    for ac_prog in apt-get yum port pkgutil pkgadd
8212do
8213  # Extract the first word of "$ac_prog", so it can be a program name with args.
8214set dummy $ac_prog; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_prog_PKGHANDLER+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  if test -n "$PKGHANDLER"; then
8221  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8222else
8223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8230    ac_cv_prog_PKGHANDLER="$ac_prog"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238fi
8239fi
8240PKGHANDLER=$ac_cv_prog_PKGHANDLER
8241if test -n "$PKGHANDLER"; then
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8243$as_echo "$PKGHANDLER" >&6; }
8244else
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246$as_echo "no" >&6; }
8247fi
8248
8249
8250  test -n "$PKGHANDLER" && break
8251done
8252
8253
8254
8255# Setup tools that requires more complex handling, or that is not needed by the configure script.
8256
8257
8258  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8259  if test "x$MAKE" != x; then
8260    # User has supplied a make, test it.
8261    if test ! -f "$MAKE"; then
8262      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8263    fi
8264
8265  MAKE_CANDIDATE=""$MAKE""
8266  DESCRIPTION="user supplied MAKE=$MAKE"
8267  if test "x$MAKE_CANDIDATE" != x; then
8268    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8269$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8270    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8271    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8272    if test "x$IS_GNU_MAKE" = x; then
8273      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8274$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8275    else
8276      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8277      if test "x$IS_MODERN_MAKE" = x; then
8278        { $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
8279$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;}
8280      else
8281        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8282          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8283            MAKE_EXPECTED_ENV='cygwin'
8284          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8285            MAKE_EXPECTED_ENV='msys'
8286          else
8287            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8288          fi
8289          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8290          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8291        else
8292          # Not relevant for non-Windows
8293          IS_MAKE_CORRECT_ENV=true
8294        fi
8295        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8296          { $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
8297$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;}
8298        else
8299          FOUND_MAKE=$MAKE_CANDIDATE
8300
8301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8302
8303  # First separate the path from the arguments. This will split at the first
8304  # space.
8305  complete="$FOUND_MAKE"
8306  path="${complete%% *}"
8307  tmp="$complete EOL"
8308  arguments="${tmp#* }"
8309
8310  # Input might be given as Windows format, start by converting to
8311  # unix format.
8312  new_path=`$CYGPATH -u "$path"`
8313
8314  # Now try to locate executable using which
8315  new_path=`$WHICH "$new_path" 2> /dev/null`
8316  # bat and cmd files are not always considered executable in cygwin causing which
8317  # to not find them
8318  if test "x$new_path" = x \
8319           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8320           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8321    new_path=`$CYGPATH -u "$path"`
8322  fi
8323  if test "x$new_path" = x; then
8324    # Oops. Which didn't find the executable.
8325    # The splitting of arguments from the executable at a space might have been incorrect,
8326    # since paths with space are more likely in Windows. Give it another try with the whole
8327    # argument.
8328    path="$complete"
8329    arguments="EOL"
8330    new_path=`$CYGPATH -u "$path"`
8331    new_path=`$WHICH "$new_path" 2> /dev/null`
8332    # bat and cmd files are not always considered executable in cygwin causing which
8333    # to not find them
8334    if test "x$new_path" = x \
8335             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8336             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8337      new_path=`$CYGPATH -u "$path"`
8338    fi
8339    if test "x$new_path" = x; then
8340      # It's still not found. Now this is an unrecoverable error.
8341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8343      has_space=`$ECHO "$complete" | $GREP " "`
8344      if test "x$has_space" != x; then
8345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8347      fi
8348      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8349    fi
8350  fi
8351
8352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8355  # "foo.exe" is OK but "foo" is an error.
8356  #
8357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8358  # It is also a way to make sure we got the proper file name for the real test later on.
8359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8360  if test "x$test_shortpath" = x; then
8361    # Short path failed, file does not exist as specified.
8362    # Try adding .exe or .cmd
8363    if test -f "${new_path}.exe"; then
8364       input_to_shortpath="${new_path}.exe"
8365    elif test -f "${new_path}.cmd"; then
8366       input_to_shortpath="${new_path}.cmd"
8367    else
8368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8370      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8371$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8372      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8373    fi
8374  else
8375    input_to_shortpath="$new_path"
8376  fi
8377
8378  # Call helper function which possibly converts this using DOS-style short mode.
8379  # If so, the updated path is stored in $new_path.
8380  new_path="$input_to_shortpath"
8381
8382  input_path="$input_to_shortpath"
8383  # Check if we need to convert this using DOS-style short mode. If the path
8384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8385  # take no chances and rewrite it.
8386  # Note: m4 eats our [], so we need to use [ and ] instead.
8387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8388  if test "x$has_forbidden_chars" != x; then
8389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8393      # Going to short mode and back again did indeed matter. Since short mode is
8394      # case insensitive, let's make it lowercase to improve readability.
8395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8396      # Now convert it back to Unix-stile (cygpath)
8397      input_path=`$CYGPATH -u "$shortmode_path"`
8398      new_path="$input_path"
8399    fi
8400  fi
8401
8402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8403  if test "x$test_cygdrive_prefix" = x; then
8404    # As a simple fix, exclude /usr/bin since it's not a real path.
8405    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8407      # a path prefixed by /cygdrive for fixpath to work.
8408      new_path="$CYGWIN_ROOT_PATH$input_path"
8409    fi
8410  fi
8411
8412  # remove trailing .exe if any
8413  new_path="${new_path/%.exe/}"
8414
8415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8416
8417  # First separate the path from the arguments. This will split at the first
8418  # space.
8419  complete="$FOUND_MAKE"
8420  path="${complete%% *}"
8421  tmp="$complete EOL"
8422  arguments="${tmp#* }"
8423
8424  # Input might be given as Windows format, start by converting to
8425  # unix format.
8426  new_path="$path"
8427
8428  windows_path="$new_path"
8429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8430    unix_path=`$CYGPATH -u "$windows_path"`
8431    new_path="$unix_path"
8432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8434    new_path="$unix_path"
8435  fi
8436
8437
8438  # Now try to locate executable using which
8439  new_path=`$WHICH "$new_path" 2> /dev/null`
8440
8441  if test "x$new_path" = x; then
8442    # Oops. Which didn't find the executable.
8443    # The splitting of arguments from the executable at a space might have been incorrect,
8444    # since paths with space are more likely in Windows. Give it another try with the whole
8445    # argument.
8446    path="$complete"
8447    arguments="EOL"
8448    new_path="$path"
8449
8450  windows_path="$new_path"
8451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8452    unix_path=`$CYGPATH -u "$windows_path"`
8453    new_path="$unix_path"
8454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8456    new_path="$unix_path"
8457  fi
8458
8459
8460    new_path=`$WHICH "$new_path" 2> /dev/null`
8461
8462    if test "x$new_path" = x; then
8463      # It's still not found. Now this is an unrecoverable error.
8464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8465$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8466      has_space=`$ECHO "$complete" | $GREP " "`
8467      if test "x$has_space" != x; then
8468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8470      fi
8471      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8472    fi
8473  fi
8474
8475  # Now new_path has a complete unix path to the binary
8476  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8477    # Keep paths in /bin as-is, but remove trailing .exe if any
8478    new_path="${new_path/%.exe/}"
8479    # Do not save /bin paths to all_fixpath_prefixes!
8480  else
8481    # Not in mixed or Windows style, start by that.
8482    new_path=`cmd //c echo $new_path`
8483
8484  input_path="$new_path"
8485  # Check if we need to convert this using DOS-style short mode. If the path
8486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8487  # take no chances and rewrite it.
8488  # Note: m4 eats our [], so we need to use [ and ] instead.
8489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8490  if test "x$has_forbidden_chars" != x; then
8491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8493  fi
8494
8495    # Output is in $new_path
8496
8497  windows_path="$new_path"
8498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8499    unix_path=`$CYGPATH -u "$windows_path"`
8500    new_path="$unix_path"
8501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8503    new_path="$unix_path"
8504  fi
8505
8506    # remove trailing .exe if any
8507    new_path="${new_path/%.exe/}"
8508
8509    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8510    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8511  fi
8512
8513  else
8514    # We're on a posix platform. Hooray! :)
8515    # First separate the path from the arguments. This will split at the first
8516    # space.
8517    complete="$FOUND_MAKE"
8518    path="${complete%% *}"
8519    tmp="$complete EOL"
8520    arguments="${tmp#* }"
8521
8522    # Cannot rely on the command "which" here since it doesn't always work.
8523    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8524    if test -z "$is_absolute_path"; then
8525      # Path to executable is not absolute. Find it.
8526      IFS_save="$IFS"
8527      IFS=:
8528      for p in $PATH; do
8529        if test -f "$p/$path" && test -x "$p/$path"; then
8530          new_path="$p/$path"
8531          break
8532        fi
8533      done
8534      IFS="$IFS_save"
8535    else
8536      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8537$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8538      new_path="$path"
8539    fi
8540
8541    if test "x$new_path" = x; then
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8543$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8544        has_space=`$ECHO "$complete" | $GREP " "`
8545        if test "x$has_space" != x; then
8546          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8547$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8548        fi
8549        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8550      fi
8551  fi
8552
8553      # Now join together the path and the arguments once again
8554      if test "x$arguments" != xEOL; then
8555        new_complete="$new_path ${arguments% *}"
8556      else
8557        new_complete="$new_path"
8558      fi
8559
8560  if test "x$complete" != "x$new_complete"; then
8561      FOUND_MAKE="$new_complete"
8562      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8563$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8564    fi
8565
8566        fi
8567      fi
8568    fi
8569  fi
8570
8571    if test "x$FOUND_MAKE" = x; then
8572      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8573    fi
8574  else
8575    # Try our hardest to locate a correct version of GNU make
8576    for ac_prog in gmake
8577do
8578  # Extract the first word of "$ac_prog", so it can be a program name with args.
8579set dummy $ac_prog; ac_word=$2
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8581$as_echo_n "checking for $ac_word... " >&6; }
8582if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8583  $as_echo_n "(cached) " >&6
8584else
8585  case $CHECK_GMAKE in
8586  [\\/]* | ?:[\\/]*)
8587  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8588  ;;
8589  *)
8590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8591for as_dir in $PATH
8592do
8593  IFS=$as_save_IFS
8594  test -z "$as_dir" && as_dir=.
8595    for ac_exec_ext in '' $ac_executable_extensions; do
8596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8597    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8599    break 2
8600  fi
8601done
8602  done
8603IFS=$as_save_IFS
8604
8605  ;;
8606esac
8607fi
8608CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8609if test -n "$CHECK_GMAKE"; then
8610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8611$as_echo "$CHECK_GMAKE" >&6; }
8612else
8613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8614$as_echo "no" >&6; }
8615fi
8616
8617
8618  test -n "$CHECK_GMAKE" && break
8619done
8620
8621
8622  MAKE_CANDIDATE=""$CHECK_GMAKE""
8623  DESCRIPTION="gmake in PATH"
8624  if test "x$MAKE_CANDIDATE" != x; then
8625    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8626$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8627    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8628    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8629    if test "x$IS_GNU_MAKE" = x; then
8630      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8631$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8632    else
8633      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8634      if test "x$IS_MODERN_MAKE" = x; then
8635        { $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
8636$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;}
8637      else
8638        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8639          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8640            MAKE_EXPECTED_ENV='cygwin'
8641          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8642            MAKE_EXPECTED_ENV='msys'
8643          else
8644            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8645          fi
8646          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8647          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8648        else
8649          # Not relevant for non-Windows
8650          IS_MAKE_CORRECT_ENV=true
8651        fi
8652        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8653          { $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
8654$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;}
8655        else
8656          FOUND_MAKE=$MAKE_CANDIDATE
8657
8658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8659
8660  # First separate the path from the arguments. This will split at the first
8661  # space.
8662  complete="$FOUND_MAKE"
8663  path="${complete%% *}"
8664  tmp="$complete EOL"
8665  arguments="${tmp#* }"
8666
8667  # Input might be given as Windows format, start by converting to
8668  # unix format.
8669  new_path=`$CYGPATH -u "$path"`
8670
8671  # Now try to locate executable using which
8672  new_path=`$WHICH "$new_path" 2> /dev/null`
8673  # bat and cmd files are not always considered executable in cygwin causing which
8674  # to not find them
8675  if test "x$new_path" = x \
8676           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8677           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8678    new_path=`$CYGPATH -u "$path"`
8679  fi
8680  if test "x$new_path" = x; then
8681    # Oops. Which didn't find the executable.
8682    # The splitting of arguments from the executable at a space might have been incorrect,
8683    # since paths with space are more likely in Windows. Give it another try with the whole
8684    # argument.
8685    path="$complete"
8686    arguments="EOL"
8687    new_path=`$CYGPATH -u "$path"`
8688    new_path=`$WHICH "$new_path" 2> /dev/null`
8689    # bat and cmd files are not always considered executable in cygwin causing which
8690    # to not find them
8691    if test "x$new_path" = x \
8692             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8693             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8694      new_path=`$CYGPATH -u "$path"`
8695    fi
8696    if test "x$new_path" = x; then
8697      # It's still not found. Now this is an unrecoverable error.
8698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8699$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8700      has_space=`$ECHO "$complete" | $GREP " "`
8701      if test "x$has_space" != x; then
8702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8704      fi
8705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8706    fi
8707  fi
8708
8709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8712  # "foo.exe" is OK but "foo" is an error.
8713  #
8714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8715  # It is also a way to make sure we got the proper file name for the real test later on.
8716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8717  if test "x$test_shortpath" = x; then
8718    # Short path failed, file does not exist as specified.
8719    # Try adding .exe or .cmd
8720    if test -f "${new_path}.exe"; then
8721       input_to_shortpath="${new_path}.exe"
8722    elif test -f "${new_path}.cmd"; then
8723       input_to_shortpath="${new_path}.cmd"
8724    else
8725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8726$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8727      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8728$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8729      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8730    fi
8731  else
8732    input_to_shortpath="$new_path"
8733  fi
8734
8735  # Call helper function which possibly converts this using DOS-style short mode.
8736  # If so, the updated path is stored in $new_path.
8737  new_path="$input_to_shortpath"
8738
8739  input_path="$input_to_shortpath"
8740  # Check if we need to convert this using DOS-style short mode. If the path
8741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8742  # take no chances and rewrite it.
8743  # Note: m4 eats our [], so we need to use [ and ] instead.
8744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8745  if test "x$has_forbidden_chars" != x; then
8746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8750      # Going to short mode and back again did indeed matter. Since short mode is
8751      # case insensitive, let's make it lowercase to improve readability.
8752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8753      # Now convert it back to Unix-stile (cygpath)
8754      input_path=`$CYGPATH -u "$shortmode_path"`
8755      new_path="$input_path"
8756    fi
8757  fi
8758
8759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8760  if test "x$test_cygdrive_prefix" = x; then
8761    # As a simple fix, exclude /usr/bin since it's not a real path.
8762    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8764      # a path prefixed by /cygdrive for fixpath to work.
8765      new_path="$CYGWIN_ROOT_PATH$input_path"
8766    fi
8767  fi
8768
8769  # remove trailing .exe if any
8770  new_path="${new_path/%.exe/}"
8771
8772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8773
8774  # First separate the path from the arguments. This will split at the first
8775  # space.
8776  complete="$FOUND_MAKE"
8777  path="${complete%% *}"
8778  tmp="$complete EOL"
8779  arguments="${tmp#* }"
8780
8781  # Input might be given as Windows format, start by converting to
8782  # unix format.
8783  new_path="$path"
8784
8785  windows_path="$new_path"
8786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8787    unix_path=`$CYGPATH -u "$windows_path"`
8788    new_path="$unix_path"
8789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8791    new_path="$unix_path"
8792  fi
8793
8794
8795  # Now try to locate executable using which
8796  new_path=`$WHICH "$new_path" 2> /dev/null`
8797
8798  if test "x$new_path" = x; then
8799    # Oops. Which didn't find the executable.
8800    # The splitting of arguments from the executable at a space might have been incorrect,
8801    # since paths with space are more likely in Windows. Give it another try with the whole
8802    # argument.
8803    path="$complete"
8804    arguments="EOL"
8805    new_path="$path"
8806
8807  windows_path="$new_path"
8808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8809    unix_path=`$CYGPATH -u "$windows_path"`
8810    new_path="$unix_path"
8811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8813    new_path="$unix_path"
8814  fi
8815
8816
8817    new_path=`$WHICH "$new_path" 2> /dev/null`
8818
8819    if test "x$new_path" = x; then
8820      # It's still not found. Now this is an unrecoverable error.
8821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8822$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8823      has_space=`$ECHO "$complete" | $GREP " "`
8824      if test "x$has_space" != x; then
8825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8827      fi
8828      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8829    fi
8830  fi
8831
8832  # Now new_path has a complete unix path to the binary
8833  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8834    # Keep paths in /bin as-is, but remove trailing .exe if any
8835    new_path="${new_path/%.exe/}"
8836    # Do not save /bin paths to all_fixpath_prefixes!
8837  else
8838    # Not in mixed or Windows style, start by that.
8839    new_path=`cmd //c echo $new_path`
8840
8841  input_path="$new_path"
8842  # Check if we need to convert this using DOS-style short mode. If the path
8843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8844  # take no chances and rewrite it.
8845  # Note: m4 eats our [], so we need to use [ and ] instead.
8846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8847  if test "x$has_forbidden_chars" != x; then
8848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8850  fi
8851
8852    # Output is in $new_path
8853
8854  windows_path="$new_path"
8855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8856    unix_path=`$CYGPATH -u "$windows_path"`
8857    new_path="$unix_path"
8858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8860    new_path="$unix_path"
8861  fi
8862
8863    # remove trailing .exe if any
8864    new_path="${new_path/%.exe/}"
8865
8866    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8867    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8868  fi
8869
8870  else
8871    # We're on a posix platform. Hooray! :)
8872    # First separate the path from the arguments. This will split at the first
8873    # space.
8874    complete="$FOUND_MAKE"
8875    path="${complete%% *}"
8876    tmp="$complete EOL"
8877    arguments="${tmp#* }"
8878
8879    # Cannot rely on the command "which" here since it doesn't always work.
8880    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8881    if test -z "$is_absolute_path"; then
8882      # Path to executable is not absolute. Find it.
8883      IFS_save="$IFS"
8884      IFS=:
8885      for p in $PATH; do
8886        if test -f "$p/$path" && test -x "$p/$path"; then
8887          new_path="$p/$path"
8888          break
8889        fi
8890      done
8891      IFS="$IFS_save"
8892    else
8893      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8894$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8895      new_path="$path"
8896    fi
8897
8898    if test "x$new_path" = x; then
8899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8900$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8901        has_space=`$ECHO "$complete" | $GREP " "`
8902        if test "x$has_space" != x; then
8903          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8904$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8905        fi
8906        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8907      fi
8908  fi
8909
8910      # Now join together the path and the arguments once again
8911      if test "x$arguments" != xEOL; then
8912        new_complete="$new_path ${arguments% *}"
8913      else
8914        new_complete="$new_path"
8915      fi
8916
8917  if test "x$complete" != "x$new_complete"; then
8918      FOUND_MAKE="$new_complete"
8919      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8920$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8921    fi
8922
8923        fi
8924      fi
8925    fi
8926  fi
8927
8928
8929    if test "x$FOUND_MAKE" = x; then
8930      for ac_prog in make
8931do
8932  # Extract the first word of "$ac_prog", so it can be a program name with args.
8933set dummy $ac_prog; ac_word=$2
8934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8935$as_echo_n "checking for $ac_word... " >&6; }
8936if ${ac_cv_path_CHECK_MAKE+:} false; then :
8937  $as_echo_n "(cached) " >&6
8938else
8939  case $CHECK_MAKE in
8940  [\\/]* | ?:[\\/]*)
8941  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8942  ;;
8943  *)
8944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8945for as_dir in $PATH
8946do
8947  IFS=$as_save_IFS
8948  test -z "$as_dir" && as_dir=.
8949    for ac_exec_ext in '' $ac_executable_extensions; do
8950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8951    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8953    break 2
8954  fi
8955done
8956  done
8957IFS=$as_save_IFS
8958
8959  ;;
8960esac
8961fi
8962CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8963if test -n "$CHECK_MAKE"; then
8964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8965$as_echo "$CHECK_MAKE" >&6; }
8966else
8967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8968$as_echo "no" >&6; }
8969fi
8970
8971
8972  test -n "$CHECK_MAKE" && break
8973done
8974
8975
8976  MAKE_CANDIDATE=""$CHECK_MAKE""
8977  DESCRIPTION="make in PATH"
8978  if test "x$MAKE_CANDIDATE" != x; then
8979    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8980$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8981    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8982    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8983    if test "x$IS_GNU_MAKE" = x; then
8984      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8985$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8986    else
8987      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8988      if test "x$IS_MODERN_MAKE" = x; then
8989        { $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
8990$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;}
8991      else
8992        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8993          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8994            MAKE_EXPECTED_ENV='cygwin'
8995          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8996            MAKE_EXPECTED_ENV='msys'
8997          else
8998            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8999          fi
9000          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9001          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9002        else
9003          # Not relevant for non-Windows
9004          IS_MAKE_CORRECT_ENV=true
9005        fi
9006        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9007          { $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
9008$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;}
9009        else
9010          FOUND_MAKE=$MAKE_CANDIDATE
9011
9012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9013
9014  # First separate the path from the arguments. This will split at the first
9015  # space.
9016  complete="$FOUND_MAKE"
9017  path="${complete%% *}"
9018  tmp="$complete EOL"
9019  arguments="${tmp#* }"
9020
9021  # Input might be given as Windows format, start by converting to
9022  # unix format.
9023  new_path=`$CYGPATH -u "$path"`
9024
9025  # Now try to locate executable using which
9026  new_path=`$WHICH "$new_path" 2> /dev/null`
9027  # bat and cmd files are not always considered executable in cygwin causing which
9028  # to not find them
9029  if test "x$new_path" = x \
9030           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9031           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9032    new_path=`$CYGPATH -u "$path"`
9033  fi
9034  if test "x$new_path" = x; then
9035    # Oops. Which didn't find the executable.
9036    # The splitting of arguments from the executable at a space might have been incorrect,
9037    # since paths with space are more likely in Windows. Give it another try with the whole
9038    # argument.
9039    path="$complete"
9040    arguments="EOL"
9041    new_path=`$CYGPATH -u "$path"`
9042    new_path=`$WHICH "$new_path" 2> /dev/null`
9043    # bat and cmd files are not always considered executable in cygwin causing which
9044    # to not find them
9045    if test "x$new_path" = x \
9046             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9047             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9048      new_path=`$CYGPATH -u "$path"`
9049    fi
9050    if test "x$new_path" = x; then
9051      # It's still not found. Now this is an unrecoverable error.
9052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9054      has_space=`$ECHO "$complete" | $GREP " "`
9055      if test "x$has_space" != x; then
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9058      fi
9059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9060    fi
9061  fi
9062
9063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9066  # "foo.exe" is OK but "foo" is an error.
9067  #
9068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9069  # It is also a way to make sure we got the proper file name for the real test later on.
9070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9071  if test "x$test_shortpath" = x; then
9072    # Short path failed, file does not exist as specified.
9073    # Try adding .exe or .cmd
9074    if test -f "${new_path}.exe"; then
9075       input_to_shortpath="${new_path}.exe"
9076    elif test -f "${new_path}.cmd"; then
9077       input_to_shortpath="${new_path}.cmd"
9078    else
9079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9084    fi
9085  else
9086    input_to_shortpath="$new_path"
9087  fi
9088
9089  # Call helper function which possibly converts this using DOS-style short mode.
9090  # If so, the updated path is stored in $new_path.
9091  new_path="$input_to_shortpath"
9092
9093  input_path="$input_to_shortpath"
9094  # Check if we need to convert this using DOS-style short mode. If the path
9095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9096  # take no chances and rewrite it.
9097  # Note: m4 eats our [], so we need to use [ and ] instead.
9098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9099  if test "x$has_forbidden_chars" != x; then
9100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9104      # Going to short mode and back again did indeed matter. Since short mode is
9105      # case insensitive, let's make it lowercase to improve readability.
9106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9107      # Now convert it back to Unix-stile (cygpath)
9108      input_path=`$CYGPATH -u "$shortmode_path"`
9109      new_path="$input_path"
9110    fi
9111  fi
9112
9113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9114  if test "x$test_cygdrive_prefix" = x; then
9115    # As a simple fix, exclude /usr/bin since it's not a real path.
9116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9118      # a path prefixed by /cygdrive for fixpath to work.
9119      new_path="$CYGWIN_ROOT_PATH$input_path"
9120    fi
9121  fi
9122
9123  # remove trailing .exe if any
9124  new_path="${new_path/%.exe/}"
9125
9126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9127
9128  # First separate the path from the arguments. This will split at the first
9129  # space.
9130  complete="$FOUND_MAKE"
9131  path="${complete%% *}"
9132  tmp="$complete EOL"
9133  arguments="${tmp#* }"
9134
9135  # Input might be given as Windows format, start by converting to
9136  # unix format.
9137  new_path="$path"
9138
9139  windows_path="$new_path"
9140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9141    unix_path=`$CYGPATH -u "$windows_path"`
9142    new_path="$unix_path"
9143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9145    new_path="$unix_path"
9146  fi
9147
9148
9149  # Now try to locate executable using which
9150  new_path=`$WHICH "$new_path" 2> /dev/null`
9151
9152  if test "x$new_path" = x; then
9153    # Oops. Which didn't find the executable.
9154    # The splitting of arguments from the executable at a space might have been incorrect,
9155    # since paths with space are more likely in Windows. Give it another try with the whole
9156    # argument.
9157    path="$complete"
9158    arguments="EOL"
9159    new_path="$path"
9160
9161  windows_path="$new_path"
9162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9163    unix_path=`$CYGPATH -u "$windows_path"`
9164    new_path="$unix_path"
9165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9167    new_path="$unix_path"
9168  fi
9169
9170
9171    new_path=`$WHICH "$new_path" 2> /dev/null`
9172
9173    if test "x$new_path" = x; then
9174      # It's still not found. Now this is an unrecoverable error.
9175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9176$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9177      has_space=`$ECHO "$complete" | $GREP " "`
9178      if test "x$has_space" != x; then
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9181      fi
9182      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9183    fi
9184  fi
9185
9186  # Now new_path has a complete unix path to the binary
9187  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9188    # Keep paths in /bin as-is, but remove trailing .exe if any
9189    new_path="${new_path/%.exe/}"
9190    # Do not save /bin paths to all_fixpath_prefixes!
9191  else
9192    # Not in mixed or Windows style, start by that.
9193    new_path=`cmd //c echo $new_path`
9194
9195  input_path="$new_path"
9196  # Check if we need to convert this using DOS-style short mode. If the path
9197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9198  # take no chances and rewrite it.
9199  # Note: m4 eats our [], so we need to use [ and ] instead.
9200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9201  if test "x$has_forbidden_chars" != x; then
9202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9204  fi
9205
9206    # Output is in $new_path
9207
9208  windows_path="$new_path"
9209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9210    unix_path=`$CYGPATH -u "$windows_path"`
9211    new_path="$unix_path"
9212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9214    new_path="$unix_path"
9215  fi
9216
9217    # remove trailing .exe if any
9218    new_path="${new_path/%.exe/}"
9219
9220    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9221    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9222  fi
9223
9224  else
9225    # We're on a posix platform. Hooray! :)
9226    # First separate the path from the arguments. This will split at the first
9227    # space.
9228    complete="$FOUND_MAKE"
9229    path="${complete%% *}"
9230    tmp="$complete EOL"
9231    arguments="${tmp#* }"
9232
9233    # Cannot rely on the command "which" here since it doesn't always work.
9234    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9235    if test -z "$is_absolute_path"; then
9236      # Path to executable is not absolute. Find it.
9237      IFS_save="$IFS"
9238      IFS=:
9239      for p in $PATH; do
9240        if test -f "$p/$path" && test -x "$p/$path"; then
9241          new_path="$p/$path"
9242          break
9243        fi
9244      done
9245      IFS="$IFS_save"
9246    else
9247      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9248$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9249      new_path="$path"
9250    fi
9251
9252    if test "x$new_path" = x; then
9253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9255        has_space=`$ECHO "$complete" | $GREP " "`
9256        if test "x$has_space" != x; then
9257          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9259        fi
9260        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9261      fi
9262  fi
9263
9264      # Now join together the path and the arguments once again
9265      if test "x$arguments" != xEOL; then
9266        new_complete="$new_path ${arguments% *}"
9267      else
9268        new_complete="$new_path"
9269      fi
9270
9271  if test "x$complete" != "x$new_complete"; then
9272      FOUND_MAKE="$new_complete"
9273      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9274$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9275    fi
9276
9277        fi
9278      fi
9279    fi
9280  fi
9281
9282    fi
9283
9284    if test "x$FOUND_MAKE" = x; then
9285      if test "x$TOOLS_DIR" != x; then
9286        # We have a tools-dir, check that as well before giving up.
9287        OLD_PATH=$PATH
9288        PATH=$TOOLS_DIR:$PATH
9289        for ac_prog in gmake
9290do
9291  # Extract the first word of "$ac_prog", so it can be a program name with args.
9292set dummy $ac_prog; ac_word=$2
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9294$as_echo_n "checking for $ac_word... " >&6; }
9295if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9296  $as_echo_n "(cached) " >&6
9297else
9298  case $CHECK_TOOLSDIR_GMAKE in
9299  [\\/]* | ?:[\\/]*)
9300  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9301  ;;
9302  *)
9303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9304for as_dir in $PATH
9305do
9306  IFS=$as_save_IFS
9307  test -z "$as_dir" && as_dir=.
9308    for ac_exec_ext in '' $ac_executable_extensions; do
9309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9310    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9312    break 2
9313  fi
9314done
9315  done
9316IFS=$as_save_IFS
9317
9318  ;;
9319esac
9320fi
9321CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9322if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9324$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9325else
9326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
9328fi
9329
9330
9331  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9332done
9333
9334
9335  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9336  DESCRIPTION="gmake in tools-dir"
9337  if test "x$MAKE_CANDIDATE" != x; then
9338    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9339$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9340    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9341    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9342    if test "x$IS_GNU_MAKE" = x; then
9343      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9344$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9345    else
9346      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9347      if test "x$IS_MODERN_MAKE" = x; then
9348        { $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
9349$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;}
9350      else
9351        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9352          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9353            MAKE_EXPECTED_ENV='cygwin'
9354          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9355            MAKE_EXPECTED_ENV='msys'
9356          else
9357            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9358          fi
9359          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9360          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9361        else
9362          # Not relevant for non-Windows
9363          IS_MAKE_CORRECT_ENV=true
9364        fi
9365        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9366          { $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
9367$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;}
9368        else
9369          FOUND_MAKE=$MAKE_CANDIDATE
9370
9371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9372
9373  # First separate the path from the arguments. This will split at the first
9374  # space.
9375  complete="$FOUND_MAKE"
9376  path="${complete%% *}"
9377  tmp="$complete EOL"
9378  arguments="${tmp#* }"
9379
9380  # Input might be given as Windows format, start by converting to
9381  # unix format.
9382  new_path=`$CYGPATH -u "$path"`
9383
9384  # Now try to locate executable using which
9385  new_path=`$WHICH "$new_path" 2> /dev/null`
9386  # bat and cmd files are not always considered executable in cygwin causing which
9387  # to not find them
9388  if test "x$new_path" = x \
9389           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9390           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9391    new_path=`$CYGPATH -u "$path"`
9392  fi
9393  if test "x$new_path" = x; then
9394    # Oops. Which didn't find the executable.
9395    # The splitting of arguments from the executable at a space might have been incorrect,
9396    # since paths with space are more likely in Windows. Give it another try with the whole
9397    # argument.
9398    path="$complete"
9399    arguments="EOL"
9400    new_path=`$CYGPATH -u "$path"`
9401    new_path=`$WHICH "$new_path" 2> /dev/null`
9402    # bat and cmd files are not always considered executable in cygwin causing which
9403    # to not find them
9404    if test "x$new_path" = x \
9405             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9406             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9407      new_path=`$CYGPATH -u "$path"`
9408    fi
9409    if test "x$new_path" = x; then
9410      # It's still not found. Now this is an unrecoverable error.
9411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9413      has_space=`$ECHO "$complete" | $GREP " "`
9414      if test "x$has_space" != x; then
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9417      fi
9418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9419    fi
9420  fi
9421
9422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9425  # "foo.exe" is OK but "foo" is an error.
9426  #
9427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9428  # It is also a way to make sure we got the proper file name for the real test later on.
9429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9430  if test "x$test_shortpath" = x; then
9431    # Short path failed, file does not exist as specified.
9432    # Try adding .exe or .cmd
9433    if test -f "${new_path}.exe"; then
9434       input_to_shortpath="${new_path}.exe"
9435    elif test -f "${new_path}.cmd"; then
9436       input_to_shortpath="${new_path}.cmd"
9437    else
9438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9442      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9443    fi
9444  else
9445    input_to_shortpath="$new_path"
9446  fi
9447
9448  # Call helper function which possibly converts this using DOS-style short mode.
9449  # If so, the updated path is stored in $new_path.
9450  new_path="$input_to_shortpath"
9451
9452  input_path="$input_to_shortpath"
9453  # Check if we need to convert this using DOS-style short mode. If the path
9454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9455  # take no chances and rewrite it.
9456  # Note: m4 eats our [], so we need to use [ and ] instead.
9457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9458  if test "x$has_forbidden_chars" != x; then
9459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9463      # Going to short mode and back again did indeed matter. Since short mode is
9464      # case insensitive, let's make it lowercase to improve readability.
9465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9466      # Now convert it back to Unix-stile (cygpath)
9467      input_path=`$CYGPATH -u "$shortmode_path"`
9468      new_path="$input_path"
9469    fi
9470  fi
9471
9472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9473  if test "x$test_cygdrive_prefix" = x; then
9474    # As a simple fix, exclude /usr/bin since it's not a real path.
9475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9477      # a path prefixed by /cygdrive for fixpath to work.
9478      new_path="$CYGWIN_ROOT_PATH$input_path"
9479    fi
9480  fi
9481
9482  # remove trailing .exe if any
9483  new_path="${new_path/%.exe/}"
9484
9485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9486
9487  # First separate the path from the arguments. This will split at the first
9488  # space.
9489  complete="$FOUND_MAKE"
9490  path="${complete%% *}"
9491  tmp="$complete EOL"
9492  arguments="${tmp#* }"
9493
9494  # Input might be given as Windows format, start by converting to
9495  # unix format.
9496  new_path="$path"
9497
9498  windows_path="$new_path"
9499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9500    unix_path=`$CYGPATH -u "$windows_path"`
9501    new_path="$unix_path"
9502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9504    new_path="$unix_path"
9505  fi
9506
9507
9508  # Now try to locate executable using which
9509  new_path=`$WHICH "$new_path" 2> /dev/null`
9510
9511  if test "x$new_path" = x; then
9512    # Oops. Which didn't find the executable.
9513    # The splitting of arguments from the executable at a space might have been incorrect,
9514    # since paths with space are more likely in Windows. Give it another try with the whole
9515    # argument.
9516    path="$complete"
9517    arguments="EOL"
9518    new_path="$path"
9519
9520  windows_path="$new_path"
9521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9522    unix_path=`$CYGPATH -u "$windows_path"`
9523    new_path="$unix_path"
9524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9526    new_path="$unix_path"
9527  fi
9528
9529
9530    new_path=`$WHICH "$new_path" 2> /dev/null`
9531
9532    if test "x$new_path" = x; then
9533      # It's still not found. Now this is an unrecoverable error.
9534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9536      has_space=`$ECHO "$complete" | $GREP " "`
9537      if test "x$has_space" != x; then
9538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9540      fi
9541      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9542    fi
9543  fi
9544
9545  # Now new_path has a complete unix path to the binary
9546  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9547    # Keep paths in /bin as-is, but remove trailing .exe if any
9548    new_path="${new_path/%.exe/}"
9549    # Do not save /bin paths to all_fixpath_prefixes!
9550  else
9551    # Not in mixed or Windows style, start by that.
9552    new_path=`cmd //c echo $new_path`
9553
9554  input_path="$new_path"
9555  # Check if we need to convert this using DOS-style short mode. If the path
9556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9557  # take no chances and rewrite it.
9558  # Note: m4 eats our [], so we need to use [ and ] instead.
9559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9560  if test "x$has_forbidden_chars" != x; then
9561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9563  fi
9564
9565    # Output is in $new_path
9566
9567  windows_path="$new_path"
9568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9569    unix_path=`$CYGPATH -u "$windows_path"`
9570    new_path="$unix_path"
9571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9573    new_path="$unix_path"
9574  fi
9575
9576    # remove trailing .exe if any
9577    new_path="${new_path/%.exe/}"
9578
9579    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9580    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9581  fi
9582
9583  else
9584    # We're on a posix platform. Hooray! :)
9585    # First separate the path from the arguments. This will split at the first
9586    # space.
9587    complete="$FOUND_MAKE"
9588    path="${complete%% *}"
9589    tmp="$complete EOL"
9590    arguments="${tmp#* }"
9591
9592    # Cannot rely on the command "which" here since it doesn't always work.
9593    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9594    if test -z "$is_absolute_path"; then
9595      # Path to executable is not absolute. Find it.
9596      IFS_save="$IFS"
9597      IFS=:
9598      for p in $PATH; do
9599        if test -f "$p/$path" && test -x "$p/$path"; then
9600          new_path="$p/$path"
9601          break
9602        fi
9603      done
9604      IFS="$IFS_save"
9605    else
9606      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9607$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9608      new_path="$path"
9609    fi
9610
9611    if test "x$new_path" = x; then
9612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9614        has_space=`$ECHO "$complete" | $GREP " "`
9615        if test "x$has_space" != x; then
9616          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9617$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9618        fi
9619        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9620      fi
9621  fi
9622
9623      # Now join together the path and the arguments once again
9624      if test "x$arguments" != xEOL; then
9625        new_complete="$new_path ${arguments% *}"
9626      else
9627        new_complete="$new_path"
9628      fi
9629
9630  if test "x$complete" != "x$new_complete"; then
9631      FOUND_MAKE="$new_complete"
9632      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9633$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9634    fi
9635
9636        fi
9637      fi
9638    fi
9639  fi
9640
9641        if test "x$FOUND_MAKE" = x; then
9642          for ac_prog in make
9643do
9644  # Extract the first word of "$ac_prog", so it can be a program name with args.
9645set dummy $ac_prog; ac_word=$2
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9647$as_echo_n "checking for $ac_word... " >&6; }
9648if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9649  $as_echo_n "(cached) " >&6
9650else
9651  case $CHECK_TOOLSDIR_MAKE in
9652  [\\/]* | ?:[\\/]*)
9653  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9654  ;;
9655  *)
9656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9657for as_dir in $PATH
9658do
9659  IFS=$as_save_IFS
9660  test -z "$as_dir" && as_dir=.
9661    for ac_exec_ext in '' $ac_executable_extensions; do
9662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9663    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9665    break 2
9666  fi
9667done
9668  done
9669IFS=$as_save_IFS
9670
9671  ;;
9672esac
9673fi
9674CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9675if test -n "$CHECK_TOOLSDIR_MAKE"; then
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9677$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9678else
9679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9680$as_echo "no" >&6; }
9681fi
9682
9683
9684  test -n "$CHECK_TOOLSDIR_MAKE" && break
9685done
9686
9687
9688  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9689  DESCRIPTION="make in tools-dir"
9690  if test "x$MAKE_CANDIDATE" != x; then
9691    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9692$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9693    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9694    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9695    if test "x$IS_GNU_MAKE" = x; then
9696      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9697$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9698    else
9699      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9700      if test "x$IS_MODERN_MAKE" = x; then
9701        { $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
9702$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;}
9703      else
9704        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9705          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9706            MAKE_EXPECTED_ENV='cygwin'
9707          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9708            MAKE_EXPECTED_ENV='msys'
9709          else
9710            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9711          fi
9712          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9713          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9714        else
9715          # Not relevant for non-Windows
9716          IS_MAKE_CORRECT_ENV=true
9717        fi
9718        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9719          { $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
9720$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;}
9721        else
9722          FOUND_MAKE=$MAKE_CANDIDATE
9723
9724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9725
9726  # First separate the path from the arguments. This will split at the first
9727  # space.
9728  complete="$FOUND_MAKE"
9729  path="${complete%% *}"
9730  tmp="$complete EOL"
9731  arguments="${tmp#* }"
9732
9733  # Input might be given as Windows format, start by converting to
9734  # unix format.
9735  new_path=`$CYGPATH -u "$path"`
9736
9737  # Now try to locate executable using which
9738  new_path=`$WHICH "$new_path" 2> /dev/null`
9739  # bat and cmd files are not always considered executable in cygwin causing which
9740  # to not find them
9741  if test "x$new_path" = x \
9742           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9743           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9744    new_path=`$CYGPATH -u "$path"`
9745  fi
9746  if test "x$new_path" = x; then
9747    # Oops. Which didn't find the executable.
9748    # The splitting of arguments from the executable at a space might have been incorrect,
9749    # since paths with space are more likely in Windows. Give it another try with the whole
9750    # argument.
9751    path="$complete"
9752    arguments="EOL"
9753    new_path=`$CYGPATH -u "$path"`
9754    new_path=`$WHICH "$new_path" 2> /dev/null`
9755    # bat and cmd files are not always considered executable in cygwin causing which
9756    # to not find them
9757    if test "x$new_path" = x \
9758             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9759             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9760      new_path=`$CYGPATH -u "$path"`
9761    fi
9762    if test "x$new_path" = x; then
9763      # It's still not found. Now this is an unrecoverable error.
9764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9766      has_space=`$ECHO "$complete" | $GREP " "`
9767      if test "x$has_space" != x; then
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9770      fi
9771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9772    fi
9773  fi
9774
9775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9778  # "foo.exe" is OK but "foo" is an error.
9779  #
9780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9781  # It is also a way to make sure we got the proper file name for the real test later on.
9782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9783  if test "x$test_shortpath" = x; then
9784    # Short path failed, file does not exist as specified.
9785    # Try adding .exe or .cmd
9786    if test -f "${new_path}.exe"; then
9787       input_to_shortpath="${new_path}.exe"
9788    elif test -f "${new_path}.cmd"; then
9789       input_to_shortpath="${new_path}.cmd"
9790    else
9791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9796    fi
9797  else
9798    input_to_shortpath="$new_path"
9799  fi
9800
9801  # Call helper function which possibly converts this using DOS-style short mode.
9802  # If so, the updated path is stored in $new_path.
9803  new_path="$input_to_shortpath"
9804
9805  input_path="$input_to_shortpath"
9806  # Check if we need to convert this using DOS-style short mode. If the path
9807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9808  # take no chances and rewrite it.
9809  # Note: m4 eats our [], so we need to use [ and ] instead.
9810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9811  if test "x$has_forbidden_chars" != x; then
9812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9816      # Going to short mode and back again did indeed matter. Since short mode is
9817      # case insensitive, let's make it lowercase to improve readability.
9818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9819      # Now convert it back to Unix-stile (cygpath)
9820      input_path=`$CYGPATH -u "$shortmode_path"`
9821      new_path="$input_path"
9822    fi
9823  fi
9824
9825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9826  if test "x$test_cygdrive_prefix" = x; then
9827    # As a simple fix, exclude /usr/bin since it's not a real path.
9828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9830      # a path prefixed by /cygdrive for fixpath to work.
9831      new_path="$CYGWIN_ROOT_PATH$input_path"
9832    fi
9833  fi
9834
9835  # remove trailing .exe if any
9836  new_path="${new_path/%.exe/}"
9837
9838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9839
9840  # First separate the path from the arguments. This will split at the first
9841  # space.
9842  complete="$FOUND_MAKE"
9843  path="${complete%% *}"
9844  tmp="$complete EOL"
9845  arguments="${tmp#* }"
9846
9847  # Input might be given as Windows format, start by converting to
9848  # unix format.
9849  new_path="$path"
9850
9851  windows_path="$new_path"
9852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9853    unix_path=`$CYGPATH -u "$windows_path"`
9854    new_path="$unix_path"
9855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9857    new_path="$unix_path"
9858  fi
9859
9860
9861  # Now try to locate executable using which
9862  new_path=`$WHICH "$new_path" 2> /dev/null`
9863
9864  if test "x$new_path" = x; then
9865    # Oops. Which didn't find the executable.
9866    # The splitting of arguments from the executable at a space might have been incorrect,
9867    # since paths with space are more likely in Windows. Give it another try with the whole
9868    # argument.
9869    path="$complete"
9870    arguments="EOL"
9871    new_path="$path"
9872
9873  windows_path="$new_path"
9874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9875    unix_path=`$CYGPATH -u "$windows_path"`
9876    new_path="$unix_path"
9877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9879    new_path="$unix_path"
9880  fi
9881
9882
9883    new_path=`$WHICH "$new_path" 2> /dev/null`
9884
9885    if test "x$new_path" = x; then
9886      # It's still not found. Now this is an unrecoverable error.
9887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9889      has_space=`$ECHO "$complete" | $GREP " "`
9890      if test "x$has_space" != x; then
9891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9893      fi
9894      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9895    fi
9896  fi
9897
9898  # Now new_path has a complete unix path to the binary
9899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9900    # Keep paths in /bin as-is, but remove trailing .exe if any
9901    new_path="${new_path/%.exe/}"
9902    # Do not save /bin paths to all_fixpath_prefixes!
9903  else
9904    # Not in mixed or Windows style, start by that.
9905    new_path=`cmd //c echo $new_path`
9906
9907  input_path="$new_path"
9908  # Check if we need to convert this using DOS-style short mode. If the path
9909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9910  # take no chances and rewrite it.
9911  # Note: m4 eats our [], so we need to use [ and ] instead.
9912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9913  if test "x$has_forbidden_chars" != x; then
9914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9916  fi
9917
9918    # Output is in $new_path
9919
9920  windows_path="$new_path"
9921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9922    unix_path=`$CYGPATH -u "$windows_path"`
9923    new_path="$unix_path"
9924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9926    new_path="$unix_path"
9927  fi
9928
9929    # remove trailing .exe if any
9930    new_path="${new_path/%.exe/}"
9931
9932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9934  fi
9935
9936  else
9937    # We're on a posix platform. Hooray! :)
9938    # First separate the path from the arguments. This will split at the first
9939    # space.
9940    complete="$FOUND_MAKE"
9941    path="${complete%% *}"
9942    tmp="$complete EOL"
9943    arguments="${tmp#* }"
9944
9945    # Cannot rely on the command "which" here since it doesn't always work.
9946    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9947    if test -z "$is_absolute_path"; then
9948      # Path to executable is not absolute. Find it.
9949      IFS_save="$IFS"
9950      IFS=:
9951      for p in $PATH; do
9952        if test -f "$p/$path" && test -x "$p/$path"; then
9953          new_path="$p/$path"
9954          break
9955        fi
9956      done
9957      IFS="$IFS_save"
9958    else
9959      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9960$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9961      new_path="$path"
9962    fi
9963
9964    if test "x$new_path" = x; then
9965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9967        has_space=`$ECHO "$complete" | $GREP " "`
9968        if test "x$has_space" != x; then
9969          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9971        fi
9972        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9973      fi
9974  fi
9975
9976      # Now join together the path and the arguments once again
9977      if test "x$arguments" != xEOL; then
9978        new_complete="$new_path ${arguments% *}"
9979      else
9980        new_complete="$new_path"
9981      fi
9982
9983  if test "x$complete" != "x$new_complete"; then
9984      FOUND_MAKE="$new_complete"
9985      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9986$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9987    fi
9988
9989        fi
9990      fi
9991    fi
9992  fi
9993
9994        fi
9995        PATH=$OLD_PATH
9996      fi
9997    fi
9998
9999    if test "x$FOUND_MAKE" = x; then
10000      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
10001    fi
10002  fi
10003
10004  MAKE=$FOUND_MAKE
10005
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10007$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10008
10009
10010
10011    # Test if find supports -delete
10012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10013$as_echo_n "checking if find supports -delete... " >&6; }
10014    FIND_DELETE="-delete"
10015
10016    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10017
10018    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10019
10020    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10021    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10022        # No, it does not.
10023        rm $DELETEDIR/TestIfFindSupportsDelete
10024        FIND_DELETE="-exec rm \{\} \+"
10025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10026$as_echo "no" >&6; }
10027    else
10028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10029$as_echo "yes" >&6; }
10030    fi
10031    rmdir $DELETEDIR
10032
10033
10034
10035# These tools might not be installed by default,
10036# need hint on how to install them.
10037
10038    for ac_prog in unzip
10039do
10040  # Extract the first word of "$ac_prog", so it can be a program name with args.
10041set dummy $ac_prog; ac_word=$2
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10043$as_echo_n "checking for $ac_word... " >&6; }
10044if ${ac_cv_path_UNZIP+:} false; then :
10045  $as_echo_n "(cached) " >&6
10046else
10047  case $UNZIP in
10048  [\\/]* | ?:[\\/]*)
10049  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10050  ;;
10051  *)
10052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10053for as_dir in $PATH
10054do
10055  IFS=$as_save_IFS
10056  test -z "$as_dir" && as_dir=.
10057    for ac_exec_ext in '' $ac_executable_extensions; do
10058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10059    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10061    break 2
10062  fi
10063done
10064  done
10065IFS=$as_save_IFS
10066
10067  ;;
10068esac
10069fi
10070UNZIP=$ac_cv_path_UNZIP
10071if test -n "$UNZIP"; then
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10073$as_echo "$UNZIP" >&6; }
10074else
10075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
10077fi
10078
10079
10080  test -n "$UNZIP" && break
10081done
10082
10083
10084    if test "x$UNZIP" = x; then
10085        if test "xunzip" = x; then
10086          PROG_NAME=unzip
10087        else
10088          PROG_NAME=unzip
10089        fi
10090        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10091$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10092        as_fn_error $? "Cannot continue" "$LINENO" 5
10093    fi
10094
10095
10096
10097    for ac_prog in zip
10098do
10099  # Extract the first word of "$ac_prog", so it can be a program name with args.
10100set dummy $ac_prog; ac_word=$2
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102$as_echo_n "checking for $ac_word... " >&6; }
10103if ${ac_cv_path_ZIP+:} false; then :
10104  $as_echo_n "(cached) " >&6
10105else
10106  case $ZIP in
10107  [\\/]* | ?:[\\/]*)
10108  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10109  ;;
10110  *)
10111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112for as_dir in $PATH
10113do
10114  IFS=$as_save_IFS
10115  test -z "$as_dir" && as_dir=.
10116    for ac_exec_ext in '' $ac_executable_extensions; do
10117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10118    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120    break 2
10121  fi
10122done
10123  done
10124IFS=$as_save_IFS
10125
10126  ;;
10127esac
10128fi
10129ZIP=$ac_cv_path_ZIP
10130if test -n "$ZIP"; then
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10132$as_echo "$ZIP" >&6; }
10133else
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
10139  test -n "$ZIP" && break
10140done
10141
10142
10143    if test "x$ZIP" = x; then
10144        if test "xzip" = x; then
10145          PROG_NAME=zip
10146        else
10147          PROG_NAME=zip
10148        fi
10149        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10150$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10151        as_fn_error $? "Cannot continue" "$LINENO" 5
10152    fi
10153
10154
10155
10156# Non-required basic tools
10157
10158# Extract the first word of "ldd", so it can be a program name with args.
10159set dummy ldd; ac_word=$2
10160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10161$as_echo_n "checking for $ac_word... " >&6; }
10162if ${ac_cv_path_LDD+:} false; then :
10163  $as_echo_n "(cached) " >&6
10164else
10165  case $LDD in
10166  [\\/]* | ?:[\\/]*)
10167  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10168  ;;
10169  *)
10170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10171for as_dir in $PATH
10172do
10173  IFS=$as_save_IFS
10174  test -z "$as_dir" && as_dir=.
10175    for ac_exec_ext in '' $ac_executable_extensions; do
10176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10177    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10179    break 2
10180  fi
10181done
10182  done
10183IFS=$as_save_IFS
10184
10185  ;;
10186esac
10187fi
10188LDD=$ac_cv_path_LDD
10189if test -n "$LDD"; then
10190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10191$as_echo "$LDD" >&6; }
10192else
10193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10194$as_echo "no" >&6; }
10195fi
10196
10197
10198if test "x$LDD" = "x"; then
10199    # List shared lib dependencies is used for
10200    # debug output and checking for forbidden dependencies.
10201    # We can build without it.
10202    LDD="true"
10203fi
10204# Extract the first word of "otool", so it can be a program name with args.
10205set dummy otool; ac_word=$2
10206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10207$as_echo_n "checking for $ac_word... " >&6; }
10208if ${ac_cv_path_OTOOL+:} false; then :
10209  $as_echo_n "(cached) " >&6
10210else
10211  case $OTOOL in
10212  [\\/]* | ?:[\\/]*)
10213  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10214  ;;
10215  *)
10216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10217for as_dir in $PATH
10218do
10219  IFS=$as_save_IFS
10220  test -z "$as_dir" && as_dir=.
10221    for ac_exec_ext in '' $ac_executable_extensions; do
10222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10223    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10225    break 2
10226  fi
10227done
10228  done
10229IFS=$as_save_IFS
10230
10231  ;;
10232esac
10233fi
10234OTOOL=$ac_cv_path_OTOOL
10235if test -n "$OTOOL"; then
10236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10237$as_echo "$OTOOL" >&6; }
10238else
10239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
10241fi
10242
10243
10244if test "x$OTOOL" = "x"; then
10245   OTOOL="true"
10246fi
10247for ac_prog in readelf greadelf
10248do
10249  # Extract the first word of "$ac_prog", so it can be a program name with args.
10250set dummy $ac_prog; ac_word=$2
10251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10252$as_echo_n "checking for $ac_word... " >&6; }
10253if ${ac_cv_path_READELF+:} false; then :
10254  $as_echo_n "(cached) " >&6
10255else
10256  case $READELF in
10257  [\\/]* | ?:[\\/]*)
10258  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10259  ;;
10260  *)
10261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10262for as_dir in $PATH
10263do
10264  IFS=$as_save_IFS
10265  test -z "$as_dir" && as_dir=.
10266    for ac_exec_ext in '' $ac_executable_extensions; do
10267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10268    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10270    break 2
10271  fi
10272done
10273  done
10274IFS=$as_save_IFS
10275
10276  ;;
10277esac
10278fi
10279READELF=$ac_cv_path_READELF
10280if test -n "$READELF"; then
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10282$as_echo "$READELF" >&6; }
10283else
10284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285$as_echo "no" >&6; }
10286fi
10287
10288
10289  test -n "$READELF" && break
10290done
10291
10292# Extract the first word of "hg", so it can be a program name with args.
10293set dummy hg; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_HG+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $HG in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322HG=$ac_cv_path_HG
10323if test -n "$HG"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10325$as_echo "$HG" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332# Extract the first word of "stat", so it can be a program name with args.
10333set dummy stat; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_STAT+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $STAT in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362STAT=$ac_cv_path_STAT
10363if test -n "$STAT"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10365$as_echo "$STAT" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372# Extract the first word of "time", so it can be a program name with args.
10373set dummy time; ac_word=$2
10374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10375$as_echo_n "checking for $ac_word... " >&6; }
10376if ${ac_cv_path_TIME+:} false; then :
10377  $as_echo_n "(cached) " >&6
10378else
10379  case $TIME in
10380  [\\/]* | ?:[\\/]*)
10381  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10382  ;;
10383  *)
10384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10385for as_dir in $PATH
10386do
10387  IFS=$as_save_IFS
10388  test -z "$as_dir" && as_dir=.
10389    for ac_exec_ext in '' $ac_executable_extensions; do
10390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10391    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10393    break 2
10394  fi
10395done
10396  done
10397IFS=$as_save_IFS
10398
10399  ;;
10400esac
10401fi
10402TIME=$ac_cv_path_TIME
10403if test -n "$TIME"; then
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10405$as_echo "$TIME" >&6; }
10406else
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408$as_echo "no" >&6; }
10409fi
10410
10411
10412# Check if it's GNU time
10413IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10414if test "x$IS_GNU_TIME" != x; then
10415  IS_GNU_TIME=yes
10416else
10417  IS_GNU_TIME=no
10418fi
10419
10420
10421if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10422
10423    for ac_prog in comm
10424do
10425  # Extract the first word of "$ac_prog", so it can be a program name with args.
10426set dummy $ac_prog; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
10429if ${ac_cv_path_COMM+:} false; then :
10430  $as_echo_n "(cached) " >&6
10431else
10432  case $COMM in
10433  [\\/]* | ?:[\\/]*)
10434  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10435  ;;
10436  *)
10437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440  IFS=$as_save_IFS
10441  test -z "$as_dir" && as_dir=.
10442    for ac_exec_ext in '' $ac_executable_extensions; do
10443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10444    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446    break 2
10447  fi
10448done
10449  done
10450IFS=$as_save_IFS
10451
10452  ;;
10453esac
10454fi
10455COMM=$ac_cv_path_COMM
10456if test -n "$COMM"; then
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10458$as_echo "$COMM" >&6; }
10459else
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
10462fi
10463
10464
10465  test -n "$COMM" && break
10466done
10467
10468
10469    if test "x$COMM" = x; then
10470        if test "xcomm" = x; then
10471          PROG_NAME=comm
10472        else
10473          PROG_NAME=comm
10474        fi
10475        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10476$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10477        as_fn_error $? "Cannot continue" "$LINENO" 5
10478    fi
10479
10480
10481fi
10482
10483if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10484
10485    for ac_prog in xattr
10486do
10487  # Extract the first word of "$ac_prog", so it can be a program name with args.
10488set dummy $ac_prog; ac_word=$2
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10490$as_echo_n "checking for $ac_word... " >&6; }
10491if ${ac_cv_path_XATTR+:} false; then :
10492  $as_echo_n "(cached) " >&6
10493else
10494  case $XATTR in
10495  [\\/]* | ?:[\\/]*)
10496  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10497  ;;
10498  *)
10499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10500for as_dir in $PATH
10501do
10502  IFS=$as_save_IFS
10503  test -z "$as_dir" && as_dir=.
10504    for ac_exec_ext in '' $ac_executable_extensions; do
10505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10506    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10508    break 2
10509  fi
10510done
10511  done
10512IFS=$as_save_IFS
10513
10514  ;;
10515esac
10516fi
10517XATTR=$ac_cv_path_XATTR
10518if test -n "$XATTR"; then
10519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10520$as_echo "$XATTR" >&6; }
10521else
10522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10523$as_echo "no" >&6; }
10524fi
10525
10526
10527  test -n "$XATTR" && break
10528done
10529
10530
10531    if test "x$XATTR" = x; then
10532        if test "xxattr" = x; then
10533          PROG_NAME=xattr
10534        else
10535          PROG_NAME=xattr
10536        fi
10537        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10538$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10539        as_fn_error $? "Cannot continue" "$LINENO" 5
10540    fi
10541
10542
10543  # Extract the first word of "codesign", so it can be a program name with args.
10544set dummy codesign; ac_word=$2
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10546$as_echo_n "checking for $ac_word... " >&6; }
10547if ${ac_cv_path_CODESIGN+:} false; then :
10548  $as_echo_n "(cached) " >&6
10549else
10550  case $CODESIGN in
10551  [\\/]* | ?:[\\/]*)
10552  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10553  ;;
10554  *)
10555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570  ;;
10571esac
10572fi
10573CODESIGN=$ac_cv_path_CODESIGN
10574if test -n "$CODESIGN"; then
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10576$as_echo "$CODESIGN" >&6; }
10577else
10578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580fi
10581
10582
10583  if test "x$CODESIGN" != "x"; then
10584    # Verify that the openjdk_codesign certificate is present
10585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10586$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10587    rm -f codesign-testfile
10588    touch codesign-testfile
10589    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10590    rm -f codesign-testfile
10591    if test "x$CODESIGN" = x; then
10592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10593$as_echo "no" >&6; }
10594    else
10595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10596$as_echo "yes" >&6; }
10597    fi
10598  fi
10599fi
10600
10601
10602# Check if pkg-config is available.
10603
10604
10605if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10606	if test -n "$ac_tool_prefix"; then
10607  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10608set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10610$as_echo_n "checking for $ac_word... " >&6; }
10611if ${ac_cv_path_PKG_CONFIG+:} false; then :
10612  $as_echo_n "(cached) " >&6
10613else
10614  case $PKG_CONFIG in
10615  [\\/]* | ?:[\\/]*)
10616  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10617  ;;
10618  *)
10619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10620for as_dir in $PATH
10621do
10622  IFS=$as_save_IFS
10623  test -z "$as_dir" && as_dir=.
10624    for ac_exec_ext in '' $ac_executable_extensions; do
10625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10626    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10628    break 2
10629  fi
10630done
10631  done
10632IFS=$as_save_IFS
10633
10634  ;;
10635esac
10636fi
10637PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10638if test -n "$PKG_CONFIG"; then
10639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10640$as_echo "$PKG_CONFIG" >&6; }
10641else
10642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10643$as_echo "no" >&6; }
10644fi
10645
10646
10647fi
10648if test -z "$ac_cv_path_PKG_CONFIG"; then
10649  ac_pt_PKG_CONFIG=$PKG_CONFIG
10650  # Extract the first word of "pkg-config", so it can be a program name with args.
10651set dummy pkg-config; ac_word=$2
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653$as_echo_n "checking for $ac_word... " >&6; }
10654if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10655  $as_echo_n "(cached) " >&6
10656else
10657  case $ac_pt_PKG_CONFIG in
10658  [\\/]* | ?:[\\/]*)
10659  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10660  ;;
10661  *)
10662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663for as_dir in $PATH
10664do
10665  IFS=$as_save_IFS
10666  test -z "$as_dir" && as_dir=.
10667    for ac_exec_ext in '' $ac_executable_extensions; do
10668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671    break 2
10672  fi
10673done
10674  done
10675IFS=$as_save_IFS
10676
10677  ;;
10678esac
10679fi
10680ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10681if test -n "$ac_pt_PKG_CONFIG"; then
10682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10683$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10684else
10685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687fi
10688
10689  if test "x$ac_pt_PKG_CONFIG" = x; then
10690    PKG_CONFIG=""
10691  else
10692    case $cross_compiling:$ac_tool_warned in
10693yes:)
10694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10696ac_tool_warned=yes ;;
10697esac
10698    PKG_CONFIG=$ac_pt_PKG_CONFIG
10699  fi
10700else
10701  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10702fi
10703
10704fi
10705if test -n "$PKG_CONFIG"; then
10706	_pkg_min_version=0.9.0
10707	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10708$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10709	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10710		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10711$as_echo "yes" >&6; }
10712	else
10713		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
10715		PKG_CONFIG=""
10716	fi
10717
10718fi
10719
10720# After basic tools have been setup, we can check build os specific details.
10721
10722###############################################################################
10723
10724# Note that this is the build platform OS version!
10725
10726OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10727OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10728OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10729OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10730
10731
10732
10733
10734
10735# Setup builddeps, for automatic downloading of tools we need.
10736# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10737# boot-jdk setup, but we need to have basic tools setup first.
10738
10739
10740# Check whether --with-builddeps-conf was given.
10741if test "${with_builddeps_conf+set}" = set; then :
10742  withval=$with_builddeps_conf;
10743fi
10744
10745
10746
10747# Check whether --with-builddeps-server was given.
10748if test "${with_builddeps_server+set}" = set; then :
10749  withval=$with_builddeps_server;
10750fi
10751
10752
10753
10754# Check whether --with-builddeps-dir was given.
10755if test "${with_builddeps_dir+set}" = set; then :
10756  withval=$with_builddeps_dir;
10757else
10758  with_builddeps_dir=/localhome/builddeps
10759fi
10760
10761
10762
10763# Check whether --with-builddeps-group was given.
10764if test "${with_builddeps_group+set}" = set; then :
10765  withval=$with_builddeps_group;
10766fi
10767
10768
10769
10770
10771    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10772        if test "x$with_builddeps_conf" != x; then
10773            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10774$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10775            builddepsfile=$with_builddeps_conf
10776            if test -s $builddepsfile; then
10777                . $builddepsfile
10778                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10779$as_echo "loaded!" >&6; }
10780            else
10781               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10782           fi
10783        else
10784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10785$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10786            builddepsfile=`mktemp`
10787            touch $builddepsfile
10788            # Put all found confs into a single file.
10789            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10790            # Source the file to acquire the variables
10791            if test -s $builddepsfile; then
10792                . $builddepsfile
10793                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10794$as_echo "found at least one!" >&6; }
10795            else
10796               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10797           fi
10798        fi
10799        # Create build and target names that use _ instead of "-" and ".".
10800        # This is necessary to use them in variable names.
10801        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10802        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10803        # Extract rewrite information for build and target
10804        eval rewritten_build=\${REWRITE_${build_var}}
10805        if test "x$rewritten_build" = x; then
10806            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10807            echo Build stays the same $rewritten_build
10808        else
10809            echo Rewriting build for builddeps into $rewritten_build
10810        fi
10811        eval rewritten_target=\${REWRITE_${target_var}}
10812        if test "x$rewritten_target" = x; then
10813            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10814            echo Target stays the same $rewritten_target
10815        else
10816            echo Rewriting target for builddeps into $rewritten_target
10817        fi
10818        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10819        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10820    fi
10821    for ac_prog in 7z unzip
10822do
10823  # Extract the first word of "$ac_prog", so it can be a program name with args.
10824set dummy $ac_prog; ac_word=$2
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10826$as_echo_n "checking for $ac_word... " >&6; }
10827if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10828  $as_echo_n "(cached) " >&6
10829else
10830  if test -n "$BDEPS_UNZIP"; then
10831  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10832else
10833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10834for as_dir in $PATH
10835do
10836  IFS=$as_save_IFS
10837  test -z "$as_dir" && as_dir=.
10838    for ac_exec_ext in '' $ac_executable_extensions; do
10839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10840    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10842    break 2
10843  fi
10844done
10845  done
10846IFS=$as_save_IFS
10847
10848fi
10849fi
10850BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10851if test -n "$BDEPS_UNZIP"; then
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10853$as_echo "$BDEPS_UNZIP" >&6; }
10854else
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856$as_echo "no" >&6; }
10857fi
10858
10859
10860  test -n "$BDEPS_UNZIP" && break
10861done
10862
10863    if test "x$BDEPS_UNZIP" = x7z; then
10864        BDEPS_UNZIP="7z x"
10865    fi
10866
10867    for ac_prog in wget lftp ftp
10868do
10869  # Extract the first word of "$ac_prog", so it can be a program name with args.
10870set dummy $ac_prog; ac_word=$2
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10872$as_echo_n "checking for $ac_word... " >&6; }
10873if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10874  $as_echo_n "(cached) " >&6
10875else
10876  if test -n "$BDEPS_FTP"; then
10877  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10878else
10879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10880for as_dir in $PATH
10881do
10882  IFS=$as_save_IFS
10883  test -z "$as_dir" && as_dir=.
10884    for ac_exec_ext in '' $ac_executable_extensions; do
10885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10886    ac_cv_prog_BDEPS_FTP="$ac_prog"
10887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10888    break 2
10889  fi
10890done
10891  done
10892IFS=$as_save_IFS
10893
10894fi
10895fi
10896BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10897if test -n "$BDEPS_FTP"; then
10898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10899$as_echo "$BDEPS_FTP" >&6; }
10900else
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902$as_echo "no" >&6; }
10903fi
10904
10905
10906  test -n "$BDEPS_FTP" && break
10907done
10908
10909
10910
10911###############################################################################
10912#
10913# Determine OpenJDK variants, options and version numbers.
10914#
10915###############################################################################
10916
10917# We need build & target for this.
10918
10919
10920###############################################################################
10921#
10922# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10923# We always build headless support.
10924#
10925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10926$as_echo_n "checking headful support... " >&6; }
10927# Check whether --enable-headful was given.
10928if test "${enable_headful+set}" = set; then :
10929  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10930else
10931  SUPPORT_HEADFUL=yes
10932fi
10933
10934
10935SUPPORT_HEADLESS=yes
10936BUILD_HEADLESS="BUILD_HEADLESS:=true"
10937
10938if test "x$SUPPORT_HEADFUL" = xyes; then
10939    # We are building both headful and headless.
10940    headful_msg="inlude support for both headful and headless"
10941fi
10942
10943if test "x$SUPPORT_HEADFUL" = xno; then
10944    # Thus we are building headless only.
10945    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10946    headful_msg="headless only"
10947fi
10948
10949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10950$as_echo "$headful_msg" >&6; }
10951
10952
10953
10954
10955
10956# Control wether Hotspot runs Queens test after build.
10957# Check whether --enable-hotspot-test-in-build was given.
10958if test "${enable_hotspot_test_in_build+set}" = set; then :
10959  enableval=$enable_hotspot_test_in_build;
10960else
10961  enable_hotspot_test_in_build=no
10962fi
10963
10964if test "x$enable_hotspot_test_in_build" = "xyes"; then
10965    TEST_IN_BUILD=true
10966else
10967    TEST_IN_BUILD=false
10968fi
10969
10970
10971###############################################################################
10972#
10973# Choose cacerts source file
10974#
10975
10976# Check whether --with-cacerts-file was given.
10977if test "${with_cacerts_file+set}" = set; then :
10978  withval=$with_cacerts_file;
10979fi
10980
10981if test "x$with_cacerts_file" != x; then
10982    CACERTS_FILE=$with_cacerts_file
10983else
10984    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10985fi
10986
10987
10988###############################################################################
10989#
10990# Enable or disable unlimited crypto
10991#
10992# Check whether --enable-unlimited-crypto was given.
10993if test "${enable_unlimited_crypto+set}" = set; then :
10994  enableval=$enable_unlimited_crypto;
10995else
10996  enable_unlimited_crypto=no
10997fi
10998
10999if test "x$enable_unlimited_crypto" = "xyes"; then
11000    UNLIMITED_CRYPTO=true
11001else
11002    UNLIMITED_CRYPTO=false
11003fi
11004
11005
11006###############################################################################
11007#
11008# Enable or disable the elliptic curve crypto implementation
11009#
11010
11011
11012###############################################################################
11013#
11014# Compress jars
11015#
11016COMPRESS_JARS=false
11017
11018
11019
11020
11021# Source the version numbers
11022. $AUTOCONF_DIR/version-numbers
11023
11024# Get the settings from parameters
11025
11026# Check whether --with-milestone was given.
11027if test "${with_milestone+set}" = set; then :
11028  withval=$with_milestone;
11029fi
11030
11031if test "x$with_milestone" = xyes; then
11032  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11033elif test "x$with_milestone" != x; then
11034    MILESTONE="$with_milestone"
11035fi
11036if test "x$MILESTONE" = x; then
11037  MILESTONE=internal
11038fi
11039
11040
11041# Check whether --with-update-version was given.
11042if test "${with_update_version+set}" = set; then :
11043  withval=$with_update_version;
11044fi
11045
11046if test "x$with_update_version" = xyes; then
11047  as_fn_error $? "Update version must have a value" "$LINENO" 5
11048elif test "x$with_update_version" != x; then
11049  JDK_UPDATE_VERSION="$with_update_version"
11050fi
11051
11052
11053# Check whether --with-build-number was given.
11054if test "${with_build_number+set}" = set; then :
11055  withval=$with_build_number;
11056fi
11057
11058if test "x$with_build_number" = xyes; then
11059  as_fn_error $? "Build number must have a value" "$LINENO" 5
11060elif test "x$with_build_number" != x; then
11061  JDK_BUILD_NUMBER="$with_build_number"
11062fi
11063if test "x$JDK_BUILD_NUMBER" = x; then
11064  JDK_BUILD_NUMBER=b00
11065fi
11066
11067
11068# Check whether --with-user-release-suffix was given.
11069if test "${with_user_release_suffix+set}" = set; then :
11070  withval=$with_user_release_suffix;
11071fi
11072
11073if test "x$with_user_release_suffix" = xyes; then
11074  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11075elif test "x$with_user_release_suffix" != x; then
11076  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11077else
11078  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11079  # Avoid [:alnum:] since it depends on the locale.
11080  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11081  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11082fi
11083
11084
11085# Now set the JDK version, milestone, build number etc.
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100COPYRIGHT_YEAR=`date +'%Y'`
11101
11102
11103if test "x$JDK_UPDATE_VERSION" != x; then
11104  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11105else
11106  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11107fi
11108
11109
11110COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11111
11112
11113
11114###############################################################################
11115#
11116# Setup BootJDK, used to bootstrap the build.
11117#
11118###############################################################################
11119
11120
11121BOOT_JDK_FOUND=no
11122
11123# Check whether --with-boot-jdk was given.
11124if test "${with_boot_jdk+set}" = set; then :
11125  withval=$with_boot_jdk;
11126fi
11127
11128
11129# We look for the Boot JDK through various means, going from more certain to
11130# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11131# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11132# must check if this is indeed valid; otherwise we'll continue looking.
11133
11134# Test: Is bootjdk explicitely set by command line arguments?
11135
11136  if test "x$BOOT_JDK_FOUND" = xno; then
11137    # Now execute the test
11138
11139if test "x$with_boot_jdk" != x; then
11140    BOOT_JDK=$with_boot_jdk
11141    BOOT_JDK_FOUND=maybe
11142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11143$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11144fi
11145
11146
11147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11149      # Do we have a bin/java?
11150      if test ! -x "$BOOT_JDK/bin/java"; then
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11153        BOOT_JDK_FOUND=no
11154      else
11155        # Do we have a bin/javac?
11156        if test ! -x "$BOOT_JDK/bin/javac"; then
11157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11161          BOOT_JDK_FOUND=no
11162        else
11163          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11164          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11167            BOOT_JDK_FOUND=no
11168          else
11169            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11170            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11171
11172            # Extra M4 quote needed to protect [] in grep expression.
11173            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11174            if test "x$FOUND_VERSION_78" = x; then
11175              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11177              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11178$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11179              BOOT_JDK_FOUND=no
11180            else
11181              # We're done! :-)
11182              BOOT_JDK_FOUND=yes
11183
11184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11185
11186  # Input might be given as Windows format, start by converting to
11187  # unix format.
11188  path="$BOOT_JDK"
11189  new_path=`$CYGPATH -u "$path"`
11190
11191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11194  # "foo.exe" is OK but "foo" is an error.
11195  #
11196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11197  # It is also a way to make sure we got the proper file name for the real test later on.
11198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11199  if test "x$test_shortpath" = x; then
11200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11203  fi
11204
11205  # Call helper function which possibly converts this using DOS-style short mode.
11206  # If so, the updated path is stored in $new_path.
11207
11208  input_path="$new_path"
11209  # Check if we need to convert this using DOS-style short mode. If the path
11210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11211  # take no chances and rewrite it.
11212  # Note: m4 eats our [], so we need to use [ and ] instead.
11213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11214  if test "x$has_forbidden_chars" != x; then
11215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11219      # Going to short mode and back again did indeed matter. Since short mode is
11220      # case insensitive, let's make it lowercase to improve readability.
11221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11222      # Now convert it back to Unix-stile (cygpath)
11223      input_path=`$CYGPATH -u "$shortmode_path"`
11224      new_path="$input_path"
11225    fi
11226  fi
11227
11228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11229  if test "x$test_cygdrive_prefix" = x; then
11230    # As a simple fix, exclude /usr/bin since it's not a real path.
11231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11233      # a path prefixed by /cygdrive for fixpath to work.
11234      new_path="$CYGWIN_ROOT_PATH$input_path"
11235    fi
11236  fi
11237
11238
11239  if test "x$path" != "x$new_path"; then
11240    BOOT_JDK="$new_path"
11241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11243  fi
11244
11245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11246
11247  path="$BOOT_JDK"
11248  has_colon=`$ECHO $path | $GREP ^.:`
11249  new_path="$path"
11250  if test "x$has_colon" = x; then
11251    # Not in mixed or Windows style, start by that.
11252    new_path=`cmd //c echo $path`
11253  fi
11254
11255
11256  input_path="$new_path"
11257  # Check if we need to convert this using DOS-style short mode. If the path
11258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11259  # take no chances and rewrite it.
11260  # Note: m4 eats our [], so we need to use [ and ] instead.
11261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11262  if test "x$has_forbidden_chars" != x; then
11263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11265  fi
11266
11267
11268  windows_path="$new_path"
11269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11270    unix_path=`$CYGPATH -u "$windows_path"`
11271    new_path="$unix_path"
11272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11274    new_path="$unix_path"
11275  fi
11276
11277  if test "x$path" != "x$new_path"; then
11278    BOOT_JDK="$new_path"
11279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11281  fi
11282
11283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11285
11286  else
11287    # We're on a posix platform. Hooray! :)
11288    path="$BOOT_JDK"
11289    has_space=`$ECHO "$path" | $GREP " "`
11290    if test "x$has_space" != x; then
11291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11293      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11294    fi
11295
11296    # Use eval to expand a potential ~
11297    eval path="$path"
11298    if test ! -f "$path" && test ! -d "$path"; then
11299      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11300    fi
11301
11302    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11303  fi
11304
11305              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11306$as_echo_n "checking for Boot JDK... " >&6; }
11307              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11308$as_echo "$BOOT_JDK" >&6; }
11309              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11310$as_echo_n "checking Boot JDK version... " >&6; }
11311              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11312              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11313$as_echo "$BOOT_JDK_VERSION" >&6; }
11314            fi # end check jdk version
11315          fi # end check rt.jar
11316        fi # end check javac
11317      fi # end check java
11318    fi # end check boot jdk found
11319  fi
11320
11321if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11322  # Having specified an argument which is incorrect will produce an instant failure;
11323  # we should not go on looking
11324  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11325fi
11326
11327# Test: Is bootjdk available from builddeps?
11328
11329  if test "x$BOOT_JDK_FOUND" = xno; then
11330    # Now execute the test
11331
11332
11333
11334    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11335        # Source the builddeps file again, to make sure it uses the latest variables!
11336        . $builddepsfile
11337        # Look for a target and build machine specific resource!
11338        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11339        if test "x$resource" = x; then
11340            # Ok, lets instead look for a target specific resource
11341            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11342        fi
11343        if test "x$resource" = x; then
11344            # Ok, lets instead look for a build specific resource
11345            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11346        fi
11347        if test "x$resource" = x; then
11348            # Ok, lets instead look for a generic resource
11349            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11350            resource=${builddep_bootjdk}
11351        fi
11352        if test "x$resource" != x; then
11353            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11354$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11355	    # If the resource in the builddeps.conf file is an existing directory,
11356	    # for example /java/linux/cups
11357	    if test -d ${resource}; then
11358	       depdir=${resource}
11359	    else
11360
11361# bootjdk is for example mymodule
11362# $resource is for example libs/general/libmymod_1_2_3.zip
11363# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11364# $with_builddeps_dir is for example /localhome/builddeps
11365# depdir is the name of the variable into which we store the depdir, eg MYMOD
11366# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11367# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11368    filename=`basename $resource`
11369    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11370    filebase=${filename%%.*}
11371    extension=${filename#*.}
11372    installdir=$with_builddeps_dir/$filebase
11373    if test ! -f $installdir/$filename.unpacked; then
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11375$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11376        if test ! -d $installdir; then
11377            mkdir -p $installdir
11378        fi
11379        if test ! -d $installdir; then
11380            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11381        fi
11382        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11383        touch $tmpfile
11384        if test ! -f $tmpfile; then
11385            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11386        fi
11387
11388    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11389    # $tmpfile is the local file name for the downloaded file.
11390    VALID_TOOL=no
11391    if test "x$BDEPS_FTP" = xwget; then
11392       VALID_TOOL=yes
11393       wget -O $tmpfile $with_builddeps_server/$resource
11394    fi
11395    if test "x$BDEPS_FTP" = xlftp; then
11396       VALID_TOOL=yes
11397       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11398    fi
11399    if test "x$BDEPS_FTP" = xftp; then
11400        VALID_TOOL=yes
11401        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11402        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11403        FTPUSERPWD=${FTPSERVER%%@*}
11404        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11405            FTPUSER=${userpwd%%:*}
11406            FTPPWD=${userpwd#*@}
11407            FTPSERVER=${FTPSERVER#*@}
11408        else
11409            FTPUSER=ftp
11410            FTPPWD=ftp
11411        fi
11412        # the "pass" command does not work on some
11413        # ftp clients (read ftp.exe) but if it works,
11414        # passive mode is better!
11415        (\
11416            echo "user $FTPUSER $FTPPWD"        ;\
11417            echo "pass"                         ;\
11418            echo "bin"                          ;\
11419            echo "get $FTPPATH $tmpfile"              ;\
11420        ) | ftp -in $FTPSERVER
11421    fi
11422    if test "x$VALID_TOOL" != xyes; then
11423       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11424    fi
11425
11426        mv $tmpfile $installdir/$filename
11427        if test ! -s $installdir/$filename; then
11428            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11429        fi
11430        case "$extension" in
11431            zip)  echo "Unzipping $installdir/$filename..."
11432               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11433            ;;
11434            tar.gz) echo "Untaring $installdir/$filename..."
11435               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11436            ;;
11437            tgz) echo "Untaring $installdir/$filename..."
11438               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11439            ;;
11440            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11441            ;;
11442        esac
11443    fi
11444    if test -f $installdir/$filename.unpacked; then
11445        depdir=$installdir
11446    fi
11447
11448	    fi
11449            # Source the builddeps file again, because in the previous command, the depdir
11450            # was updated to point at the current build dependency install directory.
11451            . $builddepsfile
11452            # Now extract variables from the builddeps.conf files.
11453            theroot=${builddep_bootjdk_ROOT}
11454            thecflags=${builddep_bootjdk_CFLAGS}
11455            thelibs=${builddep_bootjdk_LIBS}
11456            if test "x$depdir" = x; then
11457                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11458            fi
11459            BOOT_JDK=$depdir
11460            if test "x$theroot" != x; then
11461               BOOT_JDK="$theroot"
11462            fi
11463            if test "x$thecflags" != x; then
11464               BOOT_JDK_CFLAGS="$thecflags"
11465            fi
11466            if test "x$thelibs" != x; then
11467               BOOT_JDK_LIBS="$thelibs"
11468            fi
11469            BOOT_JDK_FOUND=maybe
11470            else BOOT_JDK_FOUND=no
11471
11472        fi
11473        else BOOT_JDK_FOUND=no
11474
11475    fi
11476
11477
11478
11479    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11480    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11481      # Do we have a bin/java?
11482      if test ! -x "$BOOT_JDK/bin/java"; then
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11485        BOOT_JDK_FOUND=no
11486      else
11487        # Do we have a bin/javac?
11488        if test ! -x "$BOOT_JDK/bin/javac"; then
11489          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11491          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11492$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11493          BOOT_JDK_FOUND=no
11494        else
11495          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11496          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11497            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11499            BOOT_JDK_FOUND=no
11500          else
11501            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11502            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11503
11504            # Extra M4 quote needed to protect [] in grep expression.
11505            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11506            if test "x$FOUND_VERSION_78" = x; then
11507              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11509              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11510$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11511              BOOT_JDK_FOUND=no
11512            else
11513              # We're done! :-)
11514              BOOT_JDK_FOUND=yes
11515
11516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11517
11518  # Input might be given as Windows format, start by converting to
11519  # unix format.
11520  path="$BOOT_JDK"
11521  new_path=`$CYGPATH -u "$path"`
11522
11523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11526  # "foo.exe" is OK but "foo" is an error.
11527  #
11528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11529  # It is also a way to make sure we got the proper file name for the real test later on.
11530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11531  if test "x$test_shortpath" = x; then
11532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11534    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11535  fi
11536
11537  # Call helper function which possibly converts this using DOS-style short mode.
11538  # If so, the updated path is stored in $new_path.
11539
11540  input_path="$new_path"
11541  # Check if we need to convert this using DOS-style short mode. If the path
11542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11543  # take no chances and rewrite it.
11544  # Note: m4 eats our [], so we need to use [ and ] instead.
11545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11546  if test "x$has_forbidden_chars" != x; then
11547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11551      # Going to short mode and back again did indeed matter. Since short mode is
11552      # case insensitive, let's make it lowercase to improve readability.
11553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11554      # Now convert it back to Unix-stile (cygpath)
11555      input_path=`$CYGPATH -u "$shortmode_path"`
11556      new_path="$input_path"
11557    fi
11558  fi
11559
11560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11561  if test "x$test_cygdrive_prefix" = x; then
11562    # As a simple fix, exclude /usr/bin since it's not a real path.
11563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11565      # a path prefixed by /cygdrive for fixpath to work.
11566      new_path="$CYGWIN_ROOT_PATH$input_path"
11567    fi
11568  fi
11569
11570
11571  if test "x$path" != "x$new_path"; then
11572    BOOT_JDK="$new_path"
11573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11575  fi
11576
11577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11578
11579  path="$BOOT_JDK"
11580  has_colon=`$ECHO $path | $GREP ^.:`
11581  new_path="$path"
11582  if test "x$has_colon" = x; then
11583    # Not in mixed or Windows style, start by that.
11584    new_path=`cmd //c echo $path`
11585  fi
11586
11587
11588  input_path="$new_path"
11589  # Check if we need to convert this using DOS-style short mode. If the path
11590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11591  # take no chances and rewrite it.
11592  # Note: m4 eats our [], so we need to use [ and ] instead.
11593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11594  if test "x$has_forbidden_chars" != x; then
11595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11597  fi
11598
11599
11600  windows_path="$new_path"
11601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11602    unix_path=`$CYGPATH -u "$windows_path"`
11603    new_path="$unix_path"
11604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11606    new_path="$unix_path"
11607  fi
11608
11609  if test "x$path" != "x$new_path"; then
11610    BOOT_JDK="$new_path"
11611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11613  fi
11614
11615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11617
11618  else
11619    # We're on a posix platform. Hooray! :)
11620    path="$BOOT_JDK"
11621    has_space=`$ECHO "$path" | $GREP " "`
11622    if test "x$has_space" != x; then
11623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11625      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11626    fi
11627
11628    # Use eval to expand a potential ~
11629    eval path="$path"
11630    if test ! -f "$path" && test ! -d "$path"; then
11631      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11632    fi
11633
11634    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11635  fi
11636
11637              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11638$as_echo_n "checking for Boot JDK... " >&6; }
11639              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11640$as_echo "$BOOT_JDK" >&6; }
11641              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11642$as_echo_n "checking Boot JDK version... " >&6; }
11643              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11644              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11645$as_echo "$BOOT_JDK_VERSION" >&6; }
11646            fi # end check jdk version
11647          fi # end check rt.jar
11648        fi # end check javac
11649      fi # end check java
11650    fi # end check boot jdk found
11651  fi
11652
11653
11654# Test: Is $JAVA_HOME set?
11655
11656  if test "x$BOOT_JDK_FOUND" = xno; then
11657    # Now execute the test
11658
11659    if test "x$JAVA_HOME" != x; then
11660        JAVA_HOME_PROCESSED="$JAVA_HOME"
11661
11662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11663
11664  # Input might be given as Windows format, start by converting to
11665  # unix format.
11666  path="$JAVA_HOME_PROCESSED"
11667  new_path=`$CYGPATH -u "$path"`
11668
11669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11672  # "foo.exe" is OK but "foo" is an error.
11673  #
11674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11675  # It is also a way to make sure we got the proper file name for the real test later on.
11676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11677  if test "x$test_shortpath" = x; then
11678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11679$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11680    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11681  fi
11682
11683  # Call helper function which possibly converts this using DOS-style short mode.
11684  # If so, the updated path is stored in $new_path.
11685
11686  input_path="$new_path"
11687  # Check if we need to convert this using DOS-style short mode. If the path
11688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11689  # take no chances and rewrite it.
11690  # Note: m4 eats our [], so we need to use [ and ] instead.
11691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11692  if test "x$has_forbidden_chars" != x; then
11693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11697      # Going to short mode and back again did indeed matter. Since short mode is
11698      # case insensitive, let's make it lowercase to improve readability.
11699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11700      # Now convert it back to Unix-stile (cygpath)
11701      input_path=`$CYGPATH -u "$shortmode_path"`
11702      new_path="$input_path"
11703    fi
11704  fi
11705
11706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11707  if test "x$test_cygdrive_prefix" = x; then
11708    # As a simple fix, exclude /usr/bin since it's not a real path.
11709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11711      # a path prefixed by /cygdrive for fixpath to work.
11712      new_path="$CYGWIN_ROOT_PATH$input_path"
11713    fi
11714  fi
11715
11716
11717  if test "x$path" != "x$new_path"; then
11718    JAVA_HOME_PROCESSED="$new_path"
11719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11720$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11721  fi
11722
11723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11724
11725  path="$JAVA_HOME_PROCESSED"
11726  has_colon=`$ECHO $path | $GREP ^.:`
11727  new_path="$path"
11728  if test "x$has_colon" = x; then
11729    # Not in mixed or Windows style, start by that.
11730    new_path=`cmd //c echo $path`
11731  fi
11732
11733
11734  input_path="$new_path"
11735  # Check if we need to convert this using DOS-style short mode. If the path
11736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11737  # take no chances and rewrite it.
11738  # Note: m4 eats our [], so we need to use [ and ] instead.
11739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11740  if test "x$has_forbidden_chars" != x; then
11741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11743  fi
11744
11745
11746  windows_path="$new_path"
11747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11748    unix_path=`$CYGPATH -u "$windows_path"`
11749    new_path="$unix_path"
11750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11752    new_path="$unix_path"
11753  fi
11754
11755  if test "x$path" != "x$new_path"; then
11756    JAVA_HOME_PROCESSED="$new_path"
11757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11758$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11759  fi
11760
11761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11763
11764  else
11765    # We're on a posix platform. Hooray! :)
11766    path="$JAVA_HOME_PROCESSED"
11767    has_space=`$ECHO "$path" | $GREP " "`
11768    if test "x$has_space" != x; then
11769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11770$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11772    fi
11773
11774    # Use eval to expand a potential ~
11775    eval path="$path"
11776    if test ! -f "$path" && test ! -d "$path"; then
11777      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11778    fi
11779
11780    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11781  fi
11782
11783        if test ! -d "$JAVA_HOME_PROCESSED"; then
11784            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11785$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11786        else
11787          # Aha, the user has set a JAVA_HOME
11788          # let us use that as the Boot JDK.
11789          BOOT_JDK="$JAVA_HOME_PROCESSED"
11790          BOOT_JDK_FOUND=maybe
11791          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11792$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11793        fi
11794    fi
11795
11796
11797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11799      # Do we have a bin/java?
11800      if test ! -x "$BOOT_JDK/bin/java"; then
11801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11803        BOOT_JDK_FOUND=no
11804      else
11805        # Do we have a bin/javac?
11806        if test ! -x "$BOOT_JDK/bin/javac"; then
11807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11811          BOOT_JDK_FOUND=no
11812        else
11813          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11814          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11815            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11817            BOOT_JDK_FOUND=no
11818          else
11819            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11820            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11821
11822            # Extra M4 quote needed to protect [] in grep expression.
11823            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11824            if test "x$FOUND_VERSION_78" = x; then
11825              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11827              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11828$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11829              BOOT_JDK_FOUND=no
11830            else
11831              # We're done! :-)
11832              BOOT_JDK_FOUND=yes
11833
11834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11835
11836  # Input might be given as Windows format, start by converting to
11837  # unix format.
11838  path="$BOOT_JDK"
11839  new_path=`$CYGPATH -u "$path"`
11840
11841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11844  # "foo.exe" is OK but "foo" is an error.
11845  #
11846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11847  # It is also a way to make sure we got the proper file name for the real test later on.
11848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11849  if test "x$test_shortpath" = x; then
11850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11853  fi
11854
11855  # Call helper function which possibly converts this using DOS-style short mode.
11856  # If so, the updated path is stored in $new_path.
11857
11858  input_path="$new_path"
11859  # Check if we need to convert this using DOS-style short mode. If the path
11860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11861  # take no chances and rewrite it.
11862  # Note: m4 eats our [], so we need to use [ and ] instead.
11863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11864  if test "x$has_forbidden_chars" != x; then
11865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11869      # Going to short mode and back again did indeed matter. Since short mode is
11870      # case insensitive, let's make it lowercase to improve readability.
11871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11872      # Now convert it back to Unix-stile (cygpath)
11873      input_path=`$CYGPATH -u "$shortmode_path"`
11874      new_path="$input_path"
11875    fi
11876  fi
11877
11878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11879  if test "x$test_cygdrive_prefix" = x; then
11880    # As a simple fix, exclude /usr/bin since it's not a real path.
11881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11883      # a path prefixed by /cygdrive for fixpath to work.
11884      new_path="$CYGWIN_ROOT_PATH$input_path"
11885    fi
11886  fi
11887
11888
11889  if test "x$path" != "x$new_path"; then
11890    BOOT_JDK="$new_path"
11891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11893  fi
11894
11895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11896
11897  path="$BOOT_JDK"
11898  has_colon=`$ECHO $path | $GREP ^.:`
11899  new_path="$path"
11900  if test "x$has_colon" = x; then
11901    # Not in mixed or Windows style, start by that.
11902    new_path=`cmd //c echo $path`
11903  fi
11904
11905
11906  input_path="$new_path"
11907  # Check if we need to convert this using DOS-style short mode. If the path
11908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11909  # take no chances and rewrite it.
11910  # Note: m4 eats our [], so we need to use [ and ] instead.
11911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11912  if test "x$has_forbidden_chars" != x; then
11913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11915  fi
11916
11917
11918  windows_path="$new_path"
11919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11920    unix_path=`$CYGPATH -u "$windows_path"`
11921    new_path="$unix_path"
11922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11924    new_path="$unix_path"
11925  fi
11926
11927  if test "x$path" != "x$new_path"; then
11928    BOOT_JDK="$new_path"
11929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11931  fi
11932
11933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11935
11936  else
11937    # We're on a posix platform. Hooray! :)
11938    path="$BOOT_JDK"
11939    has_space=`$ECHO "$path" | $GREP " "`
11940    if test "x$has_space" != x; then
11941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11943      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11944    fi
11945
11946    # Use eval to expand a potential ~
11947    eval path="$path"
11948    if test ! -f "$path" && test ! -d "$path"; then
11949      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11950    fi
11951
11952    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11953  fi
11954
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11956$as_echo_n "checking for Boot JDK... " >&6; }
11957              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11958$as_echo "$BOOT_JDK" >&6; }
11959              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11960$as_echo_n "checking Boot JDK version... " >&6; }
11961              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11962              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11963$as_echo "$BOOT_JDK_VERSION" >&6; }
11964            fi # end check jdk version
11965          fi # end check rt.jar
11966        fi # end check javac
11967      fi # end check java
11968    fi # end check boot jdk found
11969  fi
11970
11971
11972# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11973
11974  if test "x$BOOT_JDK_FOUND" = xno; then
11975    # Now execute the test
11976
11977    if test -x /usr/libexec/java_home; then
11978        BOOT_JDK=`/usr/libexec/java_home`
11979        BOOT_JDK_FOUND=maybe
11980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11981$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11982    fi
11983
11984
11985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11987      # Do we have a bin/java?
11988      if test ! -x "$BOOT_JDK/bin/java"; then
11989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11991        BOOT_JDK_FOUND=no
11992      else
11993        # Do we have a bin/javac?
11994        if test ! -x "$BOOT_JDK/bin/javac"; then
11995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11999          BOOT_JDK_FOUND=no
12000        else
12001          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12002          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12005            BOOT_JDK_FOUND=no
12006          else
12007            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12008            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12009
12010            # Extra M4 quote needed to protect [] in grep expression.
12011            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12012            if test "x$FOUND_VERSION_78" = x; then
12013              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12015              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12016$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12017              BOOT_JDK_FOUND=no
12018            else
12019              # We're done! :-)
12020              BOOT_JDK_FOUND=yes
12021
12022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12023
12024  # Input might be given as Windows format, start by converting to
12025  # unix format.
12026  path="$BOOT_JDK"
12027  new_path=`$CYGPATH -u "$path"`
12028
12029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12032  # "foo.exe" is OK but "foo" is an error.
12033  #
12034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12035  # It is also a way to make sure we got the proper file name for the real test later on.
12036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12037  if test "x$test_shortpath" = x; then
12038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12041  fi
12042
12043  # Call helper function which possibly converts this using DOS-style short mode.
12044  # If so, the updated path is stored in $new_path.
12045
12046  input_path="$new_path"
12047  # Check if we need to convert this using DOS-style short mode. If the path
12048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12049  # take no chances and rewrite it.
12050  # Note: m4 eats our [], so we need to use [ and ] instead.
12051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12052  if test "x$has_forbidden_chars" != x; then
12053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12057      # Going to short mode and back again did indeed matter. Since short mode is
12058      # case insensitive, let's make it lowercase to improve readability.
12059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12060      # Now convert it back to Unix-stile (cygpath)
12061      input_path=`$CYGPATH -u "$shortmode_path"`
12062      new_path="$input_path"
12063    fi
12064  fi
12065
12066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12067  if test "x$test_cygdrive_prefix" = x; then
12068    # As a simple fix, exclude /usr/bin since it's not a real path.
12069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12071      # a path prefixed by /cygdrive for fixpath to work.
12072      new_path="$CYGWIN_ROOT_PATH$input_path"
12073    fi
12074  fi
12075
12076
12077  if test "x$path" != "x$new_path"; then
12078    BOOT_JDK="$new_path"
12079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12081  fi
12082
12083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12084
12085  path="$BOOT_JDK"
12086  has_colon=`$ECHO $path | $GREP ^.:`
12087  new_path="$path"
12088  if test "x$has_colon" = x; then
12089    # Not in mixed or Windows style, start by that.
12090    new_path=`cmd //c echo $path`
12091  fi
12092
12093
12094  input_path="$new_path"
12095  # Check if we need to convert this using DOS-style short mode. If the path
12096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12097  # take no chances and rewrite it.
12098  # Note: m4 eats our [], so we need to use [ and ] instead.
12099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12100  if test "x$has_forbidden_chars" != x; then
12101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12103  fi
12104
12105
12106  windows_path="$new_path"
12107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12108    unix_path=`$CYGPATH -u "$windows_path"`
12109    new_path="$unix_path"
12110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12112    new_path="$unix_path"
12113  fi
12114
12115  if test "x$path" != "x$new_path"; then
12116    BOOT_JDK="$new_path"
12117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12119  fi
12120
12121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12123
12124  else
12125    # We're on a posix platform. Hooray! :)
12126    path="$BOOT_JDK"
12127    has_space=`$ECHO "$path" | $GREP " "`
12128    if test "x$has_space" != x; then
12129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12131      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12132    fi
12133
12134    # Use eval to expand a potential ~
12135    eval path="$path"
12136    if test ! -f "$path" && test ! -d "$path"; then
12137      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12138    fi
12139
12140    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12141  fi
12142
12143              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12144$as_echo_n "checking for Boot JDK... " >&6; }
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12146$as_echo "$BOOT_JDK" >&6; }
12147              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12148$as_echo_n "checking Boot JDK version... " >&6; }
12149              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12151$as_echo "$BOOT_JDK_VERSION" >&6; }
12152            fi # end check jdk version
12153          fi # end check rt.jar
12154        fi # end check javac
12155      fi # end check java
12156    fi # end check boot jdk found
12157  fi
12158
12159
12160# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12161
12162  if test "x$BOOT_JDK_FOUND" = xno; then
12163    # Now execute the test
12164
12165    # Extract the first word of "javac", so it can be a program name with args.
12166set dummy javac; ac_word=$2
12167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12168$as_echo_n "checking for $ac_word... " >&6; }
12169if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12170  $as_echo_n "(cached) " >&6
12171else
12172  case $JAVAC_CHECK in
12173  [\\/]* | ?:[\\/]*)
12174  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12175  ;;
12176  *)
12177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12178for as_dir in $PATH
12179do
12180  IFS=$as_save_IFS
12181  test -z "$as_dir" && as_dir=.
12182    for ac_exec_ext in '' $ac_executable_extensions; do
12183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12184    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12186    break 2
12187  fi
12188done
12189  done
12190IFS=$as_save_IFS
12191
12192  ;;
12193esac
12194fi
12195JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12196if test -n "$JAVAC_CHECK"; then
12197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12198$as_echo "$JAVAC_CHECK" >&6; }
12199else
12200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12201$as_echo "no" >&6; }
12202fi
12203
12204
12205    # Extract the first word of "java", so it can be a program name with args.
12206set dummy java; ac_word=$2
12207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12208$as_echo_n "checking for $ac_word... " >&6; }
12209if ${ac_cv_path_JAVA_CHECK+:} false; then :
12210  $as_echo_n "(cached) " >&6
12211else
12212  case $JAVA_CHECK in
12213  [\\/]* | ?:[\\/]*)
12214  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12215  ;;
12216  *)
12217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12218for as_dir in $PATH
12219do
12220  IFS=$as_save_IFS
12221  test -z "$as_dir" && as_dir=.
12222    for ac_exec_ext in '' $ac_executable_extensions; do
12223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12224    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12226    break 2
12227  fi
12228done
12229  done
12230IFS=$as_save_IFS
12231
12232  ;;
12233esac
12234fi
12235JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12236if test -n "$JAVA_CHECK"; then
12237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12238$as_echo "$JAVA_CHECK" >&6; }
12239else
12240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12241$as_echo "no" >&6; }
12242fi
12243
12244
12245    BINARY="$JAVAC_CHECK"
12246    if test "x$JAVAC_CHECK" = x; then
12247        BINARY="$JAVA_CHECK"
12248    fi
12249    if test "x$BINARY" != x; then
12250        # So there is a java(c) binary, it might be part of a JDK.
12251        # Lets find the JDK/JRE directory by following symbolic links.
12252        # Linux/GNU systems often have links from /usr/bin/java to
12253        # /etc/alternatives/java to the real JDK binary.
12254
12255    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12256        # Follow a chain of symbolic links. Use readlink
12257        # where it exists, else fall back to horribly
12258        # complicated shell code.
12259        if test "x$READLINK_TESTED" != yes; then
12260            # On MacOSX there is a readlink tool with a different
12261            # purpose than the GNU readlink tool. Check the found readlink.
12262            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12263            if test "x$ISGNU" = x; then
12264                 # A readlink that we do not know how to use.
12265                 # Are there other non-GNU readlinks out there?
12266                 READLINK_TESTED=yes
12267                 READLINK=
12268            fi
12269        fi
12270
12271        if test "x$READLINK" != x; then
12272            BINARY=`$READLINK -f $BINARY`
12273        else
12274            # Save the current directory for restoring afterwards
12275            STARTDIR=$PWD
12276            COUNTER=0
12277            sym_link_dir=`$DIRNAME $BINARY`
12278            sym_link_file=`$BASENAME $BINARY`
12279            cd $sym_link_dir
12280            # Use -P flag to resolve symlinks in directories.
12281            cd `$THEPWDCMD -P`
12282            sym_link_dir=`$THEPWDCMD -P`
12283            # Resolve file symlinks
12284            while test $COUNTER -lt 20; do
12285                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12286                if test "x$ISLINK" == x; then
12287                    # This is not a symbolic link! We are done!
12288                    break
12289                fi
12290                # Again resolve directory symlinks since the target of the just found
12291                # link could be in a different directory
12292                cd `$DIRNAME $ISLINK`
12293                sym_link_dir=`$THEPWDCMD -P`
12294                sym_link_file=`$BASENAME $ISLINK`
12295                let COUNTER=COUNTER+1
12296            done
12297            cd $STARTDIR
12298            BINARY=$sym_link_dir/$sym_link_file
12299        fi
12300    fi
12301
12302        BOOT_JDK=`dirname "$BINARY"`
12303        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12304        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12305            # Looks like we found ourselves an JDK
12306            BOOT_JDK_FOUND=maybe
12307            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12308$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12309        fi
12310    fi
12311
12312
12313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12315      # Do we have a bin/java?
12316      if test ! -x "$BOOT_JDK/bin/java"; then
12317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12319        BOOT_JDK_FOUND=no
12320      else
12321        # Do we have a bin/javac?
12322        if test ! -x "$BOOT_JDK/bin/javac"; then
12323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12327          BOOT_JDK_FOUND=no
12328        else
12329          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12330          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12333            BOOT_JDK_FOUND=no
12334          else
12335            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12337
12338            # Extra M4 quote needed to protect [] in grep expression.
12339            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12340            if test "x$FOUND_VERSION_78" = x; then
12341              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12343              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12344$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12345              BOOT_JDK_FOUND=no
12346            else
12347              # We're done! :-)
12348              BOOT_JDK_FOUND=yes
12349
12350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12351
12352  # Input might be given as Windows format, start by converting to
12353  # unix format.
12354  path="$BOOT_JDK"
12355  new_path=`$CYGPATH -u "$path"`
12356
12357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12360  # "foo.exe" is OK but "foo" is an error.
12361  #
12362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12363  # It is also a way to make sure we got the proper file name for the real test later on.
12364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12365  if test "x$test_shortpath" = x; then
12366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12368    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12369  fi
12370
12371  # Call helper function which possibly converts this using DOS-style short mode.
12372  # If so, the updated path is stored in $new_path.
12373
12374  input_path="$new_path"
12375  # Check if we need to convert this using DOS-style short mode. If the path
12376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12377  # take no chances and rewrite it.
12378  # Note: m4 eats our [], so we need to use [ and ] instead.
12379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12380  if test "x$has_forbidden_chars" != x; then
12381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12385      # Going to short mode and back again did indeed matter. Since short mode is
12386      # case insensitive, let's make it lowercase to improve readability.
12387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12388      # Now convert it back to Unix-stile (cygpath)
12389      input_path=`$CYGPATH -u "$shortmode_path"`
12390      new_path="$input_path"
12391    fi
12392  fi
12393
12394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12395  if test "x$test_cygdrive_prefix" = x; then
12396    # As a simple fix, exclude /usr/bin since it's not a real path.
12397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12399      # a path prefixed by /cygdrive for fixpath to work.
12400      new_path="$CYGWIN_ROOT_PATH$input_path"
12401    fi
12402  fi
12403
12404
12405  if test "x$path" != "x$new_path"; then
12406    BOOT_JDK="$new_path"
12407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12409  fi
12410
12411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12412
12413  path="$BOOT_JDK"
12414  has_colon=`$ECHO $path | $GREP ^.:`
12415  new_path="$path"
12416  if test "x$has_colon" = x; then
12417    # Not in mixed or Windows style, start by that.
12418    new_path=`cmd //c echo $path`
12419  fi
12420
12421
12422  input_path="$new_path"
12423  # Check if we need to convert this using DOS-style short mode. If the path
12424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12425  # take no chances and rewrite it.
12426  # Note: m4 eats our [], so we need to use [ and ] instead.
12427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12428  if test "x$has_forbidden_chars" != x; then
12429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12431  fi
12432
12433
12434  windows_path="$new_path"
12435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12436    unix_path=`$CYGPATH -u "$windows_path"`
12437    new_path="$unix_path"
12438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12440    new_path="$unix_path"
12441  fi
12442
12443  if test "x$path" != "x$new_path"; then
12444    BOOT_JDK="$new_path"
12445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12447  fi
12448
12449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12451
12452  else
12453    # We're on a posix platform. Hooray! :)
12454    path="$BOOT_JDK"
12455    has_space=`$ECHO "$path" | $GREP " "`
12456    if test "x$has_space" != x; then
12457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12459      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12460    fi
12461
12462    # Use eval to expand a potential ~
12463    eval path="$path"
12464    if test ! -f "$path" && test ! -d "$path"; then
12465      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12466    fi
12467
12468    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12469  fi
12470
12471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12472$as_echo_n "checking for Boot JDK... " >&6; }
12473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12474$as_echo "$BOOT_JDK" >&6; }
12475              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12476$as_echo_n "checking Boot JDK version... " >&6; }
12477              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12478              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12479$as_echo "$BOOT_JDK_VERSION" >&6; }
12480            fi # end check jdk version
12481          fi # end check rt.jar
12482        fi # end check javac
12483      fi # end check java
12484    fi # end check boot jdk found
12485  fi
12486
12487
12488# Test: Is there a JDK installed in default, well-known locations?
12489
12490  if test "x$BOOT_JDK_FOUND" = xno; then
12491    # Now execute the test
12492
12493  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12494
12495  if test "x$BOOT_JDK_FOUND" = xno; then
12496    # Now execute the test
12497
12498  if test "x$ProgramW6432" != x; then
12499    VIRTUAL_DIR="$ProgramW6432/Java"
12500
12501  windows_path="$VIRTUAL_DIR"
12502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12503    unix_path=`$CYGPATH -u "$windows_path"`
12504    VIRTUAL_DIR="$unix_path"
12505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12507    VIRTUAL_DIR="$unix_path"
12508  fi
12509
12510
12511  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12512  BOOT_JDK_SUFFIX=""
12513  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12514  if test "x$ALL_JDKS_FOUND" != x; then
12515    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12516
12517  if test "x$BOOT_JDK_FOUND" = xno; then
12518    # Now execute the test
12519
12520        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12521        if test -d "$BOOT_JDK"; then
12522          BOOT_JDK_FOUND=maybe
12523          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12524$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12525        fi
12526
12527
12528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12530      # Do we have a bin/java?
12531      if test ! -x "$BOOT_JDK/bin/java"; then
12532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12534        BOOT_JDK_FOUND=no
12535      else
12536        # Do we have a bin/javac?
12537        if test ! -x "$BOOT_JDK/bin/javac"; then
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12542          BOOT_JDK_FOUND=no
12543        else
12544          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12545          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12548            BOOT_JDK_FOUND=no
12549          else
12550            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12552
12553            # Extra M4 quote needed to protect [] in grep expression.
12554            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12555            if test "x$FOUND_VERSION_78" = x; then
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12558              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12559$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12560              BOOT_JDK_FOUND=no
12561            else
12562              # We're done! :-)
12563              BOOT_JDK_FOUND=yes
12564
12565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12566
12567  # Input might be given as Windows format, start by converting to
12568  # unix format.
12569  path="$BOOT_JDK"
12570  new_path=`$CYGPATH -u "$path"`
12571
12572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12575  # "foo.exe" is OK but "foo" is an error.
12576  #
12577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12578  # It is also a way to make sure we got the proper file name for the real test later on.
12579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12580  if test "x$test_shortpath" = x; then
12581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12584  fi
12585
12586  # Call helper function which possibly converts this using DOS-style short mode.
12587  # If so, the updated path is stored in $new_path.
12588
12589  input_path="$new_path"
12590  # Check if we need to convert this using DOS-style short mode. If the path
12591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12592  # take no chances and rewrite it.
12593  # Note: m4 eats our [], so we need to use [ and ] instead.
12594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12595  if test "x$has_forbidden_chars" != x; then
12596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12600      # Going to short mode and back again did indeed matter. Since short mode is
12601      # case insensitive, let's make it lowercase to improve readability.
12602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12603      # Now convert it back to Unix-stile (cygpath)
12604      input_path=`$CYGPATH -u "$shortmode_path"`
12605      new_path="$input_path"
12606    fi
12607  fi
12608
12609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12610  if test "x$test_cygdrive_prefix" = x; then
12611    # As a simple fix, exclude /usr/bin since it's not a real path.
12612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12614      # a path prefixed by /cygdrive for fixpath to work.
12615      new_path="$CYGWIN_ROOT_PATH$input_path"
12616    fi
12617  fi
12618
12619
12620  if test "x$path" != "x$new_path"; then
12621    BOOT_JDK="$new_path"
12622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12624  fi
12625
12626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12627
12628  path="$BOOT_JDK"
12629  has_colon=`$ECHO $path | $GREP ^.:`
12630  new_path="$path"
12631  if test "x$has_colon" = x; then
12632    # Not in mixed or Windows style, start by that.
12633    new_path=`cmd //c echo $path`
12634  fi
12635
12636
12637  input_path="$new_path"
12638  # Check if we need to convert this using DOS-style short mode. If the path
12639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12640  # take no chances and rewrite it.
12641  # Note: m4 eats our [], so we need to use [ and ] instead.
12642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12643  if test "x$has_forbidden_chars" != x; then
12644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12646  fi
12647
12648
12649  windows_path="$new_path"
12650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12651    unix_path=`$CYGPATH -u "$windows_path"`
12652    new_path="$unix_path"
12653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12655    new_path="$unix_path"
12656  fi
12657
12658  if test "x$path" != "x$new_path"; then
12659    BOOT_JDK="$new_path"
12660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12662  fi
12663
12664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12666
12667  else
12668    # We're on a posix platform. Hooray! :)
12669    path="$BOOT_JDK"
12670    has_space=`$ECHO "$path" | $GREP " "`
12671    if test "x$has_space" != x; then
12672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12674      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12675    fi
12676
12677    # Use eval to expand a potential ~
12678    eval path="$path"
12679    if test ! -f "$path" && test ! -d "$path"; then
12680      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12681    fi
12682
12683    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12684  fi
12685
12686              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12687$as_echo_n "checking for Boot JDK... " >&6; }
12688              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12689$as_echo "$BOOT_JDK" >&6; }
12690              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12691$as_echo_n "checking Boot JDK version... " >&6; }
12692              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12693              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12694$as_echo "$BOOT_JDK_VERSION" >&6; }
12695            fi # end check jdk version
12696          fi # end check rt.jar
12697        fi # end check javac
12698      fi # end check java
12699    fi # end check boot jdk found
12700  fi
12701
12702    done
12703  fi
12704
12705  fi
12706
12707
12708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12710      # Do we have a bin/java?
12711      if test ! -x "$BOOT_JDK/bin/java"; then
12712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12714        BOOT_JDK_FOUND=no
12715      else
12716        # Do we have a bin/javac?
12717        if test ! -x "$BOOT_JDK/bin/javac"; then
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12722          BOOT_JDK_FOUND=no
12723        else
12724          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12725          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12728            BOOT_JDK_FOUND=no
12729          else
12730            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12731            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12732
12733            # Extra M4 quote needed to protect [] in grep expression.
12734            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12735            if test "x$FOUND_VERSION_78" = x; then
12736              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12738              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12739$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12740              BOOT_JDK_FOUND=no
12741            else
12742              # We're done! :-)
12743              BOOT_JDK_FOUND=yes
12744
12745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12746
12747  # Input might be given as Windows format, start by converting to
12748  # unix format.
12749  path="$BOOT_JDK"
12750  new_path=`$CYGPATH -u "$path"`
12751
12752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12755  # "foo.exe" is OK but "foo" is an error.
12756  #
12757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12758  # It is also a way to make sure we got the proper file name for the real test later on.
12759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12760  if test "x$test_shortpath" = x; then
12761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12764  fi
12765
12766  # Call helper function which possibly converts this using DOS-style short mode.
12767  # If so, the updated path is stored in $new_path.
12768
12769  input_path="$new_path"
12770  # Check if we need to convert this using DOS-style short mode. If the path
12771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12772  # take no chances and rewrite it.
12773  # Note: m4 eats our [], so we need to use [ and ] instead.
12774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12775  if test "x$has_forbidden_chars" != x; then
12776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12780      # Going to short mode and back again did indeed matter. Since short mode is
12781      # case insensitive, let's make it lowercase to improve readability.
12782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12783      # Now convert it back to Unix-stile (cygpath)
12784      input_path=`$CYGPATH -u "$shortmode_path"`
12785      new_path="$input_path"
12786    fi
12787  fi
12788
12789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12790  if test "x$test_cygdrive_prefix" = x; then
12791    # As a simple fix, exclude /usr/bin since it's not a real path.
12792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12794      # a path prefixed by /cygdrive for fixpath to work.
12795      new_path="$CYGWIN_ROOT_PATH$input_path"
12796    fi
12797  fi
12798
12799
12800  if test "x$path" != "x$new_path"; then
12801    BOOT_JDK="$new_path"
12802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12804  fi
12805
12806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12807
12808  path="$BOOT_JDK"
12809  has_colon=`$ECHO $path | $GREP ^.:`
12810  new_path="$path"
12811  if test "x$has_colon" = x; then
12812    # Not in mixed or Windows style, start by that.
12813    new_path=`cmd //c echo $path`
12814  fi
12815
12816
12817  input_path="$new_path"
12818  # Check if we need to convert this using DOS-style short mode. If the path
12819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12820  # take no chances and rewrite it.
12821  # Note: m4 eats our [], so we need to use [ and ] instead.
12822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12823  if test "x$has_forbidden_chars" != x; then
12824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12826  fi
12827
12828
12829  windows_path="$new_path"
12830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12831    unix_path=`$CYGPATH -u "$windows_path"`
12832    new_path="$unix_path"
12833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12835    new_path="$unix_path"
12836  fi
12837
12838  if test "x$path" != "x$new_path"; then
12839    BOOT_JDK="$new_path"
12840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12842  fi
12843
12844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12846
12847  else
12848    # We're on a posix platform. Hooray! :)
12849    path="$BOOT_JDK"
12850    has_space=`$ECHO "$path" | $GREP " "`
12851    if test "x$has_space" != x; then
12852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12854      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12855    fi
12856
12857    # Use eval to expand a potential ~
12858    eval path="$path"
12859    if test ! -f "$path" && test ! -d "$path"; then
12860      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12861    fi
12862
12863    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12864  fi
12865
12866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12867$as_echo_n "checking for Boot JDK... " >&6; }
12868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12869$as_echo "$BOOT_JDK" >&6; }
12870              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12871$as_echo_n "checking Boot JDK version... " >&6; }
12872              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12874$as_echo "$BOOT_JDK_VERSION" >&6; }
12875            fi # end check jdk version
12876          fi # end check rt.jar
12877        fi # end check javac
12878      fi # end check java
12879    fi # end check boot jdk found
12880  fi
12881
12882
12883  if test "x$BOOT_JDK_FOUND" = xno; then
12884    # Now execute the test
12885
12886  if test "x$PROGRAMW6432" != x; then
12887    VIRTUAL_DIR="$PROGRAMW6432/Java"
12888
12889  windows_path="$VIRTUAL_DIR"
12890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12891    unix_path=`$CYGPATH -u "$windows_path"`
12892    VIRTUAL_DIR="$unix_path"
12893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12895    VIRTUAL_DIR="$unix_path"
12896  fi
12897
12898
12899  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12900  BOOT_JDK_SUFFIX=""
12901  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12902  if test "x$ALL_JDKS_FOUND" != x; then
12903    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12904
12905  if test "x$BOOT_JDK_FOUND" = xno; then
12906    # Now execute the test
12907
12908        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12909        if test -d "$BOOT_JDK"; then
12910          BOOT_JDK_FOUND=maybe
12911          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12912$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12913        fi
12914
12915
12916    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12917    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12918      # Do we have a bin/java?
12919      if test ! -x "$BOOT_JDK/bin/java"; then
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12922        BOOT_JDK_FOUND=no
12923      else
12924        # Do we have a bin/javac?
12925        if test ! -x "$BOOT_JDK/bin/javac"; then
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12929$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12930          BOOT_JDK_FOUND=no
12931        else
12932          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12933          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12934            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12936            BOOT_JDK_FOUND=no
12937          else
12938            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12939            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12940
12941            # Extra M4 quote needed to protect [] in grep expression.
12942            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12943            if test "x$FOUND_VERSION_78" = x; then
12944              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12946              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12947$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12948              BOOT_JDK_FOUND=no
12949            else
12950              # We're done! :-)
12951              BOOT_JDK_FOUND=yes
12952
12953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12954
12955  # Input might be given as Windows format, start by converting to
12956  # unix format.
12957  path="$BOOT_JDK"
12958  new_path=`$CYGPATH -u "$path"`
12959
12960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12963  # "foo.exe" is OK but "foo" is an error.
12964  #
12965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12966  # It is also a way to make sure we got the proper file name for the real test later on.
12967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12968  if test "x$test_shortpath" = x; then
12969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12970$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12971    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12972  fi
12973
12974  # Call helper function which possibly converts this using DOS-style short mode.
12975  # If so, the updated path is stored in $new_path.
12976
12977  input_path="$new_path"
12978  # Check if we need to convert this using DOS-style short mode. If the path
12979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12980  # take no chances and rewrite it.
12981  # Note: m4 eats our [], so we need to use [ and ] instead.
12982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12983  if test "x$has_forbidden_chars" != x; then
12984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12988      # Going to short mode and back again did indeed matter. Since short mode is
12989      # case insensitive, let's make it lowercase to improve readability.
12990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12991      # Now convert it back to Unix-stile (cygpath)
12992      input_path=`$CYGPATH -u "$shortmode_path"`
12993      new_path="$input_path"
12994    fi
12995  fi
12996
12997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12998  if test "x$test_cygdrive_prefix" = x; then
12999    # As a simple fix, exclude /usr/bin since it's not a real path.
13000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13002      # a path prefixed by /cygdrive for fixpath to work.
13003      new_path="$CYGWIN_ROOT_PATH$input_path"
13004    fi
13005  fi
13006
13007
13008  if test "x$path" != "x$new_path"; then
13009    BOOT_JDK="$new_path"
13010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13012  fi
13013
13014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13015
13016  path="$BOOT_JDK"
13017  has_colon=`$ECHO $path | $GREP ^.:`
13018  new_path="$path"
13019  if test "x$has_colon" = x; then
13020    # Not in mixed or Windows style, start by that.
13021    new_path=`cmd //c echo $path`
13022  fi
13023
13024
13025  input_path="$new_path"
13026  # Check if we need to convert this using DOS-style short mode. If the path
13027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13028  # take no chances and rewrite it.
13029  # Note: m4 eats our [], so we need to use [ and ] instead.
13030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13031  if test "x$has_forbidden_chars" != x; then
13032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13034  fi
13035
13036
13037  windows_path="$new_path"
13038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13039    unix_path=`$CYGPATH -u "$windows_path"`
13040    new_path="$unix_path"
13041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13043    new_path="$unix_path"
13044  fi
13045
13046  if test "x$path" != "x$new_path"; then
13047    BOOT_JDK="$new_path"
13048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13050  fi
13051
13052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13054
13055  else
13056    # We're on a posix platform. Hooray! :)
13057    path="$BOOT_JDK"
13058    has_space=`$ECHO "$path" | $GREP " "`
13059    if test "x$has_space" != x; then
13060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13062      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13063    fi
13064
13065    # Use eval to expand a potential ~
13066    eval path="$path"
13067    if test ! -f "$path" && test ! -d "$path"; then
13068      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13069    fi
13070
13071    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13072  fi
13073
13074              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13075$as_echo_n "checking for Boot JDK... " >&6; }
13076              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13077$as_echo "$BOOT_JDK" >&6; }
13078              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13079$as_echo_n "checking Boot JDK version... " >&6; }
13080              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13081              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13082$as_echo "$BOOT_JDK_VERSION" >&6; }
13083            fi # end check jdk version
13084          fi # end check rt.jar
13085        fi # end check javac
13086      fi # end check java
13087    fi # end check boot jdk found
13088  fi
13089
13090    done
13091  fi
13092
13093  fi
13094
13095
13096    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13097    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13098      # Do we have a bin/java?
13099      if test ! -x "$BOOT_JDK/bin/java"; then
13100        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13102        BOOT_JDK_FOUND=no
13103      else
13104        # Do we have a bin/javac?
13105        if test ! -x "$BOOT_JDK/bin/javac"; then
13106          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13108          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13109$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13110          BOOT_JDK_FOUND=no
13111        else
13112          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13113          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13116            BOOT_JDK_FOUND=no
13117          else
13118            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13119            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13120
13121            # Extra M4 quote needed to protect [] in grep expression.
13122            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13123            if test "x$FOUND_VERSION_78" = x; then
13124              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13126              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13127$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13128              BOOT_JDK_FOUND=no
13129            else
13130              # We're done! :-)
13131              BOOT_JDK_FOUND=yes
13132
13133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13134
13135  # Input might be given as Windows format, start by converting to
13136  # unix format.
13137  path="$BOOT_JDK"
13138  new_path=`$CYGPATH -u "$path"`
13139
13140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13143  # "foo.exe" is OK but "foo" is an error.
13144  #
13145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13146  # It is also a way to make sure we got the proper file name for the real test later on.
13147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13148  if test "x$test_shortpath" = x; then
13149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13152  fi
13153
13154  # Call helper function which possibly converts this using DOS-style short mode.
13155  # If so, the updated path is stored in $new_path.
13156
13157  input_path="$new_path"
13158  # Check if we need to convert this using DOS-style short mode. If the path
13159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13160  # take no chances and rewrite it.
13161  # Note: m4 eats our [], so we need to use [ and ] instead.
13162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13163  if test "x$has_forbidden_chars" != x; then
13164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13168      # Going to short mode and back again did indeed matter. Since short mode is
13169      # case insensitive, let's make it lowercase to improve readability.
13170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13171      # Now convert it back to Unix-stile (cygpath)
13172      input_path=`$CYGPATH -u "$shortmode_path"`
13173      new_path="$input_path"
13174    fi
13175  fi
13176
13177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13178  if test "x$test_cygdrive_prefix" = x; then
13179    # As a simple fix, exclude /usr/bin since it's not a real path.
13180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13182      # a path prefixed by /cygdrive for fixpath to work.
13183      new_path="$CYGWIN_ROOT_PATH$input_path"
13184    fi
13185  fi
13186
13187
13188  if test "x$path" != "x$new_path"; then
13189    BOOT_JDK="$new_path"
13190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13192  fi
13193
13194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13195
13196  path="$BOOT_JDK"
13197  has_colon=`$ECHO $path | $GREP ^.:`
13198  new_path="$path"
13199  if test "x$has_colon" = x; then
13200    # Not in mixed or Windows style, start by that.
13201    new_path=`cmd //c echo $path`
13202  fi
13203
13204
13205  input_path="$new_path"
13206  # Check if we need to convert this using DOS-style short mode. If the path
13207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13208  # take no chances and rewrite it.
13209  # Note: m4 eats our [], so we need to use [ and ] instead.
13210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13211  if test "x$has_forbidden_chars" != x; then
13212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13214  fi
13215
13216
13217  windows_path="$new_path"
13218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13219    unix_path=`$CYGPATH -u "$windows_path"`
13220    new_path="$unix_path"
13221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13223    new_path="$unix_path"
13224  fi
13225
13226  if test "x$path" != "x$new_path"; then
13227    BOOT_JDK="$new_path"
13228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13230  fi
13231
13232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13234
13235  else
13236    # We're on a posix platform. Hooray! :)
13237    path="$BOOT_JDK"
13238    has_space=`$ECHO "$path" | $GREP " "`
13239    if test "x$has_space" != x; then
13240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13242      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13243    fi
13244
13245    # Use eval to expand a potential ~
13246    eval path="$path"
13247    if test ! -f "$path" && test ! -d "$path"; then
13248      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13249    fi
13250
13251    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13252  fi
13253
13254              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13255$as_echo_n "checking for Boot JDK... " >&6; }
13256              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13257$as_echo "$BOOT_JDK" >&6; }
13258              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13259$as_echo_n "checking Boot JDK version... " >&6; }
13260              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13261              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13262$as_echo "$BOOT_JDK_VERSION" >&6; }
13263            fi # end check jdk version
13264          fi # end check rt.jar
13265        fi # end check javac
13266      fi # end check java
13267    fi # end check boot jdk found
13268  fi
13269
13270
13271  if test "x$BOOT_JDK_FOUND" = xno; then
13272    # Now execute the test
13273
13274  if test "x$PROGRAMFILES" != x; then
13275    VIRTUAL_DIR="$PROGRAMFILES/Java"
13276
13277  windows_path="$VIRTUAL_DIR"
13278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13279    unix_path=`$CYGPATH -u "$windows_path"`
13280    VIRTUAL_DIR="$unix_path"
13281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13283    VIRTUAL_DIR="$unix_path"
13284  fi
13285
13286
13287  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13288  BOOT_JDK_SUFFIX=""
13289  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13290  if test "x$ALL_JDKS_FOUND" != x; then
13291    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13292
13293  if test "x$BOOT_JDK_FOUND" = xno; then
13294    # Now execute the test
13295
13296        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13297        if test -d "$BOOT_JDK"; then
13298          BOOT_JDK_FOUND=maybe
13299          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13300$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13301        fi
13302
13303
13304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13306      # Do we have a bin/java?
13307      if test ! -x "$BOOT_JDK/bin/java"; then
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13310        BOOT_JDK_FOUND=no
13311      else
13312        # Do we have a bin/javac?
13313        if test ! -x "$BOOT_JDK/bin/javac"; then
13314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13318          BOOT_JDK_FOUND=no
13319        else
13320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13324            BOOT_JDK_FOUND=no
13325          else
13326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13328
13329            # Extra M4 quote needed to protect [] in grep expression.
13330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13331            if test "x$FOUND_VERSION_78" = x; then
13332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13336              BOOT_JDK_FOUND=no
13337            else
13338              # We're done! :-)
13339              BOOT_JDK_FOUND=yes
13340
13341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13342
13343  # Input might be given as Windows format, start by converting to
13344  # unix format.
13345  path="$BOOT_JDK"
13346  new_path=`$CYGPATH -u "$path"`
13347
13348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13351  # "foo.exe" is OK but "foo" is an error.
13352  #
13353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13354  # It is also a way to make sure we got the proper file name for the real test later on.
13355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13356  if test "x$test_shortpath" = x; then
13357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13360  fi
13361
13362  # Call helper function which possibly converts this using DOS-style short mode.
13363  # If so, the updated path is stored in $new_path.
13364
13365  input_path="$new_path"
13366  # Check if we need to convert this using DOS-style short mode. If the path
13367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13368  # take no chances and rewrite it.
13369  # Note: m4 eats our [], so we need to use [ and ] instead.
13370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13371  if test "x$has_forbidden_chars" != x; then
13372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13376      # Going to short mode and back again did indeed matter. Since short mode is
13377      # case insensitive, let's make it lowercase to improve readability.
13378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13379      # Now convert it back to Unix-stile (cygpath)
13380      input_path=`$CYGPATH -u "$shortmode_path"`
13381      new_path="$input_path"
13382    fi
13383  fi
13384
13385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13386  if test "x$test_cygdrive_prefix" = x; then
13387    # As a simple fix, exclude /usr/bin since it's not a real path.
13388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13390      # a path prefixed by /cygdrive for fixpath to work.
13391      new_path="$CYGWIN_ROOT_PATH$input_path"
13392    fi
13393  fi
13394
13395
13396  if test "x$path" != "x$new_path"; then
13397    BOOT_JDK="$new_path"
13398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13400  fi
13401
13402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13403
13404  path="$BOOT_JDK"
13405  has_colon=`$ECHO $path | $GREP ^.:`
13406  new_path="$path"
13407  if test "x$has_colon" = x; then
13408    # Not in mixed or Windows style, start by that.
13409    new_path=`cmd //c echo $path`
13410  fi
13411
13412
13413  input_path="$new_path"
13414  # Check if we need to convert this using DOS-style short mode. If the path
13415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13416  # take no chances and rewrite it.
13417  # Note: m4 eats our [], so we need to use [ and ] instead.
13418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13419  if test "x$has_forbidden_chars" != x; then
13420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13422  fi
13423
13424
13425  windows_path="$new_path"
13426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13427    unix_path=`$CYGPATH -u "$windows_path"`
13428    new_path="$unix_path"
13429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13431    new_path="$unix_path"
13432  fi
13433
13434  if test "x$path" != "x$new_path"; then
13435    BOOT_JDK="$new_path"
13436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13438  fi
13439
13440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13442
13443  else
13444    # We're on a posix platform. Hooray! :)
13445    path="$BOOT_JDK"
13446    has_space=`$ECHO "$path" | $GREP " "`
13447    if test "x$has_space" != x; then
13448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13450      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13451    fi
13452
13453    # Use eval to expand a potential ~
13454    eval path="$path"
13455    if test ! -f "$path" && test ! -d "$path"; then
13456      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13457    fi
13458
13459    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13460  fi
13461
13462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13463$as_echo_n "checking for Boot JDK... " >&6; }
13464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13465$as_echo "$BOOT_JDK" >&6; }
13466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13467$as_echo_n "checking Boot JDK version... " >&6; }
13468              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13470$as_echo "$BOOT_JDK_VERSION" >&6; }
13471            fi # end check jdk version
13472          fi # end check rt.jar
13473        fi # end check javac
13474      fi # end check java
13475    fi # end check boot jdk found
13476  fi
13477
13478    done
13479  fi
13480
13481  fi
13482
13483
13484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13486      # Do we have a bin/java?
13487      if test ! -x "$BOOT_JDK/bin/java"; then
13488        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13490        BOOT_JDK_FOUND=no
13491      else
13492        # Do we have a bin/javac?
13493        if test ! -x "$BOOT_JDK/bin/javac"; then
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13496          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13498          BOOT_JDK_FOUND=no
13499        else
13500          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13501          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13502            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13504            BOOT_JDK_FOUND=no
13505          else
13506            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13508
13509            # Extra M4 quote needed to protect [] in grep expression.
13510            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13511            if test "x$FOUND_VERSION_78" = x; then
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13514              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13515$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13516              BOOT_JDK_FOUND=no
13517            else
13518              # We're done! :-)
13519              BOOT_JDK_FOUND=yes
13520
13521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13522
13523  # Input might be given as Windows format, start by converting to
13524  # unix format.
13525  path="$BOOT_JDK"
13526  new_path=`$CYGPATH -u "$path"`
13527
13528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13531  # "foo.exe" is OK but "foo" is an error.
13532  #
13533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13534  # It is also a way to make sure we got the proper file name for the real test later on.
13535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13536  if test "x$test_shortpath" = x; then
13537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13540  fi
13541
13542  # Call helper function which possibly converts this using DOS-style short mode.
13543  # If so, the updated path is stored in $new_path.
13544
13545  input_path="$new_path"
13546  # Check if we need to convert this using DOS-style short mode. If the path
13547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13548  # take no chances and rewrite it.
13549  # Note: m4 eats our [], so we need to use [ and ] instead.
13550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13551  if test "x$has_forbidden_chars" != x; then
13552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13556      # Going to short mode and back again did indeed matter. Since short mode is
13557      # case insensitive, let's make it lowercase to improve readability.
13558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13559      # Now convert it back to Unix-stile (cygpath)
13560      input_path=`$CYGPATH -u "$shortmode_path"`
13561      new_path="$input_path"
13562    fi
13563  fi
13564
13565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13566  if test "x$test_cygdrive_prefix" = x; then
13567    # As a simple fix, exclude /usr/bin since it's not a real path.
13568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13570      # a path prefixed by /cygdrive for fixpath to work.
13571      new_path="$CYGWIN_ROOT_PATH$input_path"
13572    fi
13573  fi
13574
13575
13576  if test "x$path" != "x$new_path"; then
13577    BOOT_JDK="$new_path"
13578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13580  fi
13581
13582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13583
13584  path="$BOOT_JDK"
13585  has_colon=`$ECHO $path | $GREP ^.:`
13586  new_path="$path"
13587  if test "x$has_colon" = x; then
13588    # Not in mixed or Windows style, start by that.
13589    new_path=`cmd //c echo $path`
13590  fi
13591
13592
13593  input_path="$new_path"
13594  # Check if we need to convert this using DOS-style short mode. If the path
13595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13596  # take no chances and rewrite it.
13597  # Note: m4 eats our [], so we need to use [ and ] instead.
13598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13599  if test "x$has_forbidden_chars" != x; then
13600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13602  fi
13603
13604
13605  windows_path="$new_path"
13606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13607    unix_path=`$CYGPATH -u "$windows_path"`
13608    new_path="$unix_path"
13609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13611    new_path="$unix_path"
13612  fi
13613
13614  if test "x$path" != "x$new_path"; then
13615    BOOT_JDK="$new_path"
13616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13618  fi
13619
13620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13622
13623  else
13624    # We're on a posix platform. Hooray! :)
13625    path="$BOOT_JDK"
13626    has_space=`$ECHO "$path" | $GREP " "`
13627    if test "x$has_space" != x; then
13628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13630      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13631    fi
13632
13633    # Use eval to expand a potential ~
13634    eval path="$path"
13635    if test ! -f "$path" && test ! -d "$path"; then
13636      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13637    fi
13638
13639    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13640  fi
13641
13642              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13643$as_echo_n "checking for Boot JDK... " >&6; }
13644              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13645$as_echo "$BOOT_JDK" >&6; }
13646              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13647$as_echo_n "checking Boot JDK version... " >&6; }
13648              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13649              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13650$as_echo "$BOOT_JDK_VERSION" >&6; }
13651            fi # end check jdk version
13652          fi # end check rt.jar
13653        fi # end check javac
13654      fi # end check java
13655    fi # end check boot jdk found
13656  fi
13657
13658
13659  if test "x$BOOT_JDK_FOUND" = xno; then
13660    # Now execute the test
13661
13662  if test "x$ProgramFiles" != x; then
13663    VIRTUAL_DIR="$ProgramFiles/Java"
13664
13665  windows_path="$VIRTUAL_DIR"
13666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13667    unix_path=`$CYGPATH -u "$windows_path"`
13668    VIRTUAL_DIR="$unix_path"
13669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13671    VIRTUAL_DIR="$unix_path"
13672  fi
13673
13674
13675  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13676  BOOT_JDK_SUFFIX=""
13677  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13678  if test "x$ALL_JDKS_FOUND" != x; then
13679    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13680
13681  if test "x$BOOT_JDK_FOUND" = xno; then
13682    # Now execute the test
13683
13684        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13685        if test -d "$BOOT_JDK"; then
13686          BOOT_JDK_FOUND=maybe
13687          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13688$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13689        fi
13690
13691
13692    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13693    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13694      # Do we have a bin/java?
13695      if test ! -x "$BOOT_JDK/bin/java"; then
13696        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13698        BOOT_JDK_FOUND=no
13699      else
13700        # Do we have a bin/javac?
13701        if test ! -x "$BOOT_JDK/bin/javac"; then
13702          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13704          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13705$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13706          BOOT_JDK_FOUND=no
13707        else
13708          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13709          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13710            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13712            BOOT_JDK_FOUND=no
13713          else
13714            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13715            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13716
13717            # Extra M4 quote needed to protect [] in grep expression.
13718            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13719            if test "x$FOUND_VERSION_78" = x; then
13720              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13722              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13723$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13724              BOOT_JDK_FOUND=no
13725            else
13726              # We're done! :-)
13727              BOOT_JDK_FOUND=yes
13728
13729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13730
13731  # Input might be given as Windows format, start by converting to
13732  # unix format.
13733  path="$BOOT_JDK"
13734  new_path=`$CYGPATH -u "$path"`
13735
13736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13739  # "foo.exe" is OK but "foo" is an error.
13740  #
13741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13742  # It is also a way to make sure we got the proper file name for the real test later on.
13743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13744  if test "x$test_shortpath" = x; then
13745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13747    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13748  fi
13749
13750  # Call helper function which possibly converts this using DOS-style short mode.
13751  # If so, the updated path is stored in $new_path.
13752
13753  input_path="$new_path"
13754  # Check if we need to convert this using DOS-style short mode. If the path
13755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13756  # take no chances and rewrite it.
13757  # Note: m4 eats our [], so we need to use [ and ] instead.
13758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13759  if test "x$has_forbidden_chars" != x; then
13760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13764      # Going to short mode and back again did indeed matter. Since short mode is
13765      # case insensitive, let's make it lowercase to improve readability.
13766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13767      # Now convert it back to Unix-stile (cygpath)
13768      input_path=`$CYGPATH -u "$shortmode_path"`
13769      new_path="$input_path"
13770    fi
13771  fi
13772
13773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13774  if test "x$test_cygdrive_prefix" = x; then
13775    # As a simple fix, exclude /usr/bin since it's not a real path.
13776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13778      # a path prefixed by /cygdrive for fixpath to work.
13779      new_path="$CYGWIN_ROOT_PATH$input_path"
13780    fi
13781  fi
13782
13783
13784  if test "x$path" != "x$new_path"; then
13785    BOOT_JDK="$new_path"
13786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13788  fi
13789
13790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13791
13792  path="$BOOT_JDK"
13793  has_colon=`$ECHO $path | $GREP ^.:`
13794  new_path="$path"
13795  if test "x$has_colon" = x; then
13796    # Not in mixed or Windows style, start by that.
13797    new_path=`cmd //c echo $path`
13798  fi
13799
13800
13801  input_path="$new_path"
13802  # Check if we need to convert this using DOS-style short mode. If the path
13803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13804  # take no chances and rewrite it.
13805  # Note: m4 eats our [], so we need to use [ and ] instead.
13806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13807  if test "x$has_forbidden_chars" != x; then
13808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13810  fi
13811
13812
13813  windows_path="$new_path"
13814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13815    unix_path=`$CYGPATH -u "$windows_path"`
13816    new_path="$unix_path"
13817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13819    new_path="$unix_path"
13820  fi
13821
13822  if test "x$path" != "x$new_path"; then
13823    BOOT_JDK="$new_path"
13824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13826  fi
13827
13828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13830
13831  else
13832    # We're on a posix platform. Hooray! :)
13833    path="$BOOT_JDK"
13834    has_space=`$ECHO "$path" | $GREP " "`
13835    if test "x$has_space" != x; then
13836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13838      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13839    fi
13840
13841    # Use eval to expand a potential ~
13842    eval path="$path"
13843    if test ! -f "$path" && test ! -d "$path"; then
13844      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13845    fi
13846
13847    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13848  fi
13849
13850              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13851$as_echo_n "checking for Boot JDK... " >&6; }
13852              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13853$as_echo "$BOOT_JDK" >&6; }
13854              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13855$as_echo_n "checking Boot JDK version... " >&6; }
13856              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13857              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13858$as_echo "$BOOT_JDK_VERSION" >&6; }
13859            fi # end check jdk version
13860          fi # end check rt.jar
13861        fi # end check javac
13862      fi # end check java
13863    fi # end check boot jdk found
13864  fi
13865
13866    done
13867  fi
13868
13869  fi
13870
13871
13872    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13873    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13874      # Do we have a bin/java?
13875      if test ! -x "$BOOT_JDK/bin/java"; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13878        BOOT_JDK_FOUND=no
13879      else
13880        # Do we have a bin/javac?
13881        if test ! -x "$BOOT_JDK/bin/javac"; then
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13884          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13885$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13886          BOOT_JDK_FOUND=no
13887        else
13888          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13889          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13892            BOOT_JDK_FOUND=no
13893          else
13894            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13896
13897            # Extra M4 quote needed to protect [] in grep expression.
13898            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13899            if test "x$FOUND_VERSION_78" = x; then
13900              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13902              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13903$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13904              BOOT_JDK_FOUND=no
13905            else
13906              # We're done! :-)
13907              BOOT_JDK_FOUND=yes
13908
13909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910
13911  # Input might be given as Windows format, start by converting to
13912  # unix format.
13913  path="$BOOT_JDK"
13914  new_path=`$CYGPATH -u "$path"`
13915
13916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13919  # "foo.exe" is OK but "foo" is an error.
13920  #
13921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13922  # It is also a way to make sure we got the proper file name for the real test later on.
13923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13924  if test "x$test_shortpath" = x; then
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13927    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13928  fi
13929
13930  # Call helper function which possibly converts this using DOS-style short mode.
13931  # If so, the updated path is stored in $new_path.
13932
13933  input_path="$new_path"
13934  # Check if we need to convert this using DOS-style short mode. If the path
13935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13936  # take no chances and rewrite it.
13937  # Note: m4 eats our [], so we need to use [ and ] instead.
13938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13939  if test "x$has_forbidden_chars" != x; then
13940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13944      # Going to short mode and back again did indeed matter. Since short mode is
13945      # case insensitive, let's make it lowercase to improve readability.
13946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13947      # Now convert it back to Unix-stile (cygpath)
13948      input_path=`$CYGPATH -u "$shortmode_path"`
13949      new_path="$input_path"
13950    fi
13951  fi
13952
13953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13954  if test "x$test_cygdrive_prefix" = x; then
13955    # As a simple fix, exclude /usr/bin since it's not a real path.
13956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13958      # a path prefixed by /cygdrive for fixpath to work.
13959      new_path="$CYGWIN_ROOT_PATH$input_path"
13960    fi
13961  fi
13962
13963
13964  if test "x$path" != "x$new_path"; then
13965    BOOT_JDK="$new_path"
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13968  fi
13969
13970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971
13972  path="$BOOT_JDK"
13973  has_colon=`$ECHO $path | $GREP ^.:`
13974  new_path="$path"
13975  if test "x$has_colon" = x; then
13976    # Not in mixed or Windows style, start by that.
13977    new_path=`cmd //c echo $path`
13978  fi
13979
13980
13981  input_path="$new_path"
13982  # Check if we need to convert this using DOS-style short mode. If the path
13983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984  # take no chances and rewrite it.
13985  # Note: m4 eats our [], so we need to use [ and ] instead.
13986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13987  if test "x$has_forbidden_chars" != x; then
13988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13990  fi
13991
13992
13993  windows_path="$new_path"
13994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995    unix_path=`$CYGPATH -u "$windows_path"`
13996    new_path="$unix_path"
13997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13999    new_path="$unix_path"
14000  fi
14001
14002  if test "x$path" != "x$new_path"; then
14003    BOOT_JDK="$new_path"
14004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14006  fi
14007
14008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14010
14011  else
14012    # We're on a posix platform. Hooray! :)
14013    path="$BOOT_JDK"
14014    has_space=`$ECHO "$path" | $GREP " "`
14015    if test "x$has_space" != x; then
14016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14019    fi
14020
14021    # Use eval to expand a potential ~
14022    eval path="$path"
14023    if test ! -f "$path" && test ! -d "$path"; then
14024      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14025    fi
14026
14027    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14028  fi
14029
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14031$as_echo_n "checking for Boot JDK... " >&6; }
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14033$as_echo "$BOOT_JDK" >&6; }
14034              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14035$as_echo_n "checking Boot JDK version... " >&6; }
14036              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14037              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14038$as_echo "$BOOT_JDK_VERSION" >&6; }
14039            fi # end check jdk version
14040          fi # end check rt.jar
14041        fi # end check javac
14042      fi # end check java
14043    fi # end check boot jdk found
14044  fi
14045
14046
14047  if test "x$BOOT_JDK_FOUND" = xno; then
14048    # Now execute the test
14049
14050  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14051  BOOT_JDK_SUFFIX=""
14052  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14053  if test "x$ALL_JDKS_FOUND" != x; then
14054    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14055
14056  if test "x$BOOT_JDK_FOUND" = xno; then
14057    # Now execute the test
14058
14059        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14060        if test -d "$BOOT_JDK"; then
14061          BOOT_JDK_FOUND=maybe
14062          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14063$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14064        fi
14065
14066
14067    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14068    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14069      # Do we have a bin/java?
14070      if test ! -x "$BOOT_JDK/bin/java"; then
14071        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14073        BOOT_JDK_FOUND=no
14074      else
14075        # Do we have a bin/javac?
14076        if test ! -x "$BOOT_JDK/bin/javac"; then
14077          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14080$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14081          BOOT_JDK_FOUND=no
14082        else
14083          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14084          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14085            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14087            BOOT_JDK_FOUND=no
14088          else
14089            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14090            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14091
14092            # Extra M4 quote needed to protect [] in grep expression.
14093            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14094            if test "x$FOUND_VERSION_78" = x; then
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14097              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14098$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14099              BOOT_JDK_FOUND=no
14100            else
14101              # We're done! :-)
14102              BOOT_JDK_FOUND=yes
14103
14104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14105
14106  # Input might be given as Windows format, start by converting to
14107  # unix format.
14108  path="$BOOT_JDK"
14109  new_path=`$CYGPATH -u "$path"`
14110
14111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14114  # "foo.exe" is OK but "foo" is an error.
14115  #
14116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14117  # It is also a way to make sure we got the proper file name for the real test later on.
14118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14119  if test "x$test_shortpath" = x; then
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14122    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14123  fi
14124
14125  # Call helper function which possibly converts this using DOS-style short mode.
14126  # If so, the updated path is stored in $new_path.
14127
14128  input_path="$new_path"
14129  # Check if we need to convert this using DOS-style short mode. If the path
14130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14131  # take no chances and rewrite it.
14132  # Note: m4 eats our [], so we need to use [ and ] instead.
14133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14134  if test "x$has_forbidden_chars" != x; then
14135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14139      # Going to short mode and back again did indeed matter. Since short mode is
14140      # case insensitive, let's make it lowercase to improve readability.
14141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14142      # Now convert it back to Unix-stile (cygpath)
14143      input_path=`$CYGPATH -u "$shortmode_path"`
14144      new_path="$input_path"
14145    fi
14146  fi
14147
14148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14149  if test "x$test_cygdrive_prefix" = x; then
14150    # As a simple fix, exclude /usr/bin since it's not a real path.
14151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14153      # a path prefixed by /cygdrive for fixpath to work.
14154      new_path="$CYGWIN_ROOT_PATH$input_path"
14155    fi
14156  fi
14157
14158
14159  if test "x$path" != "x$new_path"; then
14160    BOOT_JDK="$new_path"
14161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14163  fi
14164
14165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14166
14167  path="$BOOT_JDK"
14168  has_colon=`$ECHO $path | $GREP ^.:`
14169  new_path="$path"
14170  if test "x$has_colon" = x; then
14171    # Not in mixed or Windows style, start by that.
14172    new_path=`cmd //c echo $path`
14173  fi
14174
14175
14176  input_path="$new_path"
14177  # Check if we need to convert this using DOS-style short mode. If the path
14178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14179  # take no chances and rewrite it.
14180  # Note: m4 eats our [], so we need to use [ and ] instead.
14181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14182  if test "x$has_forbidden_chars" != x; then
14183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185  fi
14186
14187
14188  windows_path="$new_path"
14189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14190    unix_path=`$CYGPATH -u "$windows_path"`
14191    new_path="$unix_path"
14192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14194    new_path="$unix_path"
14195  fi
14196
14197  if test "x$path" != "x$new_path"; then
14198    BOOT_JDK="$new_path"
14199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14201  fi
14202
14203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14205
14206  else
14207    # We're on a posix platform. Hooray! :)
14208    path="$BOOT_JDK"
14209    has_space=`$ECHO "$path" | $GREP " "`
14210    if test "x$has_space" != x; then
14211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14213      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14214    fi
14215
14216    # Use eval to expand a potential ~
14217    eval path="$path"
14218    if test ! -f "$path" && test ! -d "$path"; then
14219      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14220    fi
14221
14222    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14223  fi
14224
14225              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14226$as_echo_n "checking for Boot JDK... " >&6; }
14227              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14228$as_echo "$BOOT_JDK" >&6; }
14229              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14230$as_echo_n "checking Boot JDK version... " >&6; }
14231              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14232              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14233$as_echo "$BOOT_JDK_VERSION" >&6; }
14234            fi # end check jdk version
14235          fi # end check rt.jar
14236        fi # end check javac
14237      fi # end check java
14238    fi # end check boot jdk found
14239  fi
14240
14241    done
14242  fi
14243
14244
14245    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14246    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14247      # Do we have a bin/java?
14248      if test ! -x "$BOOT_JDK/bin/java"; then
14249        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14251        BOOT_JDK_FOUND=no
14252      else
14253        # Do we have a bin/javac?
14254        if test ! -x "$BOOT_JDK/bin/javac"; then
14255          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14257          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14258$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14259          BOOT_JDK_FOUND=no
14260        else
14261          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14262          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14263            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14265            BOOT_JDK_FOUND=no
14266          else
14267            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14268            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14269
14270            # Extra M4 quote needed to protect [] in grep expression.
14271            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14272            if test "x$FOUND_VERSION_78" = x; then
14273              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14275              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14276$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14277              BOOT_JDK_FOUND=no
14278            else
14279              # We're done! :-)
14280              BOOT_JDK_FOUND=yes
14281
14282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14283
14284  # Input might be given as Windows format, start by converting to
14285  # unix format.
14286  path="$BOOT_JDK"
14287  new_path=`$CYGPATH -u "$path"`
14288
14289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14292  # "foo.exe" is OK but "foo" is an error.
14293  #
14294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14295  # It is also a way to make sure we got the proper file name for the real test later on.
14296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14297  if test "x$test_shortpath" = x; then
14298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14300    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14301  fi
14302
14303  # Call helper function which possibly converts this using DOS-style short mode.
14304  # If so, the updated path is stored in $new_path.
14305
14306  input_path="$new_path"
14307  # Check if we need to convert this using DOS-style short mode. If the path
14308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14309  # take no chances and rewrite it.
14310  # Note: m4 eats our [], so we need to use [ and ] instead.
14311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14312  if test "x$has_forbidden_chars" != x; then
14313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14317      # Going to short mode and back again did indeed matter. Since short mode is
14318      # case insensitive, let's make it lowercase to improve readability.
14319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14320      # Now convert it back to Unix-stile (cygpath)
14321      input_path=`$CYGPATH -u "$shortmode_path"`
14322      new_path="$input_path"
14323    fi
14324  fi
14325
14326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14327  if test "x$test_cygdrive_prefix" = x; then
14328    # As a simple fix, exclude /usr/bin since it's not a real path.
14329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14331      # a path prefixed by /cygdrive for fixpath to work.
14332      new_path="$CYGWIN_ROOT_PATH$input_path"
14333    fi
14334  fi
14335
14336
14337  if test "x$path" != "x$new_path"; then
14338    BOOT_JDK="$new_path"
14339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14341  fi
14342
14343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14344
14345  path="$BOOT_JDK"
14346  has_colon=`$ECHO $path | $GREP ^.:`
14347  new_path="$path"
14348  if test "x$has_colon" = x; then
14349    # Not in mixed or Windows style, start by that.
14350    new_path=`cmd //c echo $path`
14351  fi
14352
14353
14354  input_path="$new_path"
14355  # Check if we need to convert this using DOS-style short mode. If the path
14356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14357  # take no chances and rewrite it.
14358  # Note: m4 eats our [], so we need to use [ and ] instead.
14359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14360  if test "x$has_forbidden_chars" != x; then
14361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14363  fi
14364
14365
14366  windows_path="$new_path"
14367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14368    unix_path=`$CYGPATH -u "$windows_path"`
14369    new_path="$unix_path"
14370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14372    new_path="$unix_path"
14373  fi
14374
14375  if test "x$path" != "x$new_path"; then
14376    BOOT_JDK="$new_path"
14377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14379  fi
14380
14381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14383
14384  else
14385    # We're on a posix platform. Hooray! :)
14386    path="$BOOT_JDK"
14387    has_space=`$ECHO "$path" | $GREP " "`
14388    if test "x$has_space" != x; then
14389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14391      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14392    fi
14393
14394    # Use eval to expand a potential ~
14395    eval path="$path"
14396    if test ! -f "$path" && test ! -d "$path"; then
14397      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14398    fi
14399
14400    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14401  fi
14402
14403              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14404$as_echo_n "checking for Boot JDK... " >&6; }
14405              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14406$as_echo "$BOOT_JDK" >&6; }
14407              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14408$as_echo_n "checking Boot JDK version... " >&6; }
14409              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14410              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14411$as_echo "$BOOT_JDK_VERSION" >&6; }
14412            fi # end check jdk version
14413          fi # end check rt.jar
14414        fi # end check javac
14415      fi # end check java
14416    fi # end check boot jdk found
14417  fi
14418
14419  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14420
14421  if test "x$BOOT_JDK_FOUND" = xno; then
14422    # Now execute the test
14423
14424  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14425  BOOT_JDK_SUFFIX="/Contents/Home"
14426  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14427  if test "x$ALL_JDKS_FOUND" != x; then
14428    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14429
14430  if test "x$BOOT_JDK_FOUND" = xno; then
14431    # Now execute the test
14432
14433        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14434        if test -d "$BOOT_JDK"; then
14435          BOOT_JDK_FOUND=maybe
14436          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14437$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14438        fi
14439
14440
14441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14443      # Do we have a bin/java?
14444      if test ! -x "$BOOT_JDK/bin/java"; then
14445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14447        BOOT_JDK_FOUND=no
14448      else
14449        # Do we have a bin/javac?
14450        if test ! -x "$BOOT_JDK/bin/javac"; then
14451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14455          BOOT_JDK_FOUND=no
14456        else
14457          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14458          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14459            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14461            BOOT_JDK_FOUND=no
14462          else
14463            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14465
14466            # Extra M4 quote needed to protect [] in grep expression.
14467            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14468            if test "x$FOUND_VERSION_78" = x; then
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14472$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14473              BOOT_JDK_FOUND=no
14474            else
14475              # We're done! :-)
14476              BOOT_JDK_FOUND=yes
14477
14478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14479
14480  # Input might be given as Windows format, start by converting to
14481  # unix format.
14482  path="$BOOT_JDK"
14483  new_path=`$CYGPATH -u "$path"`
14484
14485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14488  # "foo.exe" is OK but "foo" is an error.
14489  #
14490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14491  # It is also a way to make sure we got the proper file name for the real test later on.
14492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14493  if test "x$test_shortpath" = x; then
14494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14497  fi
14498
14499  # Call helper function which possibly converts this using DOS-style short mode.
14500  # If so, the updated path is stored in $new_path.
14501
14502  input_path="$new_path"
14503  # Check if we need to convert this using DOS-style short mode. If the path
14504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14505  # take no chances and rewrite it.
14506  # Note: m4 eats our [], so we need to use [ and ] instead.
14507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14508  if test "x$has_forbidden_chars" != x; then
14509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14513      # Going to short mode and back again did indeed matter. Since short mode is
14514      # case insensitive, let's make it lowercase to improve readability.
14515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14516      # Now convert it back to Unix-stile (cygpath)
14517      input_path=`$CYGPATH -u "$shortmode_path"`
14518      new_path="$input_path"
14519    fi
14520  fi
14521
14522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14523  if test "x$test_cygdrive_prefix" = x; then
14524    # As a simple fix, exclude /usr/bin since it's not a real path.
14525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14527      # a path prefixed by /cygdrive for fixpath to work.
14528      new_path="$CYGWIN_ROOT_PATH$input_path"
14529    fi
14530  fi
14531
14532
14533  if test "x$path" != "x$new_path"; then
14534    BOOT_JDK="$new_path"
14535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14537  fi
14538
14539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14540
14541  path="$BOOT_JDK"
14542  has_colon=`$ECHO $path | $GREP ^.:`
14543  new_path="$path"
14544  if test "x$has_colon" = x; then
14545    # Not in mixed or Windows style, start by that.
14546    new_path=`cmd //c echo $path`
14547  fi
14548
14549
14550  input_path="$new_path"
14551  # Check if we need to convert this using DOS-style short mode. If the path
14552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14553  # take no chances and rewrite it.
14554  # Note: m4 eats our [], so we need to use [ and ] instead.
14555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14556  if test "x$has_forbidden_chars" != x; then
14557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14559  fi
14560
14561
14562  windows_path="$new_path"
14563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14564    unix_path=`$CYGPATH -u "$windows_path"`
14565    new_path="$unix_path"
14566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14568    new_path="$unix_path"
14569  fi
14570
14571  if test "x$path" != "x$new_path"; then
14572    BOOT_JDK="$new_path"
14573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14575  fi
14576
14577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14579
14580  else
14581    # We're on a posix platform. Hooray! :)
14582    path="$BOOT_JDK"
14583    has_space=`$ECHO "$path" | $GREP " "`
14584    if test "x$has_space" != x; then
14585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14588    fi
14589
14590    # Use eval to expand a potential ~
14591    eval path="$path"
14592    if test ! -f "$path" && test ! -d "$path"; then
14593      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14594    fi
14595
14596    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14597  fi
14598
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14600$as_echo_n "checking for Boot JDK... " >&6; }
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14602$as_echo "$BOOT_JDK" >&6; }
14603              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14604$as_echo_n "checking Boot JDK version... " >&6; }
14605              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14607$as_echo "$BOOT_JDK_VERSION" >&6; }
14608            fi # end check jdk version
14609          fi # end check rt.jar
14610        fi # end check javac
14611      fi # end check java
14612    fi # end check boot jdk found
14613  fi
14614
14615    done
14616  fi
14617
14618
14619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14621      # Do we have a bin/java?
14622      if test ! -x "$BOOT_JDK/bin/java"; then
14623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14625        BOOT_JDK_FOUND=no
14626      else
14627        # Do we have a bin/javac?
14628        if test ! -x "$BOOT_JDK/bin/javac"; then
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14633          BOOT_JDK_FOUND=no
14634        else
14635          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14636          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14639            BOOT_JDK_FOUND=no
14640          else
14641            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14642            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14643
14644            # Extra M4 quote needed to protect [] in grep expression.
14645            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14646            if test "x$FOUND_VERSION_78" = x; then
14647              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14649              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14650$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14651              BOOT_JDK_FOUND=no
14652            else
14653              # We're done! :-)
14654              BOOT_JDK_FOUND=yes
14655
14656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657
14658  # Input might be given as Windows format, start by converting to
14659  # unix format.
14660  path="$BOOT_JDK"
14661  new_path=`$CYGPATH -u "$path"`
14662
14663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666  # "foo.exe" is OK but "foo" is an error.
14667  #
14668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669  # It is also a way to make sure we got the proper file name for the real test later on.
14670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671  if test "x$test_shortpath" = x; then
14672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14675  fi
14676
14677  # Call helper function which possibly converts this using DOS-style short mode.
14678  # If so, the updated path is stored in $new_path.
14679
14680  input_path="$new_path"
14681  # Check if we need to convert this using DOS-style short mode. If the path
14682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683  # take no chances and rewrite it.
14684  # Note: m4 eats our [], so we need to use [ and ] instead.
14685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686  if test "x$has_forbidden_chars" != x; then
14687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691      # Going to short mode and back again did indeed matter. Since short mode is
14692      # case insensitive, let's make it lowercase to improve readability.
14693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694      # Now convert it back to Unix-stile (cygpath)
14695      input_path=`$CYGPATH -u "$shortmode_path"`
14696      new_path="$input_path"
14697    fi
14698  fi
14699
14700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701  if test "x$test_cygdrive_prefix" = x; then
14702    # As a simple fix, exclude /usr/bin since it's not a real path.
14703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705      # a path prefixed by /cygdrive for fixpath to work.
14706      new_path="$CYGWIN_ROOT_PATH$input_path"
14707    fi
14708  fi
14709
14710
14711  if test "x$path" != "x$new_path"; then
14712    BOOT_JDK="$new_path"
14713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14715  fi
14716
14717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718
14719  path="$BOOT_JDK"
14720  has_colon=`$ECHO $path | $GREP ^.:`
14721  new_path="$path"
14722  if test "x$has_colon" = x; then
14723    # Not in mixed or Windows style, start by that.
14724    new_path=`cmd //c echo $path`
14725  fi
14726
14727
14728  input_path="$new_path"
14729  # Check if we need to convert this using DOS-style short mode. If the path
14730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731  # take no chances and rewrite it.
14732  # Note: m4 eats our [], so we need to use [ and ] instead.
14733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734  if test "x$has_forbidden_chars" != x; then
14735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737  fi
14738
14739
14740  windows_path="$new_path"
14741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742    unix_path=`$CYGPATH -u "$windows_path"`
14743    new_path="$unix_path"
14744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746    new_path="$unix_path"
14747  fi
14748
14749  if test "x$path" != "x$new_path"; then
14750    BOOT_JDK="$new_path"
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14753  fi
14754
14755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757
14758  else
14759    # We're on a posix platform. Hooray! :)
14760    path="$BOOT_JDK"
14761    has_space=`$ECHO "$path" | $GREP " "`
14762    if test "x$has_space" != x; then
14763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14765      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766    fi
14767
14768    # Use eval to expand a potential ~
14769    eval path="$path"
14770    if test ! -f "$path" && test ! -d "$path"; then
14771      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14772    fi
14773
14774    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14775  fi
14776
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14778$as_echo_n "checking for Boot JDK... " >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14780$as_echo "$BOOT_JDK" >&6; }
14781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14782$as_echo_n "checking Boot JDK version... " >&6; }
14783              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14784              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14785$as_echo "$BOOT_JDK_VERSION" >&6; }
14786            fi # end check jdk version
14787          fi # end check rt.jar
14788        fi # end check javac
14789      fi # end check java
14790    fi # end check boot jdk found
14791  fi
14792
14793
14794  if test "x$BOOT_JDK_FOUND" = xno; then
14795    # Now execute the test
14796
14797  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14798  BOOT_JDK_SUFFIX="/Contents/Home"
14799  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14800  if test "x$ALL_JDKS_FOUND" != x; then
14801    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14802
14803  if test "x$BOOT_JDK_FOUND" = xno; then
14804    # Now execute the test
14805
14806        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14807        if test -d "$BOOT_JDK"; then
14808          BOOT_JDK_FOUND=maybe
14809          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14810$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14811        fi
14812
14813
14814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14816      # Do we have a bin/java?
14817      if test ! -x "$BOOT_JDK/bin/java"; then
14818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14820        BOOT_JDK_FOUND=no
14821      else
14822        # Do we have a bin/javac?
14823        if test ! -x "$BOOT_JDK/bin/javac"; then
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14828          BOOT_JDK_FOUND=no
14829        else
14830          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14831          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14832            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14834            BOOT_JDK_FOUND=no
14835          else
14836            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14837            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14838
14839            # Extra M4 quote needed to protect [] in grep expression.
14840            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14841            if test "x$FOUND_VERSION_78" = x; then
14842              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14844              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14845$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14846              BOOT_JDK_FOUND=no
14847            else
14848              # We're done! :-)
14849              BOOT_JDK_FOUND=yes
14850
14851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14852
14853  # Input might be given as Windows format, start by converting to
14854  # unix format.
14855  path="$BOOT_JDK"
14856  new_path=`$CYGPATH -u "$path"`
14857
14858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14861  # "foo.exe" is OK but "foo" is an error.
14862  #
14863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14864  # It is also a way to make sure we got the proper file name for the real test later on.
14865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14866  if test "x$test_shortpath" = x; then
14867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14869    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14870  fi
14871
14872  # Call helper function which possibly converts this using DOS-style short mode.
14873  # If so, the updated path is stored in $new_path.
14874
14875  input_path="$new_path"
14876  # Check if we need to convert this using DOS-style short mode. If the path
14877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14878  # take no chances and rewrite it.
14879  # Note: m4 eats our [], so we need to use [ and ] instead.
14880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14881  if test "x$has_forbidden_chars" != x; then
14882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14886      # Going to short mode and back again did indeed matter. Since short mode is
14887      # case insensitive, let's make it lowercase to improve readability.
14888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14889      # Now convert it back to Unix-stile (cygpath)
14890      input_path=`$CYGPATH -u "$shortmode_path"`
14891      new_path="$input_path"
14892    fi
14893  fi
14894
14895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14896  if test "x$test_cygdrive_prefix" = x; then
14897    # As a simple fix, exclude /usr/bin since it's not a real path.
14898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14900      # a path prefixed by /cygdrive for fixpath to work.
14901      new_path="$CYGWIN_ROOT_PATH$input_path"
14902    fi
14903  fi
14904
14905
14906  if test "x$path" != "x$new_path"; then
14907    BOOT_JDK="$new_path"
14908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14910  fi
14911
14912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14913
14914  path="$BOOT_JDK"
14915  has_colon=`$ECHO $path | $GREP ^.:`
14916  new_path="$path"
14917  if test "x$has_colon" = x; then
14918    # Not in mixed or Windows style, start by that.
14919    new_path=`cmd //c echo $path`
14920  fi
14921
14922
14923  input_path="$new_path"
14924  # Check if we need to convert this using DOS-style short mode. If the path
14925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14926  # take no chances and rewrite it.
14927  # Note: m4 eats our [], so we need to use [ and ] instead.
14928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14929  if test "x$has_forbidden_chars" != x; then
14930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14932  fi
14933
14934
14935  windows_path="$new_path"
14936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14937    unix_path=`$CYGPATH -u "$windows_path"`
14938    new_path="$unix_path"
14939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14941    new_path="$unix_path"
14942  fi
14943
14944  if test "x$path" != "x$new_path"; then
14945    BOOT_JDK="$new_path"
14946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14948  fi
14949
14950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14952
14953  else
14954    # We're on a posix platform. Hooray! :)
14955    path="$BOOT_JDK"
14956    has_space=`$ECHO "$path" | $GREP " "`
14957    if test "x$has_space" != x; then
14958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14961    fi
14962
14963    # Use eval to expand a potential ~
14964    eval path="$path"
14965    if test ! -f "$path" && test ! -d "$path"; then
14966      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14967    fi
14968
14969    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14970  fi
14971
14972              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14973$as_echo_n "checking for Boot JDK... " >&6; }
14974              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14975$as_echo "$BOOT_JDK" >&6; }
14976              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14977$as_echo_n "checking Boot JDK version... " >&6; }
14978              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14979              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14980$as_echo "$BOOT_JDK_VERSION" >&6; }
14981            fi # end check jdk version
14982          fi # end check rt.jar
14983        fi # end check javac
14984      fi # end check java
14985    fi # end check boot jdk found
14986  fi
14987
14988    done
14989  fi
14990
14991
14992    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14993    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14994      # Do we have a bin/java?
14995      if test ! -x "$BOOT_JDK/bin/java"; then
14996        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14998        BOOT_JDK_FOUND=no
14999      else
15000        # Do we have a bin/javac?
15001        if test ! -x "$BOOT_JDK/bin/javac"; then
15002          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15004          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15005$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15006          BOOT_JDK_FOUND=no
15007        else
15008          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15009          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15010            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15012            BOOT_JDK_FOUND=no
15013          else
15014            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15015            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15016
15017            # Extra M4 quote needed to protect [] in grep expression.
15018            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15019            if test "x$FOUND_VERSION_78" = x; then
15020              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15022              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15023$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15024              BOOT_JDK_FOUND=no
15025            else
15026              # We're done! :-)
15027              BOOT_JDK_FOUND=yes
15028
15029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15030
15031  # Input might be given as Windows format, start by converting to
15032  # unix format.
15033  path="$BOOT_JDK"
15034  new_path=`$CYGPATH -u "$path"`
15035
15036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15039  # "foo.exe" is OK but "foo" is an error.
15040  #
15041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15042  # It is also a way to make sure we got the proper file name for the real test later on.
15043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15044  if test "x$test_shortpath" = x; then
15045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15047    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15048  fi
15049
15050  # Call helper function which possibly converts this using DOS-style short mode.
15051  # If so, the updated path is stored in $new_path.
15052
15053  input_path="$new_path"
15054  # Check if we need to convert this using DOS-style short mode. If the path
15055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15056  # take no chances and rewrite it.
15057  # Note: m4 eats our [], so we need to use [ and ] instead.
15058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15059  if test "x$has_forbidden_chars" != x; then
15060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15064      # Going to short mode and back again did indeed matter. Since short mode is
15065      # case insensitive, let's make it lowercase to improve readability.
15066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15067      # Now convert it back to Unix-stile (cygpath)
15068      input_path=`$CYGPATH -u "$shortmode_path"`
15069      new_path="$input_path"
15070    fi
15071  fi
15072
15073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15074  if test "x$test_cygdrive_prefix" = x; then
15075    # As a simple fix, exclude /usr/bin since it's not a real path.
15076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15078      # a path prefixed by /cygdrive for fixpath to work.
15079      new_path="$CYGWIN_ROOT_PATH$input_path"
15080    fi
15081  fi
15082
15083
15084  if test "x$path" != "x$new_path"; then
15085    BOOT_JDK="$new_path"
15086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15088  fi
15089
15090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15091
15092  path="$BOOT_JDK"
15093  has_colon=`$ECHO $path | $GREP ^.:`
15094  new_path="$path"
15095  if test "x$has_colon" = x; then
15096    # Not in mixed or Windows style, start by that.
15097    new_path=`cmd //c echo $path`
15098  fi
15099
15100
15101  input_path="$new_path"
15102  # Check if we need to convert this using DOS-style short mode. If the path
15103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15104  # take no chances and rewrite it.
15105  # Note: m4 eats our [], so we need to use [ and ] instead.
15106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15107  if test "x$has_forbidden_chars" != x; then
15108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15110  fi
15111
15112
15113  windows_path="$new_path"
15114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15115    unix_path=`$CYGPATH -u "$windows_path"`
15116    new_path="$unix_path"
15117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15119    new_path="$unix_path"
15120  fi
15121
15122  if test "x$path" != "x$new_path"; then
15123    BOOT_JDK="$new_path"
15124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15126  fi
15127
15128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15130
15131  else
15132    # We're on a posix platform. Hooray! :)
15133    path="$BOOT_JDK"
15134    has_space=`$ECHO "$path" | $GREP " "`
15135    if test "x$has_space" != x; then
15136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15137$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15139    fi
15140
15141    # Use eval to expand a potential ~
15142    eval path="$path"
15143    if test ! -f "$path" && test ! -d "$path"; then
15144      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15145    fi
15146
15147    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15148  fi
15149
15150              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15151$as_echo_n "checking for Boot JDK... " >&6; }
15152              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15153$as_echo "$BOOT_JDK" >&6; }
15154              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15155$as_echo_n "checking Boot JDK version... " >&6; }
15156              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15157              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15158$as_echo "$BOOT_JDK_VERSION" >&6; }
15159            fi # end check jdk version
15160          fi # end check rt.jar
15161        fi # end check javac
15162      fi # end check java
15163    fi # end check boot jdk found
15164  fi
15165
15166  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15167
15168  if test "x$BOOT_JDK_FOUND" = xno; then
15169    # Now execute the test
15170
15171  BOOT_JDK_PREFIX="/usr/lib/jvm"
15172  BOOT_JDK_SUFFIX=""
15173  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15174  if test "x$ALL_JDKS_FOUND" != x; then
15175    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15176
15177  if test "x$BOOT_JDK_FOUND" = xno; then
15178    # Now execute the test
15179
15180        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15181        if test -d "$BOOT_JDK"; then
15182          BOOT_JDK_FOUND=maybe
15183          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15184$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15185        fi
15186
15187
15188    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15189    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15190      # Do we have a bin/java?
15191      if test ! -x "$BOOT_JDK/bin/java"; then
15192        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15194        BOOT_JDK_FOUND=no
15195      else
15196        # Do we have a bin/javac?
15197        if test ! -x "$BOOT_JDK/bin/javac"; then
15198          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15200          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15201$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15202          BOOT_JDK_FOUND=no
15203        else
15204          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15205          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15208            BOOT_JDK_FOUND=no
15209          else
15210            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15211            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15212
15213            # Extra M4 quote needed to protect [] in grep expression.
15214            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15215            if test "x$FOUND_VERSION_78" = x; then
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15218              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15219$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15220              BOOT_JDK_FOUND=no
15221            else
15222              # We're done! :-)
15223              BOOT_JDK_FOUND=yes
15224
15225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15226
15227  # Input might be given as Windows format, start by converting to
15228  # unix format.
15229  path="$BOOT_JDK"
15230  new_path=`$CYGPATH -u "$path"`
15231
15232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15235  # "foo.exe" is OK but "foo" is an error.
15236  #
15237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15238  # It is also a way to make sure we got the proper file name for the real test later on.
15239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15240  if test "x$test_shortpath" = x; then
15241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15243    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15244  fi
15245
15246  # Call helper function which possibly converts this using DOS-style short mode.
15247  # If so, the updated path is stored in $new_path.
15248
15249  input_path="$new_path"
15250  # Check if we need to convert this using DOS-style short mode. If the path
15251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15252  # take no chances and rewrite it.
15253  # Note: m4 eats our [], so we need to use [ and ] instead.
15254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15255  if test "x$has_forbidden_chars" != x; then
15256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15260      # Going to short mode and back again did indeed matter. Since short mode is
15261      # case insensitive, let's make it lowercase to improve readability.
15262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15263      # Now convert it back to Unix-stile (cygpath)
15264      input_path=`$CYGPATH -u "$shortmode_path"`
15265      new_path="$input_path"
15266    fi
15267  fi
15268
15269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15270  if test "x$test_cygdrive_prefix" = x; then
15271    # As a simple fix, exclude /usr/bin since it's not a real path.
15272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15274      # a path prefixed by /cygdrive for fixpath to work.
15275      new_path="$CYGWIN_ROOT_PATH$input_path"
15276    fi
15277  fi
15278
15279
15280  if test "x$path" != "x$new_path"; then
15281    BOOT_JDK="$new_path"
15282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15284  fi
15285
15286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15287
15288  path="$BOOT_JDK"
15289  has_colon=`$ECHO $path | $GREP ^.:`
15290  new_path="$path"
15291  if test "x$has_colon" = x; then
15292    # Not in mixed or Windows style, start by that.
15293    new_path=`cmd //c echo $path`
15294  fi
15295
15296
15297  input_path="$new_path"
15298  # Check if we need to convert this using DOS-style short mode. If the path
15299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15300  # take no chances and rewrite it.
15301  # Note: m4 eats our [], so we need to use [ and ] instead.
15302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15303  if test "x$has_forbidden_chars" != x; then
15304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15306  fi
15307
15308
15309  windows_path="$new_path"
15310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15311    unix_path=`$CYGPATH -u "$windows_path"`
15312    new_path="$unix_path"
15313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15315    new_path="$unix_path"
15316  fi
15317
15318  if test "x$path" != "x$new_path"; then
15319    BOOT_JDK="$new_path"
15320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15322  fi
15323
15324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15326
15327  else
15328    # We're on a posix platform. Hooray! :)
15329    path="$BOOT_JDK"
15330    has_space=`$ECHO "$path" | $GREP " "`
15331    if test "x$has_space" != x; then
15332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15334      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15335    fi
15336
15337    # Use eval to expand a potential ~
15338    eval path="$path"
15339    if test ! -f "$path" && test ! -d "$path"; then
15340      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15341    fi
15342
15343    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15344  fi
15345
15346              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15347$as_echo_n "checking for Boot JDK... " >&6; }
15348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15349$as_echo "$BOOT_JDK" >&6; }
15350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15351$as_echo_n "checking Boot JDK version... " >&6; }
15352              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15354$as_echo "$BOOT_JDK_VERSION" >&6; }
15355            fi # end check jdk version
15356          fi # end check rt.jar
15357        fi # end check javac
15358      fi # end check java
15359    fi # end check boot jdk found
15360  fi
15361
15362    done
15363  fi
15364
15365
15366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15368      # Do we have a bin/java?
15369      if test ! -x "$BOOT_JDK/bin/java"; then
15370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15372        BOOT_JDK_FOUND=no
15373      else
15374        # Do we have a bin/javac?
15375        if test ! -x "$BOOT_JDK/bin/javac"; then
15376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15380          BOOT_JDK_FOUND=no
15381        else
15382          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15383          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15386            BOOT_JDK_FOUND=no
15387          else
15388            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15390
15391            # Extra M4 quote needed to protect [] in grep expression.
15392            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15393            if test "x$FOUND_VERSION_78" = x; then
15394              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15396              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15397$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15398              BOOT_JDK_FOUND=no
15399            else
15400              # We're done! :-)
15401              BOOT_JDK_FOUND=yes
15402
15403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15404
15405  # Input might be given as Windows format, start by converting to
15406  # unix format.
15407  path="$BOOT_JDK"
15408  new_path=`$CYGPATH -u "$path"`
15409
15410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15413  # "foo.exe" is OK but "foo" is an error.
15414  #
15415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15416  # It is also a way to make sure we got the proper file name for the real test later on.
15417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15418  if test "x$test_shortpath" = x; then
15419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15422  fi
15423
15424  # Call helper function which possibly converts this using DOS-style short mode.
15425  # If so, the updated path is stored in $new_path.
15426
15427  input_path="$new_path"
15428  # Check if we need to convert this using DOS-style short mode. If the path
15429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15430  # take no chances and rewrite it.
15431  # Note: m4 eats our [], so we need to use [ and ] instead.
15432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15433  if test "x$has_forbidden_chars" != x; then
15434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15438      # Going to short mode and back again did indeed matter. Since short mode is
15439      # case insensitive, let's make it lowercase to improve readability.
15440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15441      # Now convert it back to Unix-stile (cygpath)
15442      input_path=`$CYGPATH -u "$shortmode_path"`
15443      new_path="$input_path"
15444    fi
15445  fi
15446
15447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15448  if test "x$test_cygdrive_prefix" = x; then
15449    # As a simple fix, exclude /usr/bin since it's not a real path.
15450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15452      # a path prefixed by /cygdrive for fixpath to work.
15453      new_path="$CYGWIN_ROOT_PATH$input_path"
15454    fi
15455  fi
15456
15457
15458  if test "x$path" != "x$new_path"; then
15459    BOOT_JDK="$new_path"
15460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15462  fi
15463
15464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15465
15466  path="$BOOT_JDK"
15467  has_colon=`$ECHO $path | $GREP ^.:`
15468  new_path="$path"
15469  if test "x$has_colon" = x; then
15470    # Not in mixed or Windows style, start by that.
15471    new_path=`cmd //c echo $path`
15472  fi
15473
15474
15475  input_path="$new_path"
15476  # Check if we need to convert this using DOS-style short mode. If the path
15477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15478  # take no chances and rewrite it.
15479  # Note: m4 eats our [], so we need to use [ and ] instead.
15480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15481  if test "x$has_forbidden_chars" != x; then
15482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15484  fi
15485
15486
15487  windows_path="$new_path"
15488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15489    unix_path=`$CYGPATH -u "$windows_path"`
15490    new_path="$unix_path"
15491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15493    new_path="$unix_path"
15494  fi
15495
15496  if test "x$path" != "x$new_path"; then
15497    BOOT_JDK="$new_path"
15498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15500  fi
15501
15502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15504
15505  else
15506    # We're on a posix platform. Hooray! :)
15507    path="$BOOT_JDK"
15508    has_space=`$ECHO "$path" | $GREP " "`
15509    if test "x$has_space" != x; then
15510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15512      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15513    fi
15514
15515    # Use eval to expand a potential ~
15516    eval path="$path"
15517    if test ! -f "$path" && test ! -d "$path"; then
15518      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15519    fi
15520
15521    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15522  fi
15523
15524              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15525$as_echo_n "checking for Boot JDK... " >&6; }
15526              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15527$as_echo "$BOOT_JDK" >&6; }
15528              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15529$as_echo_n "checking Boot JDK version... " >&6; }
15530              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15531              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15532$as_echo "$BOOT_JDK_VERSION" >&6; }
15533            fi # end check jdk version
15534          fi # end check rt.jar
15535        fi # end check javac
15536      fi # end check java
15537    fi # end check boot jdk found
15538  fi
15539
15540  fi
15541
15542
15543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15545      # Do we have a bin/java?
15546      if test ! -x "$BOOT_JDK/bin/java"; then
15547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15549        BOOT_JDK_FOUND=no
15550      else
15551        # Do we have a bin/javac?
15552        if test ! -x "$BOOT_JDK/bin/javac"; then
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15557          BOOT_JDK_FOUND=no
15558        else
15559          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15560          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15561            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15563            BOOT_JDK_FOUND=no
15564          else
15565            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15567
15568            # Extra M4 quote needed to protect [] in grep expression.
15569            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15570            if test "x$FOUND_VERSION_78" = x; then
15571              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15573              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15574$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15575              BOOT_JDK_FOUND=no
15576            else
15577              # We're done! :-)
15578              BOOT_JDK_FOUND=yes
15579
15580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15581
15582  # Input might be given as Windows format, start by converting to
15583  # unix format.
15584  path="$BOOT_JDK"
15585  new_path=`$CYGPATH -u "$path"`
15586
15587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15590  # "foo.exe" is OK but "foo" is an error.
15591  #
15592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15593  # It is also a way to make sure we got the proper file name for the real test later on.
15594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15595  if test "x$test_shortpath" = x; then
15596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15599  fi
15600
15601  # Call helper function which possibly converts this using DOS-style short mode.
15602  # If so, the updated path is stored in $new_path.
15603
15604  input_path="$new_path"
15605  # Check if we need to convert this using DOS-style short mode. If the path
15606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15607  # take no chances and rewrite it.
15608  # Note: m4 eats our [], so we need to use [ and ] instead.
15609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15610  if test "x$has_forbidden_chars" != x; then
15611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15615      # Going to short mode and back again did indeed matter. Since short mode is
15616      # case insensitive, let's make it lowercase to improve readability.
15617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15618      # Now convert it back to Unix-stile (cygpath)
15619      input_path=`$CYGPATH -u "$shortmode_path"`
15620      new_path="$input_path"
15621    fi
15622  fi
15623
15624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15625  if test "x$test_cygdrive_prefix" = x; then
15626    # As a simple fix, exclude /usr/bin since it's not a real path.
15627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15629      # a path prefixed by /cygdrive for fixpath to work.
15630      new_path="$CYGWIN_ROOT_PATH$input_path"
15631    fi
15632  fi
15633
15634
15635  if test "x$path" != "x$new_path"; then
15636    BOOT_JDK="$new_path"
15637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15639  fi
15640
15641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15642
15643  path="$BOOT_JDK"
15644  has_colon=`$ECHO $path | $GREP ^.:`
15645  new_path="$path"
15646  if test "x$has_colon" = x; then
15647    # Not in mixed or Windows style, start by that.
15648    new_path=`cmd //c echo $path`
15649  fi
15650
15651
15652  input_path="$new_path"
15653  # Check if we need to convert this using DOS-style short mode. If the path
15654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15655  # take no chances and rewrite it.
15656  # Note: m4 eats our [], so we need to use [ and ] instead.
15657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15658  if test "x$has_forbidden_chars" != x; then
15659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15661  fi
15662
15663
15664  windows_path="$new_path"
15665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15666    unix_path=`$CYGPATH -u "$windows_path"`
15667    new_path="$unix_path"
15668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15670    new_path="$unix_path"
15671  fi
15672
15673  if test "x$path" != "x$new_path"; then
15674    BOOT_JDK="$new_path"
15675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15677  fi
15678
15679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15681
15682  else
15683    # We're on a posix platform. Hooray! :)
15684    path="$BOOT_JDK"
15685    has_space=`$ECHO "$path" | $GREP " "`
15686    if test "x$has_space" != x; then
15687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15690    fi
15691
15692    # Use eval to expand a potential ~
15693    eval path="$path"
15694    if test ! -f "$path" && test ! -d "$path"; then
15695      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15696    fi
15697
15698    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15699  fi
15700
15701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15702$as_echo_n "checking for Boot JDK... " >&6; }
15703              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15704$as_echo "$BOOT_JDK" >&6; }
15705              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15706$as_echo_n "checking Boot JDK version... " >&6; }
15707              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15709$as_echo "$BOOT_JDK_VERSION" >&6; }
15710            fi # end check jdk version
15711          fi # end check rt.jar
15712        fi # end check javac
15713      fi # end check java
15714    fi # end check boot jdk found
15715  fi
15716
15717
15718# If we haven't found anything yet, we've truly lost. Give up.
15719if test "x$BOOT_JDK_FOUND" = xno; then
15720
15721    # Print a helpful message on how to acquire the necessary build dependency.
15722    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15723    MISSING_DEPENDENCY=openjdk
15724    PKGHANDLER_COMMAND=
15725
15726    case $PKGHANDLER in
15727	apt-get)
15728                apt_help     $MISSING_DEPENDENCY ;;
15729    yum)
15730                yum_help     $MISSING_DEPENDENCY ;;
15731	port)
15732                port_help    $MISSING_DEPENDENCY ;;
15733	pkgutil)
15734                pkgutil_help $MISSING_DEPENDENCY ;;
15735	pkgadd)
15736                pkgadd_help  $MISSING_DEPENDENCY ;;
15737    * )
15738      break ;;
15739    esac
15740
15741    if test "x$PKGHANDLER_COMMAND" != x; then
15742        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15743    fi
15744
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15746$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15747  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15748$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15749  as_fn_error $? "Cannot continue" "$LINENO" 5
15750fi
15751
15752# Setup proper paths for what we found
15753BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15754if test ! -f "$BOOT_RTJAR"; then
15755    # On MacOSX it is called classes.jar
15756    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15757    if test -f "$BOOT_RTJAR"; then
15758      # Remove the ..
15759      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15760    fi
15761fi
15762BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15763BOOT_JDK="$BOOT_JDK"
15764
15765
15766
15767
15768# Setup tools from the Boot JDK.
15769
15770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15771$as_echo_n "checking for java in Boot JDK... " >&6; }
15772  JAVA=$BOOT_JDK/bin/java
15773  if test ! -x $JAVA; then
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15775$as_echo "not found" >&6; }
15776      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15777$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15778      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15779  fi
15780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15781$as_echo "ok" >&6; }
15782
15783
15784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15785$as_echo_n "checking for javac in Boot JDK... " >&6; }
15786  JAVAC=$BOOT_JDK/bin/javac
15787  if test ! -x $JAVAC; then
15788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15789$as_echo "not found" >&6; }
15790      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15791$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15792      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15793  fi
15794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15795$as_echo "ok" >&6; }
15796
15797
15798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15799$as_echo_n "checking for javah in Boot JDK... " >&6; }
15800  JAVAH=$BOOT_JDK/bin/javah
15801  if test ! -x $JAVAH; then
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15803$as_echo "not found" >&6; }
15804      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15805$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15806      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15807  fi
15808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15809$as_echo "ok" >&6; }
15810
15811
15812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15813$as_echo_n "checking for javap in Boot JDK... " >&6; }
15814  JAVAP=$BOOT_JDK/bin/javap
15815  if test ! -x $JAVAP; then
15816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15817$as_echo "not found" >&6; }
15818      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15819$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15820      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15821  fi
15822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15823$as_echo "ok" >&6; }
15824
15825
15826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15827$as_echo_n "checking for jar in Boot JDK... " >&6; }
15828  JAR=$BOOT_JDK/bin/jar
15829  if test ! -x $JAR; then
15830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15831$as_echo "not found" >&6; }
15832      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15833$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15834      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15835  fi
15836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15837$as_echo "ok" >&6; }
15838
15839
15840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15841$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15842  RMIC=$BOOT_JDK/bin/rmic
15843  if test ! -x $RMIC; then
15844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15845$as_echo "not found" >&6; }
15846      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15847$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15848      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15849  fi
15850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15851$as_echo "ok" >&6; }
15852
15853
15854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15855$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15856  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15857  if test ! -x $NATIVE2ASCII; then
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15859$as_echo "not found" >&6; }
15860      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15861$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15862      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15863  fi
15864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15865$as_echo "ok" >&6; }
15866
15867
15868# Finally, set some other options...
15869
15870# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15871BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15872
15873
15874
15875
15876##############################################################################
15877#
15878# Specify options for anything that is run with the Boot JDK.
15879#
15880
15881# Check whether --with-boot-jdk-jvmargs was given.
15882if test "${with_boot_jdk_jvmargs+set}" = set; then :
15883  withval=$with_boot_jdk_jvmargs;
15884fi
15885
15886
15887if test "x$with_boot_jdk_jvmargs" = x; then
15888    # Not all JVM:s accept the same arguments on the command line.
15889    # OpenJDK specific increase in thread stack for JDK build,
15890    # well more specifically, when running javac.
15891    if test "x$BUILD_NUM_BITS" = x32; then
15892       STACK_SIZE=768
15893    else
15894       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15895       # since 64-bit pointers are pushed on the stach. Apparently, we need
15896       # to increase the stack space when javacing the JDK....
15897       STACK_SIZE=1536
15898    fi
15899
15900    # Minimum amount of heap memory.
15901
15902    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15903    $ECHO "Command: $JAVA -Xms64M -version" >&5
15904    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15905    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15906    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15907    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15908        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15909	JVM_ARG_OK=true
15910    else
15911	$ECHO "Arg failed:" >&5
15912	$ECHO "$OUTPUT" >&5
15913	JVM_ARG_OK=false
15914    fi
15915
15916    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15917        # Why does macosx need more heap? Its the huge JDK batch.
15918
15919    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15920    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15921    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15922    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15923    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15924    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15925        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15926	JVM_ARG_OK=true
15927    else
15928	$ECHO "Arg failed:" >&5
15929	$ECHO "$OUTPUT" >&5
15930	JVM_ARG_OK=false
15931    fi
15932
15933    else
15934
15935    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15936    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15937    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15938    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15939    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15940    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15941        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15942	JVM_ARG_OK=true
15943    else
15944	$ECHO "Arg failed:" >&5
15945	$ECHO "$OUTPUT" >&5
15946	JVM_ARG_OK=false
15947    fi
15948
15949    fi
15950    # When is adding -client something that speeds up the JVM?
15951    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15952
15953    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15954    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15955    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15956    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15957    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15958    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15959        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15960	JVM_ARG_OK=true
15961    else
15962	$ECHO "Arg failed:" >&5
15963	$ECHO "$OUTPUT" >&5
15964	JVM_ARG_OK=false
15965    fi
15966
15967
15968    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15969    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15970    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15971    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15972    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15973    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15974        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15975	JVM_ARG_OK=true
15976    else
15977	$ECHO "Arg failed:" >&5
15978	$ECHO "$OUTPUT" >&5
15979	JVM_ARG_OK=false
15980    fi
15981
15982
15983    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15984    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15985    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15986    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15987    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15988    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15989        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15990	JVM_ARG_OK=true
15991    else
15992	$ECHO "Arg failed:" >&5
15993	$ECHO "$OUTPUT" >&5
15994	JVM_ARG_OK=false
15995    fi
15996
15997    # Disable special log output when a debug build is used as Boot JDK...
15998
15999    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16000    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16001    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16002    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16003    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16004    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16005        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16006	JVM_ARG_OK=true
16007    else
16008	$ECHO "Arg failed:" >&5
16009	$ECHO "$OUTPUT" >&5
16010	JVM_ARG_OK=false
16011    fi
16012
16013fi
16014
16015BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16016
16017
16018
16019###############################################################################
16020#
16021# Configure the sources to use. We can add or override individual directories.
16022#
16023###############################################################################
16024
16025
16026
16027# Where are the sources. Any of these can be overridden
16028# using --with-override-corba and the likes.
16029LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16030CORBA_TOPDIR="$SRC_ROOT/corba"
16031JAXP_TOPDIR="$SRC_ROOT/jaxp"
16032JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16033HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16034NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16035JDK_TOPDIR="$SRC_ROOT/jdk"
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046###############################################################################
16047#
16048# Pickup additional source for a component from outside of the source root
16049# or override source for a component.
16050#
16051
16052# Check whether --with-add-source-root was given.
16053if test "${with_add_source_root+set}" = set; then :
16054  withval=$with_add_source_root;
16055fi
16056
16057
16058
16059# Check whether --with-override-source-root was given.
16060if test "${with_override_source_root+set}" = set; then :
16061  withval=$with_override_source_root;
16062fi
16063
16064
16065
16066# Check whether --with-adds-and-overrides was given.
16067if test "${with_adds_and_overrides+set}" = set; then :
16068  withval=$with_adds_and_overrides;
16069fi
16070
16071
16072if test "x$with_adds_and_overrides" != x; then
16073    with_add_source_root="$with_adds_and_overrides/adds"
16074    with_override_source_root="$with_adds_and_overrides/overrides"
16075fi
16076
16077if test "x$with_add_source_root" != x; then
16078    if ! test -d $with_add_source_root; then
16079       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16080    fi
16081    CURDIR="$PWD"
16082    cd "$with_add_source_root"
16083    ADD_SRC_ROOT="`pwd`"
16084    cd "$CURDIR"
16085    # Verify that the addon source root does not have any root makefiles.
16086    # If it does, then it is usually an error, prevent this.
16087    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16088       test -f $with_add_source_root/langtools/make/Makefile; then
16089        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
16090    fi
16091    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16092       test -f $with_add_source_root/corba/make/Makefile; then
16093        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
16094    fi
16095    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16096       test -f $with_add_source_root/jaxp/make/Makefile; then
16097        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
16098    fi
16099    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16100       test -f $with_add_source_root/jaxws/make/Makefile; then
16101        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
16102    fi
16103    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16104       test -f $with_add_source_root/hotspot/make/Makefile; then
16105        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
16106    fi
16107    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16108       test -f $with_add_source_root/nashorn/make/Makefile; then
16109        as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16110    fi
16111    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16112       test -f $with_add_source_root/jdk/make/Makefile; then
16113        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
16114    fi
16115fi
16116
16117
16118if test "x$with_override_source_root" != x; then
16119    if ! test -d $with_override_source_root; then
16120       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16121    fi
16122    CURDIR="$PWD"
16123    cd "$with_override_source_root"
16124    OVERRIDE_SRC_ROOT="`pwd`"
16125    cd "$CURDIR"
16126    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16127       test -f $with_override_source_root/langtools/make/Makefile; then
16128        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
16129    fi
16130    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16131       test -f $with_override_source_root/corba/make/Makefile; then
16132        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
16133    fi
16134    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16135       test -f $with_override_source_root/jaxp/make/Makefile; then
16136        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
16137    fi
16138    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16139       test -f $with_override_source_root/jaxws/make/Makefile; then
16140        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
16141    fi
16142    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16143       test -f $with_override_source_root/hotspot/make/Makefile; then
16144        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
16145    fi
16146    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16147       test -f $with_override_source_root/nashorn/make/Makefile; then
16148        as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16149    fi
16150    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16151       test -f $with_override_source_root/jdk/make/Makefile; then
16152        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
16153    fi
16154fi
16155
16156
16157###############################################################################
16158#
16159# Override a repo completely, this is used for example when you have 3 small
16160# development sandboxes of the langtools sources and want to avoid having 3 full
16161# OpenJDK sources checked out on disk.
16162#
16163# Assuming that the 3 langtools sandboxes are located here:
16164# /home/fredrik/sandbox1/langtools
16165# /home/fredrik/sandbox2/langtools
16166# /home/fredrik/sandbox3/langtools
16167#
16168# From the source root you create build subdirs manually:
16169#     mkdir -p build1 build2 build3
16170# in each build directory run:
16171#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16172#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16173#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16174#
16175
16176
16177# Check whether --with-override-langtools was given.
16178if test "${with_override_langtools+set}" = set; then :
16179  withval=$with_override_langtools;
16180fi
16181
16182
16183
16184# Check whether --with-override-corba was given.
16185if test "${with_override_corba+set}" = set; then :
16186  withval=$with_override_corba;
16187fi
16188
16189
16190
16191# Check whether --with-override-jaxp was given.
16192if test "${with_override_jaxp+set}" = set; then :
16193  withval=$with_override_jaxp;
16194fi
16195
16196
16197
16198# Check whether --with-override-jaxws was given.
16199if test "${with_override_jaxws+set}" = set; then :
16200  withval=$with_override_jaxws;
16201fi
16202
16203
16204
16205# Check whether --with-override-hotspot was given.
16206if test "${with_override_hotspot+set}" = set; then :
16207  withval=$with_override_hotspot;
16208fi
16209
16210
16211
16212# Check whether --with-override-nashorn was given.
16213if test "${with_override_nashorn+set}" = set; then :
16214  withval=$with_override_nashorn;
16215fi
16216
16217
16218
16219# Check whether --with-override-jdk was given.
16220if test "${with_override_jdk+set}" = set; then :
16221  withval=$with_override_jdk;
16222fi
16223
16224
16225if test "x$with_override_langtools" != x; then
16226    CURDIR="$PWD"
16227    cd "$with_override_langtools"
16228    LANGTOOLS_TOPDIR="`pwd`"
16229    cd "$CURDIR"
16230    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16231        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16232    fi
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16234$as_echo_n "checking if langtools should be overridden... " >&6; }
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16236$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16237fi
16238if test "x$with_override_corba" != x; then
16239    CURDIR="$PWD"
16240    cd "$with_override_corba"
16241    CORBA_TOPDIR="`pwd`"
16242    cd "$CURDIR"
16243    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16244        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16245    fi
16246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16247$as_echo_n "checking if corba should be overridden... " >&6; }
16248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16249$as_echo "yes with $CORBA_TOPDIR" >&6; }
16250fi
16251if test "x$with_override_jaxp" != x; then
16252    CURDIR="$PWD"
16253    cd "$with_override_jaxp"
16254    JAXP_TOPDIR="`pwd`"
16255    cd "$CURDIR"
16256    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16257        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16258    fi
16259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16260$as_echo_n "checking if jaxp should be overridden... " >&6; }
16261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16262$as_echo "yes with $JAXP_TOPDIR" >&6; }
16263fi
16264if test "x$with_override_jaxws" != x; then
16265    CURDIR="$PWD"
16266    cd "$with_override_jaxws"
16267    JAXWS_TOPDIR="`pwd`"
16268    cd "$CURDIR"
16269    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16270        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16271    fi
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16273$as_echo_n "checking if jaxws should be overridden... " >&6; }
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16275$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16276fi
16277if test "x$with_override_hotspot" != x; then
16278    CURDIR="$PWD"
16279    cd "$with_override_hotspot"
16280    HOTSPOT_TOPDIR="`pwd`"
16281    cd "$CURDIR"
16282    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16283       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16284        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16285    fi
16286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16287$as_echo_n "checking if hotspot should be overridden... " >&6; }
16288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16289$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16290fi
16291if test "x$with_override_nashorn" != x; then
16292    CURDIR="$PWD"
16293    cd "$with_override_nashorn"
16294    NASHORN_TOPDIR="`pwd`"
16295    cd "$CURDIR"
16296    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16297        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16298    fi
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16300$as_echo_n "checking if nashorn should be overridden... " >&6; }
16301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16302$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16303fi
16304if test "x$with_override_jdk" != x; then
16305    CURDIR="$PWD"
16306    cd "$with_override_jdk"
16307    JDK_TOPDIR="`pwd`"
16308    cd "$CURDIR"
16309    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16310        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16311    fi
16312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16313$as_echo_n "checking if JDK should be overridden... " >&6; }
16314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16315$as_echo "yes with $JDK_TOPDIR" >&6; }
16316fi
16317
16318
16319
16320BUILD_OUTPUT="$OUTPUT_ROOT"
16321
16322
16323HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16324BUILD_HOTSPOT=true
16325
16326
16327
16328# Check whether --with-import-hotspot was given.
16329if test "${with_import_hotspot+set}" = set; then :
16330  withval=$with_import_hotspot;
16331fi
16332
16333if test "x$with_import_hotspot" != x; then
16334    CURDIR="$PWD"
16335    cd "$with_import_hotspot"
16336    HOTSPOT_DIST="`pwd`"
16337    cd "$CURDIR"
16338    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16339        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16340    fi
16341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16342$as_echo_n "checking if hotspot should be imported... " >&6; }
16343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16344$as_echo "yes from $HOTSPOT_DIST" >&6; }
16345    BUILD_HOTSPOT=false
16346fi
16347
16348JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16349
16350
16351###############################################################################
16352#
16353# Setup the toolchain (compilers etc), i.e. the tools that need to be
16354# cross-compilation aware.
16355#
16356###############################################################################
16357
16358
16359###############################################################################
16360#
16361# Configure the development tool paths and potential sysroot.
16362#
16363ac_ext=cpp
16364ac_cpp='$CXXCPP $CPPFLAGS'
16365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16368
16369
16370# The option used to specify the target .o,.a or .so file.
16371# When compiling, how to specify the to be created object file.
16372CC_OUT_OPTION='-o$(SPACE)'
16373# When linking, how to specify the to be created executable.
16374EXE_OUT_OPTION='-o$(SPACE)'
16375# When linking, how to specify the to be created dynamically linkable library.
16376LD_OUT_OPTION='-o$(SPACE)'
16377# When archiving, how to specify the to be create static archive for object files.
16378AR_OUT_OPTION='rcs$(SPACE)'
16379
16380
16381
16382
16383
16384# Locate the actual tools
16385
16386
16387# Check whether --with-jtreg was given.
16388if test "${with_jtreg+set}" = set; then :
16389  withval=$with_jtreg;
16390else
16391  with_jtreg=no
16392fi
16393
16394
16395  if test "x$with_jtreg" = xno; then
16396    # jtreg disabled
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16398$as_echo_n "checking for jtreg... " >&6; }
16399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16400$as_echo "no" >&6; }
16401  else
16402    if test "x$with_jtreg" != xyes; then
16403      # with path specified.
16404      JT_HOME="$with_jtreg"
16405    fi
16406
16407    if test "x$JT_HOME" != x; then
16408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16409$as_echo_n "checking for jtreg... " >&6; }
16410
16411      # use JT_HOME enviroment var.
16412
16413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414
16415  # Input might be given as Windows format, start by converting to
16416  # unix format.
16417  path="$JT_HOME"
16418  new_path=`$CYGPATH -u "$path"`
16419
16420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16423  # "foo.exe" is OK but "foo" is an error.
16424  #
16425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16426  # It is also a way to make sure we got the proper file name for the real test later on.
16427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16428  if test "x$test_shortpath" = x; then
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16430$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16431    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16432  fi
16433
16434  # Call helper function which possibly converts this using DOS-style short mode.
16435  # If so, the updated path is stored in $new_path.
16436
16437  input_path="$new_path"
16438  # Check if we need to convert this using DOS-style short mode. If the path
16439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16440  # take no chances and rewrite it.
16441  # Note: m4 eats our [], so we need to use [ and ] instead.
16442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16443  if test "x$has_forbidden_chars" != x; then
16444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16448      # Going to short mode and back again did indeed matter. Since short mode is
16449      # case insensitive, let's make it lowercase to improve readability.
16450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16451      # Now convert it back to Unix-stile (cygpath)
16452      input_path=`$CYGPATH -u "$shortmode_path"`
16453      new_path="$input_path"
16454    fi
16455  fi
16456
16457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16458  if test "x$test_cygdrive_prefix" = x; then
16459    # As a simple fix, exclude /usr/bin since it's not a real path.
16460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16462      # a path prefixed by /cygdrive for fixpath to work.
16463      new_path="$CYGWIN_ROOT_PATH$input_path"
16464    fi
16465  fi
16466
16467
16468  if test "x$path" != "x$new_path"; then
16469    JT_HOME="$new_path"
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16471$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16472  fi
16473
16474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16475
16476  path="$JT_HOME"
16477  has_colon=`$ECHO $path | $GREP ^.:`
16478  new_path="$path"
16479  if test "x$has_colon" = x; then
16480    # Not in mixed or Windows style, start by that.
16481    new_path=`cmd //c echo $path`
16482  fi
16483
16484
16485  input_path="$new_path"
16486  # Check if we need to convert this using DOS-style short mode. If the path
16487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16488  # take no chances and rewrite it.
16489  # Note: m4 eats our [], so we need to use [ and ] instead.
16490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16491  if test "x$has_forbidden_chars" != x; then
16492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16494  fi
16495
16496
16497  windows_path="$new_path"
16498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16499    unix_path=`$CYGPATH -u "$windows_path"`
16500    new_path="$unix_path"
16501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16503    new_path="$unix_path"
16504  fi
16505
16506  if test "x$path" != "x$new_path"; then
16507    JT_HOME="$new_path"
16508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16509$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16510  fi
16511
16512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16514
16515  else
16516    # We're on a posix platform. Hooray! :)
16517    path="$JT_HOME"
16518    has_space=`$ECHO "$path" | $GREP " "`
16519    if test "x$has_space" != x; then
16520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16521$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16522      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16523    fi
16524
16525    # Use eval to expand a potential ~
16526    eval path="$path"
16527    if test ! -f "$path" && test ! -d "$path"; then
16528      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16529    fi
16530
16531    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16532  fi
16533
16534
16535      # jtreg win32 script works for everybody
16536      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16537
16538      if test ! -f "$JTREGEXE"; then
16539        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16540      fi
16541
16542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16543$as_echo "$JTREGEXE" >&6; }
16544    else
16545      # try to find jtreg on path
16546
16547    for ac_prog in jtreg
16548do
16549  # Extract the first word of "$ac_prog", so it can be a program name with args.
16550set dummy $ac_prog; ac_word=$2
16551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16552$as_echo_n "checking for $ac_word... " >&6; }
16553if ${ac_cv_path_JTREGEXE+:} false; then :
16554  $as_echo_n "(cached) " >&6
16555else
16556  case $JTREGEXE in
16557  [\\/]* | ?:[\\/]*)
16558  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16559  ;;
16560  *)
16561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16562for as_dir in $PATH
16563do
16564  IFS=$as_save_IFS
16565  test -z "$as_dir" && as_dir=.
16566    for ac_exec_ext in '' $ac_executable_extensions; do
16567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16568    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16570    break 2
16571  fi
16572done
16573  done
16574IFS=$as_save_IFS
16575
16576  ;;
16577esac
16578fi
16579JTREGEXE=$ac_cv_path_JTREGEXE
16580if test -n "$JTREGEXE"; then
16581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16582$as_echo "$JTREGEXE" >&6; }
16583else
16584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16585$as_echo "no" >&6; }
16586fi
16587
16588
16589  test -n "$JTREGEXE" && break
16590done
16591
16592
16593    if test "x$JTREGEXE" = x; then
16594        if test "xjtreg" = x; then
16595          PROG_NAME=jtregexe
16596        else
16597          PROG_NAME=jtreg
16598        fi
16599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16600$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16601        as_fn_error $? "Cannot continue" "$LINENO" 5
16602    fi
16603
16604
16605      JT_HOME="`$DIRNAME $JTREGEXE`"
16606    fi
16607  fi
16608
16609
16610
16611
16612
16613if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16614
16615  # Store path to cygwin link.exe to help excluding it when searching for
16616  # VS linker. This must be done before changing the PATH when looking for VS.
16617  # Extract the first word of "link", so it can be a program name with args.
16618set dummy link; ac_word=$2
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16620$as_echo_n "checking for $ac_word... " >&6; }
16621if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16622  $as_echo_n "(cached) " >&6
16623else
16624  case $CYGWIN_LINK in
16625  [\\/]* | ?:[\\/]*)
16626  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16627  ;;
16628  *)
16629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16630for as_dir in $PATH
16631do
16632  IFS=$as_save_IFS
16633  test -z "$as_dir" && as_dir=.
16634    for ac_exec_ext in '' $ac_executable_extensions; do
16635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16636    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16638    break 2
16639  fi
16640done
16641  done
16642IFS=$as_save_IFS
16643
16644  ;;
16645esac
16646fi
16647CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16648if test -n "$CYGWIN_LINK"; then
16649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16650$as_echo "$CYGWIN_LINK" >&6; }
16651else
16652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16653$as_echo "no" >&6; }
16654fi
16655
16656
16657  if test "x$CYGWIN_LINK" != x; then
16658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16659$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16660    "$CYGWIN_LINK" --version > /dev/null
16661    if test $? -eq 0 ; then
16662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16663$as_echo "yes" >&6; }
16664    else
16665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16666$as_echo "no" >&6; }
16667      # This might be the VS linker. Don't exclude it later on.
16668      CYGWIN_LINK=""
16669    fi
16670  fi
16671
16672  # First-hand choice is to locate and run the vsvars bat file.
16673
16674  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16675    VCVARSFILE="vc/bin/vcvars32.bat"
16676  else
16677    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16678  fi
16679
16680  VS_ENV_CMD=""
16681  VS_ENV_ARGS=""
16682  if test "x$with_toolsdir" != x; then
16683
16684  if test "x$VS_ENV_CMD" = x; then
16685    VS100BASE="$with_toolsdir/../.."
16686    METHOD="--with-tools-dir"
16687
16688  windows_path="$VS100BASE"
16689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16690    unix_path=`$CYGPATH -u "$windows_path"`
16691    VS100BASE="$unix_path"
16692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16694    VS100BASE="$unix_path"
16695  fi
16696
16697    if test -d "$VS100BASE"; then
16698      if test -f "$VS100BASE/$VCVARSFILE"; then
16699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16700$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16701        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16702      else
16703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16704$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16706$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16707      fi
16708    fi
16709  fi
16710
16711  fi
16712
16713  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16714    # Having specified an argument which is incorrect will produce an instant failure;
16715    # we should not go on looking
16716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16717$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16718    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16719$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16720    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16721  fi
16722
16723  if test "x$VS100COMNTOOLS" != x; then
16724
16725  if test "x$VS_ENV_CMD" = x; then
16726    VS100BASE="$VS100COMNTOOLS/../.."
16727    METHOD="VS100COMNTOOLS variable"
16728
16729  windows_path="$VS100BASE"
16730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16731    unix_path=`$CYGPATH -u "$windows_path"`
16732    VS100BASE="$unix_path"
16733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16735    VS100BASE="$unix_path"
16736  fi
16737
16738    if test -d "$VS100BASE"; then
16739      if test -f "$VS100BASE/$VCVARSFILE"; then
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16741$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16742        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16743      else
16744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16745$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16746        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16747$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16748      fi
16749    fi
16750  fi
16751
16752  fi
16753  if test "x$PROGRAMFILES" != x; then
16754
16755  if test "x$VS_ENV_CMD" = x; then
16756    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16757    METHOD="well-known name"
16758
16759  windows_path="$VS100BASE"
16760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16761    unix_path=`$CYGPATH -u "$windows_path"`
16762    VS100BASE="$unix_path"
16763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16765    VS100BASE="$unix_path"
16766  fi
16767
16768    if test -d "$VS100BASE"; then
16769      if test -f "$VS100BASE/$VCVARSFILE"; then
16770        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16771$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16772        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16773      else
16774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16775$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16777$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16778      fi
16779    fi
16780  fi
16781
16782  fi
16783
16784  if test "x$VS_ENV_CMD" = x; then
16785    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16786    METHOD="well-known name"
16787
16788  windows_path="$VS100BASE"
16789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16790    unix_path=`$CYGPATH -u "$windows_path"`
16791    VS100BASE="$unix_path"
16792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16794    VS100BASE="$unix_path"
16795  fi
16796
16797    if test -d "$VS100BASE"; then
16798      if test -f "$VS100BASE/$VCVARSFILE"; then
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16800$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16801        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16802      else
16803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16804$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16805        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16806$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16807      fi
16808    fi
16809  fi
16810
16811
16812  if test "x$VS_ENV_CMD" = x; then
16813    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16814    METHOD="well-known name"
16815
16816  windows_path="$VS100BASE"
16817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16818    unix_path=`$CYGPATH -u "$windows_path"`
16819    VS100BASE="$unix_path"
16820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16822    VS100BASE="$unix_path"
16823  fi
16824
16825    if test -d "$VS100BASE"; then
16826      if test -f "$VS100BASE/$VCVARSFILE"; then
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16828$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16829        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16830      else
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16832$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16834$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16835      fi
16836    fi
16837  fi
16838
16839
16840  if test "x$ProgramW6432" != x; then
16841
16842  if test "x$VS_ENV_CMD" = x; then
16843    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16844    METHOD="well-known name"
16845
16846  windows_path="$WIN_SDK_BASE"
16847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848    unix_path=`$CYGPATH -u "$windows_path"`
16849    WIN_SDK_BASE="$unix_path"
16850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16852    WIN_SDK_BASE="$unix_path"
16853  fi
16854
16855    if test -d "$WIN_SDK_BASE"; then
16856      # There have been cases of partial or broken SDK installations. A missing
16857      # lib dir is not going to work.
16858      if test ! -d "$WIN_SDK_BASE/../lib"; then
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16860$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16862$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16863      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16864        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16865$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16866        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16867        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16868          VS_ENV_ARGS="/x86"
16869        else
16870          VS_ENV_ARGS="/x64"
16871        fi
16872      else
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16874$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16875        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16876$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16877      fi
16878    fi
16879  fi
16880
16881  fi
16882  if test "x$PROGRAMW6432" != x; then
16883
16884  if test "x$VS_ENV_CMD" = x; then
16885    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16886    METHOD="well-known name"
16887
16888  windows_path="$WIN_SDK_BASE"
16889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16890    unix_path=`$CYGPATH -u "$windows_path"`
16891    WIN_SDK_BASE="$unix_path"
16892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16894    WIN_SDK_BASE="$unix_path"
16895  fi
16896
16897    if test -d "$WIN_SDK_BASE"; then
16898      # There have been cases of partial or broken SDK installations. A missing
16899      # lib dir is not going to work.
16900      if test ! -d "$WIN_SDK_BASE/../lib"; then
16901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16902$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16903        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16904$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16905      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16906        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16907$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16908        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16909        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16910          VS_ENV_ARGS="/x86"
16911        else
16912          VS_ENV_ARGS="/x64"
16913        fi
16914      else
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16916$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16917        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16918$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16919      fi
16920    fi
16921  fi
16922
16923  fi
16924  if test "x$PROGRAMFILES" != x; then
16925
16926  if test "x$VS_ENV_CMD" = x; then
16927    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16928    METHOD="well-known name"
16929
16930  windows_path="$WIN_SDK_BASE"
16931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16932    unix_path=`$CYGPATH -u "$windows_path"`
16933    WIN_SDK_BASE="$unix_path"
16934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16936    WIN_SDK_BASE="$unix_path"
16937  fi
16938
16939    if test -d "$WIN_SDK_BASE"; then
16940      # There have been cases of partial or broken SDK installations. A missing
16941      # lib dir is not going to work.
16942      if test ! -d "$WIN_SDK_BASE/../lib"; then
16943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16944$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16945        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16946$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16947      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16948        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16949$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16950        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16951        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16952          VS_ENV_ARGS="/x86"
16953        else
16954          VS_ENV_ARGS="/x64"
16955        fi
16956      else
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16958$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16959        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16960$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16961      fi
16962    fi
16963  fi
16964
16965  fi
16966
16967  if test "x$VS_ENV_CMD" = x; then
16968    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16969    METHOD="well-known name"
16970
16971  windows_path="$WIN_SDK_BASE"
16972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16973    unix_path=`$CYGPATH -u "$windows_path"`
16974    WIN_SDK_BASE="$unix_path"
16975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16977    WIN_SDK_BASE="$unix_path"
16978  fi
16979
16980    if test -d "$WIN_SDK_BASE"; then
16981      # There have been cases of partial or broken SDK installations. A missing
16982      # lib dir is not going to work.
16983      if test ! -d "$WIN_SDK_BASE/../lib"; then
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16985$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16987$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16988      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16989        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16990$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16991        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16992        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16993          VS_ENV_ARGS="/x86"
16994        else
16995          VS_ENV_ARGS="/x64"
16996        fi
16997      else
16998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17000        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17001$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17002      fi
17003    fi
17004  fi
17005
17006
17007  if test "x$VS_ENV_CMD" = x; then
17008    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17009    METHOD="well-known name"
17010
17011  windows_path="$WIN_SDK_BASE"
17012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17013    unix_path=`$CYGPATH -u "$windows_path"`
17014    WIN_SDK_BASE="$unix_path"
17015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17017    WIN_SDK_BASE="$unix_path"
17018  fi
17019
17020    if test -d "$WIN_SDK_BASE"; then
17021      # There have been cases of partial or broken SDK installations. A missing
17022      # lib dir is not going to work.
17023      if test ! -d "$WIN_SDK_BASE/../lib"; then
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17027$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17028      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17030$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17031        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17032        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17033          VS_ENV_ARGS="/x86"
17034        else
17035          VS_ENV_ARGS="/x64"
17036        fi
17037      else
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17039$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17041$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17042      fi
17043    fi
17044  fi
17045
17046
17047  if test "x$VS_ENV_CMD" != x; then
17048    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17049
17050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17051
17052  # First separate the path from the arguments. This will split at the first
17053  # space.
17054  complete="$VS_ENV_CMD"
17055  path="${complete%% *}"
17056  tmp="$complete EOL"
17057  arguments="${tmp#* }"
17058
17059  # Input might be given as Windows format, start by converting to
17060  # unix format.
17061  new_path=`$CYGPATH -u "$path"`
17062
17063  # Now try to locate executable using which
17064  new_path=`$WHICH "$new_path" 2> /dev/null`
17065  # bat and cmd files are not always considered executable in cygwin causing which
17066  # to not find them
17067  if test "x$new_path" = x \
17068           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17069           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17070    new_path=`$CYGPATH -u "$path"`
17071  fi
17072  if test "x$new_path" = x; then
17073    # Oops. Which didn't find the executable.
17074    # The splitting of arguments from the executable at a space might have been incorrect,
17075    # since paths with space are more likely in Windows. Give it another try with the whole
17076    # argument.
17077    path="$complete"
17078    arguments="EOL"
17079    new_path=`$CYGPATH -u "$path"`
17080    new_path=`$WHICH "$new_path" 2> /dev/null`
17081    # bat and cmd files are not always considered executable in cygwin causing which
17082    # to not find them
17083    if test "x$new_path" = x \
17084             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17085             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17086      new_path=`$CYGPATH -u "$path"`
17087    fi
17088    if test "x$new_path" = x; then
17089      # It's still not found. Now this is an unrecoverable error.
17090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17091$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17092      has_space=`$ECHO "$complete" | $GREP " "`
17093      if test "x$has_space" != x; then
17094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17096      fi
17097      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17098    fi
17099  fi
17100
17101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17104  # "foo.exe" is OK but "foo" is an error.
17105  #
17106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17107  # It is also a way to make sure we got the proper file name for the real test later on.
17108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17109  if test "x$test_shortpath" = x; then
17110    # Short path failed, file does not exist as specified.
17111    # Try adding .exe or .cmd
17112    if test -f "${new_path}.exe"; then
17113       input_to_shortpath="${new_path}.exe"
17114    elif test -f "${new_path}.cmd"; then
17115       input_to_shortpath="${new_path}.cmd"
17116    else
17117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17118$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17121      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17122    fi
17123  else
17124    input_to_shortpath="$new_path"
17125  fi
17126
17127  # Call helper function which possibly converts this using DOS-style short mode.
17128  # If so, the updated path is stored in $new_path.
17129  new_path="$input_to_shortpath"
17130
17131  input_path="$input_to_shortpath"
17132  # Check if we need to convert this using DOS-style short mode. If the path
17133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17134  # take no chances and rewrite it.
17135  # Note: m4 eats our [], so we need to use [ and ] instead.
17136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17137  if test "x$has_forbidden_chars" != x; then
17138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17142      # Going to short mode and back again did indeed matter. Since short mode is
17143      # case insensitive, let's make it lowercase to improve readability.
17144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17145      # Now convert it back to Unix-stile (cygpath)
17146      input_path=`$CYGPATH -u "$shortmode_path"`
17147      new_path="$input_path"
17148    fi
17149  fi
17150
17151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17152  if test "x$test_cygdrive_prefix" = x; then
17153    # As a simple fix, exclude /usr/bin since it's not a real path.
17154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17156      # a path prefixed by /cygdrive for fixpath to work.
17157      new_path="$CYGWIN_ROOT_PATH$input_path"
17158    fi
17159  fi
17160
17161  # remove trailing .exe if any
17162  new_path="${new_path/%.exe/}"
17163
17164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165
17166  # First separate the path from the arguments. This will split at the first
17167  # space.
17168  complete="$VS_ENV_CMD"
17169  path="${complete%% *}"
17170  tmp="$complete EOL"
17171  arguments="${tmp#* }"
17172
17173  # Input might be given as Windows format, start by converting to
17174  # unix format.
17175  new_path="$path"
17176
17177  windows_path="$new_path"
17178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17179    unix_path=`$CYGPATH -u "$windows_path"`
17180    new_path="$unix_path"
17181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17183    new_path="$unix_path"
17184  fi
17185
17186
17187  # Now try to locate executable using which
17188  new_path=`$WHICH "$new_path" 2> /dev/null`
17189
17190  if test "x$new_path" = x; then
17191    # Oops. Which didn't find the executable.
17192    # The splitting of arguments from the executable at a space might have been incorrect,
17193    # since paths with space are more likely in Windows. Give it another try with the whole
17194    # argument.
17195    path="$complete"
17196    arguments="EOL"
17197    new_path="$path"
17198
17199  windows_path="$new_path"
17200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17201    unix_path=`$CYGPATH -u "$windows_path"`
17202    new_path="$unix_path"
17203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17205    new_path="$unix_path"
17206  fi
17207
17208
17209    new_path=`$WHICH "$new_path" 2> /dev/null`
17210
17211    if test "x$new_path" = x; then
17212      # It's still not found. Now this is an unrecoverable error.
17213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17214$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17215      has_space=`$ECHO "$complete" | $GREP " "`
17216      if test "x$has_space" != x; then
17217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17219      fi
17220      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17221    fi
17222  fi
17223
17224  # Now new_path has a complete unix path to the binary
17225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17226    # Keep paths in /bin as-is, but remove trailing .exe if any
17227    new_path="${new_path/%.exe/}"
17228    # Do not save /bin paths to all_fixpath_prefixes!
17229  else
17230    # Not in mixed or Windows style, start by that.
17231    new_path=`cmd //c echo $new_path`
17232
17233  input_path="$new_path"
17234  # Check if we need to convert this using DOS-style short mode. If the path
17235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17236  # take no chances and rewrite it.
17237  # Note: m4 eats our [], so we need to use [ and ] instead.
17238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17239  if test "x$has_forbidden_chars" != x; then
17240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17242  fi
17243
17244    # Output is in $new_path
17245
17246  windows_path="$new_path"
17247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17248    unix_path=`$CYGPATH -u "$windows_path"`
17249    new_path="$unix_path"
17250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17252    new_path="$unix_path"
17253  fi
17254
17255    # remove trailing .exe if any
17256    new_path="${new_path/%.exe/}"
17257
17258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17260  fi
17261
17262  else
17263    # We're on a posix platform. Hooray! :)
17264    # First separate the path from the arguments. This will split at the first
17265    # space.
17266    complete="$VS_ENV_CMD"
17267    path="${complete%% *}"
17268    tmp="$complete EOL"
17269    arguments="${tmp#* }"
17270
17271    # Cannot rely on the command "which" here since it doesn't always work.
17272    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17273    if test -z "$is_absolute_path"; then
17274      # Path to executable is not absolute. Find it.
17275      IFS_save="$IFS"
17276      IFS=:
17277      for p in $PATH; do
17278        if test -f "$p/$path" && test -x "$p/$path"; then
17279          new_path="$p/$path"
17280          break
17281        fi
17282      done
17283      IFS="$IFS_save"
17284    else
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17286$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17287      new_path="$path"
17288    fi
17289
17290    if test "x$new_path" = x; then
17291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17292$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17293        has_space=`$ECHO "$complete" | $GREP " "`
17294        if test "x$has_space" != x; then
17295          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17297        fi
17298        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17299      fi
17300  fi
17301
17302      # Now join together the path and the arguments once again
17303      if test "x$arguments" != xEOL; then
17304        new_complete="$new_path ${arguments% *}"
17305      else
17306        new_complete="$new_path"
17307      fi
17308
17309  if test "x$complete" != "x$new_complete"; then
17310      VS_ENV_CMD="$new_complete"
17311      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17312$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17313    fi
17314
17315
17316    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17317    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17318$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17319    cd $OUTPUT_ROOT
17320    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17321    # to autoconf standards.
17322
17323    #----
17324
17325    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17326    # but calculate the difference in Cygwin environment before/after running it and then
17327    # apply the diff.
17328
17329    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17330      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17331      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17332      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17333    else
17334      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17335      _dosbash=`cmd //c echo \`which bash\``
17336    fi
17337
17338    # generate the set of exported vars before/after the vs10 setup
17339    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17340    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17341    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17342    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17343
17344    # Now execute the newly created bat file.
17345    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17346    cmd /c localdevenvtmp.bat | cat
17347
17348    # apply the diff (less some non-vs10 vars named by "!")
17349    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17350    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17351    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17352
17353    # cleanup
17354    $RM localdevenvtmp*
17355    #----
17356    cd $CURDIR
17357    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17359$as_echo "no" >&6; }
17360      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17361$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17362      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17363$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17364      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17365$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17366      as_fn_error $? "Cannot continue" "$LINENO" 5
17367    fi
17368
17369    # Now set all paths and other env variables. This will allow the rest of
17370    # the configure script to find and run the compiler in the proper way.
17371    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17372$as_echo "$as_me: Setting extracted environment variables" >&6;}
17373    . $OUTPUT_ROOT/localdevenv.sh
17374  else
17375    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17376    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17377$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17378  fi
17379
17380  # At this point, we should have corrent variables in the environment, or we can't continue.
17381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17382$as_echo_n "checking for Visual Studio variables... " >&6; }
17383
17384  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17385    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17387$as_echo "present but broken" >&6; }
17388      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17389    else
17390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17391$as_echo "ok" >&6; }
17392      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17393      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17394      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17395      # Remove any paths containing # (typically F#) as that messes up make
17396      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17397      VS_PATH="$PATH"
17398
17399
17400
17401    fi
17402  else
17403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17404$as_echo "not found" >&6; }
17405
17406    if test "x$VS_ENV_CMD" = x; then
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17408$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17409      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17410$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17411    else
17412      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17413$as_echo "$as_me: Running the extraction script failed." >&6;}
17414    fi
17415    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17416$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17417    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17418$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17419    as_fn_error $? "Cannot continue" "$LINENO" 5
17420  fi
17421
17422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17423$as_echo_n "checking for msvcr100.dll... " >&6; }
17424
17425# Check whether --with-msvcr-dll was given.
17426if test "${with_msvcr_dll+set}" = set; then :
17427  withval=$with_msvcr_dll;
17428fi
17429
17430  if test "x$with_msvcr_dll" != x; then
17431    MSVCR_DLL="$with_msvcr_dll"
17432  else
17433    if test "x$VCINSTALLDIR" != x; then
17434      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17435        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17436      else
17437        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17438        if test "x$MSVCR_DLL" = x; then
17439          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17440        fi
17441      fi
17442      if test "x$MSVCR_DLL" != x; then
17443        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17444$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17445      else
17446        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17447$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17448      fi
17449    fi
17450    # Try some fallback alternatives
17451    if test "x$MSVCR_DLL" = x; then
17452      # If visual studio express is installed, there is usually one with the debugger
17453      if test "x$VS100COMNTOOLS" != x; then
17454        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17455          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17456          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17457$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17458        fi
17459      fi
17460    fi
17461    if test "x$MSVCR_DLL" = x; then
17462      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17463        # Fallback for 32bit builds, look in the windows directory.
17464        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17465          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17466$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17467          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17468        fi
17469      fi
17470    fi
17471  fi
17472  if test "x$MSVCR_DLL" = x; then
17473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17474$as_echo "no" >&6; }
17475    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17476  fi
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17478$as_echo "$MSVCR_DLL" >&6; }
17479
17480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17481
17482  # Input might be given as Windows format, start by converting to
17483  # unix format.
17484  path="$MSVCR_DLL"
17485  new_path=`$CYGPATH -u "$path"`
17486
17487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17490  # "foo.exe" is OK but "foo" is an error.
17491  #
17492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17493  # It is also a way to make sure we got the proper file name for the real test later on.
17494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17495  if test "x$test_shortpath" = x; then
17496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17497$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17498    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17499  fi
17500
17501  # Call helper function which possibly converts this using DOS-style short mode.
17502  # If so, the updated path is stored in $new_path.
17503
17504  input_path="$new_path"
17505  # Check if we need to convert this using DOS-style short mode. If the path
17506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17507  # take no chances and rewrite it.
17508  # Note: m4 eats our [], so we need to use [ and ] instead.
17509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17510  if test "x$has_forbidden_chars" != x; then
17511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17515      # Going to short mode and back again did indeed matter. Since short mode is
17516      # case insensitive, let's make it lowercase to improve readability.
17517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17518      # Now convert it back to Unix-stile (cygpath)
17519      input_path=`$CYGPATH -u "$shortmode_path"`
17520      new_path="$input_path"
17521    fi
17522  fi
17523
17524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17525  if test "x$test_cygdrive_prefix" = x; then
17526    # As a simple fix, exclude /usr/bin since it's not a real path.
17527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17529      # a path prefixed by /cygdrive for fixpath to work.
17530      new_path="$CYGWIN_ROOT_PATH$input_path"
17531    fi
17532  fi
17533
17534
17535  if test "x$path" != "x$new_path"; then
17536    MSVCR_DLL="$new_path"
17537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17538$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17539  fi
17540
17541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17542
17543  path="$MSVCR_DLL"
17544  has_colon=`$ECHO $path | $GREP ^.:`
17545  new_path="$path"
17546  if test "x$has_colon" = x; then
17547    # Not in mixed or Windows style, start by that.
17548    new_path=`cmd //c echo $path`
17549  fi
17550
17551
17552  input_path="$new_path"
17553  # Check if we need to convert this using DOS-style short mode. If the path
17554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17555  # take no chances and rewrite it.
17556  # Note: m4 eats our [], so we need to use [ and ] instead.
17557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17558  if test "x$has_forbidden_chars" != x; then
17559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17561  fi
17562
17563
17564  windows_path="$new_path"
17565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17566    unix_path=`$CYGPATH -u "$windows_path"`
17567    new_path="$unix_path"
17568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17570    new_path="$unix_path"
17571  fi
17572
17573  if test "x$path" != "x$new_path"; then
17574    MSVCR_DLL="$new_path"
17575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17576$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17577  fi
17578
17579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17581
17582  else
17583    # We're on a posix platform. Hooray! :)
17584    path="$MSVCR_DLL"
17585    has_space=`$ECHO "$path" | $GREP " "`
17586    if test "x$has_space" != x; then
17587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17588$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17589      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17590    fi
17591
17592    # Use eval to expand a potential ~
17593    eval path="$path"
17594    if test ! -f "$path" && test ! -d "$path"; then
17595      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17596    fi
17597
17598    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17599  fi
17600
17601
17602
17603
17604# Check whether --with-dxsdk was given.
17605if test "${with_dxsdk+set}" = set; then :
17606  withval=$with_dxsdk;
17607fi
17608
17609
17610# Check whether --with-dxsdk-lib was given.
17611if test "${with_dxsdk_lib+set}" = set; then :
17612  withval=$with_dxsdk_lib;
17613fi
17614
17615
17616# Check whether --with-dxsdk-include was given.
17617if test "${with_dxsdk_include+set}" = set; then :
17618  withval=$with_dxsdk_include;
17619fi
17620
17621
17622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17623$as_echo_n "checking for DirectX SDK... " >&6; }
17624
17625  if test "x$with_dxsdk" != x; then
17626    dxsdk_path="$with_dxsdk"
17627  elif test "x$DXSDK_DIR" != x; then
17628    dxsdk_path="$DXSDK_DIR"
17629  elif test -d "C:/DXSDK"; then
17630    dxsdk_path="C:/DXSDK"
17631  else
17632    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17633  fi
17634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17635$as_echo "$dxsdk_path" >&6; }
17636
17637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17638
17639  # Input might be given as Windows format, start by converting to
17640  # unix format.
17641  path="$dxsdk_path"
17642  new_path=`$CYGPATH -u "$path"`
17643
17644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17647  # "foo.exe" is OK but "foo" is an error.
17648  #
17649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17650  # It is also a way to make sure we got the proper file name for the real test later on.
17651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17652  if test "x$test_shortpath" = x; then
17653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17654$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17655    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17656  fi
17657
17658  # Call helper function which possibly converts this using DOS-style short mode.
17659  # If so, the updated path is stored in $new_path.
17660
17661  input_path="$new_path"
17662  # Check if we need to convert this using DOS-style short mode. If the path
17663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17664  # take no chances and rewrite it.
17665  # Note: m4 eats our [], so we need to use [ and ] instead.
17666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17667  if test "x$has_forbidden_chars" != x; then
17668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17672      # Going to short mode and back again did indeed matter. Since short mode is
17673      # case insensitive, let's make it lowercase to improve readability.
17674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17675      # Now convert it back to Unix-stile (cygpath)
17676      input_path=`$CYGPATH -u "$shortmode_path"`
17677      new_path="$input_path"
17678    fi
17679  fi
17680
17681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17682  if test "x$test_cygdrive_prefix" = x; then
17683    # As a simple fix, exclude /usr/bin since it's not a real path.
17684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17686      # a path prefixed by /cygdrive for fixpath to work.
17687      new_path="$CYGWIN_ROOT_PATH$input_path"
17688    fi
17689  fi
17690
17691
17692  if test "x$path" != "x$new_path"; then
17693    dxsdk_path="$new_path"
17694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17695$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17696  fi
17697
17698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17699
17700  path="$dxsdk_path"
17701  has_colon=`$ECHO $path | $GREP ^.:`
17702  new_path="$path"
17703  if test "x$has_colon" = x; then
17704    # Not in mixed or Windows style, start by that.
17705    new_path=`cmd //c echo $path`
17706  fi
17707
17708
17709  input_path="$new_path"
17710  # Check if we need to convert this using DOS-style short mode. If the path
17711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17712  # take no chances and rewrite it.
17713  # Note: m4 eats our [], so we need to use [ and ] instead.
17714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17715  if test "x$has_forbidden_chars" != x; then
17716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17718  fi
17719
17720
17721  windows_path="$new_path"
17722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17723    unix_path=`$CYGPATH -u "$windows_path"`
17724    new_path="$unix_path"
17725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17727    new_path="$unix_path"
17728  fi
17729
17730  if test "x$path" != "x$new_path"; then
17731    dxsdk_path="$new_path"
17732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17733$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17734  fi
17735
17736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17738
17739  else
17740    # We're on a posix platform. Hooray! :)
17741    path="$dxsdk_path"
17742    has_space=`$ECHO "$path" | $GREP " "`
17743    if test "x$has_space" != x; then
17744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17745$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17746      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17747    fi
17748
17749    # Use eval to expand a potential ~
17750    eval path="$path"
17751    if test ! -f "$path" && test ! -d "$path"; then
17752      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17753    fi
17754
17755    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17756  fi
17757
17758
17759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17760$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17761  if test "x$with_dxsdk_lib" != x; then
17762    DXSDK_LIB_PATH="$with_dxsdk_lib"
17763  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17764    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17765  else
17766    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17767  fi
17768  # dsound.lib is linked to in jsoundds
17769  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17770    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17771  fi
17772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17773$as_echo "$DXSDK_LIB_PATH" >&6; }
17774
17775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17776
17777  # Input might be given as Windows format, start by converting to
17778  # unix format.
17779  path="$DXSDK_LIB_PATH"
17780  new_path=`$CYGPATH -u "$path"`
17781
17782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17785  # "foo.exe" is OK but "foo" is an error.
17786  #
17787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17788  # It is also a way to make sure we got the proper file name for the real test later on.
17789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17790  if test "x$test_shortpath" = x; then
17791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17792$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17793    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17794  fi
17795
17796  # Call helper function which possibly converts this using DOS-style short mode.
17797  # If so, the updated path is stored in $new_path.
17798
17799  input_path="$new_path"
17800  # Check if we need to convert this using DOS-style short mode. If the path
17801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17802  # take no chances and rewrite it.
17803  # Note: m4 eats our [], so we need to use [ and ] instead.
17804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17805  if test "x$has_forbidden_chars" != x; then
17806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17810      # Going to short mode and back again did indeed matter. Since short mode is
17811      # case insensitive, let's make it lowercase to improve readability.
17812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17813      # Now convert it back to Unix-stile (cygpath)
17814      input_path=`$CYGPATH -u "$shortmode_path"`
17815      new_path="$input_path"
17816    fi
17817  fi
17818
17819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17820  if test "x$test_cygdrive_prefix" = x; then
17821    # As a simple fix, exclude /usr/bin since it's not a real path.
17822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17824      # a path prefixed by /cygdrive for fixpath to work.
17825      new_path="$CYGWIN_ROOT_PATH$input_path"
17826    fi
17827  fi
17828
17829
17830  if test "x$path" != "x$new_path"; then
17831    DXSDK_LIB_PATH="$new_path"
17832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17833$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17834  fi
17835
17836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17837
17838  path="$DXSDK_LIB_PATH"
17839  has_colon=`$ECHO $path | $GREP ^.:`
17840  new_path="$path"
17841  if test "x$has_colon" = x; then
17842    # Not in mixed or Windows style, start by that.
17843    new_path=`cmd //c echo $path`
17844  fi
17845
17846
17847  input_path="$new_path"
17848  # Check if we need to convert this using DOS-style short mode. If the path
17849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17850  # take no chances and rewrite it.
17851  # Note: m4 eats our [], so we need to use [ and ] instead.
17852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17853  if test "x$has_forbidden_chars" != x; then
17854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17856  fi
17857
17858
17859  windows_path="$new_path"
17860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17861    unix_path=`$CYGPATH -u "$windows_path"`
17862    new_path="$unix_path"
17863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17865    new_path="$unix_path"
17866  fi
17867
17868  if test "x$path" != "x$new_path"; then
17869    DXSDK_LIB_PATH="$new_path"
17870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17871$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17872  fi
17873
17874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17876
17877  else
17878    # We're on a posix platform. Hooray! :)
17879    path="$DXSDK_LIB_PATH"
17880    has_space=`$ECHO "$path" | $GREP " "`
17881    if test "x$has_space" != x; then
17882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17883$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17884      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17885    fi
17886
17887    # Use eval to expand a potential ~
17888    eval path="$path"
17889    if test ! -f "$path" && test ! -d "$path"; then
17890      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17891    fi
17892
17893    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17894  fi
17895
17896
17897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17898$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17899  if test "x$with_dxsdk_include" != x; then
17900    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17901  else
17902    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17903  fi
17904  # dsound.h is included in jsoundds
17905  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17906    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17907  fi
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17909$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17910
17911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17912
17913  # Input might be given as Windows format, start by converting to
17914  # unix format.
17915  path="$DXSDK_INCLUDE_PATH"
17916  new_path=`$CYGPATH -u "$path"`
17917
17918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17921  # "foo.exe" is OK but "foo" is an error.
17922  #
17923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17924  # It is also a way to make sure we got the proper file name for the real test later on.
17925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17926  if test "x$test_shortpath" = x; then
17927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17928$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17929    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17930  fi
17931
17932  # Call helper function which possibly converts this using DOS-style short mode.
17933  # If so, the updated path is stored in $new_path.
17934
17935  input_path="$new_path"
17936  # Check if we need to convert this using DOS-style short mode. If the path
17937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17938  # take no chances and rewrite it.
17939  # Note: m4 eats our [], so we need to use [ and ] instead.
17940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17941  if test "x$has_forbidden_chars" != x; then
17942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17946      # Going to short mode and back again did indeed matter. Since short mode is
17947      # case insensitive, let's make it lowercase to improve readability.
17948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17949      # Now convert it back to Unix-stile (cygpath)
17950      input_path=`$CYGPATH -u "$shortmode_path"`
17951      new_path="$input_path"
17952    fi
17953  fi
17954
17955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17956  if test "x$test_cygdrive_prefix" = x; then
17957    # As a simple fix, exclude /usr/bin since it's not a real path.
17958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17960      # a path prefixed by /cygdrive for fixpath to work.
17961      new_path="$CYGWIN_ROOT_PATH$input_path"
17962    fi
17963  fi
17964
17965
17966  if test "x$path" != "x$new_path"; then
17967    DXSDK_INCLUDE_PATH="$new_path"
17968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17969$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17970  fi
17971
17972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17973
17974  path="$DXSDK_INCLUDE_PATH"
17975  has_colon=`$ECHO $path | $GREP ^.:`
17976  new_path="$path"
17977  if test "x$has_colon" = x; then
17978    # Not in mixed or Windows style, start by that.
17979    new_path=`cmd //c echo $path`
17980  fi
17981
17982
17983  input_path="$new_path"
17984  # Check if we need to convert this using DOS-style short mode. If the path
17985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17986  # take no chances and rewrite it.
17987  # Note: m4 eats our [], so we need to use [ and ] instead.
17988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17989  if test "x$has_forbidden_chars" != x; then
17990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17992  fi
17993
17994
17995  windows_path="$new_path"
17996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17997    unix_path=`$CYGPATH -u "$windows_path"`
17998    new_path="$unix_path"
17999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18001    new_path="$unix_path"
18002  fi
18003
18004  if test "x$path" != "x$new_path"; then
18005    DXSDK_INCLUDE_PATH="$new_path"
18006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18007$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18008  fi
18009
18010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18012
18013  else
18014    # We're on a posix platform. Hooray! :)
18015    path="$DXSDK_INCLUDE_PATH"
18016    has_space=`$ECHO "$path" | $GREP " "`
18017    if test "x$has_space" != x; then
18018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18019$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18020      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18021    fi
18022
18023    # Use eval to expand a potential ~
18024    eval path="$path"
18025    if test ! -f "$path" && test ! -d "$path"; then
18026      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18027    fi
18028
18029    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
18030  fi
18031
18032
18033
18034
18035  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18036
18037fi
18038
18039
18040
18041# If --build AND --host is set, then the configure script will find any
18042# cross compilation tools in the PATH. Cross compilation tools
18043# follows the cross compilation standard where they are prefixed with ${host}.
18044# For example the binary i686-sun-solaris2.10-gcc
18045# will cross compile for i686-sun-solaris2.10
18046# If neither of build and host is not set, then build=host and the
18047# default compiler found in the path will be used.
18048# Setting only --host, does not seem to be really supported.
18049# Please set both --build and --host if you want to cross compile.
18050
18051if test "x$COMPILE_TYPE" = "xcross"; then
18052    # Now we to find a C/C++ compiler that can build executables for the build
18053    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18054    # once. Also, we need to do this before adding a tools dir to the path,
18055    # otherwise we might pick up cross-compilers which don't use standard naming.
18056    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18057    # to wait until they are properly discovered.
18058    for ac_prog in cl cc gcc
18059do
18060  # Extract the first word of "$ac_prog", so it can be a program name with args.
18061set dummy $ac_prog; ac_word=$2
18062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18063$as_echo_n "checking for $ac_word... " >&6; }
18064if ${ac_cv_path_BUILD_CC+:} false; then :
18065  $as_echo_n "(cached) " >&6
18066else
18067  case $BUILD_CC in
18068  [\\/]* | ?:[\\/]*)
18069  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18070  ;;
18071  *)
18072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18073for as_dir in $PATH
18074do
18075  IFS=$as_save_IFS
18076  test -z "$as_dir" && as_dir=.
18077    for ac_exec_ext in '' $ac_executable_extensions; do
18078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18079    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18081    break 2
18082  fi
18083done
18084  done
18085IFS=$as_save_IFS
18086
18087  ;;
18088esac
18089fi
18090BUILD_CC=$ac_cv_path_BUILD_CC
18091if test -n "$BUILD_CC"; then
18092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18093$as_echo "$BUILD_CC" >&6; }
18094else
18095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18096$as_echo "no" >&6; }
18097fi
18098
18099
18100  test -n "$BUILD_CC" && break
18101done
18102
18103
18104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105
18106  # First separate the path from the arguments. This will split at the first
18107  # space.
18108  complete="$BUILD_CC"
18109  path="${complete%% *}"
18110  tmp="$complete EOL"
18111  arguments="${tmp#* }"
18112
18113  # Input might be given as Windows format, start by converting to
18114  # unix format.
18115  new_path=`$CYGPATH -u "$path"`
18116
18117  # Now try to locate executable using which
18118  new_path=`$WHICH "$new_path" 2> /dev/null`
18119  # bat and cmd files are not always considered executable in cygwin causing which
18120  # to not find them
18121  if test "x$new_path" = x \
18122           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18123           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18124    new_path=`$CYGPATH -u "$path"`
18125  fi
18126  if test "x$new_path" = x; then
18127    # Oops. Which didn't find the executable.
18128    # The splitting of arguments from the executable at a space might have been incorrect,
18129    # since paths with space are more likely in Windows. Give it another try with the whole
18130    # argument.
18131    path="$complete"
18132    arguments="EOL"
18133    new_path=`$CYGPATH -u "$path"`
18134    new_path=`$WHICH "$new_path" 2> /dev/null`
18135    # bat and cmd files are not always considered executable in cygwin causing which
18136    # to not find them
18137    if test "x$new_path" = x \
18138             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18139             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18140      new_path=`$CYGPATH -u "$path"`
18141    fi
18142    if test "x$new_path" = x; then
18143      # It's still not found. Now this is an unrecoverable error.
18144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18145$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18146      has_space=`$ECHO "$complete" | $GREP " "`
18147      if test "x$has_space" != x; then
18148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18150      fi
18151      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18152    fi
18153  fi
18154
18155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18158  # "foo.exe" is OK but "foo" is an error.
18159  #
18160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18161  # It is also a way to make sure we got the proper file name for the real test later on.
18162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18163  if test "x$test_shortpath" = x; then
18164    # Short path failed, file does not exist as specified.
18165    # Try adding .exe or .cmd
18166    if test -f "${new_path}.exe"; then
18167       input_to_shortpath="${new_path}.exe"
18168    elif test -f "${new_path}.cmd"; then
18169       input_to_shortpath="${new_path}.cmd"
18170    else
18171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18172$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18173      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18174$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18175      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18176    fi
18177  else
18178    input_to_shortpath="$new_path"
18179  fi
18180
18181  # Call helper function which possibly converts this using DOS-style short mode.
18182  # If so, the updated path is stored in $new_path.
18183  new_path="$input_to_shortpath"
18184
18185  input_path="$input_to_shortpath"
18186  # Check if we need to convert this using DOS-style short mode. If the path
18187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18188  # take no chances and rewrite it.
18189  # Note: m4 eats our [], so we need to use [ and ] instead.
18190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18191  if test "x$has_forbidden_chars" != x; then
18192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18196      # Going to short mode and back again did indeed matter. Since short mode is
18197      # case insensitive, let's make it lowercase to improve readability.
18198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18199      # Now convert it back to Unix-stile (cygpath)
18200      input_path=`$CYGPATH -u "$shortmode_path"`
18201      new_path="$input_path"
18202    fi
18203  fi
18204
18205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18206  if test "x$test_cygdrive_prefix" = x; then
18207    # As a simple fix, exclude /usr/bin since it's not a real path.
18208    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18210      # a path prefixed by /cygdrive for fixpath to work.
18211      new_path="$CYGWIN_ROOT_PATH$input_path"
18212    fi
18213  fi
18214
18215  # remove trailing .exe if any
18216  new_path="${new_path/%.exe/}"
18217
18218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18219
18220  # First separate the path from the arguments. This will split at the first
18221  # space.
18222  complete="$BUILD_CC"
18223  path="${complete%% *}"
18224  tmp="$complete EOL"
18225  arguments="${tmp#* }"
18226
18227  # Input might be given as Windows format, start by converting to
18228  # unix format.
18229  new_path="$path"
18230
18231  windows_path="$new_path"
18232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233    unix_path=`$CYGPATH -u "$windows_path"`
18234    new_path="$unix_path"
18235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18237    new_path="$unix_path"
18238  fi
18239
18240
18241  # Now try to locate executable using which
18242  new_path=`$WHICH "$new_path" 2> /dev/null`
18243
18244  if test "x$new_path" = x; then
18245    # Oops. Which didn't find the executable.
18246    # The splitting of arguments from the executable at a space might have been incorrect,
18247    # since paths with space are more likely in Windows. Give it another try with the whole
18248    # argument.
18249    path="$complete"
18250    arguments="EOL"
18251    new_path="$path"
18252
18253  windows_path="$new_path"
18254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18255    unix_path=`$CYGPATH -u "$windows_path"`
18256    new_path="$unix_path"
18257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18259    new_path="$unix_path"
18260  fi
18261
18262
18263    new_path=`$WHICH "$new_path" 2> /dev/null`
18264
18265    if test "x$new_path" = x; then
18266      # It's still not found. Now this is an unrecoverable error.
18267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18268$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18269      has_space=`$ECHO "$complete" | $GREP " "`
18270      if test "x$has_space" != x; then
18271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18273      fi
18274      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18275    fi
18276  fi
18277
18278  # Now new_path has a complete unix path to the binary
18279  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18280    # Keep paths in /bin as-is, but remove trailing .exe if any
18281    new_path="${new_path/%.exe/}"
18282    # Do not save /bin paths to all_fixpath_prefixes!
18283  else
18284    # Not in mixed or Windows style, start by that.
18285    new_path=`cmd //c echo $new_path`
18286
18287  input_path="$new_path"
18288  # Check if we need to convert this using DOS-style short mode. If the path
18289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18290  # take no chances and rewrite it.
18291  # Note: m4 eats our [], so we need to use [ and ] instead.
18292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18293  if test "x$has_forbidden_chars" != x; then
18294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18296  fi
18297
18298    # Output is in $new_path
18299
18300  windows_path="$new_path"
18301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18302    unix_path=`$CYGPATH -u "$windows_path"`
18303    new_path="$unix_path"
18304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18306    new_path="$unix_path"
18307  fi
18308
18309    # remove trailing .exe if any
18310    new_path="${new_path/%.exe/}"
18311
18312    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18313    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18314  fi
18315
18316  else
18317    # We're on a posix platform. Hooray! :)
18318    # First separate the path from the arguments. This will split at the first
18319    # space.
18320    complete="$BUILD_CC"
18321    path="${complete%% *}"
18322    tmp="$complete EOL"
18323    arguments="${tmp#* }"
18324
18325    # Cannot rely on the command "which" here since it doesn't always work.
18326    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18327    if test -z "$is_absolute_path"; then
18328      # Path to executable is not absolute. Find it.
18329      IFS_save="$IFS"
18330      IFS=:
18331      for p in $PATH; do
18332        if test -f "$p/$path" && test -x "$p/$path"; then
18333          new_path="$p/$path"
18334          break
18335        fi
18336      done
18337      IFS="$IFS_save"
18338    else
18339      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18340$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18341      new_path="$path"
18342    fi
18343
18344    if test "x$new_path" = x; then
18345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18346$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18347        has_space=`$ECHO "$complete" | $GREP " "`
18348        if test "x$has_space" != x; then
18349          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18350$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18351        fi
18352        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18353      fi
18354  fi
18355
18356      # Now join together the path and the arguments once again
18357      if test "x$arguments" != xEOL; then
18358        new_complete="$new_path ${arguments% *}"
18359      else
18360        new_complete="$new_path"
18361      fi
18362
18363  if test "x$complete" != "x$new_complete"; then
18364      BUILD_CC="$new_complete"
18365      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18366$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18367    fi
18368
18369    for ac_prog in cl CC g++
18370do
18371  # Extract the first word of "$ac_prog", so it can be a program name with args.
18372set dummy $ac_prog; ac_word=$2
18373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18374$as_echo_n "checking for $ac_word... " >&6; }
18375if ${ac_cv_path_BUILD_CXX+:} false; then :
18376  $as_echo_n "(cached) " >&6
18377else
18378  case $BUILD_CXX in
18379  [\\/]* | ?:[\\/]*)
18380  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18381  ;;
18382  *)
18383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18384for as_dir in $PATH
18385do
18386  IFS=$as_save_IFS
18387  test -z "$as_dir" && as_dir=.
18388    for ac_exec_ext in '' $ac_executable_extensions; do
18389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18390    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18392    break 2
18393  fi
18394done
18395  done
18396IFS=$as_save_IFS
18397
18398  ;;
18399esac
18400fi
18401BUILD_CXX=$ac_cv_path_BUILD_CXX
18402if test -n "$BUILD_CXX"; then
18403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18404$as_echo "$BUILD_CXX" >&6; }
18405else
18406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18407$as_echo "no" >&6; }
18408fi
18409
18410
18411  test -n "$BUILD_CXX" && break
18412done
18413
18414
18415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18416
18417  # First separate the path from the arguments. This will split at the first
18418  # space.
18419  complete="$BUILD_CXX"
18420  path="${complete%% *}"
18421  tmp="$complete EOL"
18422  arguments="${tmp#* }"
18423
18424  # Input might be given as Windows format, start by converting to
18425  # unix format.
18426  new_path=`$CYGPATH -u "$path"`
18427
18428  # Now try to locate executable using which
18429  new_path=`$WHICH "$new_path" 2> /dev/null`
18430  # bat and cmd files are not always considered executable in cygwin causing which
18431  # to not find them
18432  if test "x$new_path" = x \
18433           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18434           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18435    new_path=`$CYGPATH -u "$path"`
18436  fi
18437  if test "x$new_path" = x; then
18438    # Oops. Which didn't find the executable.
18439    # The splitting of arguments from the executable at a space might have been incorrect,
18440    # since paths with space are more likely in Windows. Give it another try with the whole
18441    # argument.
18442    path="$complete"
18443    arguments="EOL"
18444    new_path=`$CYGPATH -u "$path"`
18445    new_path=`$WHICH "$new_path" 2> /dev/null`
18446    # bat and cmd files are not always considered executable in cygwin causing which
18447    # to not find them
18448    if test "x$new_path" = x \
18449             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18450             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18451      new_path=`$CYGPATH -u "$path"`
18452    fi
18453    if test "x$new_path" = x; then
18454      # It's still not found. Now this is an unrecoverable error.
18455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18456$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18457      has_space=`$ECHO "$complete" | $GREP " "`
18458      if test "x$has_space" != x; then
18459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18461      fi
18462      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18463    fi
18464  fi
18465
18466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18469  # "foo.exe" is OK but "foo" is an error.
18470  #
18471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18472  # It is also a way to make sure we got the proper file name for the real test later on.
18473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18474  if test "x$test_shortpath" = x; then
18475    # Short path failed, file does not exist as specified.
18476    # Try adding .exe or .cmd
18477    if test -f "${new_path}.exe"; then
18478       input_to_shortpath="${new_path}.exe"
18479    elif test -f "${new_path}.cmd"; then
18480       input_to_shortpath="${new_path}.cmd"
18481    else
18482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18483$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18484      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18485$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18486      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18487    fi
18488  else
18489    input_to_shortpath="$new_path"
18490  fi
18491
18492  # Call helper function which possibly converts this using DOS-style short mode.
18493  # If so, the updated path is stored in $new_path.
18494  new_path="$input_to_shortpath"
18495
18496  input_path="$input_to_shortpath"
18497  # Check if we need to convert this using DOS-style short mode. If the path
18498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18499  # take no chances and rewrite it.
18500  # Note: m4 eats our [], so we need to use [ and ] instead.
18501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18502  if test "x$has_forbidden_chars" != x; then
18503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18507      # Going to short mode and back again did indeed matter. Since short mode is
18508      # case insensitive, let's make it lowercase to improve readability.
18509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18510      # Now convert it back to Unix-stile (cygpath)
18511      input_path=`$CYGPATH -u "$shortmode_path"`
18512      new_path="$input_path"
18513    fi
18514  fi
18515
18516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18517  if test "x$test_cygdrive_prefix" = x; then
18518    # As a simple fix, exclude /usr/bin since it's not a real path.
18519    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18521      # a path prefixed by /cygdrive for fixpath to work.
18522      new_path="$CYGWIN_ROOT_PATH$input_path"
18523    fi
18524  fi
18525
18526  # remove trailing .exe if any
18527  new_path="${new_path/%.exe/}"
18528
18529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18530
18531  # First separate the path from the arguments. This will split at the first
18532  # space.
18533  complete="$BUILD_CXX"
18534  path="${complete%% *}"
18535  tmp="$complete EOL"
18536  arguments="${tmp#* }"
18537
18538  # Input might be given as Windows format, start by converting to
18539  # unix format.
18540  new_path="$path"
18541
18542  windows_path="$new_path"
18543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18544    unix_path=`$CYGPATH -u "$windows_path"`
18545    new_path="$unix_path"
18546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18548    new_path="$unix_path"
18549  fi
18550
18551
18552  # Now try to locate executable using which
18553  new_path=`$WHICH "$new_path" 2> /dev/null`
18554
18555  if test "x$new_path" = x; then
18556    # Oops. Which didn't find the executable.
18557    # The splitting of arguments from the executable at a space might have been incorrect,
18558    # since paths with space are more likely in Windows. Give it another try with the whole
18559    # argument.
18560    path="$complete"
18561    arguments="EOL"
18562    new_path="$path"
18563
18564  windows_path="$new_path"
18565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18566    unix_path=`$CYGPATH -u "$windows_path"`
18567    new_path="$unix_path"
18568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18570    new_path="$unix_path"
18571  fi
18572
18573
18574    new_path=`$WHICH "$new_path" 2> /dev/null`
18575
18576    if test "x$new_path" = x; then
18577      # It's still not found. Now this is an unrecoverable error.
18578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18579$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18580      has_space=`$ECHO "$complete" | $GREP " "`
18581      if test "x$has_space" != x; then
18582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18584      fi
18585      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18586    fi
18587  fi
18588
18589  # Now new_path has a complete unix path to the binary
18590  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18591    # Keep paths in /bin as-is, but remove trailing .exe if any
18592    new_path="${new_path/%.exe/}"
18593    # Do not save /bin paths to all_fixpath_prefixes!
18594  else
18595    # Not in mixed or Windows style, start by that.
18596    new_path=`cmd //c echo $new_path`
18597
18598  input_path="$new_path"
18599  # Check if we need to convert this using DOS-style short mode. If the path
18600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18601  # take no chances and rewrite it.
18602  # Note: m4 eats our [], so we need to use [ and ] instead.
18603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18604  if test "x$has_forbidden_chars" != x; then
18605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18607  fi
18608
18609    # Output is in $new_path
18610
18611  windows_path="$new_path"
18612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18613    unix_path=`$CYGPATH -u "$windows_path"`
18614    new_path="$unix_path"
18615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18617    new_path="$unix_path"
18618  fi
18619
18620    # remove trailing .exe if any
18621    new_path="${new_path/%.exe/}"
18622
18623    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18624    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18625  fi
18626
18627  else
18628    # We're on a posix platform. Hooray! :)
18629    # First separate the path from the arguments. This will split at the first
18630    # space.
18631    complete="$BUILD_CXX"
18632    path="${complete%% *}"
18633    tmp="$complete EOL"
18634    arguments="${tmp#* }"
18635
18636    # Cannot rely on the command "which" here since it doesn't always work.
18637    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18638    if test -z "$is_absolute_path"; then
18639      # Path to executable is not absolute. Find it.
18640      IFS_save="$IFS"
18641      IFS=:
18642      for p in $PATH; do
18643        if test -f "$p/$path" && test -x "$p/$path"; then
18644          new_path="$p/$path"
18645          break
18646        fi
18647      done
18648      IFS="$IFS_save"
18649    else
18650      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18651$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18652      new_path="$path"
18653    fi
18654
18655    if test "x$new_path" = x; then
18656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18657$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18658        has_space=`$ECHO "$complete" | $GREP " "`
18659        if test "x$has_space" != x; then
18660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18662        fi
18663        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18664      fi
18665  fi
18666
18667      # Now join together the path and the arguments once again
18668      if test "x$arguments" != xEOL; then
18669        new_complete="$new_path ${arguments% *}"
18670      else
18671        new_complete="$new_path"
18672      fi
18673
18674  if test "x$complete" != "x$new_complete"; then
18675      BUILD_CXX="$new_complete"
18676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18677$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18678    fi
18679
18680    # Extract the first word of "ld", so it can be a program name with args.
18681set dummy ld; ac_word=$2
18682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18683$as_echo_n "checking for $ac_word... " >&6; }
18684if ${ac_cv_path_BUILD_LD+:} false; then :
18685  $as_echo_n "(cached) " >&6
18686else
18687  case $BUILD_LD in
18688  [\\/]* | ?:[\\/]*)
18689  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18690  ;;
18691  *)
18692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18693for as_dir in $PATH
18694do
18695  IFS=$as_save_IFS
18696  test -z "$as_dir" && as_dir=.
18697    for ac_exec_ext in '' $ac_executable_extensions; do
18698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18699    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18701    break 2
18702  fi
18703done
18704  done
18705IFS=$as_save_IFS
18706
18707  ;;
18708esac
18709fi
18710BUILD_LD=$ac_cv_path_BUILD_LD
18711if test -n "$BUILD_LD"; then
18712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18713$as_echo "$BUILD_LD" >&6; }
18714else
18715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18716$as_echo "no" >&6; }
18717fi
18718
18719
18720
18721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18722
18723  # First separate the path from the arguments. This will split at the first
18724  # space.
18725  complete="$BUILD_LD"
18726  path="${complete%% *}"
18727  tmp="$complete EOL"
18728  arguments="${tmp#* }"
18729
18730  # Input might be given as Windows format, start by converting to
18731  # unix format.
18732  new_path=`$CYGPATH -u "$path"`
18733
18734  # Now try to locate executable using which
18735  new_path=`$WHICH "$new_path" 2> /dev/null`
18736  # bat and cmd files are not always considered executable in cygwin causing which
18737  # to not find them
18738  if test "x$new_path" = x \
18739           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18740           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18741    new_path=`$CYGPATH -u "$path"`
18742  fi
18743  if test "x$new_path" = x; then
18744    # Oops. Which didn't find the executable.
18745    # The splitting of arguments from the executable at a space might have been incorrect,
18746    # since paths with space are more likely in Windows. Give it another try with the whole
18747    # argument.
18748    path="$complete"
18749    arguments="EOL"
18750    new_path=`$CYGPATH -u "$path"`
18751    new_path=`$WHICH "$new_path" 2> /dev/null`
18752    # bat and cmd files are not always considered executable in cygwin causing which
18753    # to not find them
18754    if test "x$new_path" = x \
18755             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18756             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18757      new_path=`$CYGPATH -u "$path"`
18758    fi
18759    if test "x$new_path" = x; then
18760      # It's still not found. Now this is an unrecoverable error.
18761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18762$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18763      has_space=`$ECHO "$complete" | $GREP " "`
18764      if test "x$has_space" != x; then
18765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18767      fi
18768      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18769    fi
18770  fi
18771
18772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18775  # "foo.exe" is OK but "foo" is an error.
18776  #
18777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18778  # It is also a way to make sure we got the proper file name for the real test later on.
18779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18780  if test "x$test_shortpath" = x; then
18781    # Short path failed, file does not exist as specified.
18782    # Try adding .exe or .cmd
18783    if test -f "${new_path}.exe"; then
18784       input_to_shortpath="${new_path}.exe"
18785    elif test -f "${new_path}.cmd"; then
18786       input_to_shortpath="${new_path}.cmd"
18787    else
18788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18789$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18792      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18793    fi
18794  else
18795    input_to_shortpath="$new_path"
18796  fi
18797
18798  # Call helper function which possibly converts this using DOS-style short mode.
18799  # If so, the updated path is stored in $new_path.
18800  new_path="$input_to_shortpath"
18801
18802  input_path="$input_to_shortpath"
18803  # Check if we need to convert this using DOS-style short mode. If the path
18804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18805  # take no chances and rewrite it.
18806  # Note: m4 eats our [], so we need to use [ and ] instead.
18807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18808  if test "x$has_forbidden_chars" != x; then
18809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18813      # Going to short mode and back again did indeed matter. Since short mode is
18814      # case insensitive, let's make it lowercase to improve readability.
18815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18816      # Now convert it back to Unix-stile (cygpath)
18817      input_path=`$CYGPATH -u "$shortmode_path"`
18818      new_path="$input_path"
18819    fi
18820  fi
18821
18822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18823  if test "x$test_cygdrive_prefix" = x; then
18824    # As a simple fix, exclude /usr/bin since it's not a real path.
18825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18827      # a path prefixed by /cygdrive for fixpath to work.
18828      new_path="$CYGWIN_ROOT_PATH$input_path"
18829    fi
18830  fi
18831
18832  # remove trailing .exe if any
18833  new_path="${new_path/%.exe/}"
18834
18835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18836
18837  # First separate the path from the arguments. This will split at the first
18838  # space.
18839  complete="$BUILD_LD"
18840  path="${complete%% *}"
18841  tmp="$complete EOL"
18842  arguments="${tmp#* }"
18843
18844  # Input might be given as Windows format, start by converting to
18845  # unix format.
18846  new_path="$path"
18847
18848  windows_path="$new_path"
18849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18850    unix_path=`$CYGPATH -u "$windows_path"`
18851    new_path="$unix_path"
18852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18854    new_path="$unix_path"
18855  fi
18856
18857
18858  # Now try to locate executable using which
18859  new_path=`$WHICH "$new_path" 2> /dev/null`
18860
18861  if test "x$new_path" = x; then
18862    # Oops. Which didn't find the executable.
18863    # The splitting of arguments from the executable at a space might have been incorrect,
18864    # since paths with space are more likely in Windows. Give it another try with the whole
18865    # argument.
18866    path="$complete"
18867    arguments="EOL"
18868    new_path="$path"
18869
18870  windows_path="$new_path"
18871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18872    unix_path=`$CYGPATH -u "$windows_path"`
18873    new_path="$unix_path"
18874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18876    new_path="$unix_path"
18877  fi
18878
18879
18880    new_path=`$WHICH "$new_path" 2> /dev/null`
18881
18882    if test "x$new_path" = x; then
18883      # It's still not found. Now this is an unrecoverable error.
18884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18885$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18886      has_space=`$ECHO "$complete" | $GREP " "`
18887      if test "x$has_space" != x; then
18888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18890      fi
18891      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18892    fi
18893  fi
18894
18895  # Now new_path has a complete unix path to the binary
18896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18897    # Keep paths in /bin as-is, but remove trailing .exe if any
18898    new_path="${new_path/%.exe/}"
18899    # Do not save /bin paths to all_fixpath_prefixes!
18900  else
18901    # Not in mixed or Windows style, start by that.
18902    new_path=`cmd //c echo $new_path`
18903
18904  input_path="$new_path"
18905  # Check if we need to convert this using DOS-style short mode. If the path
18906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18907  # take no chances and rewrite it.
18908  # Note: m4 eats our [], so we need to use [ and ] instead.
18909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18910  if test "x$has_forbidden_chars" != x; then
18911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18913  fi
18914
18915    # Output is in $new_path
18916
18917  windows_path="$new_path"
18918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18919    unix_path=`$CYGPATH -u "$windows_path"`
18920    new_path="$unix_path"
18921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18923    new_path="$unix_path"
18924  fi
18925
18926    # remove trailing .exe if any
18927    new_path="${new_path/%.exe/}"
18928
18929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18931  fi
18932
18933  else
18934    # We're on a posix platform. Hooray! :)
18935    # First separate the path from the arguments. This will split at the first
18936    # space.
18937    complete="$BUILD_LD"
18938    path="${complete%% *}"
18939    tmp="$complete EOL"
18940    arguments="${tmp#* }"
18941
18942    # Cannot rely on the command "which" here since it doesn't always work.
18943    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18944    if test -z "$is_absolute_path"; then
18945      # Path to executable is not absolute. Find it.
18946      IFS_save="$IFS"
18947      IFS=:
18948      for p in $PATH; do
18949        if test -f "$p/$path" && test -x "$p/$path"; then
18950          new_path="$p/$path"
18951          break
18952        fi
18953      done
18954      IFS="$IFS_save"
18955    else
18956      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18957$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18958      new_path="$path"
18959    fi
18960
18961    if test "x$new_path" = x; then
18962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18963$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18964        has_space=`$ECHO "$complete" | $GREP " "`
18965        if test "x$has_space" != x; then
18966          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18968        fi
18969        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18970      fi
18971  fi
18972
18973      # Now join together the path and the arguments once again
18974      if test "x$arguments" != xEOL; then
18975        new_complete="$new_path ${arguments% *}"
18976      else
18977        new_complete="$new_path"
18978      fi
18979
18980  if test "x$complete" != "x$new_complete"; then
18981      BUILD_LD="$new_complete"
18982      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18983$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18984    fi
18985
18986fi
18987
18988
18989
18990
18991# If a devkit is found on the builddeps server, then prepend its path to the
18992# PATH variable. If there are cross compilers available in the devkit, these
18993# will be found by AC_PROG_CC et al.
18994DEVKIT=
18995
18996
18997    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18998        # Source the builddeps file again, to make sure it uses the latest variables!
18999        . $builddepsfile
19000        # Look for a target and build machine specific resource!
19001        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19002        if test "x$resource" = x; then
19003            # Ok, lets instead look for a target specific resource
19004            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19005        fi
19006        if test "x$resource" = x; then
19007            # Ok, lets instead look for a build specific resource
19008            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19009        fi
19010        if test "x$resource" = x; then
19011            # Ok, lets instead look for a generic resource
19012            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19013            resource=${builddep_devkit}
19014        fi
19015        if test "x$resource" != x; then
19016            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19017$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19018	    # If the resource in the builddeps.conf file is an existing directory,
19019	    # for example /java/linux/cups
19020	    if test -d ${resource}; then
19021	       depdir=${resource}
19022	    else
19023
19024# devkit is for example mymodule
19025# $resource is for example libs/general/libmymod_1_2_3.zip
19026# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19027# $with_builddeps_dir is for example /localhome/builddeps
19028# depdir is the name of the variable into which we store the depdir, eg MYMOD
19029# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19030# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19031    filename=`basename $resource`
19032    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19033    filebase=${filename%%.*}
19034    extension=${filename#*.}
19035    installdir=$with_builddeps_dir/$filebase
19036    if test ! -f $installdir/$filename.unpacked; then
19037        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19038$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19039        if test ! -d $installdir; then
19040            mkdir -p $installdir
19041        fi
19042        if test ! -d $installdir; then
19043            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19044        fi
19045        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19046        touch $tmpfile
19047        if test ! -f $tmpfile; then
19048            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19049        fi
19050
19051    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19052    # $tmpfile is the local file name for the downloaded file.
19053    VALID_TOOL=no
19054    if test "x$BDEPS_FTP" = xwget; then
19055       VALID_TOOL=yes
19056       wget -O $tmpfile $with_builddeps_server/$resource
19057    fi
19058    if test "x$BDEPS_FTP" = xlftp; then
19059       VALID_TOOL=yes
19060       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19061    fi
19062    if test "x$BDEPS_FTP" = xftp; then
19063        VALID_TOOL=yes
19064        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19065        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19066        FTPUSERPWD=${FTPSERVER%%@*}
19067        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19068            FTPUSER=${userpwd%%:*}
19069            FTPPWD=${userpwd#*@}
19070            FTPSERVER=${FTPSERVER#*@}
19071        else
19072            FTPUSER=ftp
19073            FTPPWD=ftp
19074        fi
19075        # the "pass" command does not work on some
19076        # ftp clients (read ftp.exe) but if it works,
19077        # passive mode is better!
19078        (\
19079            echo "user $FTPUSER $FTPPWD"        ;\
19080            echo "pass"                         ;\
19081            echo "bin"                          ;\
19082            echo "get $FTPPATH $tmpfile"              ;\
19083        ) | ftp -in $FTPSERVER
19084    fi
19085    if test "x$VALID_TOOL" != xyes; then
19086       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19087    fi
19088
19089        mv $tmpfile $installdir/$filename
19090        if test ! -s $installdir/$filename; then
19091            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19092        fi
19093        case "$extension" in
19094            zip)  echo "Unzipping $installdir/$filename..."
19095               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19096            ;;
19097            tar.gz) echo "Untaring $installdir/$filename..."
19098               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19099            ;;
19100            tgz) echo "Untaring $installdir/$filename..."
19101               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19102            ;;
19103            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19104            ;;
19105        esac
19106    fi
19107    if test -f $installdir/$filename.unpacked; then
19108        depdir=$installdir
19109    fi
19110
19111	    fi
19112            # Source the builddeps file again, because in the previous command, the depdir
19113            # was updated to point at the current build dependency install directory.
19114            . $builddepsfile
19115            # Now extract variables from the builddeps.conf files.
19116            theroot=${builddep_devkit_ROOT}
19117            thecflags=${builddep_devkit_CFLAGS}
19118            thelibs=${builddep_devkit_LIBS}
19119            if test "x$depdir" = x; then
19120                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19121            fi
19122            DEVKIT=$depdir
19123            if test "x$theroot" != x; then
19124               DEVKIT="$theroot"
19125            fi
19126            if test "x$thecflags" != x; then
19127               DEVKIT_CFLAGS="$thecflags"
19128            fi
19129            if test "x$thelibs" != x; then
19130               DEVKIT_LIBS="$thelibs"
19131            fi
19132            # Found devkit
19133                     PATH="$DEVKIT/bin:$PATH"
19134                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19135                     if test "x$x_includes" = "xNONE"; then
19136                         x_includes="$SYS_ROOT/usr/include/X11"
19137                     fi
19138                     if test "x$x_libraries" = "xNONE"; then
19139                         x_libraries="$SYS_ROOT/usr/lib"
19140                     fi
19141
19142
19143        fi
19144
19145    fi
19146
19147
19148# Store the CFLAGS etal passed to the configure script.
19149ORG_CFLAGS="$CFLAGS"
19150ORG_CXXFLAGS="$CXXFLAGS"
19151ORG_OBJCFLAGS="$OBJCFLAGS"
19152
19153# autoconf magic only relies on PATH, so update it if tools dir is specified
19154OLD_PATH="$PATH"
19155if test "x$TOOLS_DIR" != x; then
19156  PATH=$TOOLS_DIR:$PATH
19157fi
19158
19159
19160### Locate C compiler (CC)
19161
19162# On windows, only cl.exe is supported.
19163# On Solaris, cc is preferred to gcc.
19164# Elsewhere, gcc is preferred to cc.
19165
19166if test "x$CC" != x; then
19167  COMPILER_CHECK_LIST="$CC"
19168elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19169  COMPILER_CHECK_LIST="cl"
19170elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19171  COMPILER_CHECK_LIST="cc gcc"
19172else
19173  COMPILER_CHECK_LIST="gcc cc"
19174fi
19175
19176
19177  COMPILER_NAME=C
19178
19179  CC=
19180  # If TOOLS_DIR is set, check for all compiler names in there first
19181  # before checking the rest of the PATH.
19182  if test -n "$TOOLS_DIR"; then
19183    PATH_save="$PATH"
19184    PATH="$TOOLS_DIR"
19185    for ac_prog in $COMPILER_CHECK_LIST
19186do
19187  # Extract the first word of "$ac_prog", so it can be a program name with args.
19188set dummy $ac_prog; ac_word=$2
19189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19190$as_echo_n "checking for $ac_word... " >&6; }
19191if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19192  $as_echo_n "(cached) " >&6
19193else
19194  case $TOOLS_DIR_CC in
19195  [\\/]* | ?:[\\/]*)
19196  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19197  ;;
19198  *)
19199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19200for as_dir in $PATH
19201do
19202  IFS=$as_save_IFS
19203  test -z "$as_dir" && as_dir=.
19204    for ac_exec_ext in '' $ac_executable_extensions; do
19205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19206    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19208    break 2
19209  fi
19210done
19211  done
19212IFS=$as_save_IFS
19213
19214  ;;
19215esac
19216fi
19217TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19218if test -n "$TOOLS_DIR_CC"; then
19219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19220$as_echo "$TOOLS_DIR_CC" >&6; }
19221else
19222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19223$as_echo "no" >&6; }
19224fi
19225
19226
19227  test -n "$TOOLS_DIR_CC" && break
19228done
19229
19230    CC=$TOOLS_DIR_CC
19231    PATH="$PATH_save"
19232  fi
19233
19234  # AC_PATH_PROGS can't be run multiple times with the same variable,
19235  # so create a new name for this run.
19236  if test "x$CC" = x; then
19237    for ac_prog in $COMPILER_CHECK_LIST
19238do
19239  # Extract the first word of "$ac_prog", so it can be a program name with args.
19240set dummy $ac_prog; ac_word=$2
19241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19242$as_echo_n "checking for $ac_word... " >&6; }
19243if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19244  $as_echo_n "(cached) " >&6
19245else
19246  case $POTENTIAL_CC in
19247  [\\/]* | ?:[\\/]*)
19248  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19249  ;;
19250  *)
19251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19252for as_dir in $PATH
19253do
19254  IFS=$as_save_IFS
19255  test -z "$as_dir" && as_dir=.
19256    for ac_exec_ext in '' $ac_executable_extensions; do
19257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19258    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19260    break 2
19261  fi
19262done
19263  done
19264IFS=$as_save_IFS
19265
19266  ;;
19267esac
19268fi
19269POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19270if test -n "$POTENTIAL_CC"; then
19271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19272$as_echo "$POTENTIAL_CC" >&6; }
19273else
19274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19275$as_echo "no" >&6; }
19276fi
19277
19278
19279  test -n "$POTENTIAL_CC" && break
19280done
19281
19282    CC=$POTENTIAL_CC
19283  fi
19284
19285  if test "x$CC" = x; then
19286
19287    # Print a helpful message on how to acquire the necessary build dependency.
19288    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19289    MISSING_DEPENDENCY=devkit
19290    PKGHANDLER_COMMAND=
19291
19292    case $PKGHANDLER in
19293	apt-get)
19294                apt_help     $MISSING_DEPENDENCY ;;
19295    yum)
19296                yum_help     $MISSING_DEPENDENCY ;;
19297	port)
19298                port_help    $MISSING_DEPENDENCY ;;
19299	pkgutil)
19300                pkgutil_help $MISSING_DEPENDENCY ;;
19301	pkgadd)
19302                pkgadd_help  $MISSING_DEPENDENCY ;;
19303    * )
19304      break ;;
19305    esac
19306
19307    if test "x$PKGHANDLER_COMMAND" != x; then
19308        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19309    fi
19310
19311      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19312  fi
19313
19314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19315
19316  # First separate the path from the arguments. This will split at the first
19317  # space.
19318  complete="$CC"
19319  path="${complete%% *}"
19320  tmp="$complete EOL"
19321  arguments="${tmp#* }"
19322
19323  # Input might be given as Windows format, start by converting to
19324  # unix format.
19325  new_path=`$CYGPATH -u "$path"`
19326
19327  # Now try to locate executable using which
19328  new_path=`$WHICH "$new_path" 2> /dev/null`
19329  # bat and cmd files are not always considered executable in cygwin causing which
19330  # to not find them
19331  if test "x$new_path" = x \
19332           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19333           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19334    new_path=`$CYGPATH -u "$path"`
19335  fi
19336  if test "x$new_path" = x; then
19337    # Oops. Which didn't find the executable.
19338    # The splitting of arguments from the executable at a space might have been incorrect,
19339    # since paths with space are more likely in Windows. Give it another try with the whole
19340    # argument.
19341    path="$complete"
19342    arguments="EOL"
19343    new_path=`$CYGPATH -u "$path"`
19344    new_path=`$WHICH "$new_path" 2> /dev/null`
19345    # bat and cmd files are not always considered executable in cygwin causing which
19346    # to not find them
19347    if test "x$new_path" = x \
19348             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19349             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19350      new_path=`$CYGPATH -u "$path"`
19351    fi
19352    if test "x$new_path" = x; then
19353      # It's still not found. Now this is an unrecoverable error.
19354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19355$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19356      has_space=`$ECHO "$complete" | $GREP " "`
19357      if test "x$has_space" != x; then
19358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19360      fi
19361      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19362    fi
19363  fi
19364
19365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19368  # "foo.exe" is OK but "foo" is an error.
19369  #
19370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19371  # It is also a way to make sure we got the proper file name for the real test later on.
19372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19373  if test "x$test_shortpath" = x; then
19374    # Short path failed, file does not exist as specified.
19375    # Try adding .exe or .cmd
19376    if test -f "${new_path}.exe"; then
19377       input_to_shortpath="${new_path}.exe"
19378    elif test -f "${new_path}.cmd"; then
19379       input_to_shortpath="${new_path}.cmd"
19380    else
19381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19382$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19383      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19384$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19385      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19386    fi
19387  else
19388    input_to_shortpath="$new_path"
19389  fi
19390
19391  # Call helper function which possibly converts this using DOS-style short mode.
19392  # If so, the updated path is stored in $new_path.
19393  new_path="$input_to_shortpath"
19394
19395  input_path="$input_to_shortpath"
19396  # Check if we need to convert this using DOS-style short mode. If the path
19397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19398  # take no chances and rewrite it.
19399  # Note: m4 eats our [], so we need to use [ and ] instead.
19400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19401  if test "x$has_forbidden_chars" != x; then
19402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19406      # Going to short mode and back again did indeed matter. Since short mode is
19407      # case insensitive, let's make it lowercase to improve readability.
19408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19409      # Now convert it back to Unix-stile (cygpath)
19410      input_path=`$CYGPATH -u "$shortmode_path"`
19411      new_path="$input_path"
19412    fi
19413  fi
19414
19415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19416  if test "x$test_cygdrive_prefix" = x; then
19417    # As a simple fix, exclude /usr/bin since it's not a real path.
19418    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19420      # a path prefixed by /cygdrive for fixpath to work.
19421      new_path="$CYGWIN_ROOT_PATH$input_path"
19422    fi
19423  fi
19424
19425  # remove trailing .exe if any
19426  new_path="${new_path/%.exe/}"
19427
19428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19429
19430  # First separate the path from the arguments. This will split at the first
19431  # space.
19432  complete="$CC"
19433  path="${complete%% *}"
19434  tmp="$complete EOL"
19435  arguments="${tmp#* }"
19436
19437  # Input might be given as Windows format, start by converting to
19438  # unix format.
19439  new_path="$path"
19440
19441  windows_path="$new_path"
19442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19443    unix_path=`$CYGPATH -u "$windows_path"`
19444    new_path="$unix_path"
19445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19447    new_path="$unix_path"
19448  fi
19449
19450
19451  # Now try to locate executable using which
19452  new_path=`$WHICH "$new_path" 2> /dev/null`
19453
19454  if test "x$new_path" = x; then
19455    # Oops. Which didn't find the executable.
19456    # The splitting of arguments from the executable at a space might have been incorrect,
19457    # since paths with space are more likely in Windows. Give it another try with the whole
19458    # argument.
19459    path="$complete"
19460    arguments="EOL"
19461    new_path="$path"
19462
19463  windows_path="$new_path"
19464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19465    unix_path=`$CYGPATH -u "$windows_path"`
19466    new_path="$unix_path"
19467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19469    new_path="$unix_path"
19470  fi
19471
19472
19473    new_path=`$WHICH "$new_path" 2> /dev/null`
19474
19475    if test "x$new_path" = x; then
19476      # It's still not found. Now this is an unrecoverable error.
19477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19478$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19479      has_space=`$ECHO "$complete" | $GREP " "`
19480      if test "x$has_space" != x; then
19481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19483      fi
19484      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19485    fi
19486  fi
19487
19488  # Now new_path has a complete unix path to the binary
19489  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19490    # Keep paths in /bin as-is, but remove trailing .exe if any
19491    new_path="${new_path/%.exe/}"
19492    # Do not save /bin paths to all_fixpath_prefixes!
19493  else
19494    # Not in mixed or Windows style, start by that.
19495    new_path=`cmd //c echo $new_path`
19496
19497  input_path="$new_path"
19498  # Check if we need to convert this using DOS-style short mode. If the path
19499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19500  # take no chances and rewrite it.
19501  # Note: m4 eats our [], so we need to use [ and ] instead.
19502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19503  if test "x$has_forbidden_chars" != x; then
19504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19506  fi
19507
19508    # Output is in $new_path
19509
19510  windows_path="$new_path"
19511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19512    unix_path=`$CYGPATH -u "$windows_path"`
19513    new_path="$unix_path"
19514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19516    new_path="$unix_path"
19517  fi
19518
19519    # remove trailing .exe if any
19520    new_path="${new_path/%.exe/}"
19521
19522    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19523    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19524  fi
19525
19526  else
19527    # We're on a posix platform. Hooray! :)
19528    # First separate the path from the arguments. This will split at the first
19529    # space.
19530    complete="$CC"
19531    path="${complete%% *}"
19532    tmp="$complete EOL"
19533    arguments="${tmp#* }"
19534
19535    # Cannot rely on the command "which" here since it doesn't always work.
19536    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19537    if test -z "$is_absolute_path"; then
19538      # Path to executable is not absolute. Find it.
19539      IFS_save="$IFS"
19540      IFS=:
19541      for p in $PATH; do
19542        if test -f "$p/$path" && test -x "$p/$path"; then
19543          new_path="$p/$path"
19544          break
19545        fi
19546      done
19547      IFS="$IFS_save"
19548    else
19549      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19550$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19551      new_path="$path"
19552    fi
19553
19554    if test "x$new_path" = x; then
19555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19556$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19557        has_space=`$ECHO "$complete" | $GREP " "`
19558        if test "x$has_space" != x; then
19559          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19560$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19561        fi
19562        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19563      fi
19564  fi
19565
19566      # Now join together the path and the arguments once again
19567      if test "x$arguments" != xEOL; then
19568        new_complete="$new_path ${arguments% *}"
19569      else
19570        new_complete="$new_path"
19571      fi
19572
19573  if test "x$complete" != "x$new_complete"; then
19574      CC="$new_complete"
19575      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19576$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19577    fi
19578
19579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19580$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19581  TEST_COMPILER="$CC"
19582
19583    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19584        # Follow a chain of symbolic links. Use readlink
19585        # where it exists, else fall back to horribly
19586        # complicated shell code.
19587        if test "x$READLINK_TESTED" != yes; then
19588            # On MacOSX there is a readlink tool with a different
19589            # purpose than the GNU readlink tool. Check the found readlink.
19590            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19591            if test "x$ISGNU" = x; then
19592                 # A readlink that we do not know how to use.
19593                 # Are there other non-GNU readlinks out there?
19594                 READLINK_TESTED=yes
19595                 READLINK=
19596            fi
19597        fi
19598
19599        if test "x$READLINK" != x; then
19600            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19601        else
19602            # Save the current directory for restoring afterwards
19603            STARTDIR=$PWD
19604            COUNTER=0
19605            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19606            sym_link_file=`$BASENAME $TEST_COMPILER`
19607            cd $sym_link_dir
19608            # Use -P flag to resolve symlinks in directories.
19609            cd `$THEPWDCMD -P`
19610            sym_link_dir=`$THEPWDCMD -P`
19611            # Resolve file symlinks
19612            while test $COUNTER -lt 20; do
19613                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19614                if test "x$ISLINK" == x; then
19615                    # This is not a symbolic link! We are done!
19616                    break
19617                fi
19618                # Again resolve directory symlinks since the target of the just found
19619                # link could be in a different directory
19620                cd `$DIRNAME $ISLINK`
19621                sym_link_dir=`$THEPWDCMD -P`
19622                sym_link_file=`$BASENAME $ISLINK`
19623                let COUNTER=COUNTER+1
19624            done
19625            cd $STARTDIR
19626            TEST_COMPILER=$sym_link_dir/$sym_link_file
19627        fi
19628    fi
19629
19630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19631$as_echo "$TEST_COMPILER" >&6; }
19632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19633$as_echo_n "checking if CC is disguised ccache... " >&6; }
19634
19635  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19636  if test "x$COMPILER_BASENAME" = "xccache"; then
19637    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19638$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19639    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19640    # We want to control ccache invocation ourselves, so ignore this cc and try
19641    # searching again.
19642
19643    # Remove the path to the fake ccache cc from the PATH
19644    RETRY_COMPILER_SAVED_PATH="$PATH"
19645    COMPILER_DIRNAME=`$DIRNAME $CC`
19646    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19647
19648    # Try again looking for our compiler
19649    if test -n "$ac_tool_prefix"; then
19650  for ac_prog in $COMPILER_CHECK_LIST
19651  do
19652    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19653set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19655$as_echo_n "checking for $ac_word... " >&6; }
19656if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19657  $as_echo_n "(cached) " >&6
19658else
19659  if test -n "$PROPER_COMPILER_CC"; then
19660  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19661else
19662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19663for as_dir in $PATH
19664do
19665  IFS=$as_save_IFS
19666  test -z "$as_dir" && as_dir=.
19667    for ac_exec_ext in '' $ac_executable_extensions; do
19668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19669    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19671    break 2
19672  fi
19673done
19674  done
19675IFS=$as_save_IFS
19676
19677fi
19678fi
19679PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19680if test -n "$PROPER_COMPILER_CC"; then
19681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19682$as_echo "$PROPER_COMPILER_CC" >&6; }
19683else
19684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19685$as_echo "no" >&6; }
19686fi
19687
19688
19689    test -n "$PROPER_COMPILER_CC" && break
19690  done
19691fi
19692if test -z "$PROPER_COMPILER_CC"; then
19693  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19694  for ac_prog in $COMPILER_CHECK_LIST
19695do
19696  # Extract the first word of "$ac_prog", so it can be a program name with args.
19697set dummy $ac_prog; ac_word=$2
19698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19699$as_echo_n "checking for $ac_word... " >&6; }
19700if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19701  $as_echo_n "(cached) " >&6
19702else
19703  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19704  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19705else
19706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19707for as_dir in $PATH
19708do
19709  IFS=$as_save_IFS
19710  test -z "$as_dir" && as_dir=.
19711    for ac_exec_ext in '' $ac_executable_extensions; do
19712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19713    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19715    break 2
19716  fi
19717done
19718  done
19719IFS=$as_save_IFS
19720
19721fi
19722fi
19723ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19724if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19726$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19727else
19728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19729$as_echo "no" >&6; }
19730fi
19731
19732
19733  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19734done
19735
19736  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19737    PROPER_COMPILER_CC=""
19738  else
19739    case $cross_compiling:$ac_tool_warned in
19740yes:)
19741{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19742$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19743ac_tool_warned=yes ;;
19744esac
19745    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19746  fi
19747fi
19748
19749
19750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19751
19752  # First separate the path from the arguments. This will split at the first
19753  # space.
19754  complete="$PROPER_COMPILER_CC"
19755  path="${complete%% *}"
19756  tmp="$complete EOL"
19757  arguments="${tmp#* }"
19758
19759  # Input might be given as Windows format, start by converting to
19760  # unix format.
19761  new_path=`$CYGPATH -u "$path"`
19762
19763  # Now try to locate executable using which
19764  new_path=`$WHICH "$new_path" 2> /dev/null`
19765  # bat and cmd files are not always considered executable in cygwin causing which
19766  # to not find them
19767  if test "x$new_path" = x \
19768           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19769           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19770    new_path=`$CYGPATH -u "$path"`
19771  fi
19772  if test "x$new_path" = x; then
19773    # Oops. Which didn't find the executable.
19774    # The splitting of arguments from the executable at a space might have been incorrect,
19775    # since paths with space are more likely in Windows. Give it another try with the whole
19776    # argument.
19777    path="$complete"
19778    arguments="EOL"
19779    new_path=`$CYGPATH -u "$path"`
19780    new_path=`$WHICH "$new_path" 2> /dev/null`
19781    # bat and cmd files are not always considered executable in cygwin causing which
19782    # to not find them
19783    if test "x$new_path" = x \
19784             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19785             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19786      new_path=`$CYGPATH -u "$path"`
19787    fi
19788    if test "x$new_path" = x; then
19789      # It's still not found. Now this is an unrecoverable error.
19790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19791$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19792      has_space=`$ECHO "$complete" | $GREP " "`
19793      if test "x$has_space" != x; then
19794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19796      fi
19797      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19798    fi
19799  fi
19800
19801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19804  # "foo.exe" is OK but "foo" is an error.
19805  #
19806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19807  # It is also a way to make sure we got the proper file name for the real test later on.
19808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19809  if test "x$test_shortpath" = x; then
19810    # Short path failed, file does not exist as specified.
19811    # Try adding .exe or .cmd
19812    if test -f "${new_path}.exe"; then
19813       input_to_shortpath="${new_path}.exe"
19814    elif test -f "${new_path}.cmd"; then
19815       input_to_shortpath="${new_path}.cmd"
19816    else
19817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19818$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19821      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19822    fi
19823  else
19824    input_to_shortpath="$new_path"
19825  fi
19826
19827  # Call helper function which possibly converts this using DOS-style short mode.
19828  # If so, the updated path is stored in $new_path.
19829  new_path="$input_to_shortpath"
19830
19831  input_path="$input_to_shortpath"
19832  # Check if we need to convert this using DOS-style short mode. If the path
19833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19834  # take no chances and rewrite it.
19835  # Note: m4 eats our [], so we need to use [ and ] instead.
19836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19837  if test "x$has_forbidden_chars" != x; then
19838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19842      # Going to short mode and back again did indeed matter. Since short mode is
19843      # case insensitive, let's make it lowercase to improve readability.
19844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19845      # Now convert it back to Unix-stile (cygpath)
19846      input_path=`$CYGPATH -u "$shortmode_path"`
19847      new_path="$input_path"
19848    fi
19849  fi
19850
19851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19852  if test "x$test_cygdrive_prefix" = x; then
19853    # As a simple fix, exclude /usr/bin since it's not a real path.
19854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19856      # a path prefixed by /cygdrive for fixpath to work.
19857      new_path="$CYGWIN_ROOT_PATH$input_path"
19858    fi
19859  fi
19860
19861  # remove trailing .exe if any
19862  new_path="${new_path/%.exe/}"
19863
19864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19865
19866  # First separate the path from the arguments. This will split at the first
19867  # space.
19868  complete="$PROPER_COMPILER_CC"
19869  path="${complete%% *}"
19870  tmp="$complete EOL"
19871  arguments="${tmp#* }"
19872
19873  # Input might be given as Windows format, start by converting to
19874  # unix format.
19875  new_path="$path"
19876
19877  windows_path="$new_path"
19878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19879    unix_path=`$CYGPATH -u "$windows_path"`
19880    new_path="$unix_path"
19881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19883    new_path="$unix_path"
19884  fi
19885
19886
19887  # Now try to locate executable using which
19888  new_path=`$WHICH "$new_path" 2> /dev/null`
19889
19890  if test "x$new_path" = x; then
19891    # Oops. Which didn't find the executable.
19892    # The splitting of arguments from the executable at a space might have been incorrect,
19893    # since paths with space are more likely in Windows. Give it another try with the whole
19894    # argument.
19895    path="$complete"
19896    arguments="EOL"
19897    new_path="$path"
19898
19899  windows_path="$new_path"
19900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19901    unix_path=`$CYGPATH -u "$windows_path"`
19902    new_path="$unix_path"
19903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19905    new_path="$unix_path"
19906  fi
19907
19908
19909    new_path=`$WHICH "$new_path" 2> /dev/null`
19910
19911    if test "x$new_path" = x; then
19912      # It's still not found. Now this is an unrecoverable error.
19913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19914$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19915      has_space=`$ECHO "$complete" | $GREP " "`
19916      if test "x$has_space" != x; then
19917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19919      fi
19920      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19921    fi
19922  fi
19923
19924  # Now new_path has a complete unix path to the binary
19925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19926    # Keep paths in /bin as-is, but remove trailing .exe if any
19927    new_path="${new_path/%.exe/}"
19928    # Do not save /bin paths to all_fixpath_prefixes!
19929  else
19930    # Not in mixed or Windows style, start by that.
19931    new_path=`cmd //c echo $new_path`
19932
19933  input_path="$new_path"
19934  # Check if we need to convert this using DOS-style short mode. If the path
19935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19936  # take no chances and rewrite it.
19937  # Note: m4 eats our [], so we need to use [ and ] instead.
19938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19939  if test "x$has_forbidden_chars" != x; then
19940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19942  fi
19943
19944    # Output is in $new_path
19945
19946  windows_path="$new_path"
19947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19948    unix_path=`$CYGPATH -u "$windows_path"`
19949    new_path="$unix_path"
19950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19952    new_path="$unix_path"
19953  fi
19954
19955    # remove trailing .exe if any
19956    new_path="${new_path/%.exe/}"
19957
19958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19960  fi
19961
19962  else
19963    # We're on a posix platform. Hooray! :)
19964    # First separate the path from the arguments. This will split at the first
19965    # space.
19966    complete="$PROPER_COMPILER_CC"
19967    path="${complete%% *}"
19968    tmp="$complete EOL"
19969    arguments="${tmp#* }"
19970
19971    # Cannot rely on the command "which" here since it doesn't always work.
19972    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19973    if test -z "$is_absolute_path"; then
19974      # Path to executable is not absolute. Find it.
19975      IFS_save="$IFS"
19976      IFS=:
19977      for p in $PATH; do
19978        if test -f "$p/$path" && test -x "$p/$path"; then
19979          new_path="$p/$path"
19980          break
19981        fi
19982      done
19983      IFS="$IFS_save"
19984    else
19985      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19986$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19987      new_path="$path"
19988    fi
19989
19990    if test "x$new_path" = x; then
19991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19992$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19993        has_space=`$ECHO "$complete" | $GREP " "`
19994        if test "x$has_space" != x; then
19995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19997        fi
19998        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19999      fi
20000  fi
20001
20002      # Now join together the path and the arguments once again
20003      if test "x$arguments" != xEOL; then
20004        new_complete="$new_path ${arguments% *}"
20005      else
20006        new_complete="$new_path"
20007      fi
20008
20009  if test "x$complete" != "x$new_complete"; then
20010      PROPER_COMPILER_CC="$new_complete"
20011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20012$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20013    fi
20014
20015    PATH="$RETRY_COMPILER_SAVED_PATH"
20016
20017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20018$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20019
20020    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20021        # Follow a chain of symbolic links. Use readlink
20022        # where it exists, else fall back to horribly
20023        # complicated shell code.
20024        if test "x$READLINK_TESTED" != yes; then
20025            # On MacOSX there is a readlink tool with a different
20026            # purpose than the GNU readlink tool. Check the found readlink.
20027            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20028            if test "x$ISGNU" = x; then
20029                 # A readlink that we do not know how to use.
20030                 # Are there other non-GNU readlinks out there?
20031                 READLINK_TESTED=yes
20032                 READLINK=
20033            fi
20034        fi
20035
20036        if test "x$READLINK" != x; then
20037            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20038        else
20039            # Save the current directory for restoring afterwards
20040            STARTDIR=$PWD
20041            COUNTER=0
20042            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20043            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20044            cd $sym_link_dir
20045            # Use -P flag to resolve symlinks in directories.
20046            cd `$THEPWDCMD -P`
20047            sym_link_dir=`$THEPWDCMD -P`
20048            # Resolve file symlinks
20049            while test $COUNTER -lt 20; do
20050                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20051                if test "x$ISLINK" == x; then
20052                    # This is not a symbolic link! We are done!
20053                    break
20054                fi
20055                # Again resolve directory symlinks since the target of the just found
20056                # link could be in a different directory
20057                cd `$DIRNAME $ISLINK`
20058                sym_link_dir=`$THEPWDCMD -P`
20059                sym_link_file=`$BASENAME $ISLINK`
20060                let COUNTER=COUNTER+1
20061            done
20062            cd $STARTDIR
20063            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20064        fi
20065    fi
20066
20067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20068$as_echo "$PROPER_COMPILER_CC" >&6; }
20069    CC="$PROPER_COMPILER_CC"
20070  else
20071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20072$as_echo "no, keeping CC" >&6; }
20073    CC="$TEST_COMPILER"
20074  fi
20075
20076  COMPILER=$CC
20077  COMPILER_NAME=$COMPILER_NAME
20078
20079  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20080    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20081    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20082    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20083    if test $? -ne 0; then
20084      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20085
20086      { $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
20087$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20089$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20090      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20091    else
20092      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20093      COMPILER_VENDOR="Sun Studio"
20094    fi
20095  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20096    # First line typically looks something like:
20097    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20098    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20099    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20100    COMPILER_VENDOR="Microsoft CL.EXE"
20101    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20102    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20103      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20104        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20105      fi
20106    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20107      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20108        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20109      fi
20110    fi
20111  else
20112    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20113    # Check that this is likely to be GCC.
20114    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20115    if test $? -ne 0; then
20116      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20117$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20119$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20120      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20121    fi
20122
20123    # First line typically looks something like:
20124    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20125    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20126    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20127  fi
20128  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20129  CC_VERSION="$COMPILER_VERSION"
20130  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20131  CC_VENDOR="$COMPILER_VENDOR"
20132
20133  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20134$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20135
20136
20137# Now that we have resolved CC ourself, let autoconf have its go at it
20138ac_ext=c
20139ac_cpp='$CPP $CPPFLAGS'
20140ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20141ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20142ac_compiler_gnu=$ac_cv_c_compiler_gnu
20143if test -n "$ac_tool_prefix"; then
20144  for ac_prog in $CC
20145  do
20146    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20147set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20149$as_echo_n "checking for $ac_word... " >&6; }
20150if ${ac_cv_prog_CC+:} false; then :
20151  $as_echo_n "(cached) " >&6
20152else
20153  if test -n "$CC"; then
20154  ac_cv_prog_CC="$CC" # Let the user override the test.
20155else
20156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20157for as_dir in $PATH
20158do
20159  IFS=$as_save_IFS
20160  test -z "$as_dir" && as_dir=.
20161    for ac_exec_ext in '' $ac_executable_extensions; do
20162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20163    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20165    break 2
20166  fi
20167done
20168  done
20169IFS=$as_save_IFS
20170
20171fi
20172fi
20173CC=$ac_cv_prog_CC
20174if test -n "$CC"; then
20175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20176$as_echo "$CC" >&6; }
20177else
20178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20179$as_echo "no" >&6; }
20180fi
20181
20182
20183    test -n "$CC" && break
20184  done
20185fi
20186if test -z "$CC"; then
20187  ac_ct_CC=$CC
20188  for ac_prog in $CC
20189do
20190  # Extract the first word of "$ac_prog", so it can be a program name with args.
20191set dummy $ac_prog; ac_word=$2
20192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20193$as_echo_n "checking for $ac_word... " >&6; }
20194if ${ac_cv_prog_ac_ct_CC+:} false; then :
20195  $as_echo_n "(cached) " >&6
20196else
20197  if test -n "$ac_ct_CC"; then
20198  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20199else
20200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20201for as_dir in $PATH
20202do
20203  IFS=$as_save_IFS
20204  test -z "$as_dir" && as_dir=.
20205    for ac_exec_ext in '' $ac_executable_extensions; do
20206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20207    ac_cv_prog_ac_ct_CC="$ac_prog"
20208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20209    break 2
20210  fi
20211done
20212  done
20213IFS=$as_save_IFS
20214
20215fi
20216fi
20217ac_ct_CC=$ac_cv_prog_ac_ct_CC
20218if test -n "$ac_ct_CC"; then
20219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20220$as_echo "$ac_ct_CC" >&6; }
20221else
20222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20223$as_echo "no" >&6; }
20224fi
20225
20226
20227  test -n "$ac_ct_CC" && break
20228done
20229
20230  if test "x$ac_ct_CC" = x; then
20231    CC=""
20232  else
20233    case $cross_compiling:$ac_tool_warned in
20234yes:)
20235{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20236$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20237ac_tool_warned=yes ;;
20238esac
20239    CC=$ac_ct_CC
20240  fi
20241fi
20242
20243
20244test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20246as_fn_error $? "no acceptable C compiler found in \$PATH
20247See \`config.log' for more details" "$LINENO" 5; }
20248
20249# Provide some information about the compiler.
20250$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20251set X $ac_compile
20252ac_compiler=$2
20253for ac_option in --version -v -V -qversion; do
20254  { { ac_try="$ac_compiler $ac_option >&5"
20255case "(($ac_try" in
20256  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20257  *) ac_try_echo=$ac_try;;
20258esac
20259eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20260$as_echo "$ac_try_echo"; } >&5
20261  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20262  ac_status=$?
20263  if test -s conftest.err; then
20264    sed '10a\
20265... rest of stderr output deleted ...
20266         10q' conftest.err >conftest.er1
20267    cat conftest.er1 >&5
20268  fi
20269  rm -f conftest.er1 conftest.err
20270  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20271  test $ac_status = 0; }
20272done
20273
20274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20275/* end confdefs.h.  */
20276
20277int
20278main ()
20279{
20280
20281  ;
20282  return 0;
20283}
20284_ACEOF
20285ac_clean_files_save=$ac_clean_files
20286ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20287# Try to create an executable without -o first, disregard a.out.
20288# It will help us diagnose broken compilers, and finding out an intuition
20289# of exeext.
20290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20291$as_echo_n "checking whether the C compiler works... " >&6; }
20292ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20293
20294# The possible output files:
20295ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20296
20297ac_rmfiles=
20298for ac_file in $ac_files
20299do
20300  case $ac_file in
20301    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20302    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20303  esac
20304done
20305rm -f $ac_rmfiles
20306
20307if { { ac_try="$ac_link_default"
20308case "(($ac_try" in
20309  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20310  *) ac_try_echo=$ac_try;;
20311esac
20312eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20313$as_echo "$ac_try_echo"; } >&5
20314  (eval "$ac_link_default") 2>&5
20315  ac_status=$?
20316  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20317  test $ac_status = 0; }; then :
20318  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20319# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20320# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20321# so that the user can short-circuit this test for compilers unknown to
20322# Autoconf.
20323for ac_file in $ac_files ''
20324do
20325  test -f "$ac_file" || continue
20326  case $ac_file in
20327    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20328	;;
20329    [ab].out )
20330	# We found the default executable, but exeext='' is most
20331	# certainly right.
20332	break;;
20333    *.* )
20334	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20335	then :; else
20336	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20337	fi
20338	# We set ac_cv_exeext here because the later test for it is not
20339	# safe: cross compilers may not add the suffix if given an `-o'
20340	# argument, so we may need to know it at that point already.
20341	# Even if this section looks crufty: it has the advantage of
20342	# actually working.
20343	break;;
20344    * )
20345	break;;
20346  esac
20347done
20348test "$ac_cv_exeext" = no && ac_cv_exeext=
20349
20350else
20351  ac_file=''
20352fi
20353if test -z "$ac_file"; then :
20354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20355$as_echo "no" >&6; }
20356$as_echo "$as_me: failed program was:" >&5
20357sed 's/^/| /' conftest.$ac_ext >&5
20358
20359{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20361as_fn_error 77 "C compiler cannot create executables
20362See \`config.log' for more details" "$LINENO" 5; }
20363else
20364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20365$as_echo "yes" >&6; }
20366fi
20367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20368$as_echo_n "checking for C compiler default output file name... " >&6; }
20369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20370$as_echo "$ac_file" >&6; }
20371ac_exeext=$ac_cv_exeext
20372
20373rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20374ac_clean_files=$ac_clean_files_save
20375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20376$as_echo_n "checking for suffix of executables... " >&6; }
20377if { { ac_try="$ac_link"
20378case "(($ac_try" in
20379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20380  *) ac_try_echo=$ac_try;;
20381esac
20382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20383$as_echo "$ac_try_echo"; } >&5
20384  (eval "$ac_link") 2>&5
20385  ac_status=$?
20386  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20387  test $ac_status = 0; }; then :
20388  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20389# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20390# work properly (i.e., refer to `conftest.exe'), while it won't with
20391# `rm'.
20392for ac_file in conftest.exe conftest conftest.*; do
20393  test -f "$ac_file" || continue
20394  case $ac_file in
20395    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20396    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20397	  break;;
20398    * ) break;;
20399  esac
20400done
20401else
20402  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20404as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20405See \`config.log' for more details" "$LINENO" 5; }
20406fi
20407rm -f conftest conftest$ac_cv_exeext
20408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20409$as_echo "$ac_cv_exeext" >&6; }
20410
20411rm -f conftest.$ac_ext
20412EXEEXT=$ac_cv_exeext
20413ac_exeext=$EXEEXT
20414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20415/* end confdefs.h.  */
20416#include <stdio.h>
20417int
20418main ()
20419{
20420FILE *f = fopen ("conftest.out", "w");
20421 return ferror (f) || fclose (f) != 0;
20422
20423  ;
20424  return 0;
20425}
20426_ACEOF
20427ac_clean_files="$ac_clean_files conftest.out"
20428# Check that the compiler produces executables we can run.  If not, either
20429# the compiler is broken, or we cross compile.
20430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20431$as_echo_n "checking whether we are cross compiling... " >&6; }
20432if test "$cross_compiling" != yes; then
20433  { { ac_try="$ac_link"
20434case "(($ac_try" in
20435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20436  *) ac_try_echo=$ac_try;;
20437esac
20438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20439$as_echo "$ac_try_echo"; } >&5
20440  (eval "$ac_link") 2>&5
20441  ac_status=$?
20442  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20443  test $ac_status = 0; }
20444  if { ac_try='./conftest$ac_cv_exeext'
20445  { { case "(($ac_try" in
20446  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20447  *) ac_try_echo=$ac_try;;
20448esac
20449eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20450$as_echo "$ac_try_echo"; } >&5
20451  (eval "$ac_try") 2>&5
20452  ac_status=$?
20453  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20454  test $ac_status = 0; }; }; then
20455    cross_compiling=no
20456  else
20457    if test "$cross_compiling" = maybe; then
20458	cross_compiling=yes
20459    else
20460	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20462as_fn_error $? "cannot run C compiled programs.
20463If you meant to cross compile, use \`--host'.
20464See \`config.log' for more details" "$LINENO" 5; }
20465    fi
20466  fi
20467fi
20468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20469$as_echo "$cross_compiling" >&6; }
20470
20471rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20472ac_clean_files=$ac_clean_files_save
20473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20474$as_echo_n "checking for suffix of object files... " >&6; }
20475if ${ac_cv_objext+:} false; then :
20476  $as_echo_n "(cached) " >&6
20477else
20478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20479/* end confdefs.h.  */
20480
20481int
20482main ()
20483{
20484
20485  ;
20486  return 0;
20487}
20488_ACEOF
20489rm -f conftest.o conftest.obj
20490if { { ac_try="$ac_compile"
20491case "(($ac_try" in
20492  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20493  *) ac_try_echo=$ac_try;;
20494esac
20495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20496$as_echo "$ac_try_echo"; } >&5
20497  (eval "$ac_compile") 2>&5
20498  ac_status=$?
20499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20500  test $ac_status = 0; }; then :
20501  for ac_file in conftest.o conftest.obj conftest.*; do
20502  test -f "$ac_file" || continue;
20503  case $ac_file in
20504    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20505    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20506       break;;
20507  esac
20508done
20509else
20510  $as_echo "$as_me: failed program was:" >&5
20511sed 's/^/| /' conftest.$ac_ext >&5
20512
20513{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20514$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20515as_fn_error $? "cannot compute suffix of object files: cannot compile
20516See \`config.log' for more details" "$LINENO" 5; }
20517fi
20518rm -f conftest.$ac_cv_objext conftest.$ac_ext
20519fi
20520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20521$as_echo "$ac_cv_objext" >&6; }
20522OBJEXT=$ac_cv_objext
20523ac_objext=$OBJEXT
20524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20525$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20526if ${ac_cv_c_compiler_gnu+:} false; then :
20527  $as_echo_n "(cached) " >&6
20528else
20529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20530/* end confdefs.h.  */
20531
20532int
20533main ()
20534{
20535#ifndef __GNUC__
20536       choke me
20537#endif
20538
20539  ;
20540  return 0;
20541}
20542_ACEOF
20543if ac_fn_c_try_compile "$LINENO"; then :
20544  ac_compiler_gnu=yes
20545else
20546  ac_compiler_gnu=no
20547fi
20548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20549ac_cv_c_compiler_gnu=$ac_compiler_gnu
20550
20551fi
20552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20553$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20554if test $ac_compiler_gnu = yes; then
20555  GCC=yes
20556else
20557  GCC=
20558fi
20559ac_test_CFLAGS=${CFLAGS+set}
20560ac_save_CFLAGS=$CFLAGS
20561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20562$as_echo_n "checking whether $CC accepts -g... " >&6; }
20563if ${ac_cv_prog_cc_g+:} false; then :
20564  $as_echo_n "(cached) " >&6
20565else
20566  ac_save_c_werror_flag=$ac_c_werror_flag
20567   ac_c_werror_flag=yes
20568   ac_cv_prog_cc_g=no
20569   CFLAGS="-g"
20570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20571/* end confdefs.h.  */
20572
20573int
20574main ()
20575{
20576
20577  ;
20578  return 0;
20579}
20580_ACEOF
20581if ac_fn_c_try_compile "$LINENO"; then :
20582  ac_cv_prog_cc_g=yes
20583else
20584  CFLAGS=""
20585      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20586/* end confdefs.h.  */
20587
20588int
20589main ()
20590{
20591
20592  ;
20593  return 0;
20594}
20595_ACEOF
20596if ac_fn_c_try_compile "$LINENO"; then :
20597
20598else
20599  ac_c_werror_flag=$ac_save_c_werror_flag
20600	 CFLAGS="-g"
20601	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20602/* end confdefs.h.  */
20603
20604int
20605main ()
20606{
20607
20608  ;
20609  return 0;
20610}
20611_ACEOF
20612if ac_fn_c_try_compile "$LINENO"; then :
20613  ac_cv_prog_cc_g=yes
20614fi
20615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20616fi
20617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20618fi
20619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20620   ac_c_werror_flag=$ac_save_c_werror_flag
20621fi
20622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20623$as_echo "$ac_cv_prog_cc_g" >&6; }
20624if test "$ac_test_CFLAGS" = set; then
20625  CFLAGS=$ac_save_CFLAGS
20626elif test $ac_cv_prog_cc_g = yes; then
20627  if test "$GCC" = yes; then
20628    CFLAGS="-g -O2"
20629  else
20630    CFLAGS="-g"
20631  fi
20632else
20633  if test "$GCC" = yes; then
20634    CFLAGS="-O2"
20635  else
20636    CFLAGS=
20637  fi
20638fi
20639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20640$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20641if ${ac_cv_prog_cc_c89+:} false; then :
20642  $as_echo_n "(cached) " >&6
20643else
20644  ac_cv_prog_cc_c89=no
20645ac_save_CC=$CC
20646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20647/* end confdefs.h.  */
20648#include <stdarg.h>
20649#include <stdio.h>
20650struct stat;
20651/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20652struct buf { int x; };
20653FILE * (*rcsopen) (struct buf *, struct stat *, int);
20654static char *e (p, i)
20655     char **p;
20656     int i;
20657{
20658  return p[i];
20659}
20660static char *f (char * (*g) (char **, int), char **p, ...)
20661{
20662  char *s;
20663  va_list v;
20664  va_start (v,p);
20665  s = g (p, va_arg (v,int));
20666  va_end (v);
20667  return s;
20668}
20669
20670/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20671   function prototypes and stuff, but not '\xHH' hex character constants.
20672   These don't provoke an error unfortunately, instead are silently treated
20673   as 'x'.  The following induces an error, until -std is added to get
20674   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20675   array size at least.  It's necessary to write '\x00'==0 to get something
20676   that's true only with -std.  */
20677int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20678
20679/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20680   inside strings and character constants.  */
20681#define FOO(x) 'x'
20682int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20683
20684int test (int i, double x);
20685struct s1 {int (*f) (int a);};
20686struct s2 {int (*f) (double a);};
20687int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20688int argc;
20689char **argv;
20690int
20691main ()
20692{
20693return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20694  ;
20695  return 0;
20696}
20697_ACEOF
20698for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20699	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20700do
20701  CC="$ac_save_CC $ac_arg"
20702  if ac_fn_c_try_compile "$LINENO"; then :
20703  ac_cv_prog_cc_c89=$ac_arg
20704fi
20705rm -f core conftest.err conftest.$ac_objext
20706  test "x$ac_cv_prog_cc_c89" != "xno" && break
20707done
20708rm -f conftest.$ac_ext
20709CC=$ac_save_CC
20710
20711fi
20712# AC_CACHE_VAL
20713case "x$ac_cv_prog_cc_c89" in
20714  x)
20715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20716$as_echo "none needed" >&6; } ;;
20717  xno)
20718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20719$as_echo "unsupported" >&6; } ;;
20720  *)
20721    CC="$CC $ac_cv_prog_cc_c89"
20722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20723$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20724esac
20725if test "x$ac_cv_prog_cc_c89" != xno; then :
20726
20727fi
20728
20729ac_ext=cpp
20730ac_cpp='$CXXCPP $CPPFLAGS'
20731ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20732ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20733ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20734
20735
20736### Locate C++ compiler (CXX)
20737
20738if test "x$CXX" != x; then
20739  COMPILER_CHECK_LIST="$CXX"
20740elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20741  COMPILER_CHECK_LIST="cl"
20742elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20743  COMPILER_CHECK_LIST="CC g++"
20744else
20745  COMPILER_CHECK_LIST="g++ CC"
20746fi
20747
20748
20749  COMPILER_NAME=C++
20750
20751  CXX=
20752  # If TOOLS_DIR is set, check for all compiler names in there first
20753  # before checking the rest of the PATH.
20754  if test -n "$TOOLS_DIR"; then
20755    PATH_save="$PATH"
20756    PATH="$TOOLS_DIR"
20757    for ac_prog in $COMPILER_CHECK_LIST
20758do
20759  # Extract the first word of "$ac_prog", so it can be a program name with args.
20760set dummy $ac_prog; ac_word=$2
20761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20762$as_echo_n "checking for $ac_word... " >&6; }
20763if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20764  $as_echo_n "(cached) " >&6
20765else
20766  case $TOOLS_DIR_CXX in
20767  [\\/]* | ?:[\\/]*)
20768  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20769  ;;
20770  *)
20771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20772for as_dir in $PATH
20773do
20774  IFS=$as_save_IFS
20775  test -z "$as_dir" && as_dir=.
20776    for ac_exec_ext in '' $ac_executable_extensions; do
20777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20778    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20780    break 2
20781  fi
20782done
20783  done
20784IFS=$as_save_IFS
20785
20786  ;;
20787esac
20788fi
20789TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20790if test -n "$TOOLS_DIR_CXX"; then
20791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20792$as_echo "$TOOLS_DIR_CXX" >&6; }
20793else
20794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20795$as_echo "no" >&6; }
20796fi
20797
20798
20799  test -n "$TOOLS_DIR_CXX" && break
20800done
20801
20802    CXX=$TOOLS_DIR_CXX
20803    PATH="$PATH_save"
20804  fi
20805
20806  # AC_PATH_PROGS can't be run multiple times with the same variable,
20807  # so create a new name for this run.
20808  if test "x$CXX" = x; then
20809    for ac_prog in $COMPILER_CHECK_LIST
20810do
20811  # Extract the first word of "$ac_prog", so it can be a program name with args.
20812set dummy $ac_prog; ac_word=$2
20813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20814$as_echo_n "checking for $ac_word... " >&6; }
20815if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20816  $as_echo_n "(cached) " >&6
20817else
20818  case $POTENTIAL_CXX in
20819  [\\/]* | ?:[\\/]*)
20820  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20821  ;;
20822  *)
20823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20824for as_dir in $PATH
20825do
20826  IFS=$as_save_IFS
20827  test -z "$as_dir" && as_dir=.
20828    for ac_exec_ext in '' $ac_executable_extensions; do
20829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20830    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20832    break 2
20833  fi
20834done
20835  done
20836IFS=$as_save_IFS
20837
20838  ;;
20839esac
20840fi
20841POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20842if test -n "$POTENTIAL_CXX"; then
20843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20844$as_echo "$POTENTIAL_CXX" >&6; }
20845else
20846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20847$as_echo "no" >&6; }
20848fi
20849
20850
20851  test -n "$POTENTIAL_CXX" && break
20852done
20853
20854    CXX=$POTENTIAL_CXX
20855  fi
20856
20857  if test "x$CXX" = x; then
20858
20859    # Print a helpful message on how to acquire the necessary build dependency.
20860    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20861    MISSING_DEPENDENCY=devkit
20862    PKGHANDLER_COMMAND=
20863
20864    case $PKGHANDLER in
20865	apt-get)
20866                apt_help     $MISSING_DEPENDENCY ;;
20867    yum)
20868                yum_help     $MISSING_DEPENDENCY ;;
20869	port)
20870                port_help    $MISSING_DEPENDENCY ;;
20871	pkgutil)
20872                pkgutil_help $MISSING_DEPENDENCY ;;
20873	pkgadd)
20874                pkgadd_help  $MISSING_DEPENDENCY ;;
20875    * )
20876      break ;;
20877    esac
20878
20879    if test "x$PKGHANDLER_COMMAND" != x; then
20880        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20881    fi
20882
20883      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20884  fi
20885
20886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20887
20888  # First separate the path from the arguments. This will split at the first
20889  # space.
20890  complete="$CXX"
20891  path="${complete%% *}"
20892  tmp="$complete EOL"
20893  arguments="${tmp#* }"
20894
20895  # Input might be given as Windows format, start by converting to
20896  # unix format.
20897  new_path=`$CYGPATH -u "$path"`
20898
20899  # Now try to locate executable using which
20900  new_path=`$WHICH "$new_path" 2> /dev/null`
20901  # bat and cmd files are not always considered executable in cygwin causing which
20902  # to not find them
20903  if test "x$new_path" = x \
20904           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20906    new_path=`$CYGPATH -u "$path"`
20907  fi
20908  if test "x$new_path" = x; then
20909    # Oops. Which didn't find the executable.
20910    # The splitting of arguments from the executable at a space might have been incorrect,
20911    # since paths with space are more likely in Windows. Give it another try with the whole
20912    # argument.
20913    path="$complete"
20914    arguments="EOL"
20915    new_path=`$CYGPATH -u "$path"`
20916    new_path=`$WHICH "$new_path" 2> /dev/null`
20917    # bat and cmd files are not always considered executable in cygwin causing which
20918    # to not find them
20919    if test "x$new_path" = x \
20920             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20922      new_path=`$CYGPATH -u "$path"`
20923    fi
20924    if test "x$new_path" = x; then
20925      # It's still not found. Now this is an unrecoverable error.
20926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20927$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20928      has_space=`$ECHO "$complete" | $GREP " "`
20929      if test "x$has_space" != x; then
20930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20932      fi
20933      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20934    fi
20935  fi
20936
20937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20940  # "foo.exe" is OK but "foo" is an error.
20941  #
20942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20943  # It is also a way to make sure we got the proper file name for the real test later on.
20944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20945  if test "x$test_shortpath" = x; then
20946    # Short path failed, file does not exist as specified.
20947    # Try adding .exe or .cmd
20948    if test -f "${new_path}.exe"; then
20949       input_to_shortpath="${new_path}.exe"
20950    elif test -f "${new_path}.cmd"; then
20951       input_to_shortpath="${new_path}.cmd"
20952    else
20953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20954$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20957      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20958    fi
20959  else
20960    input_to_shortpath="$new_path"
20961  fi
20962
20963  # Call helper function which possibly converts this using DOS-style short mode.
20964  # If so, the updated path is stored in $new_path.
20965  new_path="$input_to_shortpath"
20966
20967  input_path="$input_to_shortpath"
20968  # Check if we need to convert this using DOS-style short mode. If the path
20969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20970  # take no chances and rewrite it.
20971  # Note: m4 eats our [], so we need to use [ and ] instead.
20972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20973  if test "x$has_forbidden_chars" != x; then
20974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20978      # Going to short mode and back again did indeed matter. Since short mode is
20979      # case insensitive, let's make it lowercase to improve readability.
20980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20981      # Now convert it back to Unix-stile (cygpath)
20982      input_path=`$CYGPATH -u "$shortmode_path"`
20983      new_path="$input_path"
20984    fi
20985  fi
20986
20987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20988  if test "x$test_cygdrive_prefix" = x; then
20989    # As a simple fix, exclude /usr/bin since it's not a real path.
20990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20992      # a path prefixed by /cygdrive for fixpath to work.
20993      new_path="$CYGWIN_ROOT_PATH$input_path"
20994    fi
20995  fi
20996
20997  # remove trailing .exe if any
20998  new_path="${new_path/%.exe/}"
20999
21000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21001
21002  # First separate the path from the arguments. This will split at the first
21003  # space.
21004  complete="$CXX"
21005  path="${complete%% *}"
21006  tmp="$complete EOL"
21007  arguments="${tmp#* }"
21008
21009  # Input might be given as Windows format, start by converting to
21010  # unix format.
21011  new_path="$path"
21012
21013  windows_path="$new_path"
21014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21015    unix_path=`$CYGPATH -u "$windows_path"`
21016    new_path="$unix_path"
21017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21019    new_path="$unix_path"
21020  fi
21021
21022
21023  # Now try to locate executable using which
21024  new_path=`$WHICH "$new_path" 2> /dev/null`
21025
21026  if test "x$new_path" = x; then
21027    # Oops. Which didn't find the executable.
21028    # The splitting of arguments from the executable at a space might have been incorrect,
21029    # since paths with space are more likely in Windows. Give it another try with the whole
21030    # argument.
21031    path="$complete"
21032    arguments="EOL"
21033    new_path="$path"
21034
21035  windows_path="$new_path"
21036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21037    unix_path=`$CYGPATH -u "$windows_path"`
21038    new_path="$unix_path"
21039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21041    new_path="$unix_path"
21042  fi
21043
21044
21045    new_path=`$WHICH "$new_path" 2> /dev/null`
21046
21047    if test "x$new_path" = x; then
21048      # It's still not found. Now this is an unrecoverable error.
21049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21050$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21051      has_space=`$ECHO "$complete" | $GREP " "`
21052      if test "x$has_space" != x; then
21053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21055      fi
21056      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21057    fi
21058  fi
21059
21060  # Now new_path has a complete unix path to the binary
21061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21062    # Keep paths in /bin as-is, but remove trailing .exe if any
21063    new_path="${new_path/%.exe/}"
21064    # Do not save /bin paths to all_fixpath_prefixes!
21065  else
21066    # Not in mixed or Windows style, start by that.
21067    new_path=`cmd //c echo $new_path`
21068
21069  input_path="$new_path"
21070  # Check if we need to convert this using DOS-style short mode. If the path
21071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21072  # take no chances and rewrite it.
21073  # Note: m4 eats our [], so we need to use [ and ] instead.
21074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21075  if test "x$has_forbidden_chars" != x; then
21076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21078  fi
21079
21080    # Output is in $new_path
21081
21082  windows_path="$new_path"
21083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21084    unix_path=`$CYGPATH -u "$windows_path"`
21085    new_path="$unix_path"
21086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21088    new_path="$unix_path"
21089  fi
21090
21091    # remove trailing .exe if any
21092    new_path="${new_path/%.exe/}"
21093
21094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21096  fi
21097
21098  else
21099    # We're on a posix platform. Hooray! :)
21100    # First separate the path from the arguments. This will split at the first
21101    # space.
21102    complete="$CXX"
21103    path="${complete%% *}"
21104    tmp="$complete EOL"
21105    arguments="${tmp#* }"
21106
21107    # Cannot rely on the command "which" here since it doesn't always work.
21108    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21109    if test -z "$is_absolute_path"; then
21110      # Path to executable is not absolute. Find it.
21111      IFS_save="$IFS"
21112      IFS=:
21113      for p in $PATH; do
21114        if test -f "$p/$path" && test -x "$p/$path"; then
21115          new_path="$p/$path"
21116          break
21117        fi
21118      done
21119      IFS="$IFS_save"
21120    else
21121      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21122$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21123      new_path="$path"
21124    fi
21125
21126    if test "x$new_path" = x; then
21127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21128$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21129        has_space=`$ECHO "$complete" | $GREP " "`
21130        if test "x$has_space" != x; then
21131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21133        fi
21134        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21135      fi
21136  fi
21137
21138      # Now join together the path and the arguments once again
21139      if test "x$arguments" != xEOL; then
21140        new_complete="$new_path ${arguments% *}"
21141      else
21142        new_complete="$new_path"
21143      fi
21144
21145  if test "x$complete" != "x$new_complete"; then
21146      CXX="$new_complete"
21147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21148$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21149    fi
21150
21151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21152$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21153  TEST_COMPILER="$CXX"
21154
21155    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21156        # Follow a chain of symbolic links. Use readlink
21157        # where it exists, else fall back to horribly
21158        # complicated shell code.
21159        if test "x$READLINK_TESTED" != yes; then
21160            # On MacOSX there is a readlink tool with a different
21161            # purpose than the GNU readlink tool. Check the found readlink.
21162            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21163            if test "x$ISGNU" = x; then
21164                 # A readlink that we do not know how to use.
21165                 # Are there other non-GNU readlinks out there?
21166                 READLINK_TESTED=yes
21167                 READLINK=
21168            fi
21169        fi
21170
21171        if test "x$READLINK" != x; then
21172            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21173        else
21174            # Save the current directory for restoring afterwards
21175            STARTDIR=$PWD
21176            COUNTER=0
21177            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21178            sym_link_file=`$BASENAME $TEST_COMPILER`
21179            cd $sym_link_dir
21180            # Use -P flag to resolve symlinks in directories.
21181            cd `$THEPWDCMD -P`
21182            sym_link_dir=`$THEPWDCMD -P`
21183            # Resolve file symlinks
21184            while test $COUNTER -lt 20; do
21185                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21186                if test "x$ISLINK" == x; then
21187                    # This is not a symbolic link! We are done!
21188                    break
21189                fi
21190                # Again resolve directory symlinks since the target of the just found
21191                # link could be in a different directory
21192                cd `$DIRNAME $ISLINK`
21193                sym_link_dir=`$THEPWDCMD -P`
21194                sym_link_file=`$BASENAME $ISLINK`
21195                let COUNTER=COUNTER+1
21196            done
21197            cd $STARTDIR
21198            TEST_COMPILER=$sym_link_dir/$sym_link_file
21199        fi
21200    fi
21201
21202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21203$as_echo "$TEST_COMPILER" >&6; }
21204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21205$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21206
21207  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21208  if test "x$COMPILER_BASENAME" = "xccache"; then
21209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21210$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21211    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21212    # We want to control ccache invocation ourselves, so ignore this cc and try
21213    # searching again.
21214
21215    # Remove the path to the fake ccache cc from the PATH
21216    RETRY_COMPILER_SAVED_PATH="$PATH"
21217    COMPILER_DIRNAME=`$DIRNAME $CXX`
21218    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21219
21220    # Try again looking for our compiler
21221    if test -n "$ac_tool_prefix"; then
21222  for ac_prog in $COMPILER_CHECK_LIST
21223  do
21224    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21225set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21227$as_echo_n "checking for $ac_word... " >&6; }
21228if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21229  $as_echo_n "(cached) " >&6
21230else
21231  if test -n "$PROPER_COMPILER_CXX"; then
21232  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21233else
21234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21235for as_dir in $PATH
21236do
21237  IFS=$as_save_IFS
21238  test -z "$as_dir" && as_dir=.
21239    for ac_exec_ext in '' $ac_executable_extensions; do
21240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21241    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21243    break 2
21244  fi
21245done
21246  done
21247IFS=$as_save_IFS
21248
21249fi
21250fi
21251PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21252if test -n "$PROPER_COMPILER_CXX"; then
21253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21254$as_echo "$PROPER_COMPILER_CXX" >&6; }
21255else
21256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21257$as_echo "no" >&6; }
21258fi
21259
21260
21261    test -n "$PROPER_COMPILER_CXX" && break
21262  done
21263fi
21264if test -z "$PROPER_COMPILER_CXX"; then
21265  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21266  for ac_prog in $COMPILER_CHECK_LIST
21267do
21268  # Extract the first word of "$ac_prog", so it can be a program name with args.
21269set dummy $ac_prog; ac_word=$2
21270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21271$as_echo_n "checking for $ac_word... " >&6; }
21272if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21273  $as_echo_n "(cached) " >&6
21274else
21275  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21276  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21277else
21278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21279for as_dir in $PATH
21280do
21281  IFS=$as_save_IFS
21282  test -z "$as_dir" && as_dir=.
21283    for ac_exec_ext in '' $ac_executable_extensions; do
21284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21285    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21287    break 2
21288  fi
21289done
21290  done
21291IFS=$as_save_IFS
21292
21293fi
21294fi
21295ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21296if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21298$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21299else
21300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21301$as_echo "no" >&6; }
21302fi
21303
21304
21305  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21306done
21307
21308  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21309    PROPER_COMPILER_CXX=""
21310  else
21311    case $cross_compiling:$ac_tool_warned in
21312yes:)
21313{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21314$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21315ac_tool_warned=yes ;;
21316esac
21317    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21318  fi
21319fi
21320
21321
21322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21323
21324  # First separate the path from the arguments. This will split at the first
21325  # space.
21326  complete="$PROPER_COMPILER_CXX"
21327  path="${complete%% *}"
21328  tmp="$complete EOL"
21329  arguments="${tmp#* }"
21330
21331  # Input might be given as Windows format, start by converting to
21332  # unix format.
21333  new_path=`$CYGPATH -u "$path"`
21334
21335  # Now try to locate executable using which
21336  new_path=`$WHICH "$new_path" 2> /dev/null`
21337  # bat and cmd files are not always considered executable in cygwin causing which
21338  # to not find them
21339  if test "x$new_path" = x \
21340           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21341           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21342    new_path=`$CYGPATH -u "$path"`
21343  fi
21344  if test "x$new_path" = x; then
21345    # Oops. Which didn't find the executable.
21346    # The splitting of arguments from the executable at a space might have been incorrect,
21347    # since paths with space are more likely in Windows. Give it another try with the whole
21348    # argument.
21349    path="$complete"
21350    arguments="EOL"
21351    new_path=`$CYGPATH -u "$path"`
21352    new_path=`$WHICH "$new_path" 2> /dev/null`
21353    # bat and cmd files are not always considered executable in cygwin causing which
21354    # to not find them
21355    if test "x$new_path" = x \
21356             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21357             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21358      new_path=`$CYGPATH -u "$path"`
21359    fi
21360    if test "x$new_path" = x; then
21361      # It's still not found. Now this is an unrecoverable error.
21362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21363$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21364      has_space=`$ECHO "$complete" | $GREP " "`
21365      if test "x$has_space" != x; then
21366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21368      fi
21369      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21370    fi
21371  fi
21372
21373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21376  # "foo.exe" is OK but "foo" is an error.
21377  #
21378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21379  # It is also a way to make sure we got the proper file name for the real test later on.
21380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21381  if test "x$test_shortpath" = x; then
21382    # Short path failed, file does not exist as specified.
21383    # Try adding .exe or .cmd
21384    if test -f "${new_path}.exe"; then
21385       input_to_shortpath="${new_path}.exe"
21386    elif test -f "${new_path}.cmd"; then
21387       input_to_shortpath="${new_path}.cmd"
21388    else
21389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21390$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21393      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21394    fi
21395  else
21396    input_to_shortpath="$new_path"
21397  fi
21398
21399  # Call helper function which possibly converts this using DOS-style short mode.
21400  # If so, the updated path is stored in $new_path.
21401  new_path="$input_to_shortpath"
21402
21403  input_path="$input_to_shortpath"
21404  # Check if we need to convert this using DOS-style short mode. If the path
21405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21406  # take no chances and rewrite it.
21407  # Note: m4 eats our [], so we need to use [ and ] instead.
21408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21409  if test "x$has_forbidden_chars" != x; then
21410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21414      # Going to short mode and back again did indeed matter. Since short mode is
21415      # case insensitive, let's make it lowercase to improve readability.
21416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21417      # Now convert it back to Unix-stile (cygpath)
21418      input_path=`$CYGPATH -u "$shortmode_path"`
21419      new_path="$input_path"
21420    fi
21421  fi
21422
21423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21424  if test "x$test_cygdrive_prefix" = x; then
21425    # As a simple fix, exclude /usr/bin since it's not a real path.
21426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21428      # a path prefixed by /cygdrive for fixpath to work.
21429      new_path="$CYGWIN_ROOT_PATH$input_path"
21430    fi
21431  fi
21432
21433  # remove trailing .exe if any
21434  new_path="${new_path/%.exe/}"
21435
21436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21437
21438  # First separate the path from the arguments. This will split at the first
21439  # space.
21440  complete="$PROPER_COMPILER_CXX"
21441  path="${complete%% *}"
21442  tmp="$complete EOL"
21443  arguments="${tmp#* }"
21444
21445  # Input might be given as Windows format, start by converting to
21446  # unix format.
21447  new_path="$path"
21448
21449  windows_path="$new_path"
21450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21451    unix_path=`$CYGPATH -u "$windows_path"`
21452    new_path="$unix_path"
21453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21455    new_path="$unix_path"
21456  fi
21457
21458
21459  # Now try to locate executable using which
21460  new_path=`$WHICH "$new_path" 2> /dev/null`
21461
21462  if test "x$new_path" = x; then
21463    # Oops. Which didn't find the executable.
21464    # The splitting of arguments from the executable at a space might have been incorrect,
21465    # since paths with space are more likely in Windows. Give it another try with the whole
21466    # argument.
21467    path="$complete"
21468    arguments="EOL"
21469    new_path="$path"
21470
21471  windows_path="$new_path"
21472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21473    unix_path=`$CYGPATH -u "$windows_path"`
21474    new_path="$unix_path"
21475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21477    new_path="$unix_path"
21478  fi
21479
21480
21481    new_path=`$WHICH "$new_path" 2> /dev/null`
21482
21483    if test "x$new_path" = x; then
21484      # It's still not found. Now this is an unrecoverable error.
21485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21486$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21487      has_space=`$ECHO "$complete" | $GREP " "`
21488      if test "x$has_space" != x; then
21489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21491      fi
21492      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21493    fi
21494  fi
21495
21496  # Now new_path has a complete unix path to the binary
21497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21498    # Keep paths in /bin as-is, but remove trailing .exe if any
21499    new_path="${new_path/%.exe/}"
21500    # Do not save /bin paths to all_fixpath_prefixes!
21501  else
21502    # Not in mixed or Windows style, start by that.
21503    new_path=`cmd //c echo $new_path`
21504
21505  input_path="$new_path"
21506  # Check if we need to convert this using DOS-style short mode. If the path
21507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21508  # take no chances and rewrite it.
21509  # Note: m4 eats our [], so we need to use [ and ] instead.
21510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21511  if test "x$has_forbidden_chars" != x; then
21512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21514  fi
21515
21516    # Output is in $new_path
21517
21518  windows_path="$new_path"
21519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21520    unix_path=`$CYGPATH -u "$windows_path"`
21521    new_path="$unix_path"
21522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21524    new_path="$unix_path"
21525  fi
21526
21527    # remove trailing .exe if any
21528    new_path="${new_path/%.exe/}"
21529
21530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21532  fi
21533
21534  else
21535    # We're on a posix platform. Hooray! :)
21536    # First separate the path from the arguments. This will split at the first
21537    # space.
21538    complete="$PROPER_COMPILER_CXX"
21539    path="${complete%% *}"
21540    tmp="$complete EOL"
21541    arguments="${tmp#* }"
21542
21543    # Cannot rely on the command "which" here since it doesn't always work.
21544    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21545    if test -z "$is_absolute_path"; then
21546      # Path to executable is not absolute. Find it.
21547      IFS_save="$IFS"
21548      IFS=:
21549      for p in $PATH; do
21550        if test -f "$p/$path" && test -x "$p/$path"; then
21551          new_path="$p/$path"
21552          break
21553        fi
21554      done
21555      IFS="$IFS_save"
21556    else
21557      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21558$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21559      new_path="$path"
21560    fi
21561
21562    if test "x$new_path" = x; then
21563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21564$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21565        has_space=`$ECHO "$complete" | $GREP " "`
21566        if test "x$has_space" != x; then
21567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21569        fi
21570        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21571      fi
21572  fi
21573
21574      # Now join together the path and the arguments once again
21575      if test "x$arguments" != xEOL; then
21576        new_complete="$new_path ${arguments% *}"
21577      else
21578        new_complete="$new_path"
21579      fi
21580
21581  if test "x$complete" != "x$new_complete"; then
21582      PROPER_COMPILER_CXX="$new_complete"
21583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21584$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21585    fi
21586
21587    PATH="$RETRY_COMPILER_SAVED_PATH"
21588
21589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21590$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21591
21592    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21593        # Follow a chain of symbolic links. Use readlink
21594        # where it exists, else fall back to horribly
21595        # complicated shell code.
21596        if test "x$READLINK_TESTED" != yes; then
21597            # On MacOSX there is a readlink tool with a different
21598            # purpose than the GNU readlink tool. Check the found readlink.
21599            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21600            if test "x$ISGNU" = x; then
21601                 # A readlink that we do not know how to use.
21602                 # Are there other non-GNU readlinks out there?
21603                 READLINK_TESTED=yes
21604                 READLINK=
21605            fi
21606        fi
21607
21608        if test "x$READLINK" != x; then
21609            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21610        else
21611            # Save the current directory for restoring afterwards
21612            STARTDIR=$PWD
21613            COUNTER=0
21614            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21615            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21616            cd $sym_link_dir
21617            # Use -P flag to resolve symlinks in directories.
21618            cd `$THEPWDCMD -P`
21619            sym_link_dir=`$THEPWDCMD -P`
21620            # Resolve file symlinks
21621            while test $COUNTER -lt 20; do
21622                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21623                if test "x$ISLINK" == x; then
21624                    # This is not a symbolic link! We are done!
21625                    break
21626                fi
21627                # Again resolve directory symlinks since the target of the just found
21628                # link could be in a different directory
21629                cd `$DIRNAME $ISLINK`
21630                sym_link_dir=`$THEPWDCMD -P`
21631                sym_link_file=`$BASENAME $ISLINK`
21632                let COUNTER=COUNTER+1
21633            done
21634            cd $STARTDIR
21635            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21636        fi
21637    fi
21638
21639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21640$as_echo "$PROPER_COMPILER_CXX" >&6; }
21641    CXX="$PROPER_COMPILER_CXX"
21642  else
21643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21644$as_echo "no, keeping CXX" >&6; }
21645    CXX="$TEST_COMPILER"
21646  fi
21647
21648  COMPILER=$CXX
21649  COMPILER_NAME=$COMPILER_NAME
21650
21651  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21652    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21653    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21654    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21655    if test $? -ne 0; then
21656      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21657
21658      { $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
21659$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21660      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21661$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21662      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21663    else
21664      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21665      COMPILER_VENDOR="Sun Studio"
21666    fi
21667  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21668    # First line typically looks something like:
21669    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21670    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21671    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21672    COMPILER_VENDOR="Microsoft CL.EXE"
21673    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21674    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21675      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21676        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21677      fi
21678    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21679      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21680        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21681      fi
21682    fi
21683  else
21684    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21685    # Check that this is likely to be GCC.
21686    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21687    if test $? -ne 0; then
21688      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21689$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21690      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21691$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21692      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21693    fi
21694
21695    # First line typically looks something like:
21696    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21697    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21698    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21699  fi
21700  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21701  CXX_VERSION="$COMPILER_VERSION"
21702  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21703  CXX_VENDOR="$COMPILER_VENDOR"
21704
21705  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21706$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21707
21708
21709# Now that we have resolved CXX ourself, let autoconf have its go at it
21710ac_ext=cpp
21711ac_cpp='$CXXCPP $CPPFLAGS'
21712ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21713ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21714ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21715if test -z "$CXX"; then
21716  if test -n "$CCC"; then
21717    CXX=$CCC
21718  else
21719    if test -n "$ac_tool_prefix"; then
21720  for ac_prog in $CXX
21721  do
21722    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21723set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21725$as_echo_n "checking for $ac_word... " >&6; }
21726if ${ac_cv_prog_CXX+:} false; then :
21727  $as_echo_n "(cached) " >&6
21728else
21729  if test -n "$CXX"; then
21730  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21731else
21732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21733for as_dir in $PATH
21734do
21735  IFS=$as_save_IFS
21736  test -z "$as_dir" && as_dir=.
21737    for ac_exec_ext in '' $ac_executable_extensions; do
21738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21739    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21741    break 2
21742  fi
21743done
21744  done
21745IFS=$as_save_IFS
21746
21747fi
21748fi
21749CXX=$ac_cv_prog_CXX
21750if test -n "$CXX"; then
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21752$as_echo "$CXX" >&6; }
21753else
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21755$as_echo "no" >&6; }
21756fi
21757
21758
21759    test -n "$CXX" && break
21760  done
21761fi
21762if test -z "$CXX"; then
21763  ac_ct_CXX=$CXX
21764  for ac_prog in $CXX
21765do
21766  # Extract the first word of "$ac_prog", so it can be a program name with args.
21767set dummy $ac_prog; ac_word=$2
21768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21769$as_echo_n "checking for $ac_word... " >&6; }
21770if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21771  $as_echo_n "(cached) " >&6
21772else
21773  if test -n "$ac_ct_CXX"; then
21774  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21775else
21776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21777for as_dir in $PATH
21778do
21779  IFS=$as_save_IFS
21780  test -z "$as_dir" && as_dir=.
21781    for ac_exec_ext in '' $ac_executable_extensions; do
21782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21783    ac_cv_prog_ac_ct_CXX="$ac_prog"
21784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21785    break 2
21786  fi
21787done
21788  done
21789IFS=$as_save_IFS
21790
21791fi
21792fi
21793ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21794if test -n "$ac_ct_CXX"; then
21795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21796$as_echo "$ac_ct_CXX" >&6; }
21797else
21798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21799$as_echo "no" >&6; }
21800fi
21801
21802
21803  test -n "$ac_ct_CXX" && break
21804done
21805
21806  if test "x$ac_ct_CXX" = x; then
21807    CXX="g++"
21808  else
21809    case $cross_compiling:$ac_tool_warned in
21810yes:)
21811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21813ac_tool_warned=yes ;;
21814esac
21815    CXX=$ac_ct_CXX
21816  fi
21817fi
21818
21819  fi
21820fi
21821# Provide some information about the compiler.
21822$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21823set X $ac_compile
21824ac_compiler=$2
21825for ac_option in --version -v -V -qversion; do
21826  { { ac_try="$ac_compiler $ac_option >&5"
21827case "(($ac_try" in
21828  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21829  *) ac_try_echo=$ac_try;;
21830esac
21831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21832$as_echo "$ac_try_echo"; } >&5
21833  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21834  ac_status=$?
21835  if test -s conftest.err; then
21836    sed '10a\
21837... rest of stderr output deleted ...
21838         10q' conftest.err >conftest.er1
21839    cat conftest.er1 >&5
21840  fi
21841  rm -f conftest.er1 conftest.err
21842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21843  test $ac_status = 0; }
21844done
21845
21846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21847$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21848if ${ac_cv_cxx_compiler_gnu+:} false; then :
21849  $as_echo_n "(cached) " >&6
21850else
21851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21852/* end confdefs.h.  */
21853
21854int
21855main ()
21856{
21857#ifndef __GNUC__
21858       choke me
21859#endif
21860
21861  ;
21862  return 0;
21863}
21864_ACEOF
21865if ac_fn_cxx_try_compile "$LINENO"; then :
21866  ac_compiler_gnu=yes
21867else
21868  ac_compiler_gnu=no
21869fi
21870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21871ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21872
21873fi
21874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21875$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21876if test $ac_compiler_gnu = yes; then
21877  GXX=yes
21878else
21879  GXX=
21880fi
21881ac_test_CXXFLAGS=${CXXFLAGS+set}
21882ac_save_CXXFLAGS=$CXXFLAGS
21883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21884$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21885if ${ac_cv_prog_cxx_g+:} false; then :
21886  $as_echo_n "(cached) " >&6
21887else
21888  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21889   ac_cxx_werror_flag=yes
21890   ac_cv_prog_cxx_g=no
21891   CXXFLAGS="-g"
21892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21893/* end confdefs.h.  */
21894
21895int
21896main ()
21897{
21898
21899  ;
21900  return 0;
21901}
21902_ACEOF
21903if ac_fn_cxx_try_compile "$LINENO"; then :
21904  ac_cv_prog_cxx_g=yes
21905else
21906  CXXFLAGS=""
21907      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21908/* end confdefs.h.  */
21909
21910int
21911main ()
21912{
21913
21914  ;
21915  return 0;
21916}
21917_ACEOF
21918if ac_fn_cxx_try_compile "$LINENO"; then :
21919
21920else
21921  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21922	 CXXFLAGS="-g"
21923	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21924/* end confdefs.h.  */
21925
21926int
21927main ()
21928{
21929
21930  ;
21931  return 0;
21932}
21933_ACEOF
21934if ac_fn_cxx_try_compile "$LINENO"; then :
21935  ac_cv_prog_cxx_g=yes
21936fi
21937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21938fi
21939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21940fi
21941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21942   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21943fi
21944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21945$as_echo "$ac_cv_prog_cxx_g" >&6; }
21946if test "$ac_test_CXXFLAGS" = set; then
21947  CXXFLAGS=$ac_save_CXXFLAGS
21948elif test $ac_cv_prog_cxx_g = yes; then
21949  if test "$GXX" = yes; then
21950    CXXFLAGS="-g -O2"
21951  else
21952    CXXFLAGS="-g"
21953  fi
21954else
21955  if test "$GXX" = yes; then
21956    CXXFLAGS="-O2"
21957  else
21958    CXXFLAGS=
21959  fi
21960fi
21961ac_ext=cpp
21962ac_cpp='$CXXCPP $CPPFLAGS'
21963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21966
21967
21968### Locate other tools
21969
21970if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21971    ac_ext=m
21972ac_cpp='$OBJCPP $CPPFLAGS'
21973ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21974ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21975ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21976if test -n "$ac_tool_prefix"; then
21977  for ac_prog in gcc objcc objc cc CC
21978  do
21979    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21980set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21982$as_echo_n "checking for $ac_word... " >&6; }
21983if ${ac_cv_prog_OBJC+:} false; then :
21984  $as_echo_n "(cached) " >&6
21985else
21986  if test -n "$OBJC"; then
21987  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21988else
21989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21990for as_dir in $PATH
21991do
21992  IFS=$as_save_IFS
21993  test -z "$as_dir" && as_dir=.
21994    for ac_exec_ext in '' $ac_executable_extensions; do
21995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21996    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21998    break 2
21999  fi
22000done
22001  done
22002IFS=$as_save_IFS
22003
22004fi
22005fi
22006OBJC=$ac_cv_prog_OBJC
22007if test -n "$OBJC"; then
22008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22009$as_echo "$OBJC" >&6; }
22010else
22011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22012$as_echo "no" >&6; }
22013fi
22014
22015
22016    test -n "$OBJC" && break
22017  done
22018fi
22019if test -z "$OBJC"; then
22020  ac_ct_OBJC=$OBJC
22021  for ac_prog in gcc objcc objc cc CC
22022do
22023  # Extract the first word of "$ac_prog", so it can be a program name with args.
22024set dummy $ac_prog; ac_word=$2
22025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22026$as_echo_n "checking for $ac_word... " >&6; }
22027if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22028  $as_echo_n "(cached) " >&6
22029else
22030  if test -n "$ac_ct_OBJC"; then
22031  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22032else
22033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22034for as_dir in $PATH
22035do
22036  IFS=$as_save_IFS
22037  test -z "$as_dir" && as_dir=.
22038    for ac_exec_ext in '' $ac_executable_extensions; do
22039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22040    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22042    break 2
22043  fi
22044done
22045  done
22046IFS=$as_save_IFS
22047
22048fi
22049fi
22050ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22051if test -n "$ac_ct_OBJC"; then
22052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22053$as_echo "$ac_ct_OBJC" >&6; }
22054else
22055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22056$as_echo "no" >&6; }
22057fi
22058
22059
22060  test -n "$ac_ct_OBJC" && break
22061done
22062
22063  if test "x$ac_ct_OBJC" = x; then
22064    OBJC="gcc"
22065  else
22066    case $cross_compiling:$ac_tool_warned in
22067yes:)
22068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22070ac_tool_warned=yes ;;
22071esac
22072    OBJC=$ac_ct_OBJC
22073  fi
22074fi
22075
22076# Provide some information about the compiler.
22077$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22078set X $ac_compile
22079ac_compiler=$2
22080for ac_option in --version -v -V -qversion; do
22081  { { ac_try="$ac_compiler $ac_option >&5"
22082case "(($ac_try" in
22083  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22084  *) ac_try_echo=$ac_try;;
22085esac
22086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22087$as_echo "$ac_try_echo"; } >&5
22088  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22089  ac_status=$?
22090  if test -s conftest.err; then
22091    sed '10a\
22092... rest of stderr output deleted ...
22093         10q' conftest.err >conftest.er1
22094    cat conftest.er1 >&5
22095  fi
22096  rm -f conftest.er1 conftest.err
22097  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22098  test $ac_status = 0; }
22099done
22100
22101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22102$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22103if ${ac_cv_objc_compiler_gnu+:} false; then :
22104  $as_echo_n "(cached) " >&6
22105else
22106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22107/* end confdefs.h.  */
22108
22109int
22110main ()
22111{
22112#ifndef __GNUC__
22113       choke me
22114#endif
22115
22116  ;
22117  return 0;
22118}
22119_ACEOF
22120if ac_fn_objc_try_compile "$LINENO"; then :
22121  ac_compiler_gnu=yes
22122else
22123  ac_compiler_gnu=no
22124fi
22125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22126ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22127
22128fi
22129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22130$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22131if test $ac_compiler_gnu = yes; then
22132  GOBJC=yes
22133else
22134  GOBJC=
22135fi
22136ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22137ac_save_OBJCFLAGS=$OBJCFLAGS
22138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22139$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22140if ${ac_cv_prog_objc_g+:} false; then :
22141  $as_echo_n "(cached) " >&6
22142else
22143  ac_save_objc_werror_flag=$ac_objc_werror_flag
22144   ac_objc_werror_flag=yes
22145   ac_cv_prog_objc_g=no
22146   OBJCFLAGS="-g"
22147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22148/* end confdefs.h.  */
22149
22150int
22151main ()
22152{
22153
22154  ;
22155  return 0;
22156}
22157_ACEOF
22158if ac_fn_objc_try_compile "$LINENO"; then :
22159  ac_cv_prog_objc_g=yes
22160else
22161  OBJCFLAGS=""
22162      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22163/* end confdefs.h.  */
22164
22165int
22166main ()
22167{
22168
22169  ;
22170  return 0;
22171}
22172_ACEOF
22173if ac_fn_objc_try_compile "$LINENO"; then :
22174
22175else
22176  ac_objc_werror_flag=$ac_save_objc_werror_flag
22177	 OBJCFLAGS="-g"
22178	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22179/* end confdefs.h.  */
22180
22181int
22182main ()
22183{
22184
22185  ;
22186  return 0;
22187}
22188_ACEOF
22189if ac_fn_objc_try_compile "$LINENO"; then :
22190  ac_cv_prog_objc_g=yes
22191fi
22192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22193fi
22194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22195fi
22196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22197   ac_objc_werror_flag=$ac_save_objc_werror_flag
22198fi
22199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22200$as_echo "$ac_cv_prog_objc_g" >&6; }
22201if test "$ac_test_OBJCFLAGS" = set; then
22202  OBJCFLAGS=$ac_save_OBJCFLAGS
22203elif test $ac_cv_prog_objc_g = yes; then
22204  if test "$GOBJC" = yes; then
22205    OBJCFLAGS="-g -O2"
22206  else
22207    OBJCFLAGS="-g"
22208  fi
22209else
22210  if test "$GOBJC" = yes; then
22211    OBJCFLAGS="-O2"
22212  else
22213    OBJCFLAGS=
22214  fi
22215fi
22216ac_ext=cpp
22217ac_cpp='$CXXCPP $CPPFLAGS'
22218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22221
22222
22223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22224
22225  # First separate the path from the arguments. This will split at the first
22226  # space.
22227  complete="$OBJC"
22228  path="${complete%% *}"
22229  tmp="$complete EOL"
22230  arguments="${tmp#* }"
22231
22232  # Input might be given as Windows format, start by converting to
22233  # unix format.
22234  new_path=`$CYGPATH -u "$path"`
22235
22236  # Now try to locate executable using which
22237  new_path=`$WHICH "$new_path" 2> /dev/null`
22238  # bat and cmd files are not always considered executable in cygwin causing which
22239  # to not find them
22240  if test "x$new_path" = x \
22241           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22242           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22243    new_path=`$CYGPATH -u "$path"`
22244  fi
22245  if test "x$new_path" = x; then
22246    # Oops. Which didn't find the executable.
22247    # The splitting of arguments from the executable at a space might have been incorrect,
22248    # since paths with space are more likely in Windows. Give it another try with the whole
22249    # argument.
22250    path="$complete"
22251    arguments="EOL"
22252    new_path=`$CYGPATH -u "$path"`
22253    new_path=`$WHICH "$new_path" 2> /dev/null`
22254    # bat and cmd files are not always considered executable in cygwin causing which
22255    # to not find them
22256    if test "x$new_path" = x \
22257             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22258             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22259      new_path=`$CYGPATH -u "$path"`
22260    fi
22261    if test "x$new_path" = x; then
22262      # It's still not found. Now this is an unrecoverable error.
22263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22264$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22265      has_space=`$ECHO "$complete" | $GREP " "`
22266      if test "x$has_space" != x; then
22267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22269      fi
22270      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22271    fi
22272  fi
22273
22274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22277  # "foo.exe" is OK but "foo" is an error.
22278  #
22279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22280  # It is also a way to make sure we got the proper file name for the real test later on.
22281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22282  if test "x$test_shortpath" = x; then
22283    # Short path failed, file does not exist as specified.
22284    # Try adding .exe or .cmd
22285    if test -f "${new_path}.exe"; then
22286       input_to_shortpath="${new_path}.exe"
22287    elif test -f "${new_path}.cmd"; then
22288       input_to_shortpath="${new_path}.cmd"
22289    else
22290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22291$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22294      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22295    fi
22296  else
22297    input_to_shortpath="$new_path"
22298  fi
22299
22300  # Call helper function which possibly converts this using DOS-style short mode.
22301  # If so, the updated path is stored in $new_path.
22302  new_path="$input_to_shortpath"
22303
22304  input_path="$input_to_shortpath"
22305  # Check if we need to convert this using DOS-style short mode. If the path
22306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22307  # take no chances and rewrite it.
22308  # Note: m4 eats our [], so we need to use [ and ] instead.
22309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22310  if test "x$has_forbidden_chars" != x; then
22311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22315      # Going to short mode and back again did indeed matter. Since short mode is
22316      # case insensitive, let's make it lowercase to improve readability.
22317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22318      # Now convert it back to Unix-stile (cygpath)
22319      input_path=`$CYGPATH -u "$shortmode_path"`
22320      new_path="$input_path"
22321    fi
22322  fi
22323
22324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22325  if test "x$test_cygdrive_prefix" = x; then
22326    # As a simple fix, exclude /usr/bin since it's not a real path.
22327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22329      # a path prefixed by /cygdrive for fixpath to work.
22330      new_path="$CYGWIN_ROOT_PATH$input_path"
22331    fi
22332  fi
22333
22334  # remove trailing .exe if any
22335  new_path="${new_path/%.exe/}"
22336
22337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22338
22339  # First separate the path from the arguments. This will split at the first
22340  # space.
22341  complete="$OBJC"
22342  path="${complete%% *}"
22343  tmp="$complete EOL"
22344  arguments="${tmp#* }"
22345
22346  # Input might be given as Windows format, start by converting to
22347  # unix format.
22348  new_path="$path"
22349
22350  windows_path="$new_path"
22351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22352    unix_path=`$CYGPATH -u "$windows_path"`
22353    new_path="$unix_path"
22354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22356    new_path="$unix_path"
22357  fi
22358
22359
22360  # Now try to locate executable using which
22361  new_path=`$WHICH "$new_path" 2> /dev/null`
22362
22363  if test "x$new_path" = x; then
22364    # Oops. Which didn't find the executable.
22365    # The splitting of arguments from the executable at a space might have been incorrect,
22366    # since paths with space are more likely in Windows. Give it another try with the whole
22367    # argument.
22368    path="$complete"
22369    arguments="EOL"
22370    new_path="$path"
22371
22372  windows_path="$new_path"
22373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22374    unix_path=`$CYGPATH -u "$windows_path"`
22375    new_path="$unix_path"
22376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22378    new_path="$unix_path"
22379  fi
22380
22381
22382    new_path=`$WHICH "$new_path" 2> /dev/null`
22383
22384    if test "x$new_path" = x; then
22385      # It's still not found. Now this is an unrecoverable error.
22386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22387$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22388      has_space=`$ECHO "$complete" | $GREP " "`
22389      if test "x$has_space" != x; then
22390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22392      fi
22393      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22394    fi
22395  fi
22396
22397  # Now new_path has a complete unix path to the binary
22398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22399    # Keep paths in /bin as-is, but remove trailing .exe if any
22400    new_path="${new_path/%.exe/}"
22401    # Do not save /bin paths to all_fixpath_prefixes!
22402  else
22403    # Not in mixed or Windows style, start by that.
22404    new_path=`cmd //c echo $new_path`
22405
22406  input_path="$new_path"
22407  # Check if we need to convert this using DOS-style short mode. If the path
22408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22409  # take no chances and rewrite it.
22410  # Note: m4 eats our [], so we need to use [ and ] instead.
22411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22412  if test "x$has_forbidden_chars" != x; then
22413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22415  fi
22416
22417    # Output is in $new_path
22418
22419  windows_path="$new_path"
22420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22421    unix_path=`$CYGPATH -u "$windows_path"`
22422    new_path="$unix_path"
22423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22425    new_path="$unix_path"
22426  fi
22427
22428    # remove trailing .exe if any
22429    new_path="${new_path/%.exe/}"
22430
22431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22433  fi
22434
22435  else
22436    # We're on a posix platform. Hooray! :)
22437    # First separate the path from the arguments. This will split at the first
22438    # space.
22439    complete="$OBJC"
22440    path="${complete%% *}"
22441    tmp="$complete EOL"
22442    arguments="${tmp#* }"
22443
22444    # Cannot rely on the command "which" here since it doesn't always work.
22445    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22446    if test -z "$is_absolute_path"; then
22447      # Path to executable is not absolute. Find it.
22448      IFS_save="$IFS"
22449      IFS=:
22450      for p in $PATH; do
22451        if test -f "$p/$path" && test -x "$p/$path"; then
22452          new_path="$p/$path"
22453          break
22454        fi
22455      done
22456      IFS="$IFS_save"
22457    else
22458      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22459$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22460      new_path="$path"
22461    fi
22462
22463    if test "x$new_path" = x; then
22464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22465$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22466        has_space=`$ECHO "$complete" | $GREP " "`
22467        if test "x$has_space" != x; then
22468          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22469$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22470        fi
22471        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22472      fi
22473  fi
22474
22475      # Now join together the path and the arguments once again
22476      if test "x$arguments" != xEOL; then
22477        new_complete="$new_path ${arguments% *}"
22478      else
22479        new_complete="$new_path"
22480      fi
22481
22482  if test "x$complete" != "x$new_complete"; then
22483      OBJC="$new_complete"
22484      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22485$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22486    fi
22487
22488else
22489    OBJC=
22490fi
22491
22492# Restore the flags to the user specified values.
22493# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22494CFLAGS="$ORG_CFLAGS"
22495CXXFLAGS="$ORG_CXXFLAGS"
22496OBJCFLAGS="$ORG_OBJCFLAGS"
22497
22498LD="$CC"
22499LDEXE="$CC"
22500LDCXX="$CXX"
22501LDEXECXX="$CXX"
22502
22503# LDEXE is the linker to use, when creating executables.
22504
22505# Linking C++ libraries.
22506
22507# Linking C++ executables.
22508
22509
22510if test "x$OPENJDK_TARGET_OS" != xwindows; then
22511    if test -n "$ac_tool_prefix"; then
22512  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22513set dummy ${ac_tool_prefix}ar; ac_word=$2
22514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22515$as_echo_n "checking for $ac_word... " >&6; }
22516if ${ac_cv_prog_AR+:} false; then :
22517  $as_echo_n "(cached) " >&6
22518else
22519  if test -n "$AR"; then
22520  ac_cv_prog_AR="$AR" # Let the user override the test.
22521else
22522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22523for as_dir in $PATH
22524do
22525  IFS=$as_save_IFS
22526  test -z "$as_dir" && as_dir=.
22527    for ac_exec_ext in '' $ac_executable_extensions; do
22528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22529    ac_cv_prog_AR="${ac_tool_prefix}ar"
22530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22531    break 2
22532  fi
22533done
22534  done
22535IFS=$as_save_IFS
22536
22537fi
22538fi
22539AR=$ac_cv_prog_AR
22540if test -n "$AR"; then
22541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22542$as_echo "$AR" >&6; }
22543else
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22545$as_echo "no" >&6; }
22546fi
22547
22548
22549fi
22550if test -z "$ac_cv_prog_AR"; then
22551  ac_ct_AR=$AR
22552  # Extract the first word of "ar", so it can be a program name with args.
22553set dummy ar; ac_word=$2
22554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22555$as_echo_n "checking for $ac_word... " >&6; }
22556if ${ac_cv_prog_ac_ct_AR+:} false; then :
22557  $as_echo_n "(cached) " >&6
22558else
22559  if test -n "$ac_ct_AR"; then
22560  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22561else
22562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22563for as_dir in $PATH
22564do
22565  IFS=$as_save_IFS
22566  test -z "$as_dir" && as_dir=.
22567    for ac_exec_ext in '' $ac_executable_extensions; do
22568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22569    ac_cv_prog_ac_ct_AR="ar"
22570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22571    break 2
22572  fi
22573done
22574  done
22575IFS=$as_save_IFS
22576
22577fi
22578fi
22579ac_ct_AR=$ac_cv_prog_ac_ct_AR
22580if test -n "$ac_ct_AR"; then
22581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22582$as_echo "$ac_ct_AR" >&6; }
22583else
22584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22585$as_echo "no" >&6; }
22586fi
22587
22588  if test "x$ac_ct_AR" = x; then
22589    AR=""
22590  else
22591    case $cross_compiling:$ac_tool_warned in
22592yes:)
22593{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22594$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22595ac_tool_warned=yes ;;
22596esac
22597    AR=$ac_ct_AR
22598  fi
22599else
22600  AR="$ac_cv_prog_AR"
22601fi
22602
22603
22604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22605
22606  # First separate the path from the arguments. This will split at the first
22607  # space.
22608  complete="$AR"
22609  path="${complete%% *}"
22610  tmp="$complete EOL"
22611  arguments="${tmp#* }"
22612
22613  # Input might be given as Windows format, start by converting to
22614  # unix format.
22615  new_path=`$CYGPATH -u "$path"`
22616
22617  # Now try to locate executable using which
22618  new_path=`$WHICH "$new_path" 2> /dev/null`
22619  # bat and cmd files are not always considered executable in cygwin causing which
22620  # to not find them
22621  if test "x$new_path" = x \
22622           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22623           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22624    new_path=`$CYGPATH -u "$path"`
22625  fi
22626  if test "x$new_path" = x; then
22627    # Oops. Which didn't find the executable.
22628    # The splitting of arguments from the executable at a space might have been incorrect,
22629    # since paths with space are more likely in Windows. Give it another try with the whole
22630    # argument.
22631    path="$complete"
22632    arguments="EOL"
22633    new_path=`$CYGPATH -u "$path"`
22634    new_path=`$WHICH "$new_path" 2> /dev/null`
22635    # bat and cmd files are not always considered executable in cygwin causing which
22636    # to not find them
22637    if test "x$new_path" = x \
22638             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22639             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22640      new_path=`$CYGPATH -u "$path"`
22641    fi
22642    if test "x$new_path" = x; then
22643      # It's still not found. Now this is an unrecoverable error.
22644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22645$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22646      has_space=`$ECHO "$complete" | $GREP " "`
22647      if test "x$has_space" != x; then
22648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22650      fi
22651      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22652    fi
22653  fi
22654
22655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22658  # "foo.exe" is OK but "foo" is an error.
22659  #
22660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22661  # It is also a way to make sure we got the proper file name for the real test later on.
22662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22663  if test "x$test_shortpath" = x; then
22664    # Short path failed, file does not exist as specified.
22665    # Try adding .exe or .cmd
22666    if test -f "${new_path}.exe"; then
22667       input_to_shortpath="${new_path}.exe"
22668    elif test -f "${new_path}.cmd"; then
22669       input_to_shortpath="${new_path}.cmd"
22670    else
22671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22672$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22673      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22674$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22675      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22676    fi
22677  else
22678    input_to_shortpath="$new_path"
22679  fi
22680
22681  # Call helper function which possibly converts this using DOS-style short mode.
22682  # If so, the updated path is stored in $new_path.
22683  new_path="$input_to_shortpath"
22684
22685  input_path="$input_to_shortpath"
22686  # Check if we need to convert this using DOS-style short mode. If the path
22687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22688  # take no chances and rewrite it.
22689  # Note: m4 eats our [], so we need to use [ and ] instead.
22690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22691  if test "x$has_forbidden_chars" != x; then
22692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22696      # Going to short mode and back again did indeed matter. Since short mode is
22697      # case insensitive, let's make it lowercase to improve readability.
22698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22699      # Now convert it back to Unix-stile (cygpath)
22700      input_path=`$CYGPATH -u "$shortmode_path"`
22701      new_path="$input_path"
22702    fi
22703  fi
22704
22705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22706  if test "x$test_cygdrive_prefix" = x; then
22707    # As a simple fix, exclude /usr/bin since it's not a real path.
22708    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22710      # a path prefixed by /cygdrive for fixpath to work.
22711      new_path="$CYGWIN_ROOT_PATH$input_path"
22712    fi
22713  fi
22714
22715  # remove trailing .exe if any
22716  new_path="${new_path/%.exe/}"
22717
22718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22719
22720  # First separate the path from the arguments. This will split at the first
22721  # space.
22722  complete="$AR"
22723  path="${complete%% *}"
22724  tmp="$complete EOL"
22725  arguments="${tmp#* }"
22726
22727  # Input might be given as Windows format, start by converting to
22728  # unix format.
22729  new_path="$path"
22730
22731  windows_path="$new_path"
22732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22733    unix_path=`$CYGPATH -u "$windows_path"`
22734    new_path="$unix_path"
22735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22737    new_path="$unix_path"
22738  fi
22739
22740
22741  # Now try to locate executable using which
22742  new_path=`$WHICH "$new_path" 2> /dev/null`
22743
22744  if test "x$new_path" = x; then
22745    # Oops. Which didn't find the executable.
22746    # The splitting of arguments from the executable at a space might have been incorrect,
22747    # since paths with space are more likely in Windows. Give it another try with the whole
22748    # argument.
22749    path="$complete"
22750    arguments="EOL"
22751    new_path="$path"
22752
22753  windows_path="$new_path"
22754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22755    unix_path=`$CYGPATH -u "$windows_path"`
22756    new_path="$unix_path"
22757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22759    new_path="$unix_path"
22760  fi
22761
22762
22763    new_path=`$WHICH "$new_path" 2> /dev/null`
22764
22765    if test "x$new_path" = x; then
22766      # It's still not found. Now this is an unrecoverable error.
22767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22768$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22769      has_space=`$ECHO "$complete" | $GREP " "`
22770      if test "x$has_space" != x; then
22771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22773      fi
22774      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22775    fi
22776  fi
22777
22778  # Now new_path has a complete unix path to the binary
22779  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22780    # Keep paths in /bin as-is, but remove trailing .exe if any
22781    new_path="${new_path/%.exe/}"
22782    # Do not save /bin paths to all_fixpath_prefixes!
22783  else
22784    # Not in mixed or Windows style, start by that.
22785    new_path=`cmd //c echo $new_path`
22786
22787  input_path="$new_path"
22788  # Check if we need to convert this using DOS-style short mode. If the path
22789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22790  # take no chances and rewrite it.
22791  # Note: m4 eats our [], so we need to use [ and ] instead.
22792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22793  if test "x$has_forbidden_chars" != x; then
22794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22796  fi
22797
22798    # Output is in $new_path
22799
22800  windows_path="$new_path"
22801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22802    unix_path=`$CYGPATH -u "$windows_path"`
22803    new_path="$unix_path"
22804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22806    new_path="$unix_path"
22807  fi
22808
22809    # remove trailing .exe if any
22810    new_path="${new_path/%.exe/}"
22811
22812    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22813    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22814  fi
22815
22816  else
22817    # We're on a posix platform. Hooray! :)
22818    # First separate the path from the arguments. This will split at the first
22819    # space.
22820    complete="$AR"
22821    path="${complete%% *}"
22822    tmp="$complete EOL"
22823    arguments="${tmp#* }"
22824
22825    # Cannot rely on the command "which" here since it doesn't always work.
22826    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22827    if test -z "$is_absolute_path"; then
22828      # Path to executable is not absolute. Find it.
22829      IFS_save="$IFS"
22830      IFS=:
22831      for p in $PATH; do
22832        if test -f "$p/$path" && test -x "$p/$path"; then
22833          new_path="$p/$path"
22834          break
22835        fi
22836      done
22837      IFS="$IFS_save"
22838    else
22839      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22840$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22841      new_path="$path"
22842    fi
22843
22844    if test "x$new_path" = x; then
22845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22846$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22847        has_space=`$ECHO "$complete" | $GREP " "`
22848        if test "x$has_space" != x; then
22849          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22851        fi
22852        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22853      fi
22854  fi
22855
22856      # Now join together the path and the arguments once again
22857      if test "x$arguments" != xEOL; then
22858        new_complete="$new_path ${arguments% *}"
22859      else
22860        new_complete="$new_path"
22861      fi
22862
22863  if test "x$complete" != "x$new_complete"; then
22864      AR="$new_complete"
22865      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22866$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22867    fi
22868
22869fi
22870if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22871    ARFLAGS="-r"
22872else
22873    ARFLAGS=""
22874fi
22875
22876
22877# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22878HOTSPOT_CXX="$CXX"
22879HOTSPOT_LD="$LD"
22880
22881
22882
22883COMPILER_NAME=gcc
22884COMPILER_TYPE=CC
22885if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22886
22887    # For now, assume that we are always compiling using cl.exe.
22888    CC_OUT_OPTION=-Fo
22889    EXE_OUT_OPTION=-out:
22890    LD_OUT_OPTION=-out:
22891    AR_OUT_OPTION=-out:
22892    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22893    # program for something completely different.
22894    # Extract the first word of "link", so it can be a program name with args.
22895set dummy link; ac_word=$2
22896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22897$as_echo_n "checking for $ac_word... " >&6; }
22898if ${ac_cv_prog_WINLD+:} false; then :
22899  $as_echo_n "(cached) " >&6
22900else
22901  if test -n "$WINLD"; then
22902  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22903else
22904  ac_prog_rejected=no
22905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22906for as_dir in $PATH
22907do
22908  IFS=$as_save_IFS
22909  test -z "$as_dir" && as_dir=.
22910    for ac_exec_ext in '' $ac_executable_extensions; do
22911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22912    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22913       ac_prog_rejected=yes
22914       continue
22915     fi
22916    ac_cv_prog_WINLD="link"
22917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22918    break 2
22919  fi
22920done
22921  done
22922IFS=$as_save_IFS
22923
22924if test $ac_prog_rejected = yes; then
22925  # We found a bogon in the path, so make sure we never use it.
22926  set dummy $ac_cv_prog_WINLD
22927  shift
22928  if test $# != 0; then
22929    # We chose a different compiler from the bogus one.
22930    # However, it has the same basename, so the bogon will be chosen
22931    # first if we set WINLD to just the basename; use the full file name.
22932    shift
22933    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22934  fi
22935fi
22936fi
22937fi
22938WINLD=$ac_cv_prog_WINLD
22939if test -n "$WINLD"; then
22940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22941$as_echo "$WINLD" >&6; }
22942else
22943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22944$as_echo "no" >&6; }
22945fi
22946
22947
22948    # Since we must ignore the first found link, WINLD will contain
22949    # the full path to the link.exe program.
22950
22951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22952
22953  # First separate the path from the arguments. This will split at the first
22954  # space.
22955  complete="$WINLD"
22956  path="${complete%% *}"
22957  tmp="$complete EOL"
22958  arguments="${tmp#* }"
22959
22960  # Input might be given as Windows format, start by converting to
22961  # unix format.
22962  new_path=`$CYGPATH -u "$path"`
22963
22964  # Now try to locate executable using which
22965  new_path=`$WHICH "$new_path" 2> /dev/null`
22966  # bat and cmd files are not always considered executable in cygwin causing which
22967  # to not find them
22968  if test "x$new_path" = x \
22969           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22970           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22971    new_path=`$CYGPATH -u "$path"`
22972  fi
22973  if test "x$new_path" = x; then
22974    # Oops. Which didn't find the executable.
22975    # The splitting of arguments from the executable at a space might have been incorrect,
22976    # since paths with space are more likely in Windows. Give it another try with the whole
22977    # argument.
22978    path="$complete"
22979    arguments="EOL"
22980    new_path=`$CYGPATH -u "$path"`
22981    new_path=`$WHICH "$new_path" 2> /dev/null`
22982    # bat and cmd files are not always considered executable in cygwin causing which
22983    # to not find them
22984    if test "x$new_path" = x \
22985             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22986             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22987      new_path=`$CYGPATH -u "$path"`
22988    fi
22989    if test "x$new_path" = x; then
22990      # It's still not found. Now this is an unrecoverable error.
22991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22992$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22993      has_space=`$ECHO "$complete" | $GREP " "`
22994      if test "x$has_space" != x; then
22995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22997      fi
22998      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22999    fi
23000  fi
23001
23002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23005  # "foo.exe" is OK but "foo" is an error.
23006  #
23007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23008  # It is also a way to make sure we got the proper file name for the real test later on.
23009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23010  if test "x$test_shortpath" = x; then
23011    # Short path failed, file does not exist as specified.
23012    # Try adding .exe or .cmd
23013    if test -f "${new_path}.exe"; then
23014       input_to_shortpath="${new_path}.exe"
23015    elif test -f "${new_path}.cmd"; then
23016       input_to_shortpath="${new_path}.cmd"
23017    else
23018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23019$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23020      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23021$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23022      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23023    fi
23024  else
23025    input_to_shortpath="$new_path"
23026  fi
23027
23028  # Call helper function which possibly converts this using DOS-style short mode.
23029  # If so, the updated path is stored in $new_path.
23030  new_path="$input_to_shortpath"
23031
23032  input_path="$input_to_shortpath"
23033  # Check if we need to convert this using DOS-style short mode. If the path
23034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23035  # take no chances and rewrite it.
23036  # Note: m4 eats our [], so we need to use [ and ] instead.
23037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23038  if test "x$has_forbidden_chars" != x; then
23039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23043      # Going to short mode and back again did indeed matter. Since short mode is
23044      # case insensitive, let's make it lowercase to improve readability.
23045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23046      # Now convert it back to Unix-stile (cygpath)
23047      input_path=`$CYGPATH -u "$shortmode_path"`
23048      new_path="$input_path"
23049    fi
23050  fi
23051
23052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23053  if test "x$test_cygdrive_prefix" = x; then
23054    # As a simple fix, exclude /usr/bin since it's not a real path.
23055    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23057      # a path prefixed by /cygdrive for fixpath to work.
23058      new_path="$CYGWIN_ROOT_PATH$input_path"
23059    fi
23060  fi
23061
23062  # remove trailing .exe if any
23063  new_path="${new_path/%.exe/}"
23064
23065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23066
23067  # First separate the path from the arguments. This will split at the first
23068  # space.
23069  complete="$WINLD"
23070  path="${complete%% *}"
23071  tmp="$complete EOL"
23072  arguments="${tmp#* }"
23073
23074  # Input might be given as Windows format, start by converting to
23075  # unix format.
23076  new_path="$path"
23077
23078  windows_path="$new_path"
23079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23080    unix_path=`$CYGPATH -u "$windows_path"`
23081    new_path="$unix_path"
23082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23084    new_path="$unix_path"
23085  fi
23086
23087
23088  # Now try to locate executable using which
23089  new_path=`$WHICH "$new_path" 2> /dev/null`
23090
23091  if test "x$new_path" = x; then
23092    # Oops. Which didn't find the executable.
23093    # The splitting of arguments from the executable at a space might have been incorrect,
23094    # since paths with space are more likely in Windows. Give it another try with the whole
23095    # argument.
23096    path="$complete"
23097    arguments="EOL"
23098    new_path="$path"
23099
23100  windows_path="$new_path"
23101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23102    unix_path=`$CYGPATH -u "$windows_path"`
23103    new_path="$unix_path"
23104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23106    new_path="$unix_path"
23107  fi
23108
23109
23110    new_path=`$WHICH "$new_path" 2> /dev/null`
23111
23112    if test "x$new_path" = x; then
23113      # It's still not found. Now this is an unrecoverable error.
23114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23115$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23116      has_space=`$ECHO "$complete" | $GREP " "`
23117      if test "x$has_space" != x; then
23118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23120      fi
23121      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23122    fi
23123  fi
23124
23125  # Now new_path has a complete unix path to the binary
23126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23127    # Keep paths in /bin as-is, but remove trailing .exe if any
23128    new_path="${new_path/%.exe/}"
23129    # Do not save /bin paths to all_fixpath_prefixes!
23130  else
23131    # Not in mixed or Windows style, start by that.
23132    new_path=`cmd //c echo $new_path`
23133
23134  input_path="$new_path"
23135  # Check if we need to convert this using DOS-style short mode. If the path
23136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23137  # take no chances and rewrite it.
23138  # Note: m4 eats our [], so we need to use [ and ] instead.
23139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23140  if test "x$has_forbidden_chars" != x; then
23141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23143  fi
23144
23145    # Output is in $new_path
23146
23147  windows_path="$new_path"
23148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23149    unix_path=`$CYGPATH -u "$windows_path"`
23150    new_path="$unix_path"
23151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23153    new_path="$unix_path"
23154  fi
23155
23156    # remove trailing .exe if any
23157    new_path="${new_path/%.exe/}"
23158
23159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23161  fi
23162
23163  else
23164    # We're on a posix platform. Hooray! :)
23165    # First separate the path from the arguments. This will split at the first
23166    # space.
23167    complete="$WINLD"
23168    path="${complete%% *}"
23169    tmp="$complete EOL"
23170    arguments="${tmp#* }"
23171
23172    # Cannot rely on the command "which" here since it doesn't always work.
23173    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23174    if test -z "$is_absolute_path"; then
23175      # Path to executable is not absolute. Find it.
23176      IFS_save="$IFS"
23177      IFS=:
23178      for p in $PATH; do
23179        if test -f "$p/$path" && test -x "$p/$path"; then
23180          new_path="$p/$path"
23181          break
23182        fi
23183      done
23184      IFS="$IFS_save"
23185    else
23186      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23187$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23188      new_path="$path"
23189    fi
23190
23191    if test "x$new_path" = x; then
23192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23193$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23194        has_space=`$ECHO "$complete" | $GREP " "`
23195        if test "x$has_space" != x; then
23196          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23197$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23198        fi
23199        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23200      fi
23201  fi
23202
23203      # Now join together the path and the arguments once again
23204      if test "x$arguments" != xEOL; then
23205        new_complete="$new_path ${arguments% *}"
23206      else
23207        new_complete="$new_path"
23208      fi
23209
23210  if test "x$complete" != "x$new_complete"; then
23211      WINLD="$new_complete"
23212      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23213$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23214    fi
23215
23216    printf "Windows linker was found at $WINLD\n"
23217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23218$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23219    "$WINLD" --version > /dev/null
23220    if test $? -eq 0 ; then
23221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23222$as_echo "no" >&6; }
23223      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23224    else
23225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23226$as_echo "yes" >&6; }
23227    fi
23228    LD="$WINLD"
23229    LDEXE="$WINLD"
23230    LDCXX="$WINLD"
23231    LDEXECXX="$WINLD"
23232
23233    # Extract the first word of "mt", so it can be a program name with args.
23234set dummy mt; ac_word=$2
23235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23236$as_echo_n "checking for $ac_word... " >&6; }
23237if ${ac_cv_prog_MT+:} false; then :
23238  $as_echo_n "(cached) " >&6
23239else
23240  if test -n "$MT"; then
23241  ac_cv_prog_MT="$MT" # Let the user override the test.
23242else
23243  ac_prog_rejected=no
23244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23245for as_dir in $PATH
23246do
23247  IFS=$as_save_IFS
23248  test -z "$as_dir" && as_dir=.
23249    for ac_exec_ext in '' $ac_executable_extensions; do
23250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23251    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23252       ac_prog_rejected=yes
23253       continue
23254     fi
23255    ac_cv_prog_MT="mt"
23256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23257    break 2
23258  fi
23259done
23260  done
23261IFS=$as_save_IFS
23262
23263if test $ac_prog_rejected = yes; then
23264  # We found a bogon in the path, so make sure we never use it.
23265  set dummy $ac_cv_prog_MT
23266  shift
23267  if test $# != 0; then
23268    # We chose a different compiler from the bogus one.
23269    # However, it has the same basename, so the bogon will be chosen
23270    # first if we set MT to just the basename; use the full file name.
23271    shift
23272    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23273  fi
23274fi
23275fi
23276fi
23277MT=$ac_cv_prog_MT
23278if test -n "$MT"; then
23279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23280$as_echo "$MT" >&6; }
23281else
23282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23283$as_echo "no" >&6; }
23284fi
23285
23286
23287
23288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289
23290  # First separate the path from the arguments. This will split at the first
23291  # space.
23292  complete="$MT"
23293  path="${complete%% *}"
23294  tmp="$complete EOL"
23295  arguments="${tmp#* }"
23296
23297  # Input might be given as Windows format, start by converting to
23298  # unix format.
23299  new_path=`$CYGPATH -u "$path"`
23300
23301  # Now try to locate executable using which
23302  new_path=`$WHICH "$new_path" 2> /dev/null`
23303  # bat and cmd files are not always considered executable in cygwin causing which
23304  # to not find them
23305  if test "x$new_path" = x \
23306           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23307           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23308    new_path=`$CYGPATH -u "$path"`
23309  fi
23310  if test "x$new_path" = x; then
23311    # Oops. Which didn't find the executable.
23312    # The splitting of arguments from the executable at a space might have been incorrect,
23313    # since paths with space are more likely in Windows. Give it another try with the whole
23314    # argument.
23315    path="$complete"
23316    arguments="EOL"
23317    new_path=`$CYGPATH -u "$path"`
23318    new_path=`$WHICH "$new_path" 2> /dev/null`
23319    # bat and cmd files are not always considered executable in cygwin causing which
23320    # to not find them
23321    if test "x$new_path" = x \
23322             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23323             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23324      new_path=`$CYGPATH -u "$path"`
23325    fi
23326    if test "x$new_path" = x; then
23327      # It's still not found. Now this is an unrecoverable error.
23328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23329$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23330      has_space=`$ECHO "$complete" | $GREP " "`
23331      if test "x$has_space" != x; then
23332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23334      fi
23335      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23336    fi
23337  fi
23338
23339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23342  # "foo.exe" is OK but "foo" is an error.
23343  #
23344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23345  # It is also a way to make sure we got the proper file name for the real test later on.
23346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23347  if test "x$test_shortpath" = x; then
23348    # Short path failed, file does not exist as specified.
23349    # Try adding .exe or .cmd
23350    if test -f "${new_path}.exe"; then
23351       input_to_shortpath="${new_path}.exe"
23352    elif test -f "${new_path}.cmd"; then
23353       input_to_shortpath="${new_path}.cmd"
23354    else
23355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23356$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23359      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23360    fi
23361  else
23362    input_to_shortpath="$new_path"
23363  fi
23364
23365  # Call helper function which possibly converts this using DOS-style short mode.
23366  # If so, the updated path is stored in $new_path.
23367  new_path="$input_to_shortpath"
23368
23369  input_path="$input_to_shortpath"
23370  # Check if we need to convert this using DOS-style short mode. If the path
23371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23372  # take no chances and rewrite it.
23373  # Note: m4 eats our [], so we need to use [ and ] instead.
23374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23375  if test "x$has_forbidden_chars" != x; then
23376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23380      # Going to short mode and back again did indeed matter. Since short mode is
23381      # case insensitive, let's make it lowercase to improve readability.
23382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23383      # Now convert it back to Unix-stile (cygpath)
23384      input_path=`$CYGPATH -u "$shortmode_path"`
23385      new_path="$input_path"
23386    fi
23387  fi
23388
23389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23390  if test "x$test_cygdrive_prefix" = x; then
23391    # As a simple fix, exclude /usr/bin since it's not a real path.
23392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23394      # a path prefixed by /cygdrive for fixpath to work.
23395      new_path="$CYGWIN_ROOT_PATH$input_path"
23396    fi
23397  fi
23398
23399  # remove trailing .exe if any
23400  new_path="${new_path/%.exe/}"
23401
23402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23403
23404  # First separate the path from the arguments. This will split at the first
23405  # space.
23406  complete="$MT"
23407  path="${complete%% *}"
23408  tmp="$complete EOL"
23409  arguments="${tmp#* }"
23410
23411  # Input might be given as Windows format, start by converting to
23412  # unix format.
23413  new_path="$path"
23414
23415  windows_path="$new_path"
23416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23417    unix_path=`$CYGPATH -u "$windows_path"`
23418    new_path="$unix_path"
23419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23421    new_path="$unix_path"
23422  fi
23423
23424
23425  # Now try to locate executable using which
23426  new_path=`$WHICH "$new_path" 2> /dev/null`
23427
23428  if test "x$new_path" = x; then
23429    # Oops. Which didn't find the executable.
23430    # The splitting of arguments from the executable at a space might have been incorrect,
23431    # since paths with space are more likely in Windows. Give it another try with the whole
23432    # argument.
23433    path="$complete"
23434    arguments="EOL"
23435    new_path="$path"
23436
23437  windows_path="$new_path"
23438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23439    unix_path=`$CYGPATH -u "$windows_path"`
23440    new_path="$unix_path"
23441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23443    new_path="$unix_path"
23444  fi
23445
23446
23447    new_path=`$WHICH "$new_path" 2> /dev/null`
23448
23449    if test "x$new_path" = x; then
23450      # It's still not found. Now this is an unrecoverable error.
23451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23452$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23453      has_space=`$ECHO "$complete" | $GREP " "`
23454      if test "x$has_space" != x; then
23455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23457      fi
23458      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23459    fi
23460  fi
23461
23462  # Now new_path has a complete unix path to the binary
23463  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23464    # Keep paths in /bin as-is, but remove trailing .exe if any
23465    new_path="${new_path/%.exe/}"
23466    # Do not save /bin paths to all_fixpath_prefixes!
23467  else
23468    # Not in mixed or Windows style, start by that.
23469    new_path=`cmd //c echo $new_path`
23470
23471  input_path="$new_path"
23472  # Check if we need to convert this using DOS-style short mode. If the path
23473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23474  # take no chances and rewrite it.
23475  # Note: m4 eats our [], so we need to use [ and ] instead.
23476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23477  if test "x$has_forbidden_chars" != x; then
23478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23480  fi
23481
23482    # Output is in $new_path
23483
23484  windows_path="$new_path"
23485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23486    unix_path=`$CYGPATH -u "$windows_path"`
23487    new_path="$unix_path"
23488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23490    new_path="$unix_path"
23491  fi
23492
23493    # remove trailing .exe if any
23494    new_path="${new_path/%.exe/}"
23495
23496    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23497    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23498  fi
23499
23500  else
23501    # We're on a posix platform. Hooray! :)
23502    # First separate the path from the arguments. This will split at the first
23503    # space.
23504    complete="$MT"
23505    path="${complete%% *}"
23506    tmp="$complete EOL"
23507    arguments="${tmp#* }"
23508
23509    # Cannot rely on the command "which" here since it doesn't always work.
23510    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23511    if test -z "$is_absolute_path"; then
23512      # Path to executable is not absolute. Find it.
23513      IFS_save="$IFS"
23514      IFS=:
23515      for p in $PATH; do
23516        if test -f "$p/$path" && test -x "$p/$path"; then
23517          new_path="$p/$path"
23518          break
23519        fi
23520      done
23521      IFS="$IFS_save"
23522    else
23523      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23524$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23525      new_path="$path"
23526    fi
23527
23528    if test "x$new_path" = x; then
23529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23530$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23531        has_space=`$ECHO "$complete" | $GREP " "`
23532        if test "x$has_space" != x; then
23533          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23535        fi
23536        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23537      fi
23538  fi
23539
23540      # Now join together the path and the arguments once again
23541      if test "x$arguments" != xEOL; then
23542        new_complete="$new_path ${arguments% *}"
23543      else
23544        new_complete="$new_path"
23545      fi
23546
23547  if test "x$complete" != "x$new_complete"; then
23548      MT="$new_complete"
23549      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23550$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23551    fi
23552
23553    # The resource compiler
23554    # Extract the first word of "rc", so it can be a program name with args.
23555set dummy rc; ac_word=$2
23556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23557$as_echo_n "checking for $ac_word... " >&6; }
23558if ${ac_cv_prog_RC+:} false; then :
23559  $as_echo_n "(cached) " >&6
23560else
23561  if test -n "$RC"; then
23562  ac_cv_prog_RC="$RC" # Let the user override the test.
23563else
23564  ac_prog_rejected=no
23565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23566for as_dir in $PATH
23567do
23568  IFS=$as_save_IFS
23569  test -z "$as_dir" && as_dir=.
23570    for ac_exec_ext in '' $ac_executable_extensions; do
23571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23572    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23573       ac_prog_rejected=yes
23574       continue
23575     fi
23576    ac_cv_prog_RC="rc"
23577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23578    break 2
23579  fi
23580done
23581  done
23582IFS=$as_save_IFS
23583
23584if test $ac_prog_rejected = yes; then
23585  # We found a bogon in the path, so make sure we never use it.
23586  set dummy $ac_cv_prog_RC
23587  shift
23588  if test $# != 0; then
23589    # We chose a different compiler from the bogus one.
23590    # However, it has the same basename, so the bogon will be chosen
23591    # first if we set RC to just the basename; use the full file name.
23592    shift
23593    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23594  fi
23595fi
23596fi
23597fi
23598RC=$ac_cv_prog_RC
23599if test -n "$RC"; then
23600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23601$as_echo "$RC" >&6; }
23602else
23603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23604$as_echo "no" >&6; }
23605fi
23606
23607
23608
23609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23610
23611  # First separate the path from the arguments. This will split at the first
23612  # space.
23613  complete="$RC"
23614  path="${complete%% *}"
23615  tmp="$complete EOL"
23616  arguments="${tmp#* }"
23617
23618  # Input might be given as Windows format, start by converting to
23619  # unix format.
23620  new_path=`$CYGPATH -u "$path"`
23621
23622  # Now try to locate executable using which
23623  new_path=`$WHICH "$new_path" 2> /dev/null`
23624  # bat and cmd files are not always considered executable in cygwin causing which
23625  # to not find them
23626  if test "x$new_path" = x \
23627           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23628           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23629    new_path=`$CYGPATH -u "$path"`
23630  fi
23631  if test "x$new_path" = x; then
23632    # Oops. Which didn't find the executable.
23633    # The splitting of arguments from the executable at a space might have been incorrect,
23634    # since paths with space are more likely in Windows. Give it another try with the whole
23635    # argument.
23636    path="$complete"
23637    arguments="EOL"
23638    new_path=`$CYGPATH -u "$path"`
23639    new_path=`$WHICH "$new_path" 2> /dev/null`
23640    # bat and cmd files are not always considered executable in cygwin causing which
23641    # to not find them
23642    if test "x$new_path" = x \
23643             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23644             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23645      new_path=`$CYGPATH -u "$path"`
23646    fi
23647    if test "x$new_path" = x; then
23648      # It's still not found. Now this is an unrecoverable error.
23649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23650$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23651      has_space=`$ECHO "$complete" | $GREP " "`
23652      if test "x$has_space" != x; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23655      fi
23656      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23657    fi
23658  fi
23659
23660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23663  # "foo.exe" is OK but "foo" is an error.
23664  #
23665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23666  # It is also a way to make sure we got the proper file name for the real test later on.
23667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23668  if test "x$test_shortpath" = x; then
23669    # Short path failed, file does not exist as specified.
23670    # Try adding .exe or .cmd
23671    if test -f "${new_path}.exe"; then
23672       input_to_shortpath="${new_path}.exe"
23673    elif test -f "${new_path}.cmd"; then
23674       input_to_shortpath="${new_path}.cmd"
23675    else
23676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23677$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23678      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23679$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23680      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23681    fi
23682  else
23683    input_to_shortpath="$new_path"
23684  fi
23685
23686  # Call helper function which possibly converts this using DOS-style short mode.
23687  # If so, the updated path is stored in $new_path.
23688  new_path="$input_to_shortpath"
23689
23690  input_path="$input_to_shortpath"
23691  # Check if we need to convert this using DOS-style short mode. If the path
23692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23693  # take no chances and rewrite it.
23694  # Note: m4 eats our [], so we need to use [ and ] instead.
23695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23696  if test "x$has_forbidden_chars" != x; then
23697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23701      # Going to short mode and back again did indeed matter. Since short mode is
23702      # case insensitive, let's make it lowercase to improve readability.
23703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23704      # Now convert it back to Unix-stile (cygpath)
23705      input_path=`$CYGPATH -u "$shortmode_path"`
23706      new_path="$input_path"
23707    fi
23708  fi
23709
23710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23711  if test "x$test_cygdrive_prefix" = x; then
23712    # As a simple fix, exclude /usr/bin since it's not a real path.
23713    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23715      # a path prefixed by /cygdrive for fixpath to work.
23716      new_path="$CYGWIN_ROOT_PATH$input_path"
23717    fi
23718  fi
23719
23720  # remove trailing .exe if any
23721  new_path="${new_path/%.exe/}"
23722
23723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23724
23725  # First separate the path from the arguments. This will split at the first
23726  # space.
23727  complete="$RC"
23728  path="${complete%% *}"
23729  tmp="$complete EOL"
23730  arguments="${tmp#* }"
23731
23732  # Input might be given as Windows format, start by converting to
23733  # unix format.
23734  new_path="$path"
23735
23736  windows_path="$new_path"
23737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23738    unix_path=`$CYGPATH -u "$windows_path"`
23739    new_path="$unix_path"
23740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23742    new_path="$unix_path"
23743  fi
23744
23745
23746  # Now try to locate executable using which
23747  new_path=`$WHICH "$new_path" 2> /dev/null`
23748
23749  if test "x$new_path" = x; then
23750    # Oops. Which didn't find the executable.
23751    # The splitting of arguments from the executable at a space might have been incorrect,
23752    # since paths with space are more likely in Windows. Give it another try with the whole
23753    # argument.
23754    path="$complete"
23755    arguments="EOL"
23756    new_path="$path"
23757
23758  windows_path="$new_path"
23759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23760    unix_path=`$CYGPATH -u "$windows_path"`
23761    new_path="$unix_path"
23762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23764    new_path="$unix_path"
23765  fi
23766
23767
23768    new_path=`$WHICH "$new_path" 2> /dev/null`
23769
23770    if test "x$new_path" = x; then
23771      # It's still not found. Now this is an unrecoverable error.
23772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23773$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23774      has_space=`$ECHO "$complete" | $GREP " "`
23775      if test "x$has_space" != x; then
23776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23778      fi
23779      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23780    fi
23781  fi
23782
23783  # Now new_path has a complete unix path to the binary
23784  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23785    # Keep paths in /bin as-is, but remove trailing .exe if any
23786    new_path="${new_path/%.exe/}"
23787    # Do not save /bin paths to all_fixpath_prefixes!
23788  else
23789    # Not in mixed or Windows style, start by that.
23790    new_path=`cmd //c echo $new_path`
23791
23792  input_path="$new_path"
23793  # Check if we need to convert this using DOS-style short mode. If the path
23794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23795  # take no chances and rewrite it.
23796  # Note: m4 eats our [], so we need to use [ and ] instead.
23797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23798  if test "x$has_forbidden_chars" != x; then
23799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23801  fi
23802
23803    # Output is in $new_path
23804
23805  windows_path="$new_path"
23806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23807    unix_path=`$CYGPATH -u "$windows_path"`
23808    new_path="$unix_path"
23809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23811    new_path="$unix_path"
23812  fi
23813
23814    # remove trailing .exe if any
23815    new_path="${new_path/%.exe/}"
23816
23817    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23818    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23819  fi
23820
23821  else
23822    # We're on a posix platform. Hooray! :)
23823    # First separate the path from the arguments. This will split at the first
23824    # space.
23825    complete="$RC"
23826    path="${complete%% *}"
23827    tmp="$complete EOL"
23828    arguments="${tmp#* }"
23829
23830    # Cannot rely on the command "which" here since it doesn't always work.
23831    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23832    if test -z "$is_absolute_path"; then
23833      # Path to executable is not absolute. Find it.
23834      IFS_save="$IFS"
23835      IFS=:
23836      for p in $PATH; do
23837        if test -f "$p/$path" && test -x "$p/$path"; then
23838          new_path="$p/$path"
23839          break
23840        fi
23841      done
23842      IFS="$IFS_save"
23843    else
23844      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23845$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23846      new_path="$path"
23847    fi
23848
23849    if test "x$new_path" = x; then
23850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23851$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23852        has_space=`$ECHO "$complete" | $GREP " "`
23853        if test "x$has_space" != x; then
23854          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23855$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23856        fi
23857        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23858      fi
23859  fi
23860
23861      # Now join together the path and the arguments once again
23862      if test "x$arguments" != xEOL; then
23863        new_complete="$new_path ${arguments% *}"
23864      else
23865        new_complete="$new_path"
23866      fi
23867
23868  if test "x$complete" != "x$new_complete"; then
23869      RC="$new_complete"
23870      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23871$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23872    fi
23873
23874
23875    # For hotspot, we need these in Windows mixed path,
23876    # so rewrite them all. Need added .exe suffix.
23877    HOTSPOT_CXX="$CXX.exe"
23878    HOTSPOT_LD="$LD.exe"
23879    HOTSPOT_MT="$MT.exe"
23880    HOTSPOT_RC="$RC.exe"
23881
23882  unix_path="$HOTSPOT_CXX"
23883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23884    windows_path=`$CYGPATH -m "$unix_path"`
23885    HOTSPOT_CXX="$windows_path"
23886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23887    windows_path=`cmd //c echo $unix_path`
23888    HOTSPOT_CXX="$windows_path"
23889  fi
23890
23891
23892  unix_path="$HOTSPOT_LD"
23893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23894    windows_path=`$CYGPATH -m "$unix_path"`
23895    HOTSPOT_LD="$windows_path"
23896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23897    windows_path=`cmd //c echo $unix_path`
23898    HOTSPOT_LD="$windows_path"
23899  fi
23900
23901
23902  unix_path="$HOTSPOT_MT"
23903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23904    windows_path=`$CYGPATH -m "$unix_path"`
23905    HOTSPOT_MT="$windows_path"
23906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23907    windows_path=`cmd //c echo $unix_path`
23908    HOTSPOT_MT="$windows_path"
23909  fi
23910
23911
23912  unix_path="$HOTSPOT_RC"
23913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23914    windows_path=`$CYGPATH -m "$unix_path"`
23915    HOTSPOT_RC="$windows_path"
23916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23917    windows_path=`cmd //c echo $unix_path`
23918    HOTSPOT_RC="$windows_path"
23919  fi
23920
23921
23922
23923
23924    RC_FLAGS="-nologo -l 0x409 -r"
23925    if test "x$VARIANT" = xOPT; then :
23926
23927        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23928
23929fi
23930
23931    # The version variables used to create RC_FLAGS may be overridden
23932    # in a custom configure script, or possibly the command line.
23933    # Let those variables be expanded at make time in spec.gmk.
23934    # The \$ are escaped to the shell, and the $(...) variables
23935    # are evaluated by make.
23936    RC_FLAGS="$RC_FLAGS \
23937        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23938        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23939        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23940        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23941        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23942        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23943        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23944
23945    # lib.exe is used to create static libraries.
23946    # Extract the first word of "lib", so it can be a program name with args.
23947set dummy lib; ac_word=$2
23948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23949$as_echo_n "checking for $ac_word... " >&6; }
23950if ${ac_cv_prog_WINAR+:} false; then :
23951  $as_echo_n "(cached) " >&6
23952else
23953  if test -n "$WINAR"; then
23954  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23955else
23956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23957for as_dir in $PATH
23958do
23959  IFS=$as_save_IFS
23960  test -z "$as_dir" && as_dir=.
23961    for ac_exec_ext in '' $ac_executable_extensions; do
23962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23963    ac_cv_prog_WINAR="lib"
23964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23965    break 2
23966  fi
23967done
23968  done
23969IFS=$as_save_IFS
23970
23971fi
23972fi
23973WINAR=$ac_cv_prog_WINAR
23974if test -n "$WINAR"; then
23975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23976$as_echo "$WINAR" >&6; }
23977else
23978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23979$as_echo "no" >&6; }
23980fi
23981
23982
23983
23984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23985
23986  # First separate the path from the arguments. This will split at the first
23987  # space.
23988  complete="$WINAR"
23989  path="${complete%% *}"
23990  tmp="$complete EOL"
23991  arguments="${tmp#* }"
23992
23993  # Input might be given as Windows format, start by converting to
23994  # unix format.
23995  new_path=`$CYGPATH -u "$path"`
23996
23997  # Now try to locate executable using which
23998  new_path=`$WHICH "$new_path" 2> /dev/null`
23999  # bat and cmd files are not always considered executable in cygwin causing which
24000  # to not find them
24001  if test "x$new_path" = x \
24002           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24003           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24004    new_path=`$CYGPATH -u "$path"`
24005  fi
24006  if test "x$new_path" = x; then
24007    # Oops. Which didn't find the executable.
24008    # The splitting of arguments from the executable at a space might have been incorrect,
24009    # since paths with space are more likely in Windows. Give it another try with the whole
24010    # argument.
24011    path="$complete"
24012    arguments="EOL"
24013    new_path=`$CYGPATH -u "$path"`
24014    new_path=`$WHICH "$new_path" 2> /dev/null`
24015    # bat and cmd files are not always considered executable in cygwin causing which
24016    # to not find them
24017    if test "x$new_path" = x \
24018             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24019             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24020      new_path=`$CYGPATH -u "$path"`
24021    fi
24022    if test "x$new_path" = x; then
24023      # It's still not found. Now this is an unrecoverable error.
24024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24025$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24026      has_space=`$ECHO "$complete" | $GREP " "`
24027      if test "x$has_space" != x; then
24028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24030      fi
24031      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24032    fi
24033  fi
24034
24035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24038  # "foo.exe" is OK but "foo" is an error.
24039  #
24040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24041  # It is also a way to make sure we got the proper file name for the real test later on.
24042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24043  if test "x$test_shortpath" = x; then
24044    # Short path failed, file does not exist as specified.
24045    # Try adding .exe or .cmd
24046    if test -f "${new_path}.exe"; then
24047       input_to_shortpath="${new_path}.exe"
24048    elif test -f "${new_path}.cmd"; then
24049       input_to_shortpath="${new_path}.cmd"
24050    else
24051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24052$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24053      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24054$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24055      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24056    fi
24057  else
24058    input_to_shortpath="$new_path"
24059  fi
24060
24061  # Call helper function which possibly converts this using DOS-style short mode.
24062  # If so, the updated path is stored in $new_path.
24063  new_path="$input_to_shortpath"
24064
24065  input_path="$input_to_shortpath"
24066  # Check if we need to convert this using DOS-style short mode. If the path
24067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24068  # take no chances and rewrite it.
24069  # Note: m4 eats our [], so we need to use [ and ] instead.
24070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24071  if test "x$has_forbidden_chars" != x; then
24072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24076      # Going to short mode and back again did indeed matter. Since short mode is
24077      # case insensitive, let's make it lowercase to improve readability.
24078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24079      # Now convert it back to Unix-stile (cygpath)
24080      input_path=`$CYGPATH -u "$shortmode_path"`
24081      new_path="$input_path"
24082    fi
24083  fi
24084
24085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24086  if test "x$test_cygdrive_prefix" = x; then
24087    # As a simple fix, exclude /usr/bin since it's not a real path.
24088    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24090      # a path prefixed by /cygdrive for fixpath to work.
24091      new_path="$CYGWIN_ROOT_PATH$input_path"
24092    fi
24093  fi
24094
24095  # remove trailing .exe if any
24096  new_path="${new_path/%.exe/}"
24097
24098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24099
24100  # First separate the path from the arguments. This will split at the first
24101  # space.
24102  complete="$WINAR"
24103  path="${complete%% *}"
24104  tmp="$complete EOL"
24105  arguments="${tmp#* }"
24106
24107  # Input might be given as Windows format, start by converting to
24108  # unix format.
24109  new_path="$path"
24110
24111  windows_path="$new_path"
24112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24113    unix_path=`$CYGPATH -u "$windows_path"`
24114    new_path="$unix_path"
24115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24117    new_path="$unix_path"
24118  fi
24119
24120
24121  # Now try to locate executable using which
24122  new_path=`$WHICH "$new_path" 2> /dev/null`
24123
24124  if test "x$new_path" = x; then
24125    # Oops. Which didn't find the executable.
24126    # The splitting of arguments from the executable at a space might have been incorrect,
24127    # since paths with space are more likely in Windows. Give it another try with the whole
24128    # argument.
24129    path="$complete"
24130    arguments="EOL"
24131    new_path="$path"
24132
24133  windows_path="$new_path"
24134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24135    unix_path=`$CYGPATH -u "$windows_path"`
24136    new_path="$unix_path"
24137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24139    new_path="$unix_path"
24140  fi
24141
24142
24143    new_path=`$WHICH "$new_path" 2> /dev/null`
24144
24145    if test "x$new_path" = x; then
24146      # It's still not found. Now this is an unrecoverable error.
24147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24148$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24149      has_space=`$ECHO "$complete" | $GREP " "`
24150      if test "x$has_space" != x; then
24151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24153      fi
24154      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24155    fi
24156  fi
24157
24158  # Now new_path has a complete unix path to the binary
24159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24160    # Keep paths in /bin as-is, but remove trailing .exe if any
24161    new_path="${new_path/%.exe/}"
24162    # Do not save /bin paths to all_fixpath_prefixes!
24163  else
24164    # Not in mixed or Windows style, start by that.
24165    new_path=`cmd //c echo $new_path`
24166
24167  input_path="$new_path"
24168  # Check if we need to convert this using DOS-style short mode. If the path
24169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24170  # take no chances and rewrite it.
24171  # Note: m4 eats our [], so we need to use [ and ] instead.
24172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24173  if test "x$has_forbidden_chars" != x; then
24174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24176  fi
24177
24178    # Output is in $new_path
24179
24180  windows_path="$new_path"
24181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182    unix_path=`$CYGPATH -u "$windows_path"`
24183    new_path="$unix_path"
24184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24186    new_path="$unix_path"
24187  fi
24188
24189    # remove trailing .exe if any
24190    new_path="${new_path/%.exe/}"
24191
24192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24194  fi
24195
24196  else
24197    # We're on a posix platform. Hooray! :)
24198    # First separate the path from the arguments. This will split at the first
24199    # space.
24200    complete="$WINAR"
24201    path="${complete%% *}"
24202    tmp="$complete EOL"
24203    arguments="${tmp#* }"
24204
24205    # Cannot rely on the command "which" here since it doesn't always work.
24206    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24207    if test -z "$is_absolute_path"; then
24208      # Path to executable is not absolute. Find it.
24209      IFS_save="$IFS"
24210      IFS=:
24211      for p in $PATH; do
24212        if test -f "$p/$path" && test -x "$p/$path"; then
24213          new_path="$p/$path"
24214          break
24215        fi
24216      done
24217      IFS="$IFS_save"
24218    else
24219      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24220$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24221      new_path="$path"
24222    fi
24223
24224    if test "x$new_path" = x; then
24225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24226$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24227        has_space=`$ECHO "$complete" | $GREP " "`
24228        if test "x$has_space" != x; then
24229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24231        fi
24232        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24233      fi
24234  fi
24235
24236      # Now join together the path and the arguments once again
24237      if test "x$arguments" != xEOL; then
24238        new_complete="$new_path ${arguments% *}"
24239      else
24240        new_complete="$new_path"
24241      fi
24242
24243  if test "x$complete" != "x$new_complete"; then
24244      WINAR="$new_complete"
24245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24246$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24247    fi
24248
24249    AR="$WINAR"
24250    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24251
24252    # Extract the first word of "dumpbin", so it can be a program name with args.
24253set dummy dumpbin; ac_word=$2
24254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24255$as_echo_n "checking for $ac_word... " >&6; }
24256if ${ac_cv_prog_DUMPBIN+:} false; then :
24257  $as_echo_n "(cached) " >&6
24258else
24259  if test -n "$DUMPBIN"; then
24260  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24261else
24262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24263for as_dir in $PATH
24264do
24265  IFS=$as_save_IFS
24266  test -z "$as_dir" && as_dir=.
24267    for ac_exec_ext in '' $ac_executable_extensions; do
24268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24269    ac_cv_prog_DUMPBIN="dumpbin"
24270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24271    break 2
24272  fi
24273done
24274  done
24275IFS=$as_save_IFS
24276
24277fi
24278fi
24279DUMPBIN=$ac_cv_prog_DUMPBIN
24280if test -n "$DUMPBIN"; then
24281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24282$as_echo "$DUMPBIN" >&6; }
24283else
24284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24285$as_echo "no" >&6; }
24286fi
24287
24288
24289
24290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24291
24292  # First separate the path from the arguments. This will split at the first
24293  # space.
24294  complete="$DUMPBIN"
24295  path="${complete%% *}"
24296  tmp="$complete EOL"
24297  arguments="${tmp#* }"
24298
24299  # Input might be given as Windows format, start by converting to
24300  # unix format.
24301  new_path=`$CYGPATH -u "$path"`
24302
24303  # Now try to locate executable using which
24304  new_path=`$WHICH "$new_path" 2> /dev/null`
24305  # bat and cmd files are not always considered executable in cygwin causing which
24306  # to not find them
24307  if test "x$new_path" = x \
24308           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24309           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24310    new_path=`$CYGPATH -u "$path"`
24311  fi
24312  if test "x$new_path" = x; then
24313    # Oops. Which didn't find the executable.
24314    # The splitting of arguments from the executable at a space might have been incorrect,
24315    # since paths with space are more likely in Windows. Give it another try with the whole
24316    # argument.
24317    path="$complete"
24318    arguments="EOL"
24319    new_path=`$CYGPATH -u "$path"`
24320    new_path=`$WHICH "$new_path" 2> /dev/null`
24321    # bat and cmd files are not always considered executable in cygwin causing which
24322    # to not find them
24323    if test "x$new_path" = x \
24324             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24325             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24326      new_path=`$CYGPATH -u "$path"`
24327    fi
24328    if test "x$new_path" = x; then
24329      # It's still not found. Now this is an unrecoverable error.
24330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24331$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24332      has_space=`$ECHO "$complete" | $GREP " "`
24333      if test "x$has_space" != x; then
24334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24336      fi
24337      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24338    fi
24339  fi
24340
24341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24344  # "foo.exe" is OK but "foo" is an error.
24345  #
24346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24347  # It is also a way to make sure we got the proper file name for the real test later on.
24348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24349  if test "x$test_shortpath" = x; then
24350    # Short path failed, file does not exist as specified.
24351    # Try adding .exe or .cmd
24352    if test -f "${new_path}.exe"; then
24353       input_to_shortpath="${new_path}.exe"
24354    elif test -f "${new_path}.cmd"; then
24355       input_to_shortpath="${new_path}.cmd"
24356    else
24357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24358$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24361      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24362    fi
24363  else
24364    input_to_shortpath="$new_path"
24365  fi
24366
24367  # Call helper function which possibly converts this using DOS-style short mode.
24368  # If so, the updated path is stored in $new_path.
24369  new_path="$input_to_shortpath"
24370
24371  input_path="$input_to_shortpath"
24372  # Check if we need to convert this using DOS-style short mode. If the path
24373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24374  # take no chances and rewrite it.
24375  # Note: m4 eats our [], so we need to use [ and ] instead.
24376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24377  if test "x$has_forbidden_chars" != x; then
24378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24382      # Going to short mode and back again did indeed matter. Since short mode is
24383      # case insensitive, let's make it lowercase to improve readability.
24384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24385      # Now convert it back to Unix-stile (cygpath)
24386      input_path=`$CYGPATH -u "$shortmode_path"`
24387      new_path="$input_path"
24388    fi
24389  fi
24390
24391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24392  if test "x$test_cygdrive_prefix" = x; then
24393    # As a simple fix, exclude /usr/bin since it's not a real path.
24394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24396      # a path prefixed by /cygdrive for fixpath to work.
24397      new_path="$CYGWIN_ROOT_PATH$input_path"
24398    fi
24399  fi
24400
24401  # remove trailing .exe if any
24402  new_path="${new_path/%.exe/}"
24403
24404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24405
24406  # First separate the path from the arguments. This will split at the first
24407  # space.
24408  complete="$DUMPBIN"
24409  path="${complete%% *}"
24410  tmp="$complete EOL"
24411  arguments="${tmp#* }"
24412
24413  # Input might be given as Windows format, start by converting to
24414  # unix format.
24415  new_path="$path"
24416
24417  windows_path="$new_path"
24418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24419    unix_path=`$CYGPATH -u "$windows_path"`
24420    new_path="$unix_path"
24421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24423    new_path="$unix_path"
24424  fi
24425
24426
24427  # Now try to locate executable using which
24428  new_path=`$WHICH "$new_path" 2> /dev/null`
24429
24430  if test "x$new_path" = x; then
24431    # Oops. Which didn't find the executable.
24432    # The splitting of arguments from the executable at a space might have been incorrect,
24433    # since paths with space are more likely in Windows. Give it another try with the whole
24434    # argument.
24435    path="$complete"
24436    arguments="EOL"
24437    new_path="$path"
24438
24439  windows_path="$new_path"
24440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24441    unix_path=`$CYGPATH -u "$windows_path"`
24442    new_path="$unix_path"
24443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24445    new_path="$unix_path"
24446  fi
24447
24448
24449    new_path=`$WHICH "$new_path" 2> /dev/null`
24450
24451    if test "x$new_path" = x; then
24452      # It's still not found. Now this is an unrecoverable error.
24453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24454$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24455      has_space=`$ECHO "$complete" | $GREP " "`
24456      if test "x$has_space" != x; then
24457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24459      fi
24460      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24461    fi
24462  fi
24463
24464  # Now new_path has a complete unix path to the binary
24465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24466    # Keep paths in /bin as-is, but remove trailing .exe if any
24467    new_path="${new_path/%.exe/}"
24468    # Do not save /bin paths to all_fixpath_prefixes!
24469  else
24470    # Not in mixed or Windows style, start by that.
24471    new_path=`cmd //c echo $new_path`
24472
24473  input_path="$new_path"
24474  # Check if we need to convert this using DOS-style short mode. If the path
24475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24476  # take no chances and rewrite it.
24477  # Note: m4 eats our [], so we need to use [ and ] instead.
24478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24479  if test "x$has_forbidden_chars" != x; then
24480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24482  fi
24483
24484    # Output is in $new_path
24485
24486  windows_path="$new_path"
24487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24488    unix_path=`$CYGPATH -u "$windows_path"`
24489    new_path="$unix_path"
24490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24492    new_path="$unix_path"
24493  fi
24494
24495    # remove trailing .exe if any
24496    new_path="${new_path/%.exe/}"
24497
24498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24500  fi
24501
24502  else
24503    # We're on a posix platform. Hooray! :)
24504    # First separate the path from the arguments. This will split at the first
24505    # space.
24506    complete="$DUMPBIN"
24507    path="${complete%% *}"
24508    tmp="$complete EOL"
24509    arguments="${tmp#* }"
24510
24511    # Cannot rely on the command "which" here since it doesn't always work.
24512    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24513    if test -z "$is_absolute_path"; then
24514      # Path to executable is not absolute. Find it.
24515      IFS_save="$IFS"
24516      IFS=:
24517      for p in $PATH; do
24518        if test -f "$p/$path" && test -x "$p/$path"; then
24519          new_path="$p/$path"
24520          break
24521        fi
24522      done
24523      IFS="$IFS_save"
24524    else
24525      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24526$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24527      new_path="$path"
24528    fi
24529
24530    if test "x$new_path" = x; then
24531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24532$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24533        has_space=`$ECHO "$complete" | $GREP " "`
24534        if test "x$has_space" != x; then
24535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24537        fi
24538        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24539      fi
24540  fi
24541
24542      # Now join together the path and the arguments once again
24543      if test "x$arguments" != xEOL; then
24544        new_complete="$new_path ${arguments% *}"
24545      else
24546        new_complete="$new_path"
24547      fi
24548
24549  if test "x$complete" != "x$new_complete"; then
24550      DUMPBIN="$new_complete"
24551      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24552$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24553    fi
24554
24555
24556    COMPILER_TYPE=CL
24557    CCXXFLAGS="$CCXXFLAGS -nologo"
24558
24559fi
24560
24561
24562
24563ac_ext=c
24564ac_cpp='$CPP $CPPFLAGS'
24565ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24566ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24567ac_compiler_gnu=$ac_cv_c_compiler_gnu
24568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24569$as_echo_n "checking how to run the C preprocessor... " >&6; }
24570# On Suns, sometimes $CPP names a directory.
24571if test -n "$CPP" && test -d "$CPP"; then
24572  CPP=
24573fi
24574if test -z "$CPP"; then
24575  if ${ac_cv_prog_CPP+:} false; then :
24576  $as_echo_n "(cached) " >&6
24577else
24578      # Double quotes because CPP needs to be expanded
24579    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24580    do
24581      ac_preproc_ok=false
24582for ac_c_preproc_warn_flag in '' yes
24583do
24584  # Use a header file that comes with gcc, so configuring glibc
24585  # with a fresh cross-compiler works.
24586  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24587  # <limits.h> exists even on freestanding compilers.
24588  # On the NeXT, cc -E runs the code through the compiler's parser,
24589  # not just through cpp. "Syntax error" is here to catch this case.
24590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24591/* end confdefs.h.  */
24592#ifdef __STDC__
24593# include <limits.h>
24594#else
24595# include <assert.h>
24596#endif
24597		     Syntax error
24598_ACEOF
24599if ac_fn_c_try_cpp "$LINENO"; then :
24600
24601else
24602  # Broken: fails on valid input.
24603continue
24604fi
24605rm -f conftest.err conftest.i conftest.$ac_ext
24606
24607  # OK, works on sane cases.  Now check whether nonexistent headers
24608  # can be detected and how.
24609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24610/* end confdefs.h.  */
24611#include <ac_nonexistent.h>
24612_ACEOF
24613if ac_fn_c_try_cpp "$LINENO"; then :
24614  # Broken: success on invalid input.
24615continue
24616else
24617  # Passes both tests.
24618ac_preproc_ok=:
24619break
24620fi
24621rm -f conftest.err conftest.i conftest.$ac_ext
24622
24623done
24624# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24625rm -f conftest.i conftest.err conftest.$ac_ext
24626if $ac_preproc_ok; then :
24627  break
24628fi
24629
24630    done
24631    ac_cv_prog_CPP=$CPP
24632
24633fi
24634  CPP=$ac_cv_prog_CPP
24635else
24636  ac_cv_prog_CPP=$CPP
24637fi
24638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24639$as_echo "$CPP" >&6; }
24640ac_preproc_ok=false
24641for ac_c_preproc_warn_flag in '' yes
24642do
24643  # Use a header file that comes with gcc, so configuring glibc
24644  # with a fresh cross-compiler works.
24645  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24646  # <limits.h> exists even on freestanding compilers.
24647  # On the NeXT, cc -E runs the code through the compiler's parser,
24648  # not just through cpp. "Syntax error" is here to catch this case.
24649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24650/* end confdefs.h.  */
24651#ifdef __STDC__
24652# include <limits.h>
24653#else
24654# include <assert.h>
24655#endif
24656		     Syntax error
24657_ACEOF
24658if ac_fn_c_try_cpp "$LINENO"; then :
24659
24660else
24661  # Broken: fails on valid input.
24662continue
24663fi
24664rm -f conftest.err conftest.i conftest.$ac_ext
24665
24666  # OK, works on sane cases.  Now check whether nonexistent headers
24667  # can be detected and how.
24668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24669/* end confdefs.h.  */
24670#include <ac_nonexistent.h>
24671_ACEOF
24672if ac_fn_c_try_cpp "$LINENO"; then :
24673  # Broken: success on invalid input.
24674continue
24675else
24676  # Passes both tests.
24677ac_preproc_ok=:
24678break
24679fi
24680rm -f conftest.err conftest.i conftest.$ac_ext
24681
24682done
24683# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24684rm -f conftest.i conftest.err conftest.$ac_ext
24685if $ac_preproc_ok; then :
24686
24687else
24688  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24690as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24691See \`config.log' for more details" "$LINENO" 5; }
24692fi
24693
24694ac_ext=cpp
24695ac_cpp='$CXXCPP $CPPFLAGS'
24696ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24697ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24698ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24699
24700
24701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24702
24703  # First separate the path from the arguments. This will split at the first
24704  # space.
24705  complete="$CPP"
24706  path="${complete%% *}"
24707  tmp="$complete EOL"
24708  arguments="${tmp#* }"
24709
24710  # Input might be given as Windows format, start by converting to
24711  # unix format.
24712  new_path=`$CYGPATH -u "$path"`
24713
24714  # Now try to locate executable using which
24715  new_path=`$WHICH "$new_path" 2> /dev/null`
24716  # bat and cmd files are not always considered executable in cygwin causing which
24717  # to not find them
24718  if test "x$new_path" = x \
24719           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24720           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24721    new_path=`$CYGPATH -u "$path"`
24722  fi
24723  if test "x$new_path" = x; then
24724    # Oops. Which didn't find the executable.
24725    # The splitting of arguments from the executable at a space might have been incorrect,
24726    # since paths with space are more likely in Windows. Give it another try with the whole
24727    # argument.
24728    path="$complete"
24729    arguments="EOL"
24730    new_path=`$CYGPATH -u "$path"`
24731    new_path=`$WHICH "$new_path" 2> /dev/null`
24732    # bat and cmd files are not always considered executable in cygwin causing which
24733    # to not find them
24734    if test "x$new_path" = x \
24735             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24736             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24737      new_path=`$CYGPATH -u "$path"`
24738    fi
24739    if test "x$new_path" = x; then
24740      # It's still not found. Now this is an unrecoverable error.
24741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24742$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24743      has_space=`$ECHO "$complete" | $GREP " "`
24744      if test "x$has_space" != x; then
24745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24747      fi
24748      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24749    fi
24750  fi
24751
24752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24755  # "foo.exe" is OK but "foo" is an error.
24756  #
24757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24758  # It is also a way to make sure we got the proper file name for the real test later on.
24759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24760  if test "x$test_shortpath" = x; then
24761    # Short path failed, file does not exist as specified.
24762    # Try adding .exe or .cmd
24763    if test -f "${new_path}.exe"; then
24764       input_to_shortpath="${new_path}.exe"
24765    elif test -f "${new_path}.cmd"; then
24766       input_to_shortpath="${new_path}.cmd"
24767    else
24768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24769$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24770      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24771$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24772      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24773    fi
24774  else
24775    input_to_shortpath="$new_path"
24776  fi
24777
24778  # Call helper function which possibly converts this using DOS-style short mode.
24779  # If so, the updated path is stored in $new_path.
24780  new_path="$input_to_shortpath"
24781
24782  input_path="$input_to_shortpath"
24783  # Check if we need to convert this using DOS-style short mode. If the path
24784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24785  # take no chances and rewrite it.
24786  # Note: m4 eats our [], so we need to use [ and ] instead.
24787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24788  if test "x$has_forbidden_chars" != x; then
24789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24793      # Going to short mode and back again did indeed matter. Since short mode is
24794      # case insensitive, let's make it lowercase to improve readability.
24795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24796      # Now convert it back to Unix-stile (cygpath)
24797      input_path=`$CYGPATH -u "$shortmode_path"`
24798      new_path="$input_path"
24799    fi
24800  fi
24801
24802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24803  if test "x$test_cygdrive_prefix" = x; then
24804    # As a simple fix, exclude /usr/bin since it's not a real path.
24805    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24807      # a path prefixed by /cygdrive for fixpath to work.
24808      new_path="$CYGWIN_ROOT_PATH$input_path"
24809    fi
24810  fi
24811
24812  # remove trailing .exe if any
24813  new_path="${new_path/%.exe/}"
24814
24815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24816
24817  # First separate the path from the arguments. This will split at the first
24818  # space.
24819  complete="$CPP"
24820  path="${complete%% *}"
24821  tmp="$complete EOL"
24822  arguments="${tmp#* }"
24823
24824  # Input might be given as Windows format, start by converting to
24825  # unix format.
24826  new_path="$path"
24827
24828  windows_path="$new_path"
24829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24830    unix_path=`$CYGPATH -u "$windows_path"`
24831    new_path="$unix_path"
24832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24834    new_path="$unix_path"
24835  fi
24836
24837
24838  # Now try to locate executable using which
24839  new_path=`$WHICH "$new_path" 2> /dev/null`
24840
24841  if test "x$new_path" = x; then
24842    # Oops. Which didn't find the executable.
24843    # The splitting of arguments from the executable at a space might have been incorrect,
24844    # since paths with space are more likely in Windows. Give it another try with the whole
24845    # argument.
24846    path="$complete"
24847    arguments="EOL"
24848    new_path="$path"
24849
24850  windows_path="$new_path"
24851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24852    unix_path=`$CYGPATH -u "$windows_path"`
24853    new_path="$unix_path"
24854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24856    new_path="$unix_path"
24857  fi
24858
24859
24860    new_path=`$WHICH "$new_path" 2> /dev/null`
24861
24862    if test "x$new_path" = x; then
24863      # It's still not found. Now this is an unrecoverable error.
24864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24865$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24866      has_space=`$ECHO "$complete" | $GREP " "`
24867      if test "x$has_space" != x; then
24868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24870      fi
24871      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24872    fi
24873  fi
24874
24875  # Now new_path has a complete unix path to the binary
24876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24877    # Keep paths in /bin as-is, but remove trailing .exe if any
24878    new_path="${new_path/%.exe/}"
24879    # Do not save /bin paths to all_fixpath_prefixes!
24880  else
24881    # Not in mixed or Windows style, start by that.
24882    new_path=`cmd //c echo $new_path`
24883
24884  input_path="$new_path"
24885  # Check if we need to convert this using DOS-style short mode. If the path
24886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24887  # take no chances and rewrite it.
24888  # Note: m4 eats our [], so we need to use [ and ] instead.
24889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24890  if test "x$has_forbidden_chars" != x; then
24891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24893  fi
24894
24895    # Output is in $new_path
24896
24897  windows_path="$new_path"
24898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24899    unix_path=`$CYGPATH -u "$windows_path"`
24900    new_path="$unix_path"
24901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24903    new_path="$unix_path"
24904  fi
24905
24906    # remove trailing .exe if any
24907    new_path="${new_path/%.exe/}"
24908
24909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24911  fi
24912
24913  else
24914    # We're on a posix platform. Hooray! :)
24915    # First separate the path from the arguments. This will split at the first
24916    # space.
24917    complete="$CPP"
24918    path="${complete%% *}"
24919    tmp="$complete EOL"
24920    arguments="${tmp#* }"
24921
24922    # Cannot rely on the command "which" here since it doesn't always work.
24923    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24924    if test -z "$is_absolute_path"; then
24925      # Path to executable is not absolute. Find it.
24926      IFS_save="$IFS"
24927      IFS=:
24928      for p in $PATH; do
24929        if test -f "$p/$path" && test -x "$p/$path"; then
24930          new_path="$p/$path"
24931          break
24932        fi
24933      done
24934      IFS="$IFS_save"
24935    else
24936      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24937$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24938      new_path="$path"
24939    fi
24940
24941    if test "x$new_path" = x; then
24942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24943$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24944        has_space=`$ECHO "$complete" | $GREP " "`
24945        if test "x$has_space" != x; then
24946          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24947$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24948        fi
24949        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24950      fi
24951  fi
24952
24953      # Now join together the path and the arguments once again
24954      if test "x$arguments" != xEOL; then
24955        new_complete="$new_path ${arguments% *}"
24956      else
24957        new_complete="$new_path"
24958      fi
24959
24960  if test "x$complete" != "x$new_complete"; then
24961      CPP="$new_complete"
24962      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24963$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24964    fi
24965
24966
24967ac_ext=cpp
24968ac_cpp='$CXXCPP $CPPFLAGS'
24969ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24970ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24971ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24973$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24974if test -z "$CXXCPP"; then
24975  if ${ac_cv_prog_CXXCPP+:} false; then :
24976  $as_echo_n "(cached) " >&6
24977else
24978      # Double quotes because CXXCPP needs to be expanded
24979    for CXXCPP in "$CXX -E" "/lib/cpp"
24980    do
24981      ac_preproc_ok=false
24982for ac_cxx_preproc_warn_flag in '' yes
24983do
24984  # Use a header file that comes with gcc, so configuring glibc
24985  # with a fresh cross-compiler works.
24986  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24987  # <limits.h> exists even on freestanding compilers.
24988  # On the NeXT, cc -E runs the code through the compiler's parser,
24989  # not just through cpp. "Syntax error" is here to catch this case.
24990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24991/* end confdefs.h.  */
24992#ifdef __STDC__
24993# include <limits.h>
24994#else
24995# include <assert.h>
24996#endif
24997		     Syntax error
24998_ACEOF
24999if ac_fn_cxx_try_cpp "$LINENO"; then :
25000
25001else
25002  # Broken: fails on valid input.
25003continue
25004fi
25005rm -f conftest.err conftest.i conftest.$ac_ext
25006
25007  # OK, works on sane cases.  Now check whether nonexistent headers
25008  # can be detected and how.
25009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25010/* end confdefs.h.  */
25011#include <ac_nonexistent.h>
25012_ACEOF
25013if ac_fn_cxx_try_cpp "$LINENO"; then :
25014  # Broken: success on invalid input.
25015continue
25016else
25017  # Passes both tests.
25018ac_preproc_ok=:
25019break
25020fi
25021rm -f conftest.err conftest.i conftest.$ac_ext
25022
25023done
25024# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25025rm -f conftest.i conftest.err conftest.$ac_ext
25026if $ac_preproc_ok; then :
25027  break
25028fi
25029
25030    done
25031    ac_cv_prog_CXXCPP=$CXXCPP
25032
25033fi
25034  CXXCPP=$ac_cv_prog_CXXCPP
25035else
25036  ac_cv_prog_CXXCPP=$CXXCPP
25037fi
25038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25039$as_echo "$CXXCPP" >&6; }
25040ac_preproc_ok=false
25041for ac_cxx_preproc_warn_flag in '' yes
25042do
25043  # Use a header file that comes with gcc, so configuring glibc
25044  # with a fresh cross-compiler works.
25045  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25046  # <limits.h> exists even on freestanding compilers.
25047  # On the NeXT, cc -E runs the code through the compiler's parser,
25048  # not just through cpp. "Syntax error" is here to catch this case.
25049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25050/* end confdefs.h.  */
25051#ifdef __STDC__
25052# include <limits.h>
25053#else
25054# include <assert.h>
25055#endif
25056		     Syntax error
25057_ACEOF
25058if ac_fn_cxx_try_cpp "$LINENO"; then :
25059
25060else
25061  # Broken: fails on valid input.
25062continue
25063fi
25064rm -f conftest.err conftest.i conftest.$ac_ext
25065
25066  # OK, works on sane cases.  Now check whether nonexistent headers
25067  # can be detected and how.
25068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25069/* end confdefs.h.  */
25070#include <ac_nonexistent.h>
25071_ACEOF
25072if ac_fn_cxx_try_cpp "$LINENO"; then :
25073  # Broken: success on invalid input.
25074continue
25075else
25076  # Passes both tests.
25077ac_preproc_ok=:
25078break
25079fi
25080rm -f conftest.err conftest.i conftest.$ac_ext
25081
25082done
25083# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25084rm -f conftest.i conftest.err conftest.$ac_ext
25085if $ac_preproc_ok; then :
25086
25087else
25088  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25090as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25091See \`config.log' for more details" "$LINENO" 5; }
25092fi
25093
25094ac_ext=cpp
25095ac_cpp='$CXXCPP $CPPFLAGS'
25096ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25097ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25098ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25099
25100
25101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25102
25103  # First separate the path from the arguments. This will split at the first
25104  # space.
25105  complete="$CXXCPP"
25106  path="${complete%% *}"
25107  tmp="$complete EOL"
25108  arguments="${tmp#* }"
25109
25110  # Input might be given as Windows format, start by converting to
25111  # unix format.
25112  new_path=`$CYGPATH -u "$path"`
25113
25114  # Now try to locate executable using which
25115  new_path=`$WHICH "$new_path" 2> /dev/null`
25116  # bat and cmd files are not always considered executable in cygwin causing which
25117  # to not find them
25118  if test "x$new_path" = x \
25119           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25120           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25121    new_path=`$CYGPATH -u "$path"`
25122  fi
25123  if test "x$new_path" = x; then
25124    # Oops. Which didn't find the executable.
25125    # The splitting of arguments from the executable at a space might have been incorrect,
25126    # since paths with space are more likely in Windows. Give it another try with the whole
25127    # argument.
25128    path="$complete"
25129    arguments="EOL"
25130    new_path=`$CYGPATH -u "$path"`
25131    new_path=`$WHICH "$new_path" 2> /dev/null`
25132    # bat and cmd files are not always considered executable in cygwin causing which
25133    # to not find them
25134    if test "x$new_path" = x \
25135             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25136             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25137      new_path=`$CYGPATH -u "$path"`
25138    fi
25139    if test "x$new_path" = x; then
25140      # It's still not found. Now this is an unrecoverable error.
25141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25142$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25143      has_space=`$ECHO "$complete" | $GREP " "`
25144      if test "x$has_space" != x; then
25145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25147      fi
25148      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25149    fi
25150  fi
25151
25152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25155  # "foo.exe" is OK but "foo" is an error.
25156  #
25157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25158  # It is also a way to make sure we got the proper file name for the real test later on.
25159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25160  if test "x$test_shortpath" = x; then
25161    # Short path failed, file does not exist as specified.
25162    # Try adding .exe or .cmd
25163    if test -f "${new_path}.exe"; then
25164       input_to_shortpath="${new_path}.exe"
25165    elif test -f "${new_path}.cmd"; then
25166       input_to_shortpath="${new_path}.cmd"
25167    else
25168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25169$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25170      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25171$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25172      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25173    fi
25174  else
25175    input_to_shortpath="$new_path"
25176  fi
25177
25178  # Call helper function which possibly converts this using DOS-style short mode.
25179  # If so, the updated path is stored in $new_path.
25180  new_path="$input_to_shortpath"
25181
25182  input_path="$input_to_shortpath"
25183  # Check if we need to convert this using DOS-style short mode. If the path
25184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25185  # take no chances and rewrite it.
25186  # Note: m4 eats our [], so we need to use [ and ] instead.
25187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25188  if test "x$has_forbidden_chars" != x; then
25189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25193      # Going to short mode and back again did indeed matter. Since short mode is
25194      # case insensitive, let's make it lowercase to improve readability.
25195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25196      # Now convert it back to Unix-stile (cygpath)
25197      input_path=`$CYGPATH -u "$shortmode_path"`
25198      new_path="$input_path"
25199    fi
25200  fi
25201
25202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25203  if test "x$test_cygdrive_prefix" = x; then
25204    # As a simple fix, exclude /usr/bin since it's not a real path.
25205    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25207      # a path prefixed by /cygdrive for fixpath to work.
25208      new_path="$CYGWIN_ROOT_PATH$input_path"
25209    fi
25210  fi
25211
25212  # remove trailing .exe if any
25213  new_path="${new_path/%.exe/}"
25214
25215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25216
25217  # First separate the path from the arguments. This will split at the first
25218  # space.
25219  complete="$CXXCPP"
25220  path="${complete%% *}"
25221  tmp="$complete EOL"
25222  arguments="${tmp#* }"
25223
25224  # Input might be given as Windows format, start by converting to
25225  # unix format.
25226  new_path="$path"
25227
25228  windows_path="$new_path"
25229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25230    unix_path=`$CYGPATH -u "$windows_path"`
25231    new_path="$unix_path"
25232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25234    new_path="$unix_path"
25235  fi
25236
25237
25238  # Now try to locate executable using which
25239  new_path=`$WHICH "$new_path" 2> /dev/null`
25240
25241  if test "x$new_path" = x; then
25242    # Oops. Which didn't find the executable.
25243    # The splitting of arguments from the executable at a space might have been incorrect,
25244    # since paths with space are more likely in Windows. Give it another try with the whole
25245    # argument.
25246    path="$complete"
25247    arguments="EOL"
25248    new_path="$path"
25249
25250  windows_path="$new_path"
25251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25252    unix_path=`$CYGPATH -u "$windows_path"`
25253    new_path="$unix_path"
25254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25256    new_path="$unix_path"
25257  fi
25258
25259
25260    new_path=`$WHICH "$new_path" 2> /dev/null`
25261
25262    if test "x$new_path" = x; then
25263      # It's still not found. Now this is an unrecoverable error.
25264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25265$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25266      has_space=`$ECHO "$complete" | $GREP " "`
25267      if test "x$has_space" != x; then
25268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25270      fi
25271      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25272    fi
25273  fi
25274
25275  # Now new_path has a complete unix path to the binary
25276  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25277    # Keep paths in /bin as-is, but remove trailing .exe if any
25278    new_path="${new_path/%.exe/}"
25279    # Do not save /bin paths to all_fixpath_prefixes!
25280  else
25281    # Not in mixed or Windows style, start by that.
25282    new_path=`cmd //c echo $new_path`
25283
25284  input_path="$new_path"
25285  # Check if we need to convert this using DOS-style short mode. If the path
25286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25287  # take no chances and rewrite it.
25288  # Note: m4 eats our [], so we need to use [ and ] instead.
25289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25290  if test "x$has_forbidden_chars" != x; then
25291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25293  fi
25294
25295    # Output is in $new_path
25296
25297  windows_path="$new_path"
25298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25299    unix_path=`$CYGPATH -u "$windows_path"`
25300    new_path="$unix_path"
25301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25303    new_path="$unix_path"
25304  fi
25305
25306    # remove trailing .exe if any
25307    new_path="${new_path/%.exe/}"
25308
25309    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25310    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25311  fi
25312
25313  else
25314    # We're on a posix platform. Hooray! :)
25315    # First separate the path from the arguments. This will split at the first
25316    # space.
25317    complete="$CXXCPP"
25318    path="${complete%% *}"
25319    tmp="$complete EOL"
25320    arguments="${tmp#* }"
25321
25322    # Cannot rely on the command "which" here since it doesn't always work.
25323    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25324    if test -z "$is_absolute_path"; then
25325      # Path to executable is not absolute. Find it.
25326      IFS_save="$IFS"
25327      IFS=:
25328      for p in $PATH; do
25329        if test -f "$p/$path" && test -x "$p/$path"; then
25330          new_path="$p/$path"
25331          break
25332        fi
25333      done
25334      IFS="$IFS_save"
25335    else
25336      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25337$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25338      new_path="$path"
25339    fi
25340
25341    if test "x$new_path" = x; then
25342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25343$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25344        has_space=`$ECHO "$complete" | $GREP " "`
25345        if test "x$has_space" != x; then
25346          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25347$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25348        fi
25349        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25350      fi
25351  fi
25352
25353      # Now join together the path and the arguments once again
25354      if test "x$arguments" != xEOL; then
25355        new_complete="$new_path ${arguments% *}"
25356      else
25357        new_complete="$new_path"
25358      fi
25359
25360  if test "x$complete" != "x$new_complete"; then
25361      CXXCPP="$new_complete"
25362      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25363$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25364    fi
25365
25366
25367if test "x$COMPILE_TYPE" != "xcross"; then
25368    # If we are not cross compiling, use the same compilers for
25369    # building the build platform executables. The cross-compilation
25370    # case needed to be done earlier, but this can only be done after
25371    # the native tools have been localized.
25372    BUILD_CC="$CC"
25373    BUILD_CXX="$CXX"
25374    BUILD_LD="$LD"
25375fi
25376
25377# for solaris we really need solaris tools, and not gnu equivalent
25378#   these seems to normally reside in /usr/ccs/bin so add that to path before
25379#   starting to probe
25380#
25381#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25382#         so that it can be overriden --with-tools-dir
25383if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25384    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25385fi
25386
25387# Find the right assembler.
25388if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25389    # Extract the first word of "as", so it can be a program name with args.
25390set dummy as; ac_word=$2
25391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25392$as_echo_n "checking for $ac_word... " >&6; }
25393if ${ac_cv_path_AS+:} false; then :
25394  $as_echo_n "(cached) " >&6
25395else
25396  case $AS in
25397  [\\/]* | ?:[\\/]*)
25398  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25399  ;;
25400  *)
25401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25402for as_dir in $PATH
25403do
25404  IFS=$as_save_IFS
25405  test -z "$as_dir" && as_dir=.
25406    for ac_exec_ext in '' $ac_executable_extensions; do
25407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25408    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25410    break 2
25411  fi
25412done
25413  done
25414IFS=$as_save_IFS
25415
25416  ;;
25417esac
25418fi
25419AS=$ac_cv_path_AS
25420if test -n "$AS"; then
25421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25422$as_echo "$AS" >&6; }
25423else
25424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25425$as_echo "no" >&6; }
25426fi
25427
25428
25429
25430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25431
25432  # First separate the path from the arguments. This will split at the first
25433  # space.
25434  complete="$AS"
25435  path="${complete%% *}"
25436  tmp="$complete EOL"
25437  arguments="${tmp#* }"
25438
25439  # Input might be given as Windows format, start by converting to
25440  # unix format.
25441  new_path=`$CYGPATH -u "$path"`
25442
25443  # Now try to locate executable using which
25444  new_path=`$WHICH "$new_path" 2> /dev/null`
25445  # bat and cmd files are not always considered executable in cygwin causing which
25446  # to not find them
25447  if test "x$new_path" = x \
25448           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25449           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25450    new_path=`$CYGPATH -u "$path"`
25451  fi
25452  if test "x$new_path" = x; then
25453    # Oops. Which didn't find the executable.
25454    # The splitting of arguments from the executable at a space might have been incorrect,
25455    # since paths with space are more likely in Windows. Give it another try with the whole
25456    # argument.
25457    path="$complete"
25458    arguments="EOL"
25459    new_path=`$CYGPATH -u "$path"`
25460    new_path=`$WHICH "$new_path" 2> /dev/null`
25461    # bat and cmd files are not always considered executable in cygwin causing which
25462    # to not find them
25463    if test "x$new_path" = x \
25464             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25465             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25466      new_path=`$CYGPATH -u "$path"`
25467    fi
25468    if test "x$new_path" = x; then
25469      # It's still not found. Now this is an unrecoverable error.
25470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25471$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25472      has_space=`$ECHO "$complete" | $GREP " "`
25473      if test "x$has_space" != x; then
25474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25476      fi
25477      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25478    fi
25479  fi
25480
25481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25484  # "foo.exe" is OK but "foo" is an error.
25485  #
25486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25487  # It is also a way to make sure we got the proper file name for the real test later on.
25488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25489  if test "x$test_shortpath" = x; then
25490    # Short path failed, file does not exist as specified.
25491    # Try adding .exe or .cmd
25492    if test -f "${new_path}.exe"; then
25493       input_to_shortpath="${new_path}.exe"
25494    elif test -f "${new_path}.cmd"; then
25495       input_to_shortpath="${new_path}.cmd"
25496    else
25497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25498$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25499      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25500$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25501      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25502    fi
25503  else
25504    input_to_shortpath="$new_path"
25505  fi
25506
25507  # Call helper function which possibly converts this using DOS-style short mode.
25508  # If so, the updated path is stored in $new_path.
25509  new_path="$input_to_shortpath"
25510
25511  input_path="$input_to_shortpath"
25512  # Check if we need to convert this using DOS-style short mode. If the path
25513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25514  # take no chances and rewrite it.
25515  # Note: m4 eats our [], so we need to use [ and ] instead.
25516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25517  if test "x$has_forbidden_chars" != x; then
25518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25522      # Going to short mode and back again did indeed matter. Since short mode is
25523      # case insensitive, let's make it lowercase to improve readability.
25524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25525      # Now convert it back to Unix-stile (cygpath)
25526      input_path=`$CYGPATH -u "$shortmode_path"`
25527      new_path="$input_path"
25528    fi
25529  fi
25530
25531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25532  if test "x$test_cygdrive_prefix" = x; then
25533    # As a simple fix, exclude /usr/bin since it's not a real path.
25534    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25536      # a path prefixed by /cygdrive for fixpath to work.
25537      new_path="$CYGWIN_ROOT_PATH$input_path"
25538    fi
25539  fi
25540
25541  # remove trailing .exe if any
25542  new_path="${new_path/%.exe/}"
25543
25544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25545
25546  # First separate the path from the arguments. This will split at the first
25547  # space.
25548  complete="$AS"
25549  path="${complete%% *}"
25550  tmp="$complete EOL"
25551  arguments="${tmp#* }"
25552
25553  # Input might be given as Windows format, start by converting to
25554  # unix format.
25555  new_path="$path"
25556
25557  windows_path="$new_path"
25558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25559    unix_path=`$CYGPATH -u "$windows_path"`
25560    new_path="$unix_path"
25561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25563    new_path="$unix_path"
25564  fi
25565
25566
25567  # Now try to locate executable using which
25568  new_path=`$WHICH "$new_path" 2> /dev/null`
25569
25570  if test "x$new_path" = x; then
25571    # Oops. Which didn't find the executable.
25572    # The splitting of arguments from the executable at a space might have been incorrect,
25573    # since paths with space are more likely in Windows. Give it another try with the whole
25574    # argument.
25575    path="$complete"
25576    arguments="EOL"
25577    new_path="$path"
25578
25579  windows_path="$new_path"
25580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25581    unix_path=`$CYGPATH -u "$windows_path"`
25582    new_path="$unix_path"
25583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25585    new_path="$unix_path"
25586  fi
25587
25588
25589    new_path=`$WHICH "$new_path" 2> /dev/null`
25590
25591    if test "x$new_path" = x; then
25592      # It's still not found. Now this is an unrecoverable error.
25593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25594$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25595      has_space=`$ECHO "$complete" | $GREP " "`
25596      if test "x$has_space" != x; then
25597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25599      fi
25600      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25601    fi
25602  fi
25603
25604  # Now new_path has a complete unix path to the binary
25605  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25606    # Keep paths in /bin as-is, but remove trailing .exe if any
25607    new_path="${new_path/%.exe/}"
25608    # Do not save /bin paths to all_fixpath_prefixes!
25609  else
25610    # Not in mixed or Windows style, start by that.
25611    new_path=`cmd //c echo $new_path`
25612
25613  input_path="$new_path"
25614  # Check if we need to convert this using DOS-style short mode. If the path
25615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25616  # take no chances and rewrite it.
25617  # Note: m4 eats our [], so we need to use [ and ] instead.
25618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25619  if test "x$has_forbidden_chars" != x; then
25620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25622  fi
25623
25624    # Output is in $new_path
25625
25626  windows_path="$new_path"
25627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25628    unix_path=`$CYGPATH -u "$windows_path"`
25629    new_path="$unix_path"
25630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25632    new_path="$unix_path"
25633  fi
25634
25635    # remove trailing .exe if any
25636    new_path="${new_path/%.exe/}"
25637
25638    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25639    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25640  fi
25641
25642  else
25643    # We're on a posix platform. Hooray! :)
25644    # First separate the path from the arguments. This will split at the first
25645    # space.
25646    complete="$AS"
25647    path="${complete%% *}"
25648    tmp="$complete EOL"
25649    arguments="${tmp#* }"
25650
25651    # Cannot rely on the command "which" here since it doesn't always work.
25652    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25653    if test -z "$is_absolute_path"; then
25654      # Path to executable is not absolute. Find it.
25655      IFS_save="$IFS"
25656      IFS=:
25657      for p in $PATH; do
25658        if test -f "$p/$path" && test -x "$p/$path"; then
25659          new_path="$p/$path"
25660          break
25661        fi
25662      done
25663      IFS="$IFS_save"
25664    else
25665      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25666$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25667      new_path="$path"
25668    fi
25669
25670    if test "x$new_path" = x; then
25671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25672$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25673        has_space=`$ECHO "$complete" | $GREP " "`
25674        if test "x$has_space" != x; then
25675          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25676$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25677        fi
25678        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25679      fi
25680  fi
25681
25682      # Now join together the path and the arguments once again
25683      if test "x$arguments" != xEOL; then
25684        new_complete="$new_path ${arguments% *}"
25685      else
25686        new_complete="$new_path"
25687      fi
25688
25689  if test "x$complete" != "x$new_complete"; then
25690      AS="$new_complete"
25691      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25692$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25693    fi
25694
25695else
25696    AS="$CC -c"
25697fi
25698
25699
25700if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25701    # Extract the first word of "nm", so it can be a program name with args.
25702set dummy nm; ac_word=$2
25703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25704$as_echo_n "checking for $ac_word... " >&6; }
25705if ${ac_cv_path_NM+:} false; then :
25706  $as_echo_n "(cached) " >&6
25707else
25708  case $NM in
25709  [\\/]* | ?:[\\/]*)
25710  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25711  ;;
25712  *)
25713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25714for as_dir in $PATH
25715do
25716  IFS=$as_save_IFS
25717  test -z "$as_dir" && as_dir=.
25718    for ac_exec_ext in '' $ac_executable_extensions; do
25719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25720    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25722    break 2
25723  fi
25724done
25725  done
25726IFS=$as_save_IFS
25727
25728  ;;
25729esac
25730fi
25731NM=$ac_cv_path_NM
25732if test -n "$NM"; then
25733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25734$as_echo "$NM" >&6; }
25735else
25736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25737$as_echo "no" >&6; }
25738fi
25739
25740
25741
25742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25743
25744  # First separate the path from the arguments. This will split at the first
25745  # space.
25746  complete="$NM"
25747  path="${complete%% *}"
25748  tmp="$complete EOL"
25749  arguments="${tmp#* }"
25750
25751  # Input might be given as Windows format, start by converting to
25752  # unix format.
25753  new_path=`$CYGPATH -u "$path"`
25754
25755  # Now try to locate executable using which
25756  new_path=`$WHICH "$new_path" 2> /dev/null`
25757  # bat and cmd files are not always considered executable in cygwin causing which
25758  # to not find them
25759  if test "x$new_path" = x \
25760           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25761           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25762    new_path=`$CYGPATH -u "$path"`
25763  fi
25764  if test "x$new_path" = x; then
25765    # Oops. Which didn't find the executable.
25766    # The splitting of arguments from the executable at a space might have been incorrect,
25767    # since paths with space are more likely in Windows. Give it another try with the whole
25768    # argument.
25769    path="$complete"
25770    arguments="EOL"
25771    new_path=`$CYGPATH -u "$path"`
25772    new_path=`$WHICH "$new_path" 2> /dev/null`
25773    # bat and cmd files are not always considered executable in cygwin causing which
25774    # to not find them
25775    if test "x$new_path" = x \
25776             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25777             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25778      new_path=`$CYGPATH -u "$path"`
25779    fi
25780    if test "x$new_path" = x; then
25781      # It's still not found. Now this is an unrecoverable error.
25782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25783$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25784      has_space=`$ECHO "$complete" | $GREP " "`
25785      if test "x$has_space" != x; then
25786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25788      fi
25789      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25790    fi
25791  fi
25792
25793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25796  # "foo.exe" is OK but "foo" is an error.
25797  #
25798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25799  # It is also a way to make sure we got the proper file name for the real test later on.
25800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25801  if test "x$test_shortpath" = x; then
25802    # Short path failed, file does not exist as specified.
25803    # Try adding .exe or .cmd
25804    if test -f "${new_path}.exe"; then
25805       input_to_shortpath="${new_path}.exe"
25806    elif test -f "${new_path}.cmd"; then
25807       input_to_shortpath="${new_path}.cmd"
25808    else
25809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25810$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25813      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25814    fi
25815  else
25816    input_to_shortpath="$new_path"
25817  fi
25818
25819  # Call helper function which possibly converts this using DOS-style short mode.
25820  # If so, the updated path is stored in $new_path.
25821  new_path="$input_to_shortpath"
25822
25823  input_path="$input_to_shortpath"
25824  # Check if we need to convert this using DOS-style short mode. If the path
25825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25826  # take no chances and rewrite it.
25827  # Note: m4 eats our [], so we need to use [ and ] instead.
25828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25829  if test "x$has_forbidden_chars" != x; then
25830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25834      # Going to short mode and back again did indeed matter. Since short mode is
25835      # case insensitive, let's make it lowercase to improve readability.
25836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25837      # Now convert it back to Unix-stile (cygpath)
25838      input_path=`$CYGPATH -u "$shortmode_path"`
25839      new_path="$input_path"
25840    fi
25841  fi
25842
25843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25844  if test "x$test_cygdrive_prefix" = x; then
25845    # As a simple fix, exclude /usr/bin since it's not a real path.
25846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25848      # a path prefixed by /cygdrive for fixpath to work.
25849      new_path="$CYGWIN_ROOT_PATH$input_path"
25850    fi
25851  fi
25852
25853  # remove trailing .exe if any
25854  new_path="${new_path/%.exe/}"
25855
25856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25857
25858  # First separate the path from the arguments. This will split at the first
25859  # space.
25860  complete="$NM"
25861  path="${complete%% *}"
25862  tmp="$complete EOL"
25863  arguments="${tmp#* }"
25864
25865  # Input might be given as Windows format, start by converting to
25866  # unix format.
25867  new_path="$path"
25868
25869  windows_path="$new_path"
25870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25871    unix_path=`$CYGPATH -u "$windows_path"`
25872    new_path="$unix_path"
25873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25875    new_path="$unix_path"
25876  fi
25877
25878
25879  # Now try to locate executable using which
25880  new_path=`$WHICH "$new_path" 2> /dev/null`
25881
25882  if test "x$new_path" = x; then
25883    # Oops. Which didn't find the executable.
25884    # The splitting of arguments from the executable at a space might have been incorrect,
25885    # since paths with space are more likely in Windows. Give it another try with the whole
25886    # argument.
25887    path="$complete"
25888    arguments="EOL"
25889    new_path="$path"
25890
25891  windows_path="$new_path"
25892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25893    unix_path=`$CYGPATH -u "$windows_path"`
25894    new_path="$unix_path"
25895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25897    new_path="$unix_path"
25898  fi
25899
25900
25901    new_path=`$WHICH "$new_path" 2> /dev/null`
25902
25903    if test "x$new_path" = x; then
25904      # It's still not found. Now this is an unrecoverable error.
25905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25906$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25907      has_space=`$ECHO "$complete" | $GREP " "`
25908      if test "x$has_space" != x; then
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25911      fi
25912      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25913    fi
25914  fi
25915
25916  # Now new_path has a complete unix path to the binary
25917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25918    # Keep paths in /bin as-is, but remove trailing .exe if any
25919    new_path="${new_path/%.exe/}"
25920    # Do not save /bin paths to all_fixpath_prefixes!
25921  else
25922    # Not in mixed or Windows style, start by that.
25923    new_path=`cmd //c echo $new_path`
25924
25925  input_path="$new_path"
25926  # Check if we need to convert this using DOS-style short mode. If the path
25927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25928  # take no chances and rewrite it.
25929  # Note: m4 eats our [], so we need to use [ and ] instead.
25930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25931  if test "x$has_forbidden_chars" != x; then
25932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25934  fi
25935
25936    # Output is in $new_path
25937
25938  windows_path="$new_path"
25939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25940    unix_path=`$CYGPATH -u "$windows_path"`
25941    new_path="$unix_path"
25942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25944    new_path="$unix_path"
25945  fi
25946
25947    # remove trailing .exe if any
25948    new_path="${new_path/%.exe/}"
25949
25950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25952  fi
25953
25954  else
25955    # We're on a posix platform. Hooray! :)
25956    # First separate the path from the arguments. This will split at the first
25957    # space.
25958    complete="$NM"
25959    path="${complete%% *}"
25960    tmp="$complete EOL"
25961    arguments="${tmp#* }"
25962
25963    # Cannot rely on the command "which" here since it doesn't always work.
25964    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25965    if test -z "$is_absolute_path"; then
25966      # Path to executable is not absolute. Find it.
25967      IFS_save="$IFS"
25968      IFS=:
25969      for p in $PATH; do
25970        if test -f "$p/$path" && test -x "$p/$path"; then
25971          new_path="$p/$path"
25972          break
25973        fi
25974      done
25975      IFS="$IFS_save"
25976    else
25977      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25978$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25979      new_path="$path"
25980    fi
25981
25982    if test "x$new_path" = x; then
25983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25984$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25985        has_space=`$ECHO "$complete" | $GREP " "`
25986        if test "x$has_space" != x; then
25987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25989        fi
25990        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25991      fi
25992  fi
25993
25994      # Now join together the path and the arguments once again
25995      if test "x$arguments" != xEOL; then
25996        new_complete="$new_path ${arguments% *}"
25997      else
25998        new_complete="$new_path"
25999      fi
26000
26001  if test "x$complete" != "x$new_complete"; then
26002      NM="$new_complete"
26003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26004$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26005    fi
26006
26007    # Extract the first word of "gnm", so it can be a program name with args.
26008set dummy gnm; ac_word=$2
26009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26010$as_echo_n "checking for $ac_word... " >&6; }
26011if ${ac_cv_path_GNM+:} false; then :
26012  $as_echo_n "(cached) " >&6
26013else
26014  case $GNM in
26015  [\\/]* | ?:[\\/]*)
26016  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26017  ;;
26018  *)
26019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26020for as_dir in $PATH
26021do
26022  IFS=$as_save_IFS
26023  test -z "$as_dir" && as_dir=.
26024    for ac_exec_ext in '' $ac_executable_extensions; do
26025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26026    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26028    break 2
26029  fi
26030done
26031  done
26032IFS=$as_save_IFS
26033
26034  ;;
26035esac
26036fi
26037GNM=$ac_cv_path_GNM
26038if test -n "$GNM"; then
26039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26040$as_echo "$GNM" >&6; }
26041else
26042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26043$as_echo "no" >&6; }
26044fi
26045
26046
26047
26048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26049
26050  # First separate the path from the arguments. This will split at the first
26051  # space.
26052  complete="$GNM"
26053  path="${complete%% *}"
26054  tmp="$complete EOL"
26055  arguments="${tmp#* }"
26056
26057  # Input might be given as Windows format, start by converting to
26058  # unix format.
26059  new_path=`$CYGPATH -u "$path"`
26060
26061  # Now try to locate executable using which
26062  new_path=`$WHICH "$new_path" 2> /dev/null`
26063  # bat and cmd files are not always considered executable in cygwin causing which
26064  # to not find them
26065  if test "x$new_path" = x \
26066           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26067           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26068    new_path=`$CYGPATH -u "$path"`
26069  fi
26070  if test "x$new_path" = x; then
26071    # Oops. Which didn't find the executable.
26072    # The splitting of arguments from the executable at a space might have been incorrect,
26073    # since paths with space are more likely in Windows. Give it another try with the whole
26074    # argument.
26075    path="$complete"
26076    arguments="EOL"
26077    new_path=`$CYGPATH -u "$path"`
26078    new_path=`$WHICH "$new_path" 2> /dev/null`
26079    # bat and cmd files are not always considered executable in cygwin causing which
26080    # to not find them
26081    if test "x$new_path" = x \
26082             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26083             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26084      new_path=`$CYGPATH -u "$path"`
26085    fi
26086    if test "x$new_path" = x; then
26087      # It's still not found. Now this is an unrecoverable error.
26088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26089$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26090      has_space=`$ECHO "$complete" | $GREP " "`
26091      if test "x$has_space" != x; then
26092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26094      fi
26095      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26096    fi
26097  fi
26098
26099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26102  # "foo.exe" is OK but "foo" is an error.
26103  #
26104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26105  # It is also a way to make sure we got the proper file name for the real test later on.
26106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26107  if test "x$test_shortpath" = x; then
26108    # Short path failed, file does not exist as specified.
26109    # Try adding .exe or .cmd
26110    if test -f "${new_path}.exe"; then
26111       input_to_shortpath="${new_path}.exe"
26112    elif test -f "${new_path}.cmd"; then
26113       input_to_shortpath="${new_path}.cmd"
26114    else
26115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26116$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26119      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26120    fi
26121  else
26122    input_to_shortpath="$new_path"
26123  fi
26124
26125  # Call helper function which possibly converts this using DOS-style short mode.
26126  # If so, the updated path is stored in $new_path.
26127  new_path="$input_to_shortpath"
26128
26129  input_path="$input_to_shortpath"
26130  # Check if we need to convert this using DOS-style short mode. If the path
26131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26132  # take no chances and rewrite it.
26133  # Note: m4 eats our [], so we need to use [ and ] instead.
26134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26135  if test "x$has_forbidden_chars" != x; then
26136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26140      # Going to short mode and back again did indeed matter. Since short mode is
26141      # case insensitive, let's make it lowercase to improve readability.
26142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26143      # Now convert it back to Unix-stile (cygpath)
26144      input_path=`$CYGPATH -u "$shortmode_path"`
26145      new_path="$input_path"
26146    fi
26147  fi
26148
26149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26150  if test "x$test_cygdrive_prefix" = x; then
26151    # As a simple fix, exclude /usr/bin since it's not a real path.
26152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26154      # a path prefixed by /cygdrive for fixpath to work.
26155      new_path="$CYGWIN_ROOT_PATH$input_path"
26156    fi
26157  fi
26158
26159  # remove trailing .exe if any
26160  new_path="${new_path/%.exe/}"
26161
26162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26163
26164  # First separate the path from the arguments. This will split at the first
26165  # space.
26166  complete="$GNM"
26167  path="${complete%% *}"
26168  tmp="$complete EOL"
26169  arguments="${tmp#* }"
26170
26171  # Input might be given as Windows format, start by converting to
26172  # unix format.
26173  new_path="$path"
26174
26175  windows_path="$new_path"
26176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26177    unix_path=`$CYGPATH -u "$windows_path"`
26178    new_path="$unix_path"
26179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26181    new_path="$unix_path"
26182  fi
26183
26184
26185  # Now try to locate executable using which
26186  new_path=`$WHICH "$new_path" 2> /dev/null`
26187
26188  if test "x$new_path" = x; then
26189    # Oops. Which didn't find the executable.
26190    # The splitting of arguments from the executable at a space might have been incorrect,
26191    # since paths with space are more likely in Windows. Give it another try with the whole
26192    # argument.
26193    path="$complete"
26194    arguments="EOL"
26195    new_path="$path"
26196
26197  windows_path="$new_path"
26198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26199    unix_path=`$CYGPATH -u "$windows_path"`
26200    new_path="$unix_path"
26201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26203    new_path="$unix_path"
26204  fi
26205
26206
26207    new_path=`$WHICH "$new_path" 2> /dev/null`
26208
26209    if test "x$new_path" = x; then
26210      # It's still not found. Now this is an unrecoverable error.
26211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26212$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26213      has_space=`$ECHO "$complete" | $GREP " "`
26214      if test "x$has_space" != x; then
26215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26217      fi
26218      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26219    fi
26220  fi
26221
26222  # Now new_path has a complete unix path to the binary
26223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26224    # Keep paths in /bin as-is, but remove trailing .exe if any
26225    new_path="${new_path/%.exe/}"
26226    # Do not save /bin paths to all_fixpath_prefixes!
26227  else
26228    # Not in mixed or Windows style, start by that.
26229    new_path=`cmd //c echo $new_path`
26230
26231  input_path="$new_path"
26232  # Check if we need to convert this using DOS-style short mode. If the path
26233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26234  # take no chances and rewrite it.
26235  # Note: m4 eats our [], so we need to use [ and ] instead.
26236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26237  if test "x$has_forbidden_chars" != x; then
26238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26240  fi
26241
26242    # Output is in $new_path
26243
26244  windows_path="$new_path"
26245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26246    unix_path=`$CYGPATH -u "$windows_path"`
26247    new_path="$unix_path"
26248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26250    new_path="$unix_path"
26251  fi
26252
26253    # remove trailing .exe if any
26254    new_path="${new_path/%.exe/}"
26255
26256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26258  fi
26259
26260  else
26261    # We're on a posix platform. Hooray! :)
26262    # First separate the path from the arguments. This will split at the first
26263    # space.
26264    complete="$GNM"
26265    path="${complete%% *}"
26266    tmp="$complete EOL"
26267    arguments="${tmp#* }"
26268
26269    # Cannot rely on the command "which" here since it doesn't always work.
26270    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26271    if test -z "$is_absolute_path"; then
26272      # Path to executable is not absolute. Find it.
26273      IFS_save="$IFS"
26274      IFS=:
26275      for p in $PATH; do
26276        if test -f "$p/$path" && test -x "$p/$path"; then
26277          new_path="$p/$path"
26278          break
26279        fi
26280      done
26281      IFS="$IFS_save"
26282    else
26283      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26284$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26285      new_path="$path"
26286    fi
26287
26288    if test "x$new_path" = x; then
26289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26290$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26291        has_space=`$ECHO "$complete" | $GREP " "`
26292        if test "x$has_space" != x; then
26293          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26294$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26295        fi
26296        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26297      fi
26298  fi
26299
26300      # Now join together the path and the arguments once again
26301      if test "x$arguments" != xEOL; then
26302        new_complete="$new_path ${arguments% *}"
26303      else
26304        new_complete="$new_path"
26305      fi
26306
26307  if test "x$complete" != "x$new_complete"; then
26308      GNM="$new_complete"
26309      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26310$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26311    fi
26312
26313    # Extract the first word of "strip", so it can be a program name with args.
26314set dummy strip; ac_word=$2
26315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26316$as_echo_n "checking for $ac_word... " >&6; }
26317if ${ac_cv_path_STRIP+:} false; then :
26318  $as_echo_n "(cached) " >&6
26319else
26320  case $STRIP in
26321  [\\/]* | ?:[\\/]*)
26322  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26323  ;;
26324  *)
26325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26326for as_dir in $PATH
26327do
26328  IFS=$as_save_IFS
26329  test -z "$as_dir" && as_dir=.
26330    for ac_exec_ext in '' $ac_executable_extensions; do
26331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26332    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26334    break 2
26335  fi
26336done
26337  done
26338IFS=$as_save_IFS
26339
26340  ;;
26341esac
26342fi
26343STRIP=$ac_cv_path_STRIP
26344if test -n "$STRIP"; then
26345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26346$as_echo "$STRIP" >&6; }
26347else
26348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26349$as_echo "no" >&6; }
26350fi
26351
26352
26353
26354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26355
26356  # First separate the path from the arguments. This will split at the first
26357  # space.
26358  complete="$STRIP"
26359  path="${complete%% *}"
26360  tmp="$complete EOL"
26361  arguments="${tmp#* }"
26362
26363  # Input might be given as Windows format, start by converting to
26364  # unix format.
26365  new_path=`$CYGPATH -u "$path"`
26366
26367  # Now try to locate executable using which
26368  new_path=`$WHICH "$new_path" 2> /dev/null`
26369  # bat and cmd files are not always considered executable in cygwin causing which
26370  # to not find them
26371  if test "x$new_path" = x \
26372           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26373           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26374    new_path=`$CYGPATH -u "$path"`
26375  fi
26376  if test "x$new_path" = x; then
26377    # Oops. Which didn't find the executable.
26378    # The splitting of arguments from the executable at a space might have been incorrect,
26379    # since paths with space are more likely in Windows. Give it another try with the whole
26380    # argument.
26381    path="$complete"
26382    arguments="EOL"
26383    new_path=`$CYGPATH -u "$path"`
26384    new_path=`$WHICH "$new_path" 2> /dev/null`
26385    # bat and cmd files are not always considered executable in cygwin causing which
26386    # to not find them
26387    if test "x$new_path" = x \
26388             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26389             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26390      new_path=`$CYGPATH -u "$path"`
26391    fi
26392    if test "x$new_path" = x; then
26393      # It's still not found. Now this is an unrecoverable error.
26394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26395$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26396      has_space=`$ECHO "$complete" | $GREP " "`
26397      if test "x$has_space" != x; then
26398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26400      fi
26401      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26402    fi
26403  fi
26404
26405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26408  # "foo.exe" is OK but "foo" is an error.
26409  #
26410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26411  # It is also a way to make sure we got the proper file name for the real test later on.
26412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26413  if test "x$test_shortpath" = x; then
26414    # Short path failed, file does not exist as specified.
26415    # Try adding .exe or .cmd
26416    if test -f "${new_path}.exe"; then
26417       input_to_shortpath="${new_path}.exe"
26418    elif test -f "${new_path}.cmd"; then
26419       input_to_shortpath="${new_path}.cmd"
26420    else
26421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26422$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26425      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26426    fi
26427  else
26428    input_to_shortpath="$new_path"
26429  fi
26430
26431  # Call helper function which possibly converts this using DOS-style short mode.
26432  # If so, the updated path is stored in $new_path.
26433  new_path="$input_to_shortpath"
26434
26435  input_path="$input_to_shortpath"
26436  # Check if we need to convert this using DOS-style short mode. If the path
26437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26438  # take no chances and rewrite it.
26439  # Note: m4 eats our [], so we need to use [ and ] instead.
26440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26441  if test "x$has_forbidden_chars" != x; then
26442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26446      # Going to short mode and back again did indeed matter. Since short mode is
26447      # case insensitive, let's make it lowercase to improve readability.
26448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26449      # Now convert it back to Unix-stile (cygpath)
26450      input_path=`$CYGPATH -u "$shortmode_path"`
26451      new_path="$input_path"
26452    fi
26453  fi
26454
26455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26456  if test "x$test_cygdrive_prefix" = x; then
26457    # As a simple fix, exclude /usr/bin since it's not a real path.
26458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26460      # a path prefixed by /cygdrive for fixpath to work.
26461      new_path="$CYGWIN_ROOT_PATH$input_path"
26462    fi
26463  fi
26464
26465  # remove trailing .exe if any
26466  new_path="${new_path/%.exe/}"
26467
26468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26469
26470  # First separate the path from the arguments. This will split at the first
26471  # space.
26472  complete="$STRIP"
26473  path="${complete%% *}"
26474  tmp="$complete EOL"
26475  arguments="${tmp#* }"
26476
26477  # Input might be given as Windows format, start by converting to
26478  # unix format.
26479  new_path="$path"
26480
26481  windows_path="$new_path"
26482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26483    unix_path=`$CYGPATH -u "$windows_path"`
26484    new_path="$unix_path"
26485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26487    new_path="$unix_path"
26488  fi
26489
26490
26491  # Now try to locate executable using which
26492  new_path=`$WHICH "$new_path" 2> /dev/null`
26493
26494  if test "x$new_path" = x; then
26495    # Oops. Which didn't find the executable.
26496    # The splitting of arguments from the executable at a space might have been incorrect,
26497    # since paths with space are more likely in Windows. Give it another try with the whole
26498    # argument.
26499    path="$complete"
26500    arguments="EOL"
26501    new_path="$path"
26502
26503  windows_path="$new_path"
26504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26505    unix_path=`$CYGPATH -u "$windows_path"`
26506    new_path="$unix_path"
26507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26509    new_path="$unix_path"
26510  fi
26511
26512
26513    new_path=`$WHICH "$new_path" 2> /dev/null`
26514
26515    if test "x$new_path" = x; then
26516      # It's still not found. Now this is an unrecoverable error.
26517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26518$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26519      has_space=`$ECHO "$complete" | $GREP " "`
26520      if test "x$has_space" != x; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26523      fi
26524      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26525    fi
26526  fi
26527
26528  # Now new_path has a complete unix path to the binary
26529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26530    # Keep paths in /bin as-is, but remove trailing .exe if any
26531    new_path="${new_path/%.exe/}"
26532    # Do not save /bin paths to all_fixpath_prefixes!
26533  else
26534    # Not in mixed or Windows style, start by that.
26535    new_path=`cmd //c echo $new_path`
26536
26537  input_path="$new_path"
26538  # Check if we need to convert this using DOS-style short mode. If the path
26539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26540  # take no chances and rewrite it.
26541  # Note: m4 eats our [], so we need to use [ and ] instead.
26542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26543  if test "x$has_forbidden_chars" != x; then
26544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26546  fi
26547
26548    # Output is in $new_path
26549
26550  windows_path="$new_path"
26551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26552    unix_path=`$CYGPATH -u "$windows_path"`
26553    new_path="$unix_path"
26554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26556    new_path="$unix_path"
26557  fi
26558
26559    # remove trailing .exe if any
26560    new_path="${new_path/%.exe/}"
26561
26562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26564  fi
26565
26566  else
26567    # We're on a posix platform. Hooray! :)
26568    # First separate the path from the arguments. This will split at the first
26569    # space.
26570    complete="$STRIP"
26571    path="${complete%% *}"
26572    tmp="$complete EOL"
26573    arguments="${tmp#* }"
26574
26575    # Cannot rely on the command "which" here since it doesn't always work.
26576    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26577    if test -z "$is_absolute_path"; then
26578      # Path to executable is not absolute. Find it.
26579      IFS_save="$IFS"
26580      IFS=:
26581      for p in $PATH; do
26582        if test -f "$p/$path" && test -x "$p/$path"; then
26583          new_path="$p/$path"
26584          break
26585        fi
26586      done
26587      IFS="$IFS_save"
26588    else
26589      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26590$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26591      new_path="$path"
26592    fi
26593
26594    if test "x$new_path" = x; then
26595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26596$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26597        has_space=`$ECHO "$complete" | $GREP " "`
26598        if test "x$has_space" != x; then
26599          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26601        fi
26602        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26603      fi
26604  fi
26605
26606      # Now join together the path and the arguments once again
26607      if test "x$arguments" != xEOL; then
26608        new_complete="$new_path ${arguments% *}"
26609      else
26610        new_complete="$new_path"
26611      fi
26612
26613  if test "x$complete" != "x$new_complete"; then
26614      STRIP="$new_complete"
26615      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26616$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26617    fi
26618
26619    # Extract the first word of "mcs", so it can be a program name with args.
26620set dummy mcs; ac_word=$2
26621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26622$as_echo_n "checking for $ac_word... " >&6; }
26623if ${ac_cv_path_MCS+:} false; then :
26624  $as_echo_n "(cached) " >&6
26625else
26626  case $MCS in
26627  [\\/]* | ?:[\\/]*)
26628  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26629  ;;
26630  *)
26631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26632for as_dir in $PATH
26633do
26634  IFS=$as_save_IFS
26635  test -z "$as_dir" && as_dir=.
26636    for ac_exec_ext in '' $ac_executable_extensions; do
26637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26638    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26640    break 2
26641  fi
26642done
26643  done
26644IFS=$as_save_IFS
26645
26646  ;;
26647esac
26648fi
26649MCS=$ac_cv_path_MCS
26650if test -n "$MCS"; then
26651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26652$as_echo "$MCS" >&6; }
26653else
26654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26655$as_echo "no" >&6; }
26656fi
26657
26658
26659
26660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26661
26662  # First separate the path from the arguments. This will split at the first
26663  # space.
26664  complete="$MCS"
26665  path="${complete%% *}"
26666  tmp="$complete EOL"
26667  arguments="${tmp#* }"
26668
26669  # Input might be given as Windows format, start by converting to
26670  # unix format.
26671  new_path=`$CYGPATH -u "$path"`
26672
26673  # Now try to locate executable using which
26674  new_path=`$WHICH "$new_path" 2> /dev/null`
26675  # bat and cmd files are not always considered executable in cygwin causing which
26676  # to not find them
26677  if test "x$new_path" = x \
26678           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26679           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26680    new_path=`$CYGPATH -u "$path"`
26681  fi
26682  if test "x$new_path" = x; then
26683    # Oops. Which didn't find the executable.
26684    # The splitting of arguments from the executable at a space might have been incorrect,
26685    # since paths with space are more likely in Windows. Give it another try with the whole
26686    # argument.
26687    path="$complete"
26688    arguments="EOL"
26689    new_path=`$CYGPATH -u "$path"`
26690    new_path=`$WHICH "$new_path" 2> /dev/null`
26691    # bat and cmd files are not always considered executable in cygwin causing which
26692    # to not find them
26693    if test "x$new_path" = x \
26694             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26695             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26696      new_path=`$CYGPATH -u "$path"`
26697    fi
26698    if test "x$new_path" = x; then
26699      # It's still not found. Now this is an unrecoverable error.
26700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26701$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26702      has_space=`$ECHO "$complete" | $GREP " "`
26703      if test "x$has_space" != x; then
26704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26706      fi
26707      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26708    fi
26709  fi
26710
26711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26714  # "foo.exe" is OK but "foo" is an error.
26715  #
26716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26717  # It is also a way to make sure we got the proper file name for the real test later on.
26718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26719  if test "x$test_shortpath" = x; then
26720    # Short path failed, file does not exist as specified.
26721    # Try adding .exe or .cmd
26722    if test -f "${new_path}.exe"; then
26723       input_to_shortpath="${new_path}.exe"
26724    elif test -f "${new_path}.cmd"; then
26725       input_to_shortpath="${new_path}.cmd"
26726    else
26727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26728$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26729      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26730$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26731      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26732    fi
26733  else
26734    input_to_shortpath="$new_path"
26735  fi
26736
26737  # Call helper function which possibly converts this using DOS-style short mode.
26738  # If so, the updated path is stored in $new_path.
26739  new_path="$input_to_shortpath"
26740
26741  input_path="$input_to_shortpath"
26742  # Check if we need to convert this using DOS-style short mode. If the path
26743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26744  # take no chances and rewrite it.
26745  # Note: m4 eats our [], so we need to use [ and ] instead.
26746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26747  if test "x$has_forbidden_chars" != x; then
26748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26752      # Going to short mode and back again did indeed matter. Since short mode is
26753      # case insensitive, let's make it lowercase to improve readability.
26754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26755      # Now convert it back to Unix-stile (cygpath)
26756      input_path=`$CYGPATH -u "$shortmode_path"`
26757      new_path="$input_path"
26758    fi
26759  fi
26760
26761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26762  if test "x$test_cygdrive_prefix" = x; then
26763    # As a simple fix, exclude /usr/bin since it's not a real path.
26764    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26766      # a path prefixed by /cygdrive for fixpath to work.
26767      new_path="$CYGWIN_ROOT_PATH$input_path"
26768    fi
26769  fi
26770
26771  # remove trailing .exe if any
26772  new_path="${new_path/%.exe/}"
26773
26774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26775
26776  # First separate the path from the arguments. This will split at the first
26777  # space.
26778  complete="$MCS"
26779  path="${complete%% *}"
26780  tmp="$complete EOL"
26781  arguments="${tmp#* }"
26782
26783  # Input might be given as Windows format, start by converting to
26784  # unix format.
26785  new_path="$path"
26786
26787  windows_path="$new_path"
26788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26789    unix_path=`$CYGPATH -u "$windows_path"`
26790    new_path="$unix_path"
26791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26793    new_path="$unix_path"
26794  fi
26795
26796
26797  # Now try to locate executable using which
26798  new_path=`$WHICH "$new_path" 2> /dev/null`
26799
26800  if test "x$new_path" = x; then
26801    # Oops. Which didn't find the executable.
26802    # The splitting of arguments from the executable at a space might have been incorrect,
26803    # since paths with space are more likely in Windows. Give it another try with the whole
26804    # argument.
26805    path="$complete"
26806    arguments="EOL"
26807    new_path="$path"
26808
26809  windows_path="$new_path"
26810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811    unix_path=`$CYGPATH -u "$windows_path"`
26812    new_path="$unix_path"
26813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26815    new_path="$unix_path"
26816  fi
26817
26818
26819    new_path=`$WHICH "$new_path" 2> /dev/null`
26820
26821    if test "x$new_path" = x; then
26822      # It's still not found. Now this is an unrecoverable error.
26823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26824$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26825      has_space=`$ECHO "$complete" | $GREP " "`
26826      if test "x$has_space" != x; then
26827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26829      fi
26830      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26831    fi
26832  fi
26833
26834  # Now new_path has a complete unix path to the binary
26835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26836    # Keep paths in /bin as-is, but remove trailing .exe if any
26837    new_path="${new_path/%.exe/}"
26838    # Do not save /bin paths to all_fixpath_prefixes!
26839  else
26840    # Not in mixed or Windows style, start by that.
26841    new_path=`cmd //c echo $new_path`
26842
26843  input_path="$new_path"
26844  # Check if we need to convert this using DOS-style short mode. If the path
26845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26846  # take no chances and rewrite it.
26847  # Note: m4 eats our [], so we need to use [ and ] instead.
26848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26849  if test "x$has_forbidden_chars" != x; then
26850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26852  fi
26853
26854    # Output is in $new_path
26855
26856  windows_path="$new_path"
26857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26858    unix_path=`$CYGPATH -u "$windows_path"`
26859    new_path="$unix_path"
26860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26862    new_path="$unix_path"
26863  fi
26864
26865    # remove trailing .exe if any
26866    new_path="${new_path/%.exe/}"
26867
26868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26870  fi
26871
26872  else
26873    # We're on a posix platform. Hooray! :)
26874    # First separate the path from the arguments. This will split at the first
26875    # space.
26876    complete="$MCS"
26877    path="${complete%% *}"
26878    tmp="$complete EOL"
26879    arguments="${tmp#* }"
26880
26881    # Cannot rely on the command "which" here since it doesn't always work.
26882    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26883    if test -z "$is_absolute_path"; then
26884      # Path to executable is not absolute. Find it.
26885      IFS_save="$IFS"
26886      IFS=:
26887      for p in $PATH; do
26888        if test -f "$p/$path" && test -x "$p/$path"; then
26889          new_path="$p/$path"
26890          break
26891        fi
26892      done
26893      IFS="$IFS_save"
26894    else
26895      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26896$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26897      new_path="$path"
26898    fi
26899
26900    if test "x$new_path" = x; then
26901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26902$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26903        has_space=`$ECHO "$complete" | $GREP " "`
26904        if test "x$has_space" != x; then
26905          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26906$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26907        fi
26908        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26909      fi
26910  fi
26911
26912      # Now join together the path and the arguments once again
26913      if test "x$arguments" != xEOL; then
26914        new_complete="$new_path ${arguments% *}"
26915      else
26916        new_complete="$new_path"
26917      fi
26918
26919  if test "x$complete" != "x$new_complete"; then
26920      MCS="$new_complete"
26921      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26922$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26923    fi
26924
26925elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26926    if test -n "$ac_tool_prefix"; then
26927  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26928set dummy ${ac_tool_prefix}nm; ac_word=$2
26929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26930$as_echo_n "checking for $ac_word... " >&6; }
26931if ${ac_cv_prog_NM+:} false; then :
26932  $as_echo_n "(cached) " >&6
26933else
26934  if test -n "$NM"; then
26935  ac_cv_prog_NM="$NM" # Let the user override the test.
26936else
26937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26938for as_dir in $PATH
26939do
26940  IFS=$as_save_IFS
26941  test -z "$as_dir" && as_dir=.
26942    for ac_exec_ext in '' $ac_executable_extensions; do
26943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26944    ac_cv_prog_NM="${ac_tool_prefix}nm"
26945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26946    break 2
26947  fi
26948done
26949  done
26950IFS=$as_save_IFS
26951
26952fi
26953fi
26954NM=$ac_cv_prog_NM
26955if test -n "$NM"; then
26956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26957$as_echo "$NM" >&6; }
26958else
26959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26960$as_echo "no" >&6; }
26961fi
26962
26963
26964fi
26965if test -z "$ac_cv_prog_NM"; then
26966  ac_ct_NM=$NM
26967  # Extract the first word of "nm", so it can be a program name with args.
26968set dummy nm; ac_word=$2
26969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26970$as_echo_n "checking for $ac_word... " >&6; }
26971if ${ac_cv_prog_ac_ct_NM+:} false; then :
26972  $as_echo_n "(cached) " >&6
26973else
26974  if test -n "$ac_ct_NM"; then
26975  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26976else
26977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26978for as_dir in $PATH
26979do
26980  IFS=$as_save_IFS
26981  test -z "$as_dir" && as_dir=.
26982    for ac_exec_ext in '' $ac_executable_extensions; do
26983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26984    ac_cv_prog_ac_ct_NM="nm"
26985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26986    break 2
26987  fi
26988done
26989  done
26990IFS=$as_save_IFS
26991
26992fi
26993fi
26994ac_ct_NM=$ac_cv_prog_ac_ct_NM
26995if test -n "$ac_ct_NM"; then
26996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26997$as_echo "$ac_ct_NM" >&6; }
26998else
26999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27000$as_echo "no" >&6; }
27001fi
27002
27003  if test "x$ac_ct_NM" = x; then
27004    NM=""
27005  else
27006    case $cross_compiling:$ac_tool_warned in
27007yes:)
27008{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27009$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27010ac_tool_warned=yes ;;
27011esac
27012    NM=$ac_ct_NM
27013  fi
27014else
27015  NM="$ac_cv_prog_NM"
27016fi
27017
27018
27019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27020
27021  # First separate the path from the arguments. This will split at the first
27022  # space.
27023  complete="$NM"
27024  path="${complete%% *}"
27025  tmp="$complete EOL"
27026  arguments="${tmp#* }"
27027
27028  # Input might be given as Windows format, start by converting to
27029  # unix format.
27030  new_path=`$CYGPATH -u "$path"`
27031
27032  # Now try to locate executable using which
27033  new_path=`$WHICH "$new_path" 2> /dev/null`
27034  # bat and cmd files are not always considered executable in cygwin causing which
27035  # to not find them
27036  if test "x$new_path" = x \
27037           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27038           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27039    new_path=`$CYGPATH -u "$path"`
27040  fi
27041  if test "x$new_path" = x; then
27042    # Oops. Which didn't find the executable.
27043    # The splitting of arguments from the executable at a space might have been incorrect,
27044    # since paths with space are more likely in Windows. Give it another try with the whole
27045    # argument.
27046    path="$complete"
27047    arguments="EOL"
27048    new_path=`$CYGPATH -u "$path"`
27049    new_path=`$WHICH "$new_path" 2> /dev/null`
27050    # bat and cmd files are not always considered executable in cygwin causing which
27051    # to not find them
27052    if test "x$new_path" = x \
27053             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27054             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27055      new_path=`$CYGPATH -u "$path"`
27056    fi
27057    if test "x$new_path" = x; then
27058      # It's still not found. Now this is an unrecoverable error.
27059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27060$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27061      has_space=`$ECHO "$complete" | $GREP " "`
27062      if test "x$has_space" != x; then
27063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27065      fi
27066      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27067    fi
27068  fi
27069
27070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27073  # "foo.exe" is OK but "foo" is an error.
27074  #
27075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27076  # It is also a way to make sure we got the proper file name for the real test later on.
27077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27078  if test "x$test_shortpath" = x; then
27079    # Short path failed, file does not exist as specified.
27080    # Try adding .exe or .cmd
27081    if test -f "${new_path}.exe"; then
27082       input_to_shortpath="${new_path}.exe"
27083    elif test -f "${new_path}.cmd"; then
27084       input_to_shortpath="${new_path}.cmd"
27085    else
27086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27087$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27090      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27091    fi
27092  else
27093    input_to_shortpath="$new_path"
27094  fi
27095
27096  # Call helper function which possibly converts this using DOS-style short mode.
27097  # If so, the updated path is stored in $new_path.
27098  new_path="$input_to_shortpath"
27099
27100  input_path="$input_to_shortpath"
27101  # Check if we need to convert this using DOS-style short mode. If the path
27102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27103  # take no chances and rewrite it.
27104  # Note: m4 eats our [], so we need to use [ and ] instead.
27105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27106  if test "x$has_forbidden_chars" != x; then
27107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27111      # Going to short mode and back again did indeed matter. Since short mode is
27112      # case insensitive, let's make it lowercase to improve readability.
27113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27114      # Now convert it back to Unix-stile (cygpath)
27115      input_path=`$CYGPATH -u "$shortmode_path"`
27116      new_path="$input_path"
27117    fi
27118  fi
27119
27120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27121  if test "x$test_cygdrive_prefix" = x; then
27122    # As a simple fix, exclude /usr/bin since it's not a real path.
27123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27125      # a path prefixed by /cygdrive for fixpath to work.
27126      new_path="$CYGWIN_ROOT_PATH$input_path"
27127    fi
27128  fi
27129
27130  # remove trailing .exe if any
27131  new_path="${new_path/%.exe/}"
27132
27133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27134
27135  # First separate the path from the arguments. This will split at the first
27136  # space.
27137  complete="$NM"
27138  path="${complete%% *}"
27139  tmp="$complete EOL"
27140  arguments="${tmp#* }"
27141
27142  # Input might be given as Windows format, start by converting to
27143  # unix format.
27144  new_path="$path"
27145
27146  windows_path="$new_path"
27147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27148    unix_path=`$CYGPATH -u "$windows_path"`
27149    new_path="$unix_path"
27150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27152    new_path="$unix_path"
27153  fi
27154
27155
27156  # Now try to locate executable using which
27157  new_path=`$WHICH "$new_path" 2> /dev/null`
27158
27159  if test "x$new_path" = x; then
27160    # Oops. Which didn't find the executable.
27161    # The splitting of arguments from the executable at a space might have been incorrect,
27162    # since paths with space are more likely in Windows. Give it another try with the whole
27163    # argument.
27164    path="$complete"
27165    arguments="EOL"
27166    new_path="$path"
27167
27168  windows_path="$new_path"
27169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27170    unix_path=`$CYGPATH -u "$windows_path"`
27171    new_path="$unix_path"
27172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27174    new_path="$unix_path"
27175  fi
27176
27177
27178    new_path=`$WHICH "$new_path" 2> /dev/null`
27179
27180    if test "x$new_path" = x; then
27181      # It's still not found. Now this is an unrecoverable error.
27182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27183$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27184      has_space=`$ECHO "$complete" | $GREP " "`
27185      if test "x$has_space" != x; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27188      fi
27189      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27190    fi
27191  fi
27192
27193  # Now new_path has a complete unix path to the binary
27194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27195    # Keep paths in /bin as-is, but remove trailing .exe if any
27196    new_path="${new_path/%.exe/}"
27197    # Do not save /bin paths to all_fixpath_prefixes!
27198  else
27199    # Not in mixed or Windows style, start by that.
27200    new_path=`cmd //c echo $new_path`
27201
27202  input_path="$new_path"
27203  # Check if we need to convert this using DOS-style short mode. If the path
27204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27205  # take no chances and rewrite it.
27206  # Note: m4 eats our [], so we need to use [ and ] instead.
27207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27208  if test "x$has_forbidden_chars" != x; then
27209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27211  fi
27212
27213    # Output is in $new_path
27214
27215  windows_path="$new_path"
27216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27217    unix_path=`$CYGPATH -u "$windows_path"`
27218    new_path="$unix_path"
27219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27221    new_path="$unix_path"
27222  fi
27223
27224    # remove trailing .exe if any
27225    new_path="${new_path/%.exe/}"
27226
27227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27229  fi
27230
27231  else
27232    # We're on a posix platform. Hooray! :)
27233    # First separate the path from the arguments. This will split at the first
27234    # space.
27235    complete="$NM"
27236    path="${complete%% *}"
27237    tmp="$complete EOL"
27238    arguments="${tmp#* }"
27239
27240    # Cannot rely on the command "which" here since it doesn't always work.
27241    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27242    if test -z "$is_absolute_path"; then
27243      # Path to executable is not absolute. Find it.
27244      IFS_save="$IFS"
27245      IFS=:
27246      for p in $PATH; do
27247        if test -f "$p/$path" && test -x "$p/$path"; then
27248          new_path="$p/$path"
27249          break
27250        fi
27251      done
27252      IFS="$IFS_save"
27253    else
27254      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27255$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27256      new_path="$path"
27257    fi
27258
27259    if test "x$new_path" = x; then
27260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27261$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27262        has_space=`$ECHO "$complete" | $GREP " "`
27263        if test "x$has_space" != x; then
27264          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27266        fi
27267        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27268      fi
27269  fi
27270
27271      # Now join together the path and the arguments once again
27272      if test "x$arguments" != xEOL; then
27273        new_complete="$new_path ${arguments% *}"
27274      else
27275        new_complete="$new_path"
27276      fi
27277
27278  if test "x$complete" != "x$new_complete"; then
27279      NM="$new_complete"
27280      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27281$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27282    fi
27283
27284    GNM="$NM"
27285
27286    if test -n "$ac_tool_prefix"; then
27287  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27288set dummy ${ac_tool_prefix}strip; ac_word=$2
27289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27290$as_echo_n "checking for $ac_word... " >&6; }
27291if ${ac_cv_prog_STRIP+:} false; then :
27292  $as_echo_n "(cached) " >&6
27293else
27294  if test -n "$STRIP"; then
27295  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27296else
27297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27298for as_dir in $PATH
27299do
27300  IFS=$as_save_IFS
27301  test -z "$as_dir" && as_dir=.
27302    for ac_exec_ext in '' $ac_executable_extensions; do
27303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27304    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27306    break 2
27307  fi
27308done
27309  done
27310IFS=$as_save_IFS
27311
27312fi
27313fi
27314STRIP=$ac_cv_prog_STRIP
27315if test -n "$STRIP"; then
27316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27317$as_echo "$STRIP" >&6; }
27318else
27319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27320$as_echo "no" >&6; }
27321fi
27322
27323
27324fi
27325if test -z "$ac_cv_prog_STRIP"; then
27326  ac_ct_STRIP=$STRIP
27327  # Extract the first word of "strip", so it can be a program name with args.
27328set dummy strip; ac_word=$2
27329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27330$as_echo_n "checking for $ac_word... " >&6; }
27331if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27332  $as_echo_n "(cached) " >&6
27333else
27334  if test -n "$ac_ct_STRIP"; then
27335  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27336else
27337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27338for as_dir in $PATH
27339do
27340  IFS=$as_save_IFS
27341  test -z "$as_dir" && as_dir=.
27342    for ac_exec_ext in '' $ac_executable_extensions; do
27343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27344    ac_cv_prog_ac_ct_STRIP="strip"
27345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27346    break 2
27347  fi
27348done
27349  done
27350IFS=$as_save_IFS
27351
27352fi
27353fi
27354ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27355if test -n "$ac_ct_STRIP"; then
27356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27357$as_echo "$ac_ct_STRIP" >&6; }
27358else
27359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27360$as_echo "no" >&6; }
27361fi
27362
27363  if test "x$ac_ct_STRIP" = x; then
27364    STRIP=""
27365  else
27366    case $cross_compiling:$ac_tool_warned in
27367yes:)
27368{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27369$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27370ac_tool_warned=yes ;;
27371esac
27372    STRIP=$ac_ct_STRIP
27373  fi
27374else
27375  STRIP="$ac_cv_prog_STRIP"
27376fi
27377
27378
27379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27380
27381  # First separate the path from the arguments. This will split at the first
27382  # space.
27383  complete="$STRIP"
27384  path="${complete%% *}"
27385  tmp="$complete EOL"
27386  arguments="${tmp#* }"
27387
27388  # Input might be given as Windows format, start by converting to
27389  # unix format.
27390  new_path=`$CYGPATH -u "$path"`
27391
27392  # Now try to locate executable using which
27393  new_path=`$WHICH "$new_path" 2> /dev/null`
27394  # bat and cmd files are not always considered executable in cygwin causing which
27395  # to not find them
27396  if test "x$new_path" = x \
27397           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27398           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27399    new_path=`$CYGPATH -u "$path"`
27400  fi
27401  if test "x$new_path" = x; then
27402    # Oops. Which didn't find the executable.
27403    # The splitting of arguments from the executable at a space might have been incorrect,
27404    # since paths with space are more likely in Windows. Give it another try with the whole
27405    # argument.
27406    path="$complete"
27407    arguments="EOL"
27408    new_path=`$CYGPATH -u "$path"`
27409    new_path=`$WHICH "$new_path" 2> /dev/null`
27410    # bat and cmd files are not always considered executable in cygwin causing which
27411    # to not find them
27412    if test "x$new_path" = x \
27413             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27414             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27415      new_path=`$CYGPATH -u "$path"`
27416    fi
27417    if test "x$new_path" = x; then
27418      # It's still not found. Now this is an unrecoverable error.
27419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27420$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27421      has_space=`$ECHO "$complete" | $GREP " "`
27422      if test "x$has_space" != x; then
27423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27425      fi
27426      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27427    fi
27428  fi
27429
27430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27433  # "foo.exe" is OK but "foo" is an error.
27434  #
27435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27436  # It is also a way to make sure we got the proper file name for the real test later on.
27437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27438  if test "x$test_shortpath" = x; then
27439    # Short path failed, file does not exist as specified.
27440    # Try adding .exe or .cmd
27441    if test -f "${new_path}.exe"; then
27442       input_to_shortpath="${new_path}.exe"
27443    elif test -f "${new_path}.cmd"; then
27444       input_to_shortpath="${new_path}.cmd"
27445    else
27446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27447$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27448      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27449$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27450      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27451    fi
27452  else
27453    input_to_shortpath="$new_path"
27454  fi
27455
27456  # Call helper function which possibly converts this using DOS-style short mode.
27457  # If so, the updated path is stored in $new_path.
27458  new_path="$input_to_shortpath"
27459
27460  input_path="$input_to_shortpath"
27461  # Check if we need to convert this using DOS-style short mode. If the path
27462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27463  # take no chances and rewrite it.
27464  # Note: m4 eats our [], so we need to use [ and ] instead.
27465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27466  if test "x$has_forbidden_chars" != x; then
27467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27471      # Going to short mode and back again did indeed matter. Since short mode is
27472      # case insensitive, let's make it lowercase to improve readability.
27473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27474      # Now convert it back to Unix-stile (cygpath)
27475      input_path=`$CYGPATH -u "$shortmode_path"`
27476      new_path="$input_path"
27477    fi
27478  fi
27479
27480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27481  if test "x$test_cygdrive_prefix" = x; then
27482    # As a simple fix, exclude /usr/bin since it's not a real path.
27483    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27485      # a path prefixed by /cygdrive for fixpath to work.
27486      new_path="$CYGWIN_ROOT_PATH$input_path"
27487    fi
27488  fi
27489
27490  # remove trailing .exe if any
27491  new_path="${new_path/%.exe/}"
27492
27493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27494
27495  # First separate the path from the arguments. This will split at the first
27496  # space.
27497  complete="$STRIP"
27498  path="${complete%% *}"
27499  tmp="$complete EOL"
27500  arguments="${tmp#* }"
27501
27502  # Input might be given as Windows format, start by converting to
27503  # unix format.
27504  new_path="$path"
27505
27506  windows_path="$new_path"
27507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27508    unix_path=`$CYGPATH -u "$windows_path"`
27509    new_path="$unix_path"
27510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27512    new_path="$unix_path"
27513  fi
27514
27515
27516  # Now try to locate executable using which
27517  new_path=`$WHICH "$new_path" 2> /dev/null`
27518
27519  if test "x$new_path" = x; then
27520    # Oops. Which didn't find the executable.
27521    # The splitting of arguments from the executable at a space might have been incorrect,
27522    # since paths with space are more likely in Windows. Give it another try with the whole
27523    # argument.
27524    path="$complete"
27525    arguments="EOL"
27526    new_path="$path"
27527
27528  windows_path="$new_path"
27529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27530    unix_path=`$CYGPATH -u "$windows_path"`
27531    new_path="$unix_path"
27532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27534    new_path="$unix_path"
27535  fi
27536
27537
27538    new_path=`$WHICH "$new_path" 2> /dev/null`
27539
27540    if test "x$new_path" = x; then
27541      # It's still not found. Now this is an unrecoverable error.
27542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27543$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27544      has_space=`$ECHO "$complete" | $GREP " "`
27545      if test "x$has_space" != x; then
27546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27548      fi
27549      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27550    fi
27551  fi
27552
27553  # Now new_path has a complete unix path to the binary
27554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27555    # Keep paths in /bin as-is, but remove trailing .exe if any
27556    new_path="${new_path/%.exe/}"
27557    # Do not save /bin paths to all_fixpath_prefixes!
27558  else
27559    # Not in mixed or Windows style, start by that.
27560    new_path=`cmd //c echo $new_path`
27561
27562  input_path="$new_path"
27563  # Check if we need to convert this using DOS-style short mode. If the path
27564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27565  # take no chances and rewrite it.
27566  # Note: m4 eats our [], so we need to use [ and ] instead.
27567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27568  if test "x$has_forbidden_chars" != x; then
27569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27571  fi
27572
27573    # Output is in $new_path
27574
27575  windows_path="$new_path"
27576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27577    unix_path=`$CYGPATH -u "$windows_path"`
27578    new_path="$unix_path"
27579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27581    new_path="$unix_path"
27582  fi
27583
27584    # remove trailing .exe if any
27585    new_path="${new_path/%.exe/}"
27586
27587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27589  fi
27590
27591  else
27592    # We're on a posix platform. Hooray! :)
27593    # First separate the path from the arguments. This will split at the first
27594    # space.
27595    complete="$STRIP"
27596    path="${complete%% *}"
27597    tmp="$complete EOL"
27598    arguments="${tmp#* }"
27599
27600    # Cannot rely on the command "which" here since it doesn't always work.
27601    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27602    if test -z "$is_absolute_path"; then
27603      # Path to executable is not absolute. Find it.
27604      IFS_save="$IFS"
27605      IFS=:
27606      for p in $PATH; do
27607        if test -f "$p/$path" && test -x "$p/$path"; then
27608          new_path="$p/$path"
27609          break
27610        fi
27611      done
27612      IFS="$IFS_save"
27613    else
27614      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27615$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27616      new_path="$path"
27617    fi
27618
27619    if test "x$new_path" = x; then
27620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27621$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27622        has_space=`$ECHO "$complete" | $GREP " "`
27623        if test "x$has_space" != x; then
27624          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27625$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27626        fi
27627        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27628      fi
27629  fi
27630
27631      # Now join together the path and the arguments once again
27632      if test "x$arguments" != xEOL; then
27633        new_complete="$new_path ${arguments% *}"
27634      else
27635        new_complete="$new_path"
27636      fi
27637
27638  if test "x$complete" != "x$new_complete"; then
27639      STRIP="$new_complete"
27640      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27641$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27642    fi
27643
27644fi
27645
27646# objcopy is used for moving debug symbols to separate files when
27647# full debug symbols are enabled.
27648if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27649    if test -n "$ac_tool_prefix"; then
27650  for ac_prog in gobjcopy objcopy
27651  do
27652    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27653set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27655$as_echo_n "checking for $ac_word... " >&6; }
27656if ${ac_cv_prog_OBJCOPY+:} false; then :
27657  $as_echo_n "(cached) " >&6
27658else
27659  if test -n "$OBJCOPY"; then
27660  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27661else
27662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27663for as_dir in $PATH
27664do
27665  IFS=$as_save_IFS
27666  test -z "$as_dir" && as_dir=.
27667    for ac_exec_ext in '' $ac_executable_extensions; do
27668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27669    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27671    break 2
27672  fi
27673done
27674  done
27675IFS=$as_save_IFS
27676
27677fi
27678fi
27679OBJCOPY=$ac_cv_prog_OBJCOPY
27680if test -n "$OBJCOPY"; then
27681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27682$as_echo "$OBJCOPY" >&6; }
27683else
27684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27685$as_echo "no" >&6; }
27686fi
27687
27688
27689    test -n "$OBJCOPY" && break
27690  done
27691fi
27692if test -z "$OBJCOPY"; then
27693  ac_ct_OBJCOPY=$OBJCOPY
27694  for ac_prog in gobjcopy objcopy
27695do
27696  # Extract the first word of "$ac_prog", so it can be a program name with args.
27697set dummy $ac_prog; ac_word=$2
27698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27699$as_echo_n "checking for $ac_word... " >&6; }
27700if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27701  $as_echo_n "(cached) " >&6
27702else
27703  if test -n "$ac_ct_OBJCOPY"; then
27704  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27705else
27706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27707for as_dir in $PATH
27708do
27709  IFS=$as_save_IFS
27710  test -z "$as_dir" && as_dir=.
27711    for ac_exec_ext in '' $ac_executable_extensions; do
27712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27713    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27715    break 2
27716  fi
27717done
27718  done
27719IFS=$as_save_IFS
27720
27721fi
27722fi
27723ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27724if test -n "$ac_ct_OBJCOPY"; then
27725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27726$as_echo "$ac_ct_OBJCOPY" >&6; }
27727else
27728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27729$as_echo "no" >&6; }
27730fi
27731
27732
27733  test -n "$ac_ct_OBJCOPY" && break
27734done
27735
27736  if test "x$ac_ct_OBJCOPY" = x; then
27737    OBJCOPY=""
27738  else
27739    case $cross_compiling:$ac_tool_warned in
27740yes:)
27741{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27742$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27743ac_tool_warned=yes ;;
27744esac
27745    OBJCOPY=$ac_ct_OBJCOPY
27746  fi
27747fi
27748
27749    # Only call fixup if objcopy was found.
27750    if test -n "$OBJCOPY"; then
27751
27752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27753
27754  # First separate the path from the arguments. This will split at the first
27755  # space.
27756  complete="$OBJCOPY"
27757  path="${complete%% *}"
27758  tmp="$complete EOL"
27759  arguments="${tmp#* }"
27760
27761  # Input might be given as Windows format, start by converting to
27762  # unix format.
27763  new_path=`$CYGPATH -u "$path"`
27764
27765  # Now try to locate executable using which
27766  new_path=`$WHICH "$new_path" 2> /dev/null`
27767  # bat and cmd files are not always considered executable in cygwin causing which
27768  # to not find them
27769  if test "x$new_path" = x \
27770           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27771           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27772    new_path=`$CYGPATH -u "$path"`
27773  fi
27774  if test "x$new_path" = x; then
27775    # Oops. Which didn't find the executable.
27776    # The splitting of arguments from the executable at a space might have been incorrect,
27777    # since paths with space are more likely in Windows. Give it another try with the whole
27778    # argument.
27779    path="$complete"
27780    arguments="EOL"
27781    new_path=`$CYGPATH -u "$path"`
27782    new_path=`$WHICH "$new_path" 2> /dev/null`
27783    # bat and cmd files are not always considered executable in cygwin causing which
27784    # to not find them
27785    if test "x$new_path" = x \
27786             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27787             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27788      new_path=`$CYGPATH -u "$path"`
27789    fi
27790    if test "x$new_path" = x; then
27791      # It's still not found. Now this is an unrecoverable error.
27792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27793$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27794      has_space=`$ECHO "$complete" | $GREP " "`
27795      if test "x$has_space" != x; then
27796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27798      fi
27799      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27800    fi
27801  fi
27802
27803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27806  # "foo.exe" is OK but "foo" is an error.
27807  #
27808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27809  # It is also a way to make sure we got the proper file name for the real test later on.
27810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27811  if test "x$test_shortpath" = x; then
27812    # Short path failed, file does not exist as specified.
27813    # Try adding .exe or .cmd
27814    if test -f "${new_path}.exe"; then
27815       input_to_shortpath="${new_path}.exe"
27816    elif test -f "${new_path}.cmd"; then
27817       input_to_shortpath="${new_path}.cmd"
27818    else
27819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27820$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27823      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27824    fi
27825  else
27826    input_to_shortpath="$new_path"
27827  fi
27828
27829  # Call helper function which possibly converts this using DOS-style short mode.
27830  # If so, the updated path is stored in $new_path.
27831  new_path="$input_to_shortpath"
27832
27833  input_path="$input_to_shortpath"
27834  # Check if we need to convert this using DOS-style short mode. If the path
27835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27836  # take no chances and rewrite it.
27837  # Note: m4 eats our [], so we need to use [ and ] instead.
27838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27839  if test "x$has_forbidden_chars" != x; then
27840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27844      # Going to short mode and back again did indeed matter. Since short mode is
27845      # case insensitive, let's make it lowercase to improve readability.
27846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27847      # Now convert it back to Unix-stile (cygpath)
27848      input_path=`$CYGPATH -u "$shortmode_path"`
27849      new_path="$input_path"
27850    fi
27851  fi
27852
27853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27854  if test "x$test_cygdrive_prefix" = x; then
27855    # As a simple fix, exclude /usr/bin since it's not a real path.
27856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27858      # a path prefixed by /cygdrive for fixpath to work.
27859      new_path="$CYGWIN_ROOT_PATH$input_path"
27860    fi
27861  fi
27862
27863  # remove trailing .exe if any
27864  new_path="${new_path/%.exe/}"
27865
27866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27867
27868  # First separate the path from the arguments. This will split at the first
27869  # space.
27870  complete="$OBJCOPY"
27871  path="${complete%% *}"
27872  tmp="$complete EOL"
27873  arguments="${tmp#* }"
27874
27875  # Input might be given as Windows format, start by converting to
27876  # unix format.
27877  new_path="$path"
27878
27879  windows_path="$new_path"
27880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27881    unix_path=`$CYGPATH -u "$windows_path"`
27882    new_path="$unix_path"
27883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27885    new_path="$unix_path"
27886  fi
27887
27888
27889  # Now try to locate executable using which
27890  new_path=`$WHICH "$new_path" 2> /dev/null`
27891
27892  if test "x$new_path" = x; then
27893    # Oops. Which didn't find the executable.
27894    # The splitting of arguments from the executable at a space might have been incorrect,
27895    # since paths with space are more likely in Windows. Give it another try with the whole
27896    # argument.
27897    path="$complete"
27898    arguments="EOL"
27899    new_path="$path"
27900
27901  windows_path="$new_path"
27902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27903    unix_path=`$CYGPATH -u "$windows_path"`
27904    new_path="$unix_path"
27905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27907    new_path="$unix_path"
27908  fi
27909
27910
27911    new_path=`$WHICH "$new_path" 2> /dev/null`
27912
27913    if test "x$new_path" = x; then
27914      # It's still not found. Now this is an unrecoverable error.
27915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27916$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27917      has_space=`$ECHO "$complete" | $GREP " "`
27918      if test "x$has_space" != x; then
27919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27921      fi
27922      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27923    fi
27924  fi
27925
27926  # Now new_path has a complete unix path to the binary
27927  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27928    # Keep paths in /bin as-is, but remove trailing .exe if any
27929    new_path="${new_path/%.exe/}"
27930    # Do not save /bin paths to all_fixpath_prefixes!
27931  else
27932    # Not in mixed or Windows style, start by that.
27933    new_path=`cmd //c echo $new_path`
27934
27935  input_path="$new_path"
27936  # Check if we need to convert this using DOS-style short mode. If the path
27937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27938  # take no chances and rewrite it.
27939  # Note: m4 eats our [], so we need to use [ and ] instead.
27940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27941  if test "x$has_forbidden_chars" != x; then
27942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27944  fi
27945
27946    # Output is in $new_path
27947
27948  windows_path="$new_path"
27949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27950    unix_path=`$CYGPATH -u "$windows_path"`
27951    new_path="$unix_path"
27952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27954    new_path="$unix_path"
27955  fi
27956
27957    # remove trailing .exe if any
27958    new_path="${new_path/%.exe/}"
27959
27960    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27961    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27962  fi
27963
27964  else
27965    # We're on a posix platform. Hooray! :)
27966    # First separate the path from the arguments. This will split at the first
27967    # space.
27968    complete="$OBJCOPY"
27969    path="${complete%% *}"
27970    tmp="$complete EOL"
27971    arguments="${tmp#* }"
27972
27973    # Cannot rely on the command "which" here since it doesn't always work.
27974    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27975    if test -z "$is_absolute_path"; then
27976      # Path to executable is not absolute. Find it.
27977      IFS_save="$IFS"
27978      IFS=:
27979      for p in $PATH; do
27980        if test -f "$p/$path" && test -x "$p/$path"; then
27981          new_path="$p/$path"
27982          break
27983        fi
27984      done
27985      IFS="$IFS_save"
27986    else
27987      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27988$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27989      new_path="$path"
27990    fi
27991
27992    if test "x$new_path" = x; then
27993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27994$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27995        has_space=`$ECHO "$complete" | $GREP " "`
27996        if test "x$has_space" != x; then
27997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27999        fi
28000        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28001      fi
28002  fi
28003
28004      # Now join together the path and the arguments once again
28005      if test "x$arguments" != xEOL; then
28006        new_complete="$new_path ${arguments% *}"
28007      else
28008        new_complete="$new_path"
28009      fi
28010
28011  if test "x$complete" != "x$new_complete"; then
28012      OBJCOPY="$new_complete"
28013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28014$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28015    fi
28016
28017    fi
28018fi
28019
28020if test -n "$ac_tool_prefix"; then
28021  for ac_prog in gobjdump objdump
28022  do
28023    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28024set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28026$as_echo_n "checking for $ac_word... " >&6; }
28027if ${ac_cv_prog_OBJDUMP+:} false; then :
28028  $as_echo_n "(cached) " >&6
28029else
28030  if test -n "$OBJDUMP"; then
28031  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28032else
28033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28034for as_dir in $PATH
28035do
28036  IFS=$as_save_IFS
28037  test -z "$as_dir" && as_dir=.
28038    for ac_exec_ext in '' $ac_executable_extensions; do
28039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28040    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28042    break 2
28043  fi
28044done
28045  done
28046IFS=$as_save_IFS
28047
28048fi
28049fi
28050OBJDUMP=$ac_cv_prog_OBJDUMP
28051if test -n "$OBJDUMP"; then
28052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28053$as_echo "$OBJDUMP" >&6; }
28054else
28055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28056$as_echo "no" >&6; }
28057fi
28058
28059
28060    test -n "$OBJDUMP" && break
28061  done
28062fi
28063if test -z "$OBJDUMP"; then
28064  ac_ct_OBJDUMP=$OBJDUMP
28065  for ac_prog in gobjdump objdump
28066do
28067  # Extract the first word of "$ac_prog", so it can be a program name with args.
28068set dummy $ac_prog; ac_word=$2
28069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28070$as_echo_n "checking for $ac_word... " >&6; }
28071if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28072  $as_echo_n "(cached) " >&6
28073else
28074  if test -n "$ac_ct_OBJDUMP"; then
28075  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28076else
28077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28078for as_dir in $PATH
28079do
28080  IFS=$as_save_IFS
28081  test -z "$as_dir" && as_dir=.
28082    for ac_exec_ext in '' $ac_executable_extensions; do
28083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28084    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28086    break 2
28087  fi
28088done
28089  done
28090IFS=$as_save_IFS
28091
28092fi
28093fi
28094ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28095if test -n "$ac_ct_OBJDUMP"; then
28096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28097$as_echo "$ac_ct_OBJDUMP" >&6; }
28098else
28099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28100$as_echo "no" >&6; }
28101fi
28102
28103
28104  test -n "$ac_ct_OBJDUMP" && break
28105done
28106
28107  if test "x$ac_ct_OBJDUMP" = x; then
28108    OBJDUMP=""
28109  else
28110    case $cross_compiling:$ac_tool_warned in
28111yes:)
28112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28114ac_tool_warned=yes ;;
28115esac
28116    OBJDUMP=$ac_ct_OBJDUMP
28117  fi
28118fi
28119
28120if test "x$OBJDUMP" != x; then
28121  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28122
28123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28124
28125  # First separate the path from the arguments. This will split at the first
28126  # space.
28127  complete="$OBJDUMP"
28128  path="${complete%% *}"
28129  tmp="$complete EOL"
28130  arguments="${tmp#* }"
28131
28132  # Input might be given as Windows format, start by converting to
28133  # unix format.
28134  new_path=`$CYGPATH -u "$path"`
28135
28136  # Now try to locate executable using which
28137  new_path=`$WHICH "$new_path" 2> /dev/null`
28138  # bat and cmd files are not always considered executable in cygwin causing which
28139  # to not find them
28140  if test "x$new_path" = x \
28141           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28142           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28143    new_path=`$CYGPATH -u "$path"`
28144  fi
28145  if test "x$new_path" = x; then
28146    # Oops. Which didn't find the executable.
28147    # The splitting of arguments from the executable at a space might have been incorrect,
28148    # since paths with space are more likely in Windows. Give it another try with the whole
28149    # argument.
28150    path="$complete"
28151    arguments="EOL"
28152    new_path=`$CYGPATH -u "$path"`
28153    new_path=`$WHICH "$new_path" 2> /dev/null`
28154    # bat and cmd files are not always considered executable in cygwin causing which
28155    # to not find them
28156    if test "x$new_path" = x \
28157             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28158             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28159      new_path=`$CYGPATH -u "$path"`
28160    fi
28161    if test "x$new_path" = x; then
28162      # It's still not found. Now this is an unrecoverable error.
28163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28164$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28165      has_space=`$ECHO "$complete" | $GREP " "`
28166      if test "x$has_space" != x; then
28167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28169      fi
28170      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28171    fi
28172  fi
28173
28174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28177  # "foo.exe" is OK but "foo" is an error.
28178  #
28179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28180  # It is also a way to make sure we got the proper file name for the real test later on.
28181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28182  if test "x$test_shortpath" = x; then
28183    # Short path failed, file does not exist as specified.
28184    # Try adding .exe or .cmd
28185    if test -f "${new_path}.exe"; then
28186       input_to_shortpath="${new_path}.exe"
28187    elif test -f "${new_path}.cmd"; then
28188       input_to_shortpath="${new_path}.cmd"
28189    else
28190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28191$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28194      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28195    fi
28196  else
28197    input_to_shortpath="$new_path"
28198  fi
28199
28200  # Call helper function which possibly converts this using DOS-style short mode.
28201  # If so, the updated path is stored in $new_path.
28202  new_path="$input_to_shortpath"
28203
28204  input_path="$input_to_shortpath"
28205  # Check if we need to convert this using DOS-style short mode. If the path
28206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28207  # take no chances and rewrite it.
28208  # Note: m4 eats our [], so we need to use [ and ] instead.
28209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28210  if test "x$has_forbidden_chars" != x; then
28211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28215      # Going to short mode and back again did indeed matter. Since short mode is
28216      # case insensitive, let's make it lowercase to improve readability.
28217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28218      # Now convert it back to Unix-stile (cygpath)
28219      input_path=`$CYGPATH -u "$shortmode_path"`
28220      new_path="$input_path"
28221    fi
28222  fi
28223
28224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28225  if test "x$test_cygdrive_prefix" = x; then
28226    # As a simple fix, exclude /usr/bin since it's not a real path.
28227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28229      # a path prefixed by /cygdrive for fixpath to work.
28230      new_path="$CYGWIN_ROOT_PATH$input_path"
28231    fi
28232  fi
28233
28234  # remove trailing .exe if any
28235  new_path="${new_path/%.exe/}"
28236
28237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28238
28239  # First separate the path from the arguments. This will split at the first
28240  # space.
28241  complete="$OBJDUMP"
28242  path="${complete%% *}"
28243  tmp="$complete EOL"
28244  arguments="${tmp#* }"
28245
28246  # Input might be given as Windows format, start by converting to
28247  # unix format.
28248  new_path="$path"
28249
28250  windows_path="$new_path"
28251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28252    unix_path=`$CYGPATH -u "$windows_path"`
28253    new_path="$unix_path"
28254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28256    new_path="$unix_path"
28257  fi
28258
28259
28260  # Now try to locate executable using which
28261  new_path=`$WHICH "$new_path" 2> /dev/null`
28262
28263  if test "x$new_path" = x; then
28264    # Oops. Which didn't find the executable.
28265    # The splitting of arguments from the executable at a space might have been incorrect,
28266    # since paths with space are more likely in Windows. Give it another try with the whole
28267    # argument.
28268    path="$complete"
28269    arguments="EOL"
28270    new_path="$path"
28271
28272  windows_path="$new_path"
28273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28274    unix_path=`$CYGPATH -u "$windows_path"`
28275    new_path="$unix_path"
28276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28278    new_path="$unix_path"
28279  fi
28280
28281
28282    new_path=`$WHICH "$new_path" 2> /dev/null`
28283
28284    if test "x$new_path" = x; then
28285      # It's still not found. Now this is an unrecoverable error.
28286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28287$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28288      has_space=`$ECHO "$complete" | $GREP " "`
28289      if test "x$has_space" != x; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28292      fi
28293      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28294    fi
28295  fi
28296
28297  # Now new_path has a complete unix path to the binary
28298  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28299    # Keep paths in /bin as-is, but remove trailing .exe if any
28300    new_path="${new_path/%.exe/}"
28301    # Do not save /bin paths to all_fixpath_prefixes!
28302  else
28303    # Not in mixed or Windows style, start by that.
28304    new_path=`cmd //c echo $new_path`
28305
28306  input_path="$new_path"
28307  # Check if we need to convert this using DOS-style short mode. If the path
28308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28309  # take no chances and rewrite it.
28310  # Note: m4 eats our [], so we need to use [ and ] instead.
28311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28312  if test "x$has_forbidden_chars" != x; then
28313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28315  fi
28316
28317    # Output is in $new_path
28318
28319  windows_path="$new_path"
28320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28321    unix_path=`$CYGPATH -u "$windows_path"`
28322    new_path="$unix_path"
28323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28325    new_path="$unix_path"
28326  fi
28327
28328    # remove trailing .exe if any
28329    new_path="${new_path/%.exe/}"
28330
28331    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28332    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28333  fi
28334
28335  else
28336    # We're on a posix platform. Hooray! :)
28337    # First separate the path from the arguments. This will split at the first
28338    # space.
28339    complete="$OBJDUMP"
28340    path="${complete%% *}"
28341    tmp="$complete EOL"
28342    arguments="${tmp#* }"
28343
28344    # Cannot rely on the command "which" here since it doesn't always work.
28345    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28346    if test -z "$is_absolute_path"; then
28347      # Path to executable is not absolute. Find it.
28348      IFS_save="$IFS"
28349      IFS=:
28350      for p in $PATH; do
28351        if test -f "$p/$path" && test -x "$p/$path"; then
28352          new_path="$p/$path"
28353          break
28354        fi
28355      done
28356      IFS="$IFS_save"
28357    else
28358      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28359$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28360      new_path="$path"
28361    fi
28362
28363    if test "x$new_path" = x; then
28364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28365$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28366        has_space=`$ECHO "$complete" | $GREP " "`
28367        if test "x$has_space" != x; then
28368          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28369$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28370        fi
28371        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28372      fi
28373  fi
28374
28375      # Now join together the path and the arguments once again
28376      if test "x$arguments" != xEOL; then
28377        new_complete="$new_path ${arguments% *}"
28378      else
28379        new_complete="$new_path"
28380      fi
28381
28382  if test "x$complete" != "x$new_complete"; then
28383      OBJDUMP="$new_complete"
28384      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28385$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28386    fi
28387
28388fi
28389
28390if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28391   # Extract the first word of "lipo", so it can be a program name with args.
28392set dummy lipo; ac_word=$2
28393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28394$as_echo_n "checking for $ac_word... " >&6; }
28395if ${ac_cv_path_LIPO+:} false; then :
28396  $as_echo_n "(cached) " >&6
28397else
28398  case $LIPO in
28399  [\\/]* | ?:[\\/]*)
28400  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28401  ;;
28402  *)
28403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28404for as_dir in $PATH
28405do
28406  IFS=$as_save_IFS
28407  test -z "$as_dir" && as_dir=.
28408    for ac_exec_ext in '' $ac_executable_extensions; do
28409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28410    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28412    break 2
28413  fi
28414done
28415  done
28416IFS=$as_save_IFS
28417
28418  ;;
28419esac
28420fi
28421LIPO=$ac_cv_path_LIPO
28422if test -n "$LIPO"; then
28423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28424$as_echo "$LIPO" >&6; }
28425else
28426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28427$as_echo "no" >&6; }
28428fi
28429
28430
28431
28432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28433
28434  # First separate the path from the arguments. This will split at the first
28435  # space.
28436  complete="$LIPO"
28437  path="${complete%% *}"
28438  tmp="$complete EOL"
28439  arguments="${tmp#* }"
28440
28441  # Input might be given as Windows format, start by converting to
28442  # unix format.
28443  new_path=`$CYGPATH -u "$path"`
28444
28445  # Now try to locate executable using which
28446  new_path=`$WHICH "$new_path" 2> /dev/null`
28447  # bat and cmd files are not always considered executable in cygwin causing which
28448  # to not find them
28449  if test "x$new_path" = x \
28450           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28451           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28452    new_path=`$CYGPATH -u "$path"`
28453  fi
28454  if test "x$new_path" = x; then
28455    # Oops. Which didn't find the executable.
28456    # The splitting of arguments from the executable at a space might have been incorrect,
28457    # since paths with space are more likely in Windows. Give it another try with the whole
28458    # argument.
28459    path="$complete"
28460    arguments="EOL"
28461    new_path=`$CYGPATH -u "$path"`
28462    new_path=`$WHICH "$new_path" 2> /dev/null`
28463    # bat and cmd files are not always considered executable in cygwin causing which
28464    # to not find them
28465    if test "x$new_path" = x \
28466             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28467             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28468      new_path=`$CYGPATH -u "$path"`
28469    fi
28470    if test "x$new_path" = x; then
28471      # It's still not found. Now this is an unrecoverable error.
28472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28473$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28474      has_space=`$ECHO "$complete" | $GREP " "`
28475      if test "x$has_space" != x; then
28476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28478      fi
28479      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28480    fi
28481  fi
28482
28483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28486  # "foo.exe" is OK but "foo" is an error.
28487  #
28488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28489  # It is also a way to make sure we got the proper file name for the real test later on.
28490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28491  if test "x$test_shortpath" = x; then
28492    # Short path failed, file does not exist as specified.
28493    # Try adding .exe or .cmd
28494    if test -f "${new_path}.exe"; then
28495       input_to_shortpath="${new_path}.exe"
28496    elif test -f "${new_path}.cmd"; then
28497       input_to_shortpath="${new_path}.cmd"
28498    else
28499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28500$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28503      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28504    fi
28505  else
28506    input_to_shortpath="$new_path"
28507  fi
28508
28509  # Call helper function which possibly converts this using DOS-style short mode.
28510  # If so, the updated path is stored in $new_path.
28511  new_path="$input_to_shortpath"
28512
28513  input_path="$input_to_shortpath"
28514  # Check if we need to convert this using DOS-style short mode. If the path
28515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28516  # take no chances and rewrite it.
28517  # Note: m4 eats our [], so we need to use [ and ] instead.
28518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28519  if test "x$has_forbidden_chars" != x; then
28520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28524      # Going to short mode and back again did indeed matter. Since short mode is
28525      # case insensitive, let's make it lowercase to improve readability.
28526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28527      # Now convert it back to Unix-stile (cygpath)
28528      input_path=`$CYGPATH -u "$shortmode_path"`
28529      new_path="$input_path"
28530    fi
28531  fi
28532
28533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28534  if test "x$test_cygdrive_prefix" = x; then
28535    # As a simple fix, exclude /usr/bin since it's not a real path.
28536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28538      # a path prefixed by /cygdrive for fixpath to work.
28539      new_path="$CYGWIN_ROOT_PATH$input_path"
28540    fi
28541  fi
28542
28543  # remove trailing .exe if any
28544  new_path="${new_path/%.exe/}"
28545
28546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28547
28548  # First separate the path from the arguments. This will split at the first
28549  # space.
28550  complete="$LIPO"
28551  path="${complete%% *}"
28552  tmp="$complete EOL"
28553  arguments="${tmp#* }"
28554
28555  # Input might be given as Windows format, start by converting to
28556  # unix format.
28557  new_path="$path"
28558
28559  windows_path="$new_path"
28560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28561    unix_path=`$CYGPATH -u "$windows_path"`
28562    new_path="$unix_path"
28563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28565    new_path="$unix_path"
28566  fi
28567
28568
28569  # Now try to locate executable using which
28570  new_path=`$WHICH "$new_path" 2> /dev/null`
28571
28572  if test "x$new_path" = x; then
28573    # Oops. Which didn't find the executable.
28574    # The splitting of arguments from the executable at a space might have been incorrect,
28575    # since paths with space are more likely in Windows. Give it another try with the whole
28576    # argument.
28577    path="$complete"
28578    arguments="EOL"
28579    new_path="$path"
28580
28581  windows_path="$new_path"
28582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28583    unix_path=`$CYGPATH -u "$windows_path"`
28584    new_path="$unix_path"
28585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28587    new_path="$unix_path"
28588  fi
28589
28590
28591    new_path=`$WHICH "$new_path" 2> /dev/null`
28592
28593    if test "x$new_path" = x; then
28594      # It's still not found. Now this is an unrecoverable error.
28595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28596$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28597      has_space=`$ECHO "$complete" | $GREP " "`
28598      if test "x$has_space" != x; then
28599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28601      fi
28602      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28603    fi
28604  fi
28605
28606  # Now new_path has a complete unix path to the binary
28607  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28608    # Keep paths in /bin as-is, but remove trailing .exe if any
28609    new_path="${new_path/%.exe/}"
28610    # Do not save /bin paths to all_fixpath_prefixes!
28611  else
28612    # Not in mixed or Windows style, start by that.
28613    new_path=`cmd //c echo $new_path`
28614
28615  input_path="$new_path"
28616  # Check if we need to convert this using DOS-style short mode. If the path
28617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28618  # take no chances and rewrite it.
28619  # Note: m4 eats our [], so we need to use [ and ] instead.
28620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28621  if test "x$has_forbidden_chars" != x; then
28622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28624  fi
28625
28626    # Output is in $new_path
28627
28628  windows_path="$new_path"
28629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28630    unix_path=`$CYGPATH -u "$windows_path"`
28631    new_path="$unix_path"
28632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28634    new_path="$unix_path"
28635  fi
28636
28637    # remove trailing .exe if any
28638    new_path="${new_path/%.exe/}"
28639
28640    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28641    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28642  fi
28643
28644  else
28645    # We're on a posix platform. Hooray! :)
28646    # First separate the path from the arguments. This will split at the first
28647    # space.
28648    complete="$LIPO"
28649    path="${complete%% *}"
28650    tmp="$complete EOL"
28651    arguments="${tmp#* }"
28652
28653    # Cannot rely on the command "which" here since it doesn't always work.
28654    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28655    if test -z "$is_absolute_path"; then
28656      # Path to executable is not absolute. Find it.
28657      IFS_save="$IFS"
28658      IFS=:
28659      for p in $PATH; do
28660        if test -f "$p/$path" && test -x "$p/$path"; then
28661          new_path="$p/$path"
28662          break
28663        fi
28664      done
28665      IFS="$IFS_save"
28666    else
28667      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28668$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28669      new_path="$path"
28670    fi
28671
28672    if test "x$new_path" = x; then
28673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28674$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28675        has_space=`$ECHO "$complete" | $GREP " "`
28676        if test "x$has_space" != x; then
28677          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28678$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28679        fi
28680        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28681      fi
28682  fi
28683
28684      # Now join together the path and the arguments once again
28685      if test "x$arguments" != xEOL; then
28686        new_complete="$new_path ${arguments% *}"
28687      else
28688        new_complete="$new_path"
28689      fi
28690
28691  if test "x$complete" != "x$new_complete"; then
28692      LIPO="$new_complete"
28693      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28694$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28695    fi
28696
28697fi
28698
28699
28700
28701# Restore old path without tools dir
28702PATH="$OLD_PATH"
28703
28704
28705# FIXME: Currently we must test this after paths but before flags. Fix!
28706
28707# And we can test some aspects on the target using configure macros.
28708
28709
28710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28711$as_echo_n "checking for ANSI C header files... " >&6; }
28712if ${ac_cv_header_stdc+:} false; then :
28713  $as_echo_n "(cached) " >&6
28714else
28715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28716/* end confdefs.h.  */
28717#include <stdlib.h>
28718#include <stdarg.h>
28719#include <string.h>
28720#include <float.h>
28721
28722int
28723main ()
28724{
28725
28726  ;
28727  return 0;
28728}
28729_ACEOF
28730if ac_fn_cxx_try_compile "$LINENO"; then :
28731  ac_cv_header_stdc=yes
28732else
28733  ac_cv_header_stdc=no
28734fi
28735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28736
28737if test $ac_cv_header_stdc = yes; then
28738  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28740/* end confdefs.h.  */
28741#include <string.h>
28742
28743_ACEOF
28744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28745  $EGREP "memchr" >/dev/null 2>&1; then :
28746
28747else
28748  ac_cv_header_stdc=no
28749fi
28750rm -f conftest*
28751
28752fi
28753
28754if test $ac_cv_header_stdc = yes; then
28755  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28757/* end confdefs.h.  */
28758#include <stdlib.h>
28759
28760_ACEOF
28761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28762  $EGREP "free" >/dev/null 2>&1; then :
28763
28764else
28765  ac_cv_header_stdc=no
28766fi
28767rm -f conftest*
28768
28769fi
28770
28771if test $ac_cv_header_stdc = yes; then
28772  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28773  if test "$cross_compiling" = yes; then :
28774  :
28775else
28776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28777/* end confdefs.h.  */
28778#include <ctype.h>
28779#include <stdlib.h>
28780#if ((' ' & 0x0FF) == 0x020)
28781# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28782# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28783#else
28784# define ISLOWER(c) \
28785		   (('a' <= (c) && (c) <= 'i') \
28786		     || ('j' <= (c) && (c) <= 'r') \
28787		     || ('s' <= (c) && (c) <= 'z'))
28788# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28789#endif
28790
28791#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28792int
28793main ()
28794{
28795  int i;
28796  for (i = 0; i < 256; i++)
28797    if (XOR (islower (i), ISLOWER (i))
28798	|| toupper (i) != TOUPPER (i))
28799      return 2;
28800  return 0;
28801}
28802_ACEOF
28803if ac_fn_cxx_try_run "$LINENO"; then :
28804
28805else
28806  ac_cv_header_stdc=no
28807fi
28808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28809  conftest.$ac_objext conftest.beam conftest.$ac_ext
28810fi
28811
28812fi
28813fi
28814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28815$as_echo "$ac_cv_header_stdc" >&6; }
28816if test $ac_cv_header_stdc = yes; then
28817
28818$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28819
28820fi
28821
28822# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28823for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28824		  inttypes.h stdint.h unistd.h
28825do :
28826  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28827ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28828"
28829if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28830  cat >>confdefs.h <<_ACEOF
28831#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28832_ACEOF
28833
28834fi
28835
28836done
28837
28838
28839
28840###############################################################################
28841#
28842# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28843# (The JVM can use 32 or 64 bit Java pointers but that decision
28844# is made at runtime.)
28845#
28846
28847if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28848  # Always specify -m flags on Solaris
28849
28850  # keep track of c/cxx flags that we added outselves...
28851  #   to prevent emitting warning...
28852  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28853
28854
28855  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28856  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28857  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28858
28859  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28860  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28861  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28862
28863elif test "x$COMPILE_TYPE" = xreduced; then
28864  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28865    # Specify -m if running reduced on other Posix platforms
28866
28867  # keep track of c/cxx flags that we added outselves...
28868  #   to prevent emitting warning...
28869  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28870
28871
28872  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28873  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28874  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28875
28876  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28877  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28878  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28879
28880  fi
28881fi
28882
28883# Make compilation sanity check
28884for ac_header in stdio.h
28885do :
28886  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28887if test "x$ac_cv_header_stdio_h" = xyes; then :
28888  cat >>confdefs.h <<_ACEOF
28889#define HAVE_STDIO_H 1
28890_ACEOF
28891
28892else
28893
28894  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28895$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28896  if test "x$COMPILE_TYPE" = xreduced; then
28897    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28898$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28899  elif test "x$COMPILE_TYPE" = xcross; then
28900    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28901$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28902  fi
28903  as_fn_error $? "Cannot continue." "$LINENO" 5
28904
28905fi
28906
28907done
28908
28909
28910# The cast to long int works around a bug in the HP C Compiler
28911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28913# This bug is HP SR number 8606223364.
28914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28915$as_echo_n "checking size of int *... " >&6; }
28916if ${ac_cv_sizeof_int_p+:} false; then :
28917  $as_echo_n "(cached) " >&6
28918else
28919  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28920
28921else
28922  if test "$ac_cv_type_int_p" = yes; then
28923     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28925as_fn_error 77 "cannot compute sizeof (int *)
28926See \`config.log' for more details" "$LINENO" 5; }
28927   else
28928     ac_cv_sizeof_int_p=0
28929   fi
28930fi
28931
28932fi
28933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28934$as_echo "$ac_cv_sizeof_int_p" >&6; }
28935
28936
28937
28938cat >>confdefs.h <<_ACEOF
28939#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28940_ACEOF
28941
28942
28943
28944if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28945  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28946  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28947fi
28948
28949if test "x$SIZEOF_INT_P" = x; then
28950    # The test failed, lets stick to the assumed value.
28951    { $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
28952$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28953else
28954    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28955
28956    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28957        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
28958    fi
28959fi
28960
28961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28962$as_echo_n "checking for target address size... " >&6; }
28963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28964$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28965
28966
28967###############################################################################
28968#
28969# Is the target little of big endian?
28970#
28971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28972$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28973if ${ac_cv_c_bigendian+:} false; then :
28974  $as_echo_n "(cached) " >&6
28975else
28976  ac_cv_c_bigendian=unknown
28977    # See if we're dealing with a universal compiler.
28978    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28979/* end confdefs.h.  */
28980#ifndef __APPLE_CC__
28981	       not a universal capable compiler
28982	     #endif
28983	     typedef int dummy;
28984
28985_ACEOF
28986if ac_fn_cxx_try_compile "$LINENO"; then :
28987
28988	# Check for potential -arch flags.  It is not universal unless
28989	# there are at least two -arch flags with different values.
28990	ac_arch=
28991	ac_prev=
28992	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28993	 if test -n "$ac_prev"; then
28994	   case $ac_word in
28995	     i?86 | x86_64 | ppc | ppc64)
28996	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28997		 ac_arch=$ac_word
28998	       else
28999		 ac_cv_c_bigendian=universal
29000		 break
29001	       fi
29002	       ;;
29003	   esac
29004	   ac_prev=
29005	 elif test "x$ac_word" = "x-arch"; then
29006	   ac_prev=arch
29007	 fi
29008       done
29009fi
29010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29011    if test $ac_cv_c_bigendian = unknown; then
29012      # See if sys/param.h defines the BYTE_ORDER macro.
29013      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29014/* end confdefs.h.  */
29015#include <sys/types.h>
29016	     #include <sys/param.h>
29017
29018int
29019main ()
29020{
29021#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29022		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29023		     && LITTLE_ENDIAN)
29024	      bogus endian macros
29025	     #endif
29026
29027  ;
29028  return 0;
29029}
29030_ACEOF
29031if ac_fn_cxx_try_compile "$LINENO"; then :
29032  # It does; now see whether it defined to BIG_ENDIAN or not.
29033	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29034/* end confdefs.h.  */
29035#include <sys/types.h>
29036		#include <sys/param.h>
29037
29038int
29039main ()
29040{
29041#if BYTE_ORDER != BIG_ENDIAN
29042		 not big endian
29043		#endif
29044
29045  ;
29046  return 0;
29047}
29048_ACEOF
29049if ac_fn_cxx_try_compile "$LINENO"; then :
29050  ac_cv_c_bigendian=yes
29051else
29052  ac_cv_c_bigendian=no
29053fi
29054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29055fi
29056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29057    fi
29058    if test $ac_cv_c_bigendian = unknown; then
29059      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29060      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29061/* end confdefs.h.  */
29062#include <limits.h>
29063
29064int
29065main ()
29066{
29067#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29068	      bogus endian macros
29069	     #endif
29070
29071  ;
29072  return 0;
29073}
29074_ACEOF
29075if ac_fn_cxx_try_compile "$LINENO"; then :
29076  # It does; now see whether it defined to _BIG_ENDIAN or not.
29077	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29078/* end confdefs.h.  */
29079#include <limits.h>
29080
29081int
29082main ()
29083{
29084#ifndef _BIG_ENDIAN
29085		 not big endian
29086		#endif
29087
29088  ;
29089  return 0;
29090}
29091_ACEOF
29092if ac_fn_cxx_try_compile "$LINENO"; then :
29093  ac_cv_c_bigendian=yes
29094else
29095  ac_cv_c_bigendian=no
29096fi
29097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29098fi
29099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29100    fi
29101    if test $ac_cv_c_bigendian = unknown; then
29102      # Compile a test program.
29103      if test "$cross_compiling" = yes; then :
29104  # Try to guess by grepping values from an object file.
29105	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29106/* end confdefs.h.  */
29107short int ascii_mm[] =
29108		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29109		short int ascii_ii[] =
29110		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29111		int use_ascii (int i) {
29112		  return ascii_mm[i] + ascii_ii[i];
29113		}
29114		short int ebcdic_ii[] =
29115		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29116		short int ebcdic_mm[] =
29117		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29118		int use_ebcdic (int i) {
29119		  return ebcdic_mm[i] + ebcdic_ii[i];
29120		}
29121		extern int foo;
29122
29123int
29124main ()
29125{
29126return use_ascii (foo) == use_ebcdic (foo);
29127  ;
29128  return 0;
29129}
29130_ACEOF
29131if ac_fn_cxx_try_compile "$LINENO"; then :
29132  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29133	      ac_cv_c_bigendian=yes
29134	    fi
29135	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29136	      if test "$ac_cv_c_bigendian" = unknown; then
29137		ac_cv_c_bigendian=no
29138	      else
29139		# finding both strings is unlikely to happen, but who knows?
29140		ac_cv_c_bigendian=unknown
29141	      fi
29142	    fi
29143fi
29144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29145else
29146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29147/* end confdefs.h.  */
29148$ac_includes_default
29149int
29150main ()
29151{
29152
29153	     /* Are we little or big endian?  From Harbison&Steele.  */
29154	     union
29155	     {
29156	       long int l;
29157	       char c[sizeof (long int)];
29158	     } u;
29159	     u.l = 1;
29160	     return u.c[sizeof (long int) - 1] == 1;
29161
29162  ;
29163  return 0;
29164}
29165_ACEOF
29166if ac_fn_cxx_try_run "$LINENO"; then :
29167  ac_cv_c_bigendian=no
29168else
29169  ac_cv_c_bigendian=yes
29170fi
29171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29172  conftest.$ac_objext conftest.beam conftest.$ac_ext
29173fi
29174
29175    fi
29176fi
29177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29178$as_echo "$ac_cv_c_bigendian" >&6; }
29179 case $ac_cv_c_bigendian in #(
29180   yes)
29181     ENDIAN="big";; #(
29182   no)
29183     ENDIAN="little" ;; #(
29184   universal)
29185     ENDIAN="universal_endianness"
29186     ;; #(
29187   *)
29188     ENDIAN="unknown" ;;
29189 esac
29190
29191
29192if test "x$ENDIAN" = xuniversal_endianness; then
29193    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29194fi
29195if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29196    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
29197fi
29198
29199
29200# Configure flags for the tools
29201
29202
29203###############################################################################
29204#
29205# How to compile shared libraries.
29206#
29207
29208if test "x$GCC" = xyes; then
29209    COMPILER_NAME=gcc
29210    PICFLAG="-fPIC"
29211    LIBRARY_PREFIX=lib
29212    SHARED_LIBRARY='lib$1.so'
29213    STATIC_LIBRARY='lib$1.a'
29214    SHARED_LIBRARY_FLAGS="-shared"
29215    SHARED_LIBRARY_SUFFIX='.so'
29216    STATIC_LIBRARY_SUFFIX='.a'
29217    OBJ_SUFFIX='.o'
29218    EXE_SUFFIX=''
29219    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29220    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29221    C_FLAG_REORDER=''
29222    CXX_FLAG_REORDER=''
29223    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29224    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29225    LD="$CC"
29226    LDEXE="$CC"
29227    LDCXX="$CXX"
29228    LDEXECXX="$CXX"
29229    POST_STRIP_CMD="$STRIP -g"
29230
29231    # Linking is different on MacOSX
29232    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29233        # Might change in the future to clang.
29234        COMPILER_NAME=gcc
29235        SHARED_LIBRARY='lib$1.dylib'
29236        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29237        SHARED_LIBRARY_SUFFIX='.dylib'
29238        EXE_SUFFIX=''
29239        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29240        SET_SHARED_LIBRARY_MAPFILE=''
29241        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29242        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29243        POST_STRIP_CMD="$STRIP -S"
29244    fi
29245else
29246    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29247        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29248        COMPILER_NAME=ossc
29249        PICFLAG="-KPIC"
29250        LIBRARY_PREFIX=lib
29251        SHARED_LIBRARY='lib$1.so'
29252        STATIC_LIBRARY='lib$1.a'
29253        SHARED_LIBRARY_FLAGS="-G"
29254        SHARED_LIBRARY_SUFFIX='.so'
29255        STATIC_LIBRARY_SUFFIX='.a'
29256        OBJ_SUFFIX='.o'
29257        EXE_SUFFIX=''
29258        SET_SHARED_LIBRARY_NAME=''
29259        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29260	C_FLAG_REORDER='-xF'
29261	CXX_FLAG_REORDER='-xF'
29262        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29263        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29264        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29265        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29266        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29267        POST_STRIP_CMD="$STRIP -x"
29268        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29269    fi
29270    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29271        # If it is not gcc, then assume it is the MS Visual Studio compiler
29272        COMPILER_NAME=cl
29273        PICFLAG=""
29274        LIBRARY_PREFIX=
29275        SHARED_LIBRARY='$1.dll'
29276        STATIC_LIBRARY='$1.lib'
29277        SHARED_LIBRARY_FLAGS="-LD"
29278        SHARED_LIBRARY_SUFFIX='.dll'
29279        STATIC_LIBRARY_SUFFIX='.lib'
29280        OBJ_SUFFIX='.obj'
29281        EXE_SUFFIX='.exe'
29282        SET_SHARED_LIBRARY_NAME=''
29283        SET_SHARED_LIBRARY_MAPFILE=''
29284        SET_SHARED_LIBRARY_ORIGIN=''
29285        SET_EXECUTABLE_ORIGIN=''
29286    fi
29287fi
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307# The (cross) compiler is now configured, we can now test capabilities
29308# of the target platform.
29309
29310
29311
29312###############################################################################
29313#
29314# Setup the opt flags for different compilers
29315# and different operating systems.
29316#
29317
29318#
29319# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29320#
29321if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29322    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29323    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29324    CFLAGS="$CFLAGS -mstackrealign"
29325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29326$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29327    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29328/* end confdefs.h.  */
29329int main() { return 0; }
29330_ACEOF
29331if ac_fn_cxx_try_link "$LINENO"; then :
29332
29333		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29334$as_echo "yes" >&6; }
29335
29336else
29337
29338		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29339$as_echo "no" >&6; }
29340	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29341
29342fi
29343rm -f core conftest.err conftest.$ac_objext \
29344    conftest$ac_exeext conftest.$ac_ext
29345fi
29346
29347C_FLAG_DEPS="-MMD -MF"
29348CXX_FLAG_DEPS="-MMD -MF"
29349
29350case $COMPILER_TYPE in
29351  CC )
29352    case $COMPILER_NAME in
29353      gcc )
29354      	case $OPENJDK_TARGET_OS in
29355	  macosx )
29356	    # On MacOSX we optimize for size, something
29357	    # we should do for all platforms?
29358	    C_O_FLAG_HI="-Os"
29359	    C_O_FLAG_NORM="-Os"
29360	    C_O_FLAG_NONE=""
29361	    ;;
29362	  *)
29363	    C_O_FLAG_HI="-O3"
29364	    C_O_FLAG_NORM="-O2"
29365	    C_O_FLAG_NONE="-O0"
29366	    ;;
29367	esac
29368        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29369        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29370        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29371        CFLAGS_DEBUG_SYMBOLS="-g"
29372        CXXFLAGS_DEBUG_SYMBOLS="-g"
29373        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29374            CFLAGS_DEBUG_SYMBOLS="-g1"
29375            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29376        fi
29377        ;;
29378      ossc )
29379        #
29380        # Forte has different names for this with their C++ compiler...
29381        #
29382        C_FLAG_DEPS="-xMMD -xMF"
29383        CXX_FLAG_DEPS="-xMMD -xMF"
29384
29385        # Extra options used with HIGHEST
29386        #
29387        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29388        #          done with care, there are some assumptions below that need to
29389        #          be understood about the use of pointers, and IEEE behavior.
29390        #
29391        # Use non-standard floating point mode (not IEEE 754)
29392        CC_HIGHEST="$CC_HIGHEST -fns"
29393        # Do some simplification of floating point arithmetic (not IEEE 754)
29394        CC_HIGHEST="$CC_HIGHEST -fsimple"
29395        # Use single precision floating point with 'float'
29396        CC_HIGHEST="$CC_HIGHEST -fsingle"
29397        # Assume memory references via basic pointer types do not alias
29398        #   (Source with excessing pointer casting and data access with mixed
29399        #    pointer types are not recommended)
29400        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29401        # Use intrinsic or inline versions for math/std functions
29402        #   (If you expect perfect errno behavior, do not use this)
29403        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29404        # Loop data dependency optimizations (need -xO3 or higher)
29405        CC_HIGHEST="$CC_HIGHEST -xdepend"
29406        # Pointer parameters to functions do not overlap
29407        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29408        #    If you pass in multiple pointers to the same data, do not use this)
29409        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29410        # Inline some library routines
29411        #   (If you expect perfect errno behavior, do not use this)
29412        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29413        # Use optimized math routines
29414        #   (If you expect perfect errno behavior, do not use this)
29415        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29416        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29417
29418        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29419          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29420          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29421        fi
29422
29423        case $OPENJDK_TARGET_CPU_ARCH in
29424          x86)
29425            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29426            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29427            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29428            C_O_FLAG_NONE="-xregs=no%frameptr"
29429            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29430            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29431            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29432            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29433            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29434               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29435               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29436            fi
29437            ;;
29438          sparc)
29439            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29440            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29441            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29442            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29443            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29444            C_O_FLAG_NONE=""
29445            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29446            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29447            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29448            CXX_O_FLAG_NONE=""
29449            ;;
29450        esac
29451
29452    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29453    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29454    esac
29455    ;;
29456  CL )
29457    C_O_FLAG_HIGHEST="-O2"
29458    C_O_FLAG_HI="-O1"
29459    C_O_FLAG_NORM="-O1"
29460    C_O_FLAG_NONE="-Od"
29461    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29462    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29463    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29464    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29465    ;;
29466esac
29467
29468if test -z "$C_O_FLAG_HIGHEST"; then
29469   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29470fi
29471
29472if test -z "$CXX_O_FLAG_HIGHEST"; then
29473   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29474fi
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29490   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29491$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29492fi
29493
29494if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29495   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29496$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29497fi
29498
29499if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29500   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29501$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29502fi
29503
29504
29505# Check whether --with-extra-cflags was given.
29506if test "${with_extra_cflags+set}" = set; then :
29507  withval=$with_extra_cflags;
29508fi
29509
29510
29511
29512# Check whether --with-extra-cxxflags was given.
29513if test "${with_extra_cxxflags+set}" = set; then :
29514  withval=$with_extra_cxxflags;
29515fi
29516
29517
29518
29519# Check whether --with-extra-ldflags was given.
29520if test "${with_extra_ldflags+set}" = set; then :
29521  withval=$with_extra_ldflags;
29522fi
29523
29524
29525CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29526CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29527LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29528
29529# Hotspot needs these set in their legacy form
29530LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29531LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29532LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29533
29534
29535
29536
29537
29538###############################################################################
29539#
29540# Now setup the CFLAGS and LDFLAGS for the JDK build.
29541# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29542#
29543case $COMPILER_NAME in
29544      gcc )
29545      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29546                          -pipe \
29547                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29548	  case $OPENJDK_TARGET_CPU_ARCH in
29549	  arm )
29550            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29551	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29552	  ;;
29553	  ppc )
29554            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29555	  ;;
29556	  * )
29557	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29558	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29559          ;;
29560	  esac
29561          ;;
29562      ossc )
29563          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29564          case $OPENJDK_TARGET_CPU_ARCH in
29565          x86 )
29566            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29567       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29568          ;;
29569          esac
29570
29571      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29572      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29573
29574          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29575          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29576          ;;
29577      cl )
29578          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29579               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29580	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29581	       -DWIN32 -DIAL"
29582          case $OPENJDK_TARGET_CPU in
29583              x86 )
29584                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29585                  ;;
29586              x86_64 )
29587                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29588                  ;;
29589          esac
29590          ;;
29591esac
29592
29593###############################################################################
29594
29595# Adjust flags according to debug level.
29596case $DEBUG_LEVEL in
29597      fastdebug )
29598              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29599              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29600	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29601	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29602	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29603	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29604              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29605              ;;
29606      slowdebug )
29607              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29608              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29609	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29610	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29611	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29612	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29613              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29614              ;;
29615esac
29616
29617CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29618
29619# The package path is used only on macosx?
29620PACKAGE_PATH=/opt/local
29621
29622
29623if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29624    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29625    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29626    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29627    #   Note: -Dmacro         is the same as    #define macro 1
29628    #         -Dmacro=	    is the same as    #define macro
29629    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29630        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29631    else
29632        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29633    fi
29634else
29635    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29636fi
29637if test "x$OPENJDK_TARGET_OS" = xlinux; then
29638    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29639fi
29640if test "x$OPENJDK_TARGET_OS" = xwindows; then
29641    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29642fi
29643if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29644    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29645fi
29646if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29647    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29648    # Setting these parameters makes it an error to link to macosx APIs that are
29649    # newer than the given OS version and makes the linked binaries compatible even
29650    # if built on a newer version of the OS.
29651    # The expected format is X.Y.Z
29652    MACOSX_VERSION_MIN=10.7.0
29653
29654    # The macro takes the version with no dots, ex: 1070
29655    # Let the flags variables get resolved in make for easier override on make
29656    # command line.
29657    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29658    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29659fi
29660if test "x$OPENJDK_TARGET_OS" = xbsd; then
29661    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29662fi
29663if test "x$DEBUG_LEVEL" = xrelease; then
29664    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29665    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29666        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29667    fi
29668else
29669    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29670fi
29671
29672CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29673CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29674
29675CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29676        -I${JDK_OUTPUTDIR}/include \
29677        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29678        -I${JDK_TOPDIR}/src/share/javavm/export \
29679        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29680        -I${JDK_TOPDIR}/src/share/native/common \
29681        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29682
29683# The shared libraries are compiled using the picflag.
29684CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29685CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29686
29687# Executable flags
29688CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29689CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29690
29691# Now this is odd. The JDK native libraries have to link against libjvm.so
29692# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29693# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29694# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29695# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29696# libraries will link to whatever is in memory. Yuck.
29697#
29698# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29699if test "x$COMPILER_NAME" = xcl; then
29700    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29701    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29702        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29703    fi
29704    # TODO: make -debug optional "--disable-full-debug-symbols"
29705    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29706    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29707    LDFLAGS_JDKLIB_SUFFIX=""
29708    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29709        LDFLAGS_STACK_SIZE=1048576
29710    else
29711        LDFLAGS_STACK_SIZE=327680
29712    fi
29713    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29714else
29715    if test "x$COMPILER_NAME" = xgcc; then
29716        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29717        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29718        if test -n "$HAS_GNU_HASH"; then
29719            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29720        fi
29721        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29722          # And since we now know that the linker is gnu, then add -z defs, to forbid
29723          # undefined symbols in object files.
29724          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29725          if test "x$DEBUG_LEVEL" = "xrelease"; then
29726              # When building release libraries, tell the linker optimize them.
29727              # Should this be supplied to the OSS linker as well?
29728              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29729          fi
29730        fi
29731    fi
29732    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29733                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29734
29735    # On some platforms (mac) the linker warns about non existing -L dirs.
29736    # Add server first if available. Linking aginst client does not always produce the same results.
29737    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29738    # Default to server for other variants.
29739    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29740        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29741    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29742        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29743    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29744        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29745    else
29746        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29747    fi
29748
29749    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29750    if test "x$COMPILER_NAME" = xossc; then
29751        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29752    fi
29753
29754    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29755    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29756        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29757    fi
29758fi
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774  # Some Zero and Shark settings.
29775  # ZERO_ARCHFLAG tells the compiler which mode to build for
29776  case "${OPENJDK_TARGET_CPU}" in
29777    s390)
29778      ZERO_ARCHFLAG="-m31"
29779      ;;
29780    *)
29781      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29782  esac
29783
29784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29785$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29786  supports=yes
29787
29788  saved_cflags="$CFLAGS"
29789  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29790  ac_ext=c
29791ac_cpp='$CPP $CPPFLAGS'
29792ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29793ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29794ac_compiler_gnu=$ac_cv_c_compiler_gnu
29795
29796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797/* end confdefs.h.  */
29798
29799    int i;
29800
29801_ACEOF
29802if ac_fn_c_try_compile "$LINENO"; then :
29803
29804else
29805  supports=no
29806fi
29807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29808  ac_ext=cpp
29809ac_cpp='$CXXCPP $CPPFLAGS'
29810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29813
29814  CFLAGS="$saved_cflags"
29815
29816  saved_cxxflags="$CXXFLAGS"
29817  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29818  ac_ext=cpp
29819ac_cpp='$CXXCPP $CPPFLAGS'
29820ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29821ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29822ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29823
29824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29825/* end confdefs.h.  */
29826
29827    int i;
29828
29829_ACEOF
29830if ac_fn_cxx_try_compile "$LINENO"; then :
29831
29832else
29833  supports=no
29834fi
29835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29836  ac_ext=cpp
29837ac_cpp='$CXXCPP $CPPFLAGS'
29838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29841
29842  CXXFLAGS="$saved_cxxflags"
29843
29844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29845$as_echo "$supports" >&6; }
29846  if test "x$supports" = "xyes" ; then
29847    :
29848  else
29849    ZERO_ARCHFLAG=""
29850  fi
29851
29852
29853
29854  # Check that the compiler supports -mX flags
29855  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29856
29857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29858$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29859  supports=yes
29860
29861  saved_cflags="$CFLAGS"
29862  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29863  ac_ext=c
29864ac_cpp='$CPP $CPPFLAGS'
29865ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29866ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29867ac_compiler_gnu=$ac_cv_c_compiler_gnu
29868
29869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29870/* end confdefs.h.  */
29871
29872    int i;
29873
29874_ACEOF
29875if ac_fn_c_try_compile "$LINENO"; then :
29876
29877else
29878  supports=no
29879fi
29880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29881  ac_ext=cpp
29882ac_cpp='$CXXCPP $CPPFLAGS'
29883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29886
29887  CFLAGS="$saved_cflags"
29888
29889  saved_cxxflags="$CXXFLAGS"
29890  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29891  ac_ext=cpp
29892ac_cpp='$CXXCPP $CPPFLAGS'
29893ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29894ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29895ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29896
29897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29898/* end confdefs.h.  */
29899
29900    int i;
29901
29902_ACEOF
29903if ac_fn_cxx_try_compile "$LINENO"; then :
29904
29905else
29906  supports=no
29907fi
29908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29909  ac_ext=cpp
29910ac_cpp='$CXXCPP $CPPFLAGS'
29911ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29912ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29913ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29914
29915  CXXFLAGS="$saved_cxxflags"
29916
29917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29918$as_echo "$supports" >&6; }
29919  if test "x$supports" = "xyes" ; then
29920    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29921  else
29922    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29923  fi
29924
29925
29926
29927
29928# Setup debug symbols (need objcopy from the toolchain for that)
29929
29930#
29931# ENABLE_DEBUG_SYMBOLS
29932# This must be done after the toolchain is setup, since we're looking at objcopy.
29933#
29934# Check whether --enable-debug-symbols was given.
29935if test "${enable_debug_symbols+set}" = set; then :
29936  enableval=$enable_debug_symbols;
29937fi
29938
29939
29940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29941$as_echo_n "checking if we should generate debug symbols... " >&6; }
29942
29943if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29944   # explicit enabling of enable-debug-symbols and can't find objcopy
29945   #   this is an error
29946   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29947fi
29948
29949if test "x$enable_debug_symbols" = "xyes"; then
29950  ENABLE_DEBUG_SYMBOLS=true
29951elif test "x$enable_debug_symbols" = "xno"; then
29952  ENABLE_DEBUG_SYMBOLS=false
29953else
29954  # default on macosx is false
29955  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29956    ENABLE_DEBUG_SYMBOLS=false
29957  # Default is on if objcopy is found, otherwise off
29958  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29959    ENABLE_DEBUG_SYMBOLS=true
29960  else
29961    ENABLE_DEBUG_SYMBOLS=false
29962  fi
29963fi
29964
29965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29966$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29967
29968#
29969# ZIP_DEBUGINFO_FILES
29970#
29971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29972$as_echo_n "checking if we should zip debug-info files... " >&6; }
29973# Check whether --enable-zip-debug-info was given.
29974if test "${enable_zip_debug_info+set}" = set; then :
29975  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29976else
29977  enable_zip_debug_info="yes"
29978fi
29979
29980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29981$as_echo "${enable_zip_debug_info}" >&6; }
29982
29983if test "x${enable_zip_debug_info}" = "xno"; then
29984   ZIP_DEBUGINFO_FILES=false
29985else
29986   ZIP_DEBUGINFO_FILES=true
29987fi
29988
29989
29990
29991
29992
29993
29994
29995###############################################################################
29996#
29997# Check dependencies for external and internal libraries.
29998#
29999###############################################################################
30000
30001
30002
30003###############################################################################
30004#
30005# OS specific settings that we never will need to probe.
30006#
30007if test "x$OPENJDK_TARGET_OS" = xlinux; then
30008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30009$as_echo_n "checking what is not needed on Linux?... " >&6; }
30010    PULSE_NOT_NEEDED=yes
30011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30012$as_echo "pulse" >&6; }
30013fi
30014
30015if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30017$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30018    ALSA_NOT_NEEDED=yes
30019    PULSE_NOT_NEEDED=yes
30020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30021$as_echo "alsa pulse" >&6; }
30022fi
30023
30024if test "x$OPENJDK_TARGET_OS" = xwindows; then
30025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30026$as_echo_n "checking what is not needed on Windows?... " >&6; }
30027    CUPS_NOT_NEEDED=yes
30028    ALSA_NOT_NEEDED=yes
30029    PULSE_NOT_NEEDED=yes
30030    X11_NOT_NEEDED=yes
30031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30032$as_echo "alsa cups pulse x11" >&6; }
30033fi
30034
30035if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30037$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30038    ALSA_NOT_NEEDED=yes
30039    PULSE_NOT_NEEDED=yes
30040    X11_NOT_NEEDED=yes
30041    FREETYPE2_NOT_NEEDED=yes
30042    # If the java runtime framework is disabled, then we need X11.
30043    # This will be adjusted below.
30044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30045$as_echo "alsa pulse x11" >&6; }
30046fi
30047
30048if test "x$OPENJDK_TARGET_OS" = xbsd; then
30049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30050$as_echo_n "checking what is not needed on bsd?... " >&6; }
30051    ALSA_NOT_NEEDED=yes
30052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30053$as_echo "alsa" >&6; }
30054fi
30055
30056if test "x$OPENJDK" = "xfalse"; then
30057    FREETYPE2_NOT_NEEDED=yes
30058fi
30059
30060if test "x$SUPPORT_HEADFUL" = xno; then
30061    X11_NOT_NEEDED=yes
30062fi
30063
30064###############################################################################
30065#
30066# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30067# that uses this API.
30068#
30069# Check whether --enable-macosx-runtime-support was given.
30070if test "${enable_macosx_runtime_support+set}" = set; then :
30071  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30072else
30073  MACOSX_RUNTIME_SUPPORT="no"
30074fi
30075
30076
30077USE_MACOSX_RUNTIME_SUPPORT=no
30078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30079$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30080if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30081    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30082        MACOSX_RUNTIME_SUPPORT=yes
30083        USE_MACOSX_RUNTIME_SUPPORT=yes
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30085$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30086    else
30087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30088$as_echo "yes, but explicitly disabled." >&6; }
30089    fi
30090else
30091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30092$as_echo "no" >&6; }
30093fi
30094
30095if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30097$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30098    X11_NOT_NEEDED=
30099    FREETYPE2_NOT_NEEDED=
30100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30101$as_echo "alsa pulse" >&6; }
30102fi
30103
30104
30105
30106###############################################################################
30107#
30108# Check for X Windows
30109#
30110
30111# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30112# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30113# --x-libraries for the sysroot, if that seems to be correct.
30114if test "x$SYS_ROOT" != "x/"; then
30115  if test "x$x_includes" = xNONE; then
30116    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30117      x_includes="$SYS_ROOT/usr/X11R6/include"
30118    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30119      x_includes="$SYS_ROOT/usr/include"
30120    fi
30121  fi
30122  if test "x$x_libraries" = xNONE; then
30123    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30124      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30125    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30126      x_libraries="$SYS_ROOT/usr/lib64"
30127    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30128      x_libraries="$SYS_ROOT/usr/lib"
30129    fi
30130  fi
30131fi
30132
30133# Now let autoconf do it's magic
30134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30135$as_echo_n "checking for X... " >&6; }
30136
30137
30138# Check whether --with-x was given.
30139if test "${with_x+set}" = set; then :
30140  withval=$with_x;
30141fi
30142
30143# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30144if test "x$with_x" = xno; then
30145  # The user explicitly disabled X.
30146  have_x=disabled
30147else
30148  case $x_includes,$x_libraries in #(
30149    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30150    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30151  $as_echo_n "(cached) " >&6
30152else
30153  # One or both of the vars are not set, and there is no cached value.
30154ac_x_includes=no ac_x_libraries=no
30155rm -f -r conftest.dir
30156if mkdir conftest.dir; then
30157  cd conftest.dir
30158  cat >Imakefile <<'_ACEOF'
30159incroot:
30160	@echo incroot='${INCROOT}'
30161usrlibdir:
30162	@echo usrlibdir='${USRLIBDIR}'
30163libdir:
30164	@echo libdir='${LIBDIR}'
30165_ACEOF
30166  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30167    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30168    for ac_var in incroot usrlibdir libdir; do
30169      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30170    done
30171    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30172    for ac_extension in a so sl dylib la dll; do
30173      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30174	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30175	ac_im_usrlibdir=$ac_im_libdir; break
30176      fi
30177    done
30178    # Screen out bogus values from the imake configuration.  They are
30179    # bogus both because they are the default anyway, and because
30180    # using them would break gcc on systems where it needs fixed includes.
30181    case $ac_im_incroot in
30182	/usr/include) ac_x_includes= ;;
30183	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30184    esac
30185    case $ac_im_usrlibdir in
30186	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30187	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30188    esac
30189  fi
30190  cd ..
30191  rm -f -r conftest.dir
30192fi
30193
30194# Standard set of common directories for X headers.
30195# Check X11 before X11Rn because it is often a symlink to the current release.
30196ac_x_header_dirs='
30197/usr/X11/include
30198/usr/X11R7/include
30199/usr/X11R6/include
30200/usr/X11R5/include
30201/usr/X11R4/include
30202
30203/usr/include/X11
30204/usr/include/X11R7
30205/usr/include/X11R6
30206/usr/include/X11R5
30207/usr/include/X11R4
30208
30209/usr/local/X11/include
30210/usr/local/X11R7/include
30211/usr/local/X11R6/include
30212/usr/local/X11R5/include
30213/usr/local/X11R4/include
30214
30215/usr/local/include/X11
30216/usr/local/include/X11R7
30217/usr/local/include/X11R6
30218/usr/local/include/X11R5
30219/usr/local/include/X11R4
30220
30221/usr/X386/include
30222/usr/x386/include
30223/usr/XFree86/include/X11
30224
30225/usr/include
30226/usr/local/include
30227/usr/unsupported/include
30228/usr/athena/include
30229/usr/local/x11r5/include
30230/usr/lpp/Xamples/include
30231
30232/usr/openwin/include
30233/usr/openwin/share/include'
30234
30235if test "$ac_x_includes" = no; then
30236  # Guess where to find include files, by looking for Xlib.h.
30237  # First, try using that file with no special directory specified.
30238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30239/* end confdefs.h.  */
30240#include <X11/Xlib.h>
30241_ACEOF
30242if ac_fn_cxx_try_cpp "$LINENO"; then :
30243  # We can compile using X headers with no special include directory.
30244ac_x_includes=
30245else
30246  for ac_dir in $ac_x_header_dirs; do
30247  if test -r "$ac_dir/X11/Xlib.h"; then
30248    ac_x_includes=$ac_dir
30249    break
30250  fi
30251done
30252fi
30253rm -f conftest.err conftest.i conftest.$ac_ext
30254fi # $ac_x_includes = no
30255
30256if test "$ac_x_libraries" = no; then
30257  # Check for the libraries.
30258  # See if we find them without any special options.
30259  # Don't add to $LIBS permanently.
30260  ac_save_LIBS=$LIBS
30261  LIBS="-lX11 $LIBS"
30262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30263/* end confdefs.h.  */
30264#include <X11/Xlib.h>
30265int
30266main ()
30267{
30268XrmInitialize ()
30269  ;
30270  return 0;
30271}
30272_ACEOF
30273if ac_fn_cxx_try_link "$LINENO"; then :
30274  LIBS=$ac_save_LIBS
30275# We can link X programs with no special library path.
30276ac_x_libraries=
30277else
30278  LIBS=$ac_save_LIBS
30279for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30280do
30281  # Don't even attempt the hair of trying to link an X program!
30282  for ac_extension in a so sl dylib la dll; do
30283    if test -r "$ac_dir/libX11.$ac_extension"; then
30284      ac_x_libraries=$ac_dir
30285      break 2
30286    fi
30287  done
30288done
30289fi
30290rm -f core conftest.err conftest.$ac_objext \
30291    conftest$ac_exeext conftest.$ac_ext
30292fi # $ac_x_libraries = no
30293
30294case $ac_x_includes,$ac_x_libraries in #(
30295  no,* | *,no | *\'*)
30296    # Didn't find X, or a directory has "'" in its name.
30297    ac_cv_have_x="have_x=no";; #(
30298  *)
30299    # Record where we found X for the cache.
30300    ac_cv_have_x="have_x=yes\
30301	ac_x_includes='$ac_x_includes'\
30302	ac_x_libraries='$ac_x_libraries'"
30303esac
30304fi
30305;; #(
30306    *) have_x=yes;;
30307  esac
30308  eval "$ac_cv_have_x"
30309fi # $with_x != no
30310
30311if test "$have_x" != yes; then
30312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30313$as_echo "$have_x" >&6; }
30314  no_x=yes
30315else
30316  # If each of the values was on the command line, it overrides each guess.
30317  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30318  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30319  # Update the cache value to reflect the command line values.
30320  ac_cv_have_x="have_x=yes\
30321	ac_x_includes='$x_includes'\
30322	ac_x_libraries='$x_libraries'"
30323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30324$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30325fi
30326
30327if test "$no_x" = yes; then
30328  # Not all programs may use this symbol, but it does not hurt to define it.
30329
30330$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30331
30332  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30333else
30334  if test -n "$x_includes"; then
30335    X_CFLAGS="$X_CFLAGS -I$x_includes"
30336  fi
30337
30338  # It would also be nice to do this for all -L options, not just this one.
30339  if test -n "$x_libraries"; then
30340    X_LIBS="$X_LIBS -L$x_libraries"
30341    # For Solaris; some versions of Sun CC require a space after -R and
30342    # others require no space.  Words are not sufficient . . . .
30343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30344$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30345    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30346    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30347    ac_cxx_werror_flag=yes
30348    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30349/* end confdefs.h.  */
30350
30351int
30352main ()
30353{
30354
30355  ;
30356  return 0;
30357}
30358_ACEOF
30359if ac_fn_cxx_try_link "$LINENO"; then :
30360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30361$as_echo "no" >&6; }
30362       X_LIBS="$X_LIBS -R$x_libraries"
30363else
30364  LIBS="$ac_xsave_LIBS -R $x_libraries"
30365       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366/* end confdefs.h.  */
30367
30368int
30369main ()
30370{
30371
30372  ;
30373  return 0;
30374}
30375_ACEOF
30376if ac_fn_cxx_try_link "$LINENO"; then :
30377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30378$as_echo "yes" >&6; }
30379	  X_LIBS="$X_LIBS -R $x_libraries"
30380else
30381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30382$as_echo "neither works" >&6; }
30383fi
30384rm -f core conftest.err conftest.$ac_objext \
30385    conftest$ac_exeext conftest.$ac_ext
30386fi
30387rm -f core conftest.err conftest.$ac_objext \
30388    conftest$ac_exeext conftest.$ac_ext
30389    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30390    LIBS=$ac_xsave_LIBS
30391  fi
30392
30393  # Check for system-dependent libraries X programs must link with.
30394  # Do this before checking for the system-independent R6 libraries
30395  # (-lICE), since we may need -lsocket or whatever for X linking.
30396
30397  if test "$ISC" = yes; then
30398    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30399  else
30400    # Martyn Johnson says this is needed for Ultrix, if the X
30401    # libraries were built with DECnet support.  And Karl Berry says
30402    # the Alpha needs dnet_stub (dnet does not exist).
30403    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30404    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30405/* end confdefs.h.  */
30406
30407/* Override any GCC internal prototype to avoid an error.
30408   Use char because int might match the return type of a GCC
30409   builtin and then its argument prototype would still apply.  */
30410#ifdef __cplusplus
30411extern "C"
30412#endif
30413char XOpenDisplay ();
30414int
30415main ()
30416{
30417return XOpenDisplay ();
30418  ;
30419  return 0;
30420}
30421_ACEOF
30422if ac_fn_cxx_try_link "$LINENO"; then :
30423
30424else
30425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30426$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30427if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30428  $as_echo_n "(cached) " >&6
30429else
30430  ac_check_lib_save_LIBS=$LIBS
30431LIBS="-ldnet  $LIBS"
30432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30433/* end confdefs.h.  */
30434
30435/* Override any GCC internal prototype to avoid an error.
30436   Use char because int might match the return type of a GCC
30437   builtin and then its argument prototype would still apply.  */
30438#ifdef __cplusplus
30439extern "C"
30440#endif
30441char dnet_ntoa ();
30442int
30443main ()
30444{
30445return dnet_ntoa ();
30446  ;
30447  return 0;
30448}
30449_ACEOF
30450if ac_fn_cxx_try_link "$LINENO"; then :
30451  ac_cv_lib_dnet_dnet_ntoa=yes
30452else
30453  ac_cv_lib_dnet_dnet_ntoa=no
30454fi
30455rm -f core conftest.err conftest.$ac_objext \
30456    conftest$ac_exeext conftest.$ac_ext
30457LIBS=$ac_check_lib_save_LIBS
30458fi
30459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30460$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30461if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30462  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30463fi
30464
30465    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30467$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30468if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30469  $as_echo_n "(cached) " >&6
30470else
30471  ac_check_lib_save_LIBS=$LIBS
30472LIBS="-ldnet_stub  $LIBS"
30473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30474/* end confdefs.h.  */
30475
30476/* Override any GCC internal prototype to avoid an error.
30477   Use char because int might match the return type of a GCC
30478   builtin and then its argument prototype would still apply.  */
30479#ifdef __cplusplus
30480extern "C"
30481#endif
30482char dnet_ntoa ();
30483int
30484main ()
30485{
30486return dnet_ntoa ();
30487  ;
30488  return 0;
30489}
30490_ACEOF
30491if ac_fn_cxx_try_link "$LINENO"; then :
30492  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30493else
30494  ac_cv_lib_dnet_stub_dnet_ntoa=no
30495fi
30496rm -f core conftest.err conftest.$ac_objext \
30497    conftest$ac_exeext conftest.$ac_ext
30498LIBS=$ac_check_lib_save_LIBS
30499fi
30500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30501$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30502if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30503  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30504fi
30505
30506    fi
30507fi
30508rm -f core conftest.err conftest.$ac_objext \
30509    conftest$ac_exeext conftest.$ac_ext
30510    LIBS="$ac_xsave_LIBS"
30511
30512    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30513    # to get the SysV transport functions.
30514    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30515    # needs -lnsl.
30516    # The nsl library prevents programs from opening the X display
30517    # on Irix 5.2, according to T.E. Dickey.
30518    # The functions gethostbyname, getservbyname, and inet_addr are
30519    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30520    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30521if test "x$ac_cv_func_gethostbyname" = xyes; then :
30522
30523fi
30524
30525    if test $ac_cv_func_gethostbyname = no; then
30526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30527$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30528if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30529  $as_echo_n "(cached) " >&6
30530else
30531  ac_check_lib_save_LIBS=$LIBS
30532LIBS="-lnsl  $LIBS"
30533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30534/* end confdefs.h.  */
30535
30536/* Override any GCC internal prototype to avoid an error.
30537   Use char because int might match the return type of a GCC
30538   builtin and then its argument prototype would still apply.  */
30539#ifdef __cplusplus
30540extern "C"
30541#endif
30542char gethostbyname ();
30543int
30544main ()
30545{
30546return gethostbyname ();
30547  ;
30548  return 0;
30549}
30550_ACEOF
30551if ac_fn_cxx_try_link "$LINENO"; then :
30552  ac_cv_lib_nsl_gethostbyname=yes
30553else
30554  ac_cv_lib_nsl_gethostbyname=no
30555fi
30556rm -f core conftest.err conftest.$ac_objext \
30557    conftest$ac_exeext conftest.$ac_ext
30558LIBS=$ac_check_lib_save_LIBS
30559fi
30560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30561$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30562if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30563  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30564fi
30565
30566      if test $ac_cv_lib_nsl_gethostbyname = no; then
30567	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30568$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30569if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30570  $as_echo_n "(cached) " >&6
30571else
30572  ac_check_lib_save_LIBS=$LIBS
30573LIBS="-lbsd  $LIBS"
30574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30575/* end confdefs.h.  */
30576
30577/* Override any GCC internal prototype to avoid an error.
30578   Use char because int might match the return type of a GCC
30579   builtin and then its argument prototype would still apply.  */
30580#ifdef __cplusplus
30581extern "C"
30582#endif
30583char gethostbyname ();
30584int
30585main ()
30586{
30587return gethostbyname ();
30588  ;
30589  return 0;
30590}
30591_ACEOF
30592if ac_fn_cxx_try_link "$LINENO"; then :
30593  ac_cv_lib_bsd_gethostbyname=yes
30594else
30595  ac_cv_lib_bsd_gethostbyname=no
30596fi
30597rm -f core conftest.err conftest.$ac_objext \
30598    conftest$ac_exeext conftest.$ac_ext
30599LIBS=$ac_check_lib_save_LIBS
30600fi
30601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30602$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30603if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30604  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30605fi
30606
30607      fi
30608    fi
30609
30610    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30611    # socket/setsockopt and other routines are undefined under SCO ODT
30612    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30613    # on later versions), says Simon Leinen: it contains gethostby*
30614    # variants that don't use the name server (or something).  -lsocket
30615    # must be given before -lnsl if both are needed.  We assume that
30616    # if connect needs -lnsl, so does gethostbyname.
30617    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30618if test "x$ac_cv_func_connect" = xyes; then :
30619
30620fi
30621
30622    if test $ac_cv_func_connect = no; then
30623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30624$as_echo_n "checking for connect in -lsocket... " >&6; }
30625if ${ac_cv_lib_socket_connect+:} false; then :
30626  $as_echo_n "(cached) " >&6
30627else
30628  ac_check_lib_save_LIBS=$LIBS
30629LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30631/* end confdefs.h.  */
30632
30633/* Override any GCC internal prototype to avoid an error.
30634   Use char because int might match the return type of a GCC
30635   builtin and then its argument prototype would still apply.  */
30636#ifdef __cplusplus
30637extern "C"
30638#endif
30639char connect ();
30640int
30641main ()
30642{
30643return connect ();
30644  ;
30645  return 0;
30646}
30647_ACEOF
30648if ac_fn_cxx_try_link "$LINENO"; then :
30649  ac_cv_lib_socket_connect=yes
30650else
30651  ac_cv_lib_socket_connect=no
30652fi
30653rm -f core conftest.err conftest.$ac_objext \
30654    conftest$ac_exeext conftest.$ac_ext
30655LIBS=$ac_check_lib_save_LIBS
30656fi
30657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30658$as_echo "$ac_cv_lib_socket_connect" >&6; }
30659if test "x$ac_cv_lib_socket_connect" = xyes; then :
30660  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30661fi
30662
30663    fi
30664
30665    # Guillermo Gomez says -lposix is necessary on A/UX.
30666    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30667if test "x$ac_cv_func_remove" = xyes; then :
30668
30669fi
30670
30671    if test $ac_cv_func_remove = no; then
30672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30673$as_echo_n "checking for remove in -lposix... " >&6; }
30674if ${ac_cv_lib_posix_remove+:} false; then :
30675  $as_echo_n "(cached) " >&6
30676else
30677  ac_check_lib_save_LIBS=$LIBS
30678LIBS="-lposix  $LIBS"
30679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30680/* end confdefs.h.  */
30681
30682/* Override any GCC internal prototype to avoid an error.
30683   Use char because int might match the return type of a GCC
30684   builtin and then its argument prototype would still apply.  */
30685#ifdef __cplusplus
30686extern "C"
30687#endif
30688char remove ();
30689int
30690main ()
30691{
30692return remove ();
30693  ;
30694  return 0;
30695}
30696_ACEOF
30697if ac_fn_cxx_try_link "$LINENO"; then :
30698  ac_cv_lib_posix_remove=yes
30699else
30700  ac_cv_lib_posix_remove=no
30701fi
30702rm -f core conftest.err conftest.$ac_objext \
30703    conftest$ac_exeext conftest.$ac_ext
30704LIBS=$ac_check_lib_save_LIBS
30705fi
30706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30707$as_echo "$ac_cv_lib_posix_remove" >&6; }
30708if test "x$ac_cv_lib_posix_remove" = xyes; then :
30709  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30710fi
30711
30712    fi
30713
30714    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30715    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30716if test "x$ac_cv_func_shmat" = xyes; then :
30717
30718fi
30719
30720    if test $ac_cv_func_shmat = no; then
30721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30722$as_echo_n "checking for shmat in -lipc... " >&6; }
30723if ${ac_cv_lib_ipc_shmat+:} false; then :
30724  $as_echo_n "(cached) " >&6
30725else
30726  ac_check_lib_save_LIBS=$LIBS
30727LIBS="-lipc  $LIBS"
30728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30729/* end confdefs.h.  */
30730
30731/* Override any GCC internal prototype to avoid an error.
30732   Use char because int might match the return type of a GCC
30733   builtin and then its argument prototype would still apply.  */
30734#ifdef __cplusplus
30735extern "C"
30736#endif
30737char shmat ();
30738int
30739main ()
30740{
30741return shmat ();
30742  ;
30743  return 0;
30744}
30745_ACEOF
30746if ac_fn_cxx_try_link "$LINENO"; then :
30747  ac_cv_lib_ipc_shmat=yes
30748else
30749  ac_cv_lib_ipc_shmat=no
30750fi
30751rm -f core conftest.err conftest.$ac_objext \
30752    conftest$ac_exeext conftest.$ac_ext
30753LIBS=$ac_check_lib_save_LIBS
30754fi
30755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30756$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30757if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30758  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30759fi
30760
30761    fi
30762  fi
30763
30764  # Check for libraries that X11R6 Xt/Xaw programs need.
30765  ac_save_LDFLAGS=$LDFLAGS
30766  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30767  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30768  # check for ICE first), but we must link in the order -lSM -lICE or
30769  # we get undefined symbols.  So assume we have SM if we have ICE.
30770  # These have to be linked with before -lX11, unlike the other
30771  # libraries we check for below, so use a different variable.
30772  # John Interrante, Karl Berry
30773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30774$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30775if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30776  $as_echo_n "(cached) " >&6
30777else
30778  ac_check_lib_save_LIBS=$LIBS
30779LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30781/* end confdefs.h.  */
30782
30783/* Override any GCC internal prototype to avoid an error.
30784   Use char because int might match the return type of a GCC
30785   builtin and then its argument prototype would still apply.  */
30786#ifdef __cplusplus
30787extern "C"
30788#endif
30789char IceConnectionNumber ();
30790int
30791main ()
30792{
30793return IceConnectionNumber ();
30794  ;
30795  return 0;
30796}
30797_ACEOF
30798if ac_fn_cxx_try_link "$LINENO"; then :
30799  ac_cv_lib_ICE_IceConnectionNumber=yes
30800else
30801  ac_cv_lib_ICE_IceConnectionNumber=no
30802fi
30803rm -f core conftest.err conftest.$ac_objext \
30804    conftest$ac_exeext conftest.$ac_ext
30805LIBS=$ac_check_lib_save_LIBS
30806fi
30807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30808$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30809if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30810  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30811fi
30812
30813  LDFLAGS=$ac_save_LDFLAGS
30814
30815fi
30816
30817
30818# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30819# this doesn't make sense so we remove it.
30820if test "x$COMPILE_TYPE" = xcross; then
30821  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30822fi
30823
30824if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30825
30826    # Print a helpful message on how to acquire the necessary build dependency.
30827    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30828    MISSING_DEPENDENCY=x11
30829    PKGHANDLER_COMMAND=
30830
30831    case $PKGHANDLER in
30832	apt-get)
30833                apt_help     $MISSING_DEPENDENCY ;;
30834    yum)
30835                yum_help     $MISSING_DEPENDENCY ;;
30836	port)
30837                port_help    $MISSING_DEPENDENCY ;;
30838	pkgutil)
30839                pkgutil_help $MISSING_DEPENDENCY ;;
30840	pkgadd)
30841                pkgadd_help  $MISSING_DEPENDENCY ;;
30842    * )
30843      break ;;
30844    esac
30845
30846    if test "x$PKGHANDLER_COMMAND" != x; then
30847        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30848    fi
30849
30850    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30851fi
30852
30853# Some of the old makefiles require a setting of OPENWIN_HOME
30854# Since the X11R6 directory has disappeared on later Linuxes,
30855# we need to probe for it.
30856if test "x$OPENJDK_TARGET_OS" = xlinux; then
30857    if test -d "$SYS_ROOT/usr/X11R6"; then
30858        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30859    elif test -d "$SYS_ROOT/usr/include/X11"; then
30860        OPENWIN_HOME="$SYS_ROOT/usr"
30861    fi
30862fi
30863if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30864    OPENWIN_HOME="/usr/openwin"
30865fi
30866
30867
30868
30869#
30870# Weird Sol10 something check...TODO change to try compile
30871#
30872if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30873  if test "`uname -r`" = "5.10"; then
30874     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30875     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30876     fi
30877  fi
30878fi
30879
30880ac_ext=c
30881ac_cpp='$CPP $CPPFLAGS'
30882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30884ac_compiler_gnu=$ac_cv_c_compiler_gnu
30885
30886OLD_CFLAGS="$CFLAGS"
30887CFLAGS="$CFLAGS $X_CFLAGS"
30888
30889# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30890for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30891do :
30892  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30893ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30894                   # include <X11/Xutil.h>
30895
30896"
30897if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30898  cat >>confdefs.h <<_ACEOF
30899#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30900_ACEOF
30901 X11_A_OK=yes
30902else
30903  X11_A_OK=no; break
30904fi
30905
30906done
30907
30908
30909CFLAGS="$OLD_CFLAGS"
30910ac_ext=cpp
30911ac_cpp='$CXXCPP $CPPFLAGS'
30912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30915
30916
30917if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30918
30919    # Print a helpful message on how to acquire the necessary build dependency.
30920    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30921    MISSING_DEPENDENCY=x11
30922    PKGHANDLER_COMMAND=
30923
30924    case $PKGHANDLER in
30925	apt-get)
30926                apt_help     $MISSING_DEPENDENCY ;;
30927    yum)
30928                yum_help     $MISSING_DEPENDENCY ;;
30929	port)
30930                port_help    $MISSING_DEPENDENCY ;;
30931	pkgutil)
30932                pkgutil_help $MISSING_DEPENDENCY ;;
30933	pkgadd)
30934                pkgadd_help  $MISSING_DEPENDENCY ;;
30935    * )
30936      break ;;
30937    esac
30938
30939    if test "x$PKGHANDLER_COMMAND" != x; then
30940        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30941    fi
30942
30943    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30944fi
30945
30946
30947
30948
30949
30950
30951###############################################################################
30952#
30953# The common unix printing system cups is used to print from java.
30954#
30955
30956# Check whether --with-cups was given.
30957if test "${with_cups+set}" = set; then :
30958  withval=$with_cups;
30959fi
30960
30961
30962# Check whether --with-cups-include was given.
30963if test "${with_cups_include+set}" = set; then :
30964  withval=$with_cups_include;
30965fi
30966
30967
30968if test "x$CUPS_NOT_NEEDED" = xyes; then
30969	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30970		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30971$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30972	fi
30973	CUPS_CFLAGS=
30974else
30975	CUPS_FOUND=no
30976
30977	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30978	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30979	fi
30980
30981	if test "x${with_cups}" != x; then
30982	    CUPS_CFLAGS="-I${with_cups}/include"
30983	    CUPS_FOUND=yes
30984	fi
30985	if test "x${with_cups_include}" != x; then
30986	    CUPS_CFLAGS="-I${with_cups_include}"
30987	    CUPS_FOUND=yes
30988	fi
30989	if test "x$CUPS_FOUND" = xno; then
30990
30991
30992    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30993        # Source the builddeps file again, to make sure it uses the latest variables!
30994        . $builddepsfile
30995        # Look for a target and build machine specific resource!
30996        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30997        if test "x$resource" = x; then
30998            # Ok, lets instead look for a target specific resource
30999            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31000        fi
31001        if test "x$resource" = x; then
31002            # Ok, lets instead look for a build specific resource
31003            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31004        fi
31005        if test "x$resource" = x; then
31006            # Ok, lets instead look for a generic resource
31007            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31008            resource=${builddep_cups}
31009        fi
31010        if test "x$resource" != x; then
31011            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31012$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31013	    # If the resource in the builddeps.conf file is an existing directory,
31014	    # for example /java/linux/cups
31015	    if test -d ${resource}; then
31016	       depdir=${resource}
31017	    else
31018
31019# cups is for example mymodule
31020# $resource is for example libs/general/libmymod_1_2_3.zip
31021# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31022# $with_builddeps_dir is for example /localhome/builddeps
31023# depdir is the name of the variable into which we store the depdir, eg MYMOD
31024# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31025# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31026    filename=`basename $resource`
31027    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31028    filebase=${filename%%.*}
31029    extension=${filename#*.}
31030    installdir=$with_builddeps_dir/$filebase
31031    if test ! -f $installdir/$filename.unpacked; then
31032        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31033$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31034        if test ! -d $installdir; then
31035            mkdir -p $installdir
31036        fi
31037        if test ! -d $installdir; then
31038            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31039        fi
31040        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31041        touch $tmpfile
31042        if test ! -f $tmpfile; then
31043            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31044        fi
31045
31046    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31047    # $tmpfile is the local file name for the downloaded file.
31048    VALID_TOOL=no
31049    if test "x$BDEPS_FTP" = xwget; then
31050       VALID_TOOL=yes
31051       wget -O $tmpfile $with_builddeps_server/$resource
31052    fi
31053    if test "x$BDEPS_FTP" = xlftp; then
31054       VALID_TOOL=yes
31055       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31056    fi
31057    if test "x$BDEPS_FTP" = xftp; then
31058        VALID_TOOL=yes
31059        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31060        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31061        FTPUSERPWD=${FTPSERVER%%@*}
31062        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31063            FTPUSER=${userpwd%%:*}
31064            FTPPWD=${userpwd#*@}
31065            FTPSERVER=${FTPSERVER#*@}
31066        else
31067            FTPUSER=ftp
31068            FTPPWD=ftp
31069        fi
31070        # the "pass" command does not work on some
31071        # ftp clients (read ftp.exe) but if it works,
31072        # passive mode is better!
31073        (\
31074            echo "user $FTPUSER $FTPPWD"        ;\
31075            echo "pass"                         ;\
31076            echo "bin"                          ;\
31077            echo "get $FTPPATH $tmpfile"              ;\
31078        ) | ftp -in $FTPSERVER
31079    fi
31080    if test "x$VALID_TOOL" != xyes; then
31081       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31082    fi
31083
31084        mv $tmpfile $installdir/$filename
31085        if test ! -s $installdir/$filename; then
31086            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31087        fi
31088        case "$extension" in
31089            zip)  echo "Unzipping $installdir/$filename..."
31090               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31091            ;;
31092            tar.gz) echo "Untaring $installdir/$filename..."
31093               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31094            ;;
31095            tgz) echo "Untaring $installdir/$filename..."
31096               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31097            ;;
31098            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31099            ;;
31100        esac
31101    fi
31102    if test -f $installdir/$filename.unpacked; then
31103        depdir=$installdir
31104    fi
31105
31106	    fi
31107            # Source the builddeps file again, because in the previous command, the depdir
31108            # was updated to point at the current build dependency install directory.
31109            . $builddepsfile
31110            # Now extract variables from the builddeps.conf files.
31111            theroot=${builddep_cups_ROOT}
31112            thecflags=${builddep_cups_CFLAGS}
31113            thelibs=${builddep_cups_LIBS}
31114            if test "x$depdir" = x; then
31115                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31116            fi
31117            CUPS=$depdir
31118            if test "x$theroot" != x; then
31119               CUPS="$theroot"
31120            fi
31121            if test "x$thecflags" != x; then
31122               CUPS_CFLAGS="$thecflags"
31123            fi
31124            if test "x$thelibs" != x; then
31125               CUPS_LIBS="$thelibs"
31126            fi
31127            CUPS_FOUND=yes
31128
31129        fi
31130
31131    fi
31132
31133	fi
31134	if test "x$CUPS_FOUND" = xno; then
31135	    # Are the cups headers installed in the default /usr/include location?
31136	    for ac_header in cups/cups.h cups/ppd.h
31137do :
31138  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31139ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31141  cat >>confdefs.h <<_ACEOF
31142#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31143_ACEOF
31144 CUPS_FOUND=yes
31145	                      CUPS_CFLAGS=
31146	                      DEFAULT_CUPS=yes
31147fi
31148
31149done
31150
31151	fi
31152	if test "x$CUPS_FOUND" = xno; then
31153	    # Getting nervous now? Lets poke around for standard Solaris third-party
31154	    # package installation locations.
31155	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31156$as_echo_n "checking for cups headers... " >&6; }
31157	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31158	       # An SFW package seems to be installed!
31159	       CUPS_FOUND=yes
31160	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31161	    elif test -s /opt/csw/include/cups/cups.h; then
31162	       # A CSW package seems to be installed!
31163	       CUPS_FOUND=yes
31164	       CUPS_CFLAGS="-I/opt/csw/include"
31165	    fi
31166	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31167$as_echo "$CUPS_FOUND" >&6; }
31168	fi
31169	if test "x$CUPS_FOUND" = xno; then
31170
31171    # Print a helpful message on how to acquire the necessary build dependency.
31172    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31173    MISSING_DEPENDENCY=cups
31174    PKGHANDLER_COMMAND=
31175
31176    case $PKGHANDLER in
31177	apt-get)
31178                apt_help     $MISSING_DEPENDENCY ;;
31179    yum)
31180                yum_help     $MISSING_DEPENDENCY ;;
31181	port)
31182                port_help    $MISSING_DEPENDENCY ;;
31183	pkgutil)
31184                pkgutil_help $MISSING_DEPENDENCY ;;
31185	pkgadd)
31186                pkgadd_help  $MISSING_DEPENDENCY ;;
31187    * )
31188      break ;;
31189    esac
31190
31191    if test "x$PKGHANDLER_COMMAND" != x; then
31192        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31193    fi
31194
31195	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31196	fi
31197fi
31198
31199
31200
31201
31202
31203
31204###############################################################################
31205#
31206# The ubiquitous freetype2 library is used to render fonts.
31207#
31208
31209# Check whether --with-freetype was given.
31210if test "${with_freetype+set}" = set; then :
31211  withval=$with_freetype;
31212fi
31213
31214
31215# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31216USING_SYSTEM_FT_LIB=false
31217
31218if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31219	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31220		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31221$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31222	fi
31223	FREETYPE2_CFLAGS=
31224	FREETYPE2_LIBS=
31225        FREETYPE2_LIB_PATH=
31226else
31227	FREETYPE2_FOUND=no
31228
31229	if test "x$with_freetype" != x; then
31230
31231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31232
31233  # Input might be given as Windows format, start by converting to
31234  # unix format.
31235  path="$with_freetype"
31236  new_path=`$CYGPATH -u "$path"`
31237
31238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31241  # "foo.exe" is OK but "foo" is an error.
31242  #
31243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31244  # It is also a way to make sure we got the proper file name for the real test later on.
31245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31246  if test "x$test_shortpath" = x; then
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31248$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31249    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31250  fi
31251
31252  # Call helper function which possibly converts this using DOS-style short mode.
31253  # If so, the updated path is stored in $new_path.
31254
31255  input_path="$new_path"
31256  # Check if we need to convert this using DOS-style short mode. If the path
31257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31258  # take no chances and rewrite it.
31259  # Note: m4 eats our [], so we need to use [ and ] instead.
31260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31261  if test "x$has_forbidden_chars" != x; then
31262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31266      # Going to short mode and back again did indeed matter. Since short mode is
31267      # case insensitive, let's make it lowercase to improve readability.
31268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31269      # Now convert it back to Unix-stile (cygpath)
31270      input_path=`$CYGPATH -u "$shortmode_path"`
31271      new_path="$input_path"
31272    fi
31273  fi
31274
31275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31276  if test "x$test_cygdrive_prefix" = x; then
31277    # As a simple fix, exclude /usr/bin since it's not a real path.
31278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31280      # a path prefixed by /cygdrive for fixpath to work.
31281      new_path="$CYGWIN_ROOT_PATH$input_path"
31282    fi
31283  fi
31284
31285
31286  if test "x$path" != "x$new_path"; then
31287    with_freetype="$new_path"
31288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31289$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31290  fi
31291
31292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31293
31294  path="$with_freetype"
31295  has_colon=`$ECHO $path | $GREP ^.:`
31296  new_path="$path"
31297  if test "x$has_colon" = x; then
31298    # Not in mixed or Windows style, start by that.
31299    new_path=`cmd //c echo $path`
31300  fi
31301
31302
31303  input_path="$new_path"
31304  # Check if we need to convert this using DOS-style short mode. If the path
31305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31306  # take no chances and rewrite it.
31307  # Note: m4 eats our [], so we need to use [ and ] instead.
31308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31309  if test "x$has_forbidden_chars" != x; then
31310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31312  fi
31313
31314
31315  windows_path="$new_path"
31316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31317    unix_path=`$CYGPATH -u "$windows_path"`
31318    new_path="$unix_path"
31319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31321    new_path="$unix_path"
31322  fi
31323
31324  if test "x$path" != "x$new_path"; then
31325    with_freetype="$new_path"
31326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31327$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31328  fi
31329
31330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31332
31333  else
31334    # We're on a posix platform. Hooray! :)
31335    path="$with_freetype"
31336    has_space=`$ECHO "$path" | $GREP " "`
31337    if test "x$has_space" != x; then
31338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31339$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31340      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31341    fi
31342
31343    # Use eval to expand a potential ~
31344    eval path="$path"
31345    if test ! -f "$path" && test ! -d "$path"; then
31346      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31347    fi
31348
31349    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31350  fi
31351
31352	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31353            FREETYPE2_LIB_PATH="$with_freetype/lib"
31354            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31355                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31356                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31357            fi
31358            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31359                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31360            fi
31361	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31362            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31363                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31364            fi
31365 	    FREETYPE2_FOUND=yes
31366   	    if test "x$FREETYPE2_FOUND" = xyes; then
31367	        # Verify that the directories exist
31368                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31369		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31370		fi
31371	        # List the contents of the lib.
31372		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31373                if test "x$FREETYPELIB" = x; then
31374		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31375		fi
31376	        # Check one h-file
31377                if ! test -s "$with_freetype/include/ft2build.h"; then
31378		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31379		fi
31380            fi
31381        fi
31382	if test "x$FREETYPE2_FOUND" = xno; then
31383
31384
31385    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31386        # Source the builddeps file again, to make sure it uses the latest variables!
31387        . $builddepsfile
31388        # Look for a target and build machine specific resource!
31389        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31390        if test "x$resource" = x; then
31391            # Ok, lets instead look for a target specific resource
31392            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31393        fi
31394        if test "x$resource" = x; then
31395            # Ok, lets instead look for a build specific resource
31396            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31397        fi
31398        if test "x$resource" = x; then
31399            # Ok, lets instead look for a generic resource
31400            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31401            resource=${builddep_freetype2}
31402        fi
31403        if test "x$resource" != x; then
31404            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31405$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31406	    # If the resource in the builddeps.conf file is an existing directory,
31407	    # for example /java/linux/cups
31408	    if test -d ${resource}; then
31409	       depdir=${resource}
31410	    else
31411
31412# freetype2 is for example mymodule
31413# $resource is for example libs/general/libmymod_1_2_3.zip
31414# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31415# $with_builddeps_dir is for example /localhome/builddeps
31416# depdir is the name of the variable into which we store the depdir, eg MYMOD
31417# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31418# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31419    filename=`basename $resource`
31420    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31421    filebase=${filename%%.*}
31422    extension=${filename#*.}
31423    installdir=$with_builddeps_dir/$filebase
31424    if test ! -f $installdir/$filename.unpacked; then
31425        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31426$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31427        if test ! -d $installdir; then
31428            mkdir -p $installdir
31429        fi
31430        if test ! -d $installdir; then
31431            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31432        fi
31433        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31434        touch $tmpfile
31435        if test ! -f $tmpfile; then
31436            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31437        fi
31438
31439    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31440    # $tmpfile is the local file name for the downloaded file.
31441    VALID_TOOL=no
31442    if test "x$BDEPS_FTP" = xwget; then
31443       VALID_TOOL=yes
31444       wget -O $tmpfile $with_builddeps_server/$resource
31445    fi
31446    if test "x$BDEPS_FTP" = xlftp; then
31447       VALID_TOOL=yes
31448       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31449    fi
31450    if test "x$BDEPS_FTP" = xftp; then
31451        VALID_TOOL=yes
31452        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31453        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31454        FTPUSERPWD=${FTPSERVER%%@*}
31455        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31456            FTPUSER=${userpwd%%:*}
31457            FTPPWD=${userpwd#*@}
31458            FTPSERVER=${FTPSERVER#*@}
31459        else
31460            FTPUSER=ftp
31461            FTPPWD=ftp
31462        fi
31463        # the "pass" command does not work on some
31464        # ftp clients (read ftp.exe) but if it works,
31465        # passive mode is better!
31466        (\
31467            echo "user $FTPUSER $FTPPWD"        ;\
31468            echo "pass"                         ;\
31469            echo "bin"                          ;\
31470            echo "get $FTPPATH $tmpfile"              ;\
31471        ) | ftp -in $FTPSERVER
31472    fi
31473    if test "x$VALID_TOOL" != xyes; then
31474       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31475    fi
31476
31477        mv $tmpfile $installdir/$filename
31478        if test ! -s $installdir/$filename; then
31479            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31480        fi
31481        case "$extension" in
31482            zip)  echo "Unzipping $installdir/$filename..."
31483               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31484            ;;
31485            tar.gz) echo "Untaring $installdir/$filename..."
31486               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31487            ;;
31488            tgz) echo "Untaring $installdir/$filename..."
31489               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31490            ;;
31491            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31492            ;;
31493        esac
31494    fi
31495    if test -f $installdir/$filename.unpacked; then
31496        depdir=$installdir
31497    fi
31498
31499	    fi
31500            # Source the builddeps file again, because in the previous command, the depdir
31501            # was updated to point at the current build dependency install directory.
31502            . $builddepsfile
31503            # Now extract variables from the builddeps.conf files.
31504            theroot=${builddep_freetype2_ROOT}
31505            thecflags=${builddep_freetype2_CFLAGS}
31506            thelibs=${builddep_freetype2_LIBS}
31507            if test "x$depdir" = x; then
31508                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31509            fi
31510            FREETYPE2=$depdir
31511            if test "x$theroot" != x; then
31512               FREETYPE2="$theroot"
31513            fi
31514            if test "x$thecflags" != x; then
31515               FREETYPE2_CFLAGS="$thecflags"
31516            fi
31517            if test "x$thelibs" != x; then
31518               FREETYPE2_LIBS="$thelibs"
31519            fi
31520            FREETYPE2_FOUND=yes
31521            else FREETYPE2_FOUND=no
31522
31523        fi
31524        else FREETYPE2_FOUND=no
31525
31526    fi
31527
31528            USING_SYSTEM_FT_LIB=true
31529	fi
31530	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31531            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31532
31533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31534
31535  # Input might be given as Windows format, start by converting to
31536  # unix format.
31537  path="$FREETYPELOCATION"
31538  new_path=`$CYGPATH -u "$path"`
31539
31540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31543  # "foo.exe" is OK but "foo" is an error.
31544  #
31545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31546  # It is also a way to make sure we got the proper file name for the real test later on.
31547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31548  if test "x$test_shortpath" = x; then
31549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31550$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31551    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31552  fi
31553
31554  # Call helper function which possibly converts this using DOS-style short mode.
31555  # If so, the updated path is stored in $new_path.
31556
31557  input_path="$new_path"
31558  # Check if we need to convert this using DOS-style short mode. If the path
31559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31560  # take no chances and rewrite it.
31561  # Note: m4 eats our [], so we need to use [ and ] instead.
31562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31563  if test "x$has_forbidden_chars" != x; then
31564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31568      # Going to short mode and back again did indeed matter. Since short mode is
31569      # case insensitive, let's make it lowercase to improve readability.
31570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31571      # Now convert it back to Unix-stile (cygpath)
31572      input_path=`$CYGPATH -u "$shortmode_path"`
31573      new_path="$input_path"
31574    fi
31575  fi
31576
31577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31578  if test "x$test_cygdrive_prefix" = x; then
31579    # As a simple fix, exclude /usr/bin since it's not a real path.
31580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31582      # a path prefixed by /cygdrive for fixpath to work.
31583      new_path="$CYGWIN_ROOT_PATH$input_path"
31584    fi
31585  fi
31586
31587
31588  if test "x$path" != "x$new_path"; then
31589    FREETYPELOCATION="$new_path"
31590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31591$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31592  fi
31593
31594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31595
31596  path="$FREETYPELOCATION"
31597  has_colon=`$ECHO $path | $GREP ^.:`
31598  new_path="$path"
31599  if test "x$has_colon" = x; then
31600    # Not in mixed or Windows style, start by that.
31601    new_path=`cmd //c echo $path`
31602  fi
31603
31604
31605  input_path="$new_path"
31606  # Check if we need to convert this using DOS-style short mode. If the path
31607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31608  # take no chances and rewrite it.
31609  # Note: m4 eats our [], so we need to use [ and ] instead.
31610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31611  if test "x$has_forbidden_chars" != x; then
31612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31614  fi
31615
31616
31617  windows_path="$new_path"
31618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31619    unix_path=`$CYGPATH -u "$windows_path"`
31620    new_path="$unix_path"
31621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31623    new_path="$unix_path"
31624  fi
31625
31626  if test "x$path" != "x$new_path"; then
31627    FREETYPELOCATION="$new_path"
31628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31629$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31630  fi
31631
31632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31634
31635  else
31636    # We're on a posix platform. Hooray! :)
31637    path="$FREETYPELOCATION"
31638    has_space=`$ECHO "$path" | $GREP " "`
31639    if test "x$has_space" != x; then
31640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31641$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31642      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31643    fi
31644
31645    # Use eval to expand a potential ~
31646    eval path="$path"
31647    if test ! -f "$path" && test ! -d "$path"; then
31648      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31649    fi
31650
31651    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31652  fi
31653
31654	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31655$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31656	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31657	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31658	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31659 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31660                if ! test -s "$FREETYPE2_LIBS"; then
31661		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31662		fi
31663                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31664		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31665		fi
31666                USING_SYSTEM_FT_LIB=true
31667                FREETYPE2_FOUND=yes
31668	    fi
31669	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31670$as_echo "$FREETYPE2_FOUND" >&6; }
31671        fi
31672	if test "x$FREETYPE2_FOUND" = xno; then
31673
31674pkg_failed=no
31675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31676$as_echo_n "checking for FREETYPE2... " >&6; }
31677
31678if test -n "$FREETYPE2_CFLAGS"; then
31679    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31680 elif test -n "$PKG_CONFIG"; then
31681    if test -n "$PKG_CONFIG" && \
31682    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31683  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31684  ac_status=$?
31685  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31686  test $ac_status = 0; }; then
31687  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31688else
31689  pkg_failed=yes
31690fi
31691 else
31692    pkg_failed=untried
31693fi
31694if test -n "$FREETYPE2_LIBS"; then
31695    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31696 elif test -n "$PKG_CONFIG"; then
31697    if test -n "$PKG_CONFIG" && \
31698    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31699  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31700  ac_status=$?
31701  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31702  test $ac_status = 0; }; then
31703  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31704else
31705  pkg_failed=yes
31706fi
31707 else
31708    pkg_failed=untried
31709fi
31710
31711
31712
31713if test $pkg_failed = yes; then
31714
31715if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31716        _pkg_short_errors_supported=yes
31717else
31718        _pkg_short_errors_supported=no
31719fi
31720        if test $_pkg_short_errors_supported = yes; then
31721	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31722        else
31723	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31724        fi
31725	# Put the nasty error message in config.log where it belongs
31726	echo "$FREETYPE2_PKG_ERRORS" >&5
31727
31728	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31729$as_echo "no" >&6; }
31730                FREETYPE2_FOUND=no
31731elif test $pkg_failed = untried; then
31732	FREETYPE2_FOUND=no
31733else
31734	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31735	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31737$as_echo "yes" >&6; }
31738	FREETYPE2_FOUND=yes
31739fi
31740            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31741            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31742            USING_SYSTEM_FT_LIB=true
31743            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31744            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31745              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31746            fi
31747	fi
31748	if test "x$FREETYPE2_FOUND" = xno; then
31749	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31750$as_echo_n "checking for freetype in some standard locations... " >&6; }
31751
31752	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31753	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31754	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31755	    fi
31756	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31757	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31758	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31759	    fi
31760
31761	    PREV_CXXCFLAGS="$CXXFLAGS"
31762	    PREV_LDFLAGS="$LDFLAGS"
31763	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31764	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31765	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31766/* end confdefs.h.  */
31767#include<ft2build.h>
31768	                    #include FT_FREETYPE_H
31769	                   int main() { return 0; }
31770
31771_ACEOF
31772if ac_fn_cxx_try_link "$LINENO"; then :
31773
31774	                      # Yes, the default cflags and libs did the trick.
31775	                      FREETYPE2_FOUND=yes
31776	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31777	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31778
31779else
31780
31781	                      FREETYPE2_FOUND=no
31782
31783fi
31784rm -f core conftest.err conftest.$ac_objext \
31785    conftest$ac_exeext conftest.$ac_ext
31786            CXXCFLAGS="$PREV_CXXFLAGS"
31787	    LDFLAGS="$PREV_LDFLAGS"
31788	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31789$as_echo "$FREETYPE2_FOUND" >&6; }
31790            USING_SYSTEM_FT_LIB=true
31791	fi
31792	if test "x$FREETYPE2_FOUND" = xno; then
31793
31794    # Print a helpful message on how to acquire the necessary build dependency.
31795    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31796    MISSING_DEPENDENCY=freetype2
31797    PKGHANDLER_COMMAND=
31798
31799    case $PKGHANDLER in
31800	apt-get)
31801                apt_help     $MISSING_DEPENDENCY ;;
31802    yum)
31803                yum_help     $MISSING_DEPENDENCY ;;
31804	port)
31805                port_help    $MISSING_DEPENDENCY ;;
31806	pkgutil)
31807                pkgutil_help $MISSING_DEPENDENCY ;;
31808	pkgadd)
31809                pkgadd_help  $MISSING_DEPENDENCY ;;
31810    * )
31811      break ;;
31812    esac
31813
31814    if test "x$PKGHANDLER_COMMAND" != x; then
31815        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31816    fi
31817
31818		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31819	fi
31820
31821        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31822            # AC_CHECK_LIB does not support use of cl.exe
31823            PREV_LDFLAGS="$LDFLAGS"
31824            LDFLAGS="$FREETYPE2_LIBS"
31825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31826$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31827if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31828  $as_echo_n "(cached) " >&6
31829else
31830  ac_check_lib_save_LIBS=$LIBS
31831LIBS="-lfreetype  $LIBS"
31832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31833/* end confdefs.h.  */
31834
31835/* Override any GCC internal prototype to avoid an error.
31836   Use char because int might match the return type of a GCC
31837   builtin and then its argument prototype would still apply.  */
31838#ifdef __cplusplus
31839extern "C"
31840#endif
31841char FT_Init_FreeType ();
31842int
31843main ()
31844{
31845return FT_Init_FreeType ();
31846  ;
31847  return 0;
31848}
31849_ACEOF
31850if ac_fn_cxx_try_link "$LINENO"; then :
31851  ac_cv_lib_freetype_FT_Init_FreeType=yes
31852else
31853  ac_cv_lib_freetype_FT_Init_FreeType=no
31854fi
31855rm -f core conftest.err conftest.$ac_objext \
31856    conftest$ac_exeext conftest.$ac_ext
31857LIBS=$ac_check_lib_save_LIBS
31858fi
31859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31860$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31861if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31862  FREETYPE2_FOUND=true
31863else
31864  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31865fi
31866
31867            LDFLAGS="$PREV_LDFLAGS"
31868        fi
31869fi
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879###############################################################################
31880#
31881# Check for alsa headers and libraries. Used on Linux/GNU systems.
31882#
31883
31884# Check whether --with-alsa was given.
31885if test "${with_alsa+set}" = set; then :
31886  withval=$with_alsa;
31887fi
31888
31889
31890# Check whether --with-alsa-include was given.
31891if test "${with_alsa_include+set}" = set; then :
31892  withval=$with_alsa_include;
31893fi
31894
31895
31896# Check whether --with-alsa-lib was given.
31897if test "${with_alsa_lib+set}" = set; then :
31898  withval=$with_alsa_lib;
31899fi
31900
31901
31902if test "x$ALSA_NOT_NEEDED" = xyes; then
31903	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31904		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31905$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31906	fi
31907	ALSA_CFLAGS=
31908	ALSA_LIBS=
31909else
31910	ALSA_FOUND=no
31911
31912	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31913	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31914	fi
31915
31916	if test "x${with_alsa}" != x; then
31917	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31918	    ALSA_CFLAGS="-I${with_alsa}/include"
31919	    ALSA_FOUND=yes
31920	fi
31921	if test "x${with_alsa_include}" != x; then
31922	    ALSA_CFLAGS="-I${with_alsa_include}"
31923	    ALSA_FOUND=yes
31924	fi
31925	if test "x${with_alsa_lib}" != x; then
31926	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31927	    ALSA_FOUND=yes
31928	fi
31929	if test "x$ALSA_FOUND" = xno; then
31930
31931
31932    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31933        # Source the builddeps file again, to make sure it uses the latest variables!
31934        . $builddepsfile
31935        # Look for a target and build machine specific resource!
31936        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31937        if test "x$resource" = x; then
31938            # Ok, lets instead look for a target specific resource
31939            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31940        fi
31941        if test "x$resource" = x; then
31942            # Ok, lets instead look for a build specific resource
31943            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31944        fi
31945        if test "x$resource" = x; then
31946            # Ok, lets instead look for a generic resource
31947            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31948            resource=${builddep_alsa}
31949        fi
31950        if test "x$resource" != x; then
31951            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31952$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31953	    # If the resource in the builddeps.conf file is an existing directory,
31954	    # for example /java/linux/cups
31955	    if test -d ${resource}; then
31956	       depdir=${resource}
31957	    else
31958
31959# alsa is for example mymodule
31960# $resource is for example libs/general/libmymod_1_2_3.zip
31961# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31962# $with_builddeps_dir is for example /localhome/builddeps
31963# depdir is the name of the variable into which we store the depdir, eg MYMOD
31964# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31965# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31966    filename=`basename $resource`
31967    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31968    filebase=${filename%%.*}
31969    extension=${filename#*.}
31970    installdir=$with_builddeps_dir/$filebase
31971    if test ! -f $installdir/$filename.unpacked; then
31972        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31973$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31974        if test ! -d $installdir; then
31975            mkdir -p $installdir
31976        fi
31977        if test ! -d $installdir; then
31978            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31979        fi
31980        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31981        touch $tmpfile
31982        if test ! -f $tmpfile; then
31983            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31984        fi
31985
31986    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31987    # $tmpfile is the local file name for the downloaded file.
31988    VALID_TOOL=no
31989    if test "x$BDEPS_FTP" = xwget; then
31990       VALID_TOOL=yes
31991       wget -O $tmpfile $with_builddeps_server/$resource
31992    fi
31993    if test "x$BDEPS_FTP" = xlftp; then
31994       VALID_TOOL=yes
31995       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31996    fi
31997    if test "x$BDEPS_FTP" = xftp; then
31998        VALID_TOOL=yes
31999        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32000        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32001        FTPUSERPWD=${FTPSERVER%%@*}
32002        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32003            FTPUSER=${userpwd%%:*}
32004            FTPPWD=${userpwd#*@}
32005            FTPSERVER=${FTPSERVER#*@}
32006        else
32007            FTPUSER=ftp
32008            FTPPWD=ftp
32009        fi
32010        # the "pass" command does not work on some
32011        # ftp clients (read ftp.exe) but if it works,
32012        # passive mode is better!
32013        (\
32014            echo "user $FTPUSER $FTPPWD"        ;\
32015            echo "pass"                         ;\
32016            echo "bin"                          ;\
32017            echo "get $FTPPATH $tmpfile"              ;\
32018        ) | ftp -in $FTPSERVER
32019    fi
32020    if test "x$VALID_TOOL" != xyes; then
32021       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32022    fi
32023
32024        mv $tmpfile $installdir/$filename
32025        if test ! -s $installdir/$filename; then
32026            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32027        fi
32028        case "$extension" in
32029            zip)  echo "Unzipping $installdir/$filename..."
32030               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32031            ;;
32032            tar.gz) echo "Untaring $installdir/$filename..."
32033               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32034            ;;
32035            tgz) echo "Untaring $installdir/$filename..."
32036               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32037            ;;
32038            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32039            ;;
32040        esac
32041    fi
32042    if test -f $installdir/$filename.unpacked; then
32043        depdir=$installdir
32044    fi
32045
32046	    fi
32047            # Source the builddeps file again, because in the previous command, the depdir
32048            # was updated to point at the current build dependency install directory.
32049            . $builddepsfile
32050            # Now extract variables from the builddeps.conf files.
32051            theroot=${builddep_alsa_ROOT}
32052            thecflags=${builddep_alsa_CFLAGS}
32053            thelibs=${builddep_alsa_LIBS}
32054            if test "x$depdir" = x; then
32055                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32056            fi
32057            ALSA=$depdir
32058            if test "x$theroot" != x; then
32059               ALSA="$theroot"
32060            fi
32061            if test "x$thecflags" != x; then
32062               ALSA_CFLAGS="$thecflags"
32063            fi
32064            if test "x$thelibs" != x; then
32065               ALSA_LIBS="$thelibs"
32066            fi
32067            ALSA_FOUND=yes
32068            else ALSA_FOUND=no
32069
32070        fi
32071        else ALSA_FOUND=no
32072
32073    fi
32074
32075	fi
32076	if test "x$ALSA_FOUND" = xno; then
32077
32078pkg_failed=no
32079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32080$as_echo_n "checking for ALSA... " >&6; }
32081
32082if test -n "$ALSA_CFLAGS"; then
32083    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32084 elif test -n "$PKG_CONFIG"; then
32085    if test -n "$PKG_CONFIG" && \
32086    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32087  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32088  ac_status=$?
32089  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32090  test $ac_status = 0; }; then
32091  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32092else
32093  pkg_failed=yes
32094fi
32095 else
32096    pkg_failed=untried
32097fi
32098if test -n "$ALSA_LIBS"; then
32099    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32100 elif test -n "$PKG_CONFIG"; then
32101    if test -n "$PKG_CONFIG" && \
32102    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32103  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32104  ac_status=$?
32105  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32106  test $ac_status = 0; }; then
32107  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32108else
32109  pkg_failed=yes
32110fi
32111 else
32112    pkg_failed=untried
32113fi
32114
32115
32116
32117if test $pkg_failed = yes; then
32118
32119if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32120        _pkg_short_errors_supported=yes
32121else
32122        _pkg_short_errors_supported=no
32123fi
32124        if test $_pkg_short_errors_supported = yes; then
32125	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32126        else
32127	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32128        fi
32129	# Put the nasty error message in config.log where it belongs
32130	echo "$ALSA_PKG_ERRORS" >&5
32131
32132	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32133$as_echo "no" >&6; }
32134                ALSA_FOUND=no
32135elif test $pkg_failed = untried; then
32136	ALSA_FOUND=no
32137else
32138	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32139	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32141$as_echo "yes" >&6; }
32142	ALSA_FOUND=yes
32143fi
32144	fi
32145	if test "x$ALSA_FOUND" = xno; then
32146	    for ac_header in alsa/asoundlib.h
32147do :
32148  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32149if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32150  cat >>confdefs.h <<_ACEOF
32151#define HAVE_ALSA_ASOUNDLIB_H 1
32152_ACEOF
32153 ALSA_FOUND=yes
32154	                      ALSA_CFLAGS=-Iignoreme
32155	                      ALSA_LIBS=-lasound
32156	                      DEFAULT_ALSA=yes
32157else
32158  ALSA_FOUND=no
32159fi
32160
32161done
32162
32163	fi
32164	if test "x$ALSA_FOUND" = xno; then
32165
32166    # Print a helpful message on how to acquire the necessary build dependency.
32167    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32168    MISSING_DEPENDENCY=alsa
32169    PKGHANDLER_COMMAND=
32170
32171    case $PKGHANDLER in
32172	apt-get)
32173                apt_help     $MISSING_DEPENDENCY ;;
32174    yum)
32175                yum_help     $MISSING_DEPENDENCY ;;
32176	port)
32177                port_help    $MISSING_DEPENDENCY ;;
32178	pkgutil)
32179                pkgutil_help $MISSING_DEPENDENCY ;;
32180	pkgadd)
32181                pkgadd_help  $MISSING_DEPENDENCY ;;
32182    * )
32183      break ;;
32184    esac
32185
32186    if test "x$PKGHANDLER_COMMAND" != x; then
32187        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32188    fi
32189
32190	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32191	fi
32192fi
32193
32194
32195
32196
32197
32198
32199
32200###############################################################################
32201#
32202# Check for the jpeg library
32203#
32204
32205USE_EXTERNAL_LIBJPEG=true
32206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32207$as_echo_n "checking for main in -ljpeg... " >&6; }
32208if ${ac_cv_lib_jpeg_main+:} false; then :
32209  $as_echo_n "(cached) " >&6
32210else
32211  ac_check_lib_save_LIBS=$LIBS
32212LIBS="-ljpeg  $LIBS"
32213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32214/* end confdefs.h.  */
32215
32216
32217int
32218main ()
32219{
32220return main ();
32221  ;
32222  return 0;
32223}
32224_ACEOF
32225if ac_fn_cxx_try_link "$LINENO"; then :
32226  ac_cv_lib_jpeg_main=yes
32227else
32228  ac_cv_lib_jpeg_main=no
32229fi
32230rm -f core conftest.err conftest.$ac_objext \
32231    conftest$ac_exeext conftest.$ac_ext
32232LIBS=$ac_check_lib_save_LIBS
32233fi
32234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32235$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32236if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32237  cat >>confdefs.h <<_ACEOF
32238#define HAVE_LIBJPEG 1
32239_ACEOF
32240
32241  LIBS="-ljpeg $LIBS"
32242
32243else
32244   USE_EXTERNAL_LIBJPEG=false
32245               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32246$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32247
32248fi
32249
32250
32251
32252###############################################################################
32253#
32254# Check for the gif library
32255#
32256
32257
32258# Check whether --with-giflib was given.
32259if test "${with_giflib+set}" = set; then :
32260  withval=$with_giflib;
32261fi
32262
32263
32264
32265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32266$as_echo_n "checking for which giflib to use... " >&6; }
32267
32268# default is bundled
32269DEFAULT_GIFLIB=bundled
32270
32271#
32272# if user didn't specify, use DEFAULT_GIFLIB
32273#
32274if test "x${with_giflib}" = "x"; then
32275    with_giflib=${DEFAULT_GIFLIB}
32276fi
32277
32278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32279$as_echo "${with_giflib}" >&6; }
32280
32281if test "x${with_giflib}" = "xbundled"; then
32282    USE_EXTERNAL_LIBGIF=false
32283elif test "x${with_giflib}" = "xsystem"; then
32284    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32285if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32286
32287else
32288   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32289fi
32290
32291
32292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32293$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32294if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32295  $as_echo_n "(cached) " >&6
32296else
32297  ac_check_lib_save_LIBS=$LIBS
32298LIBS="-lgif  $LIBS"
32299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32300/* end confdefs.h.  */
32301
32302/* Override any GCC internal prototype to avoid an error.
32303   Use char because int might match the return type of a GCC
32304   builtin and then its argument prototype would still apply.  */
32305#ifdef __cplusplus
32306extern "C"
32307#endif
32308char DGifGetCode ();
32309int
32310main ()
32311{
32312return DGifGetCode ();
32313  ;
32314  return 0;
32315}
32316_ACEOF
32317if ac_fn_cxx_try_link "$LINENO"; then :
32318  ac_cv_lib_gif_DGifGetCode=yes
32319else
32320  ac_cv_lib_gif_DGifGetCode=no
32321fi
32322rm -f core conftest.err conftest.$ac_objext \
32323    conftest$ac_exeext conftest.$ac_ext
32324LIBS=$ac_check_lib_save_LIBS
32325fi
32326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32327$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32328if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32329  cat >>confdefs.h <<_ACEOF
32330#define HAVE_LIBGIF 1
32331_ACEOF
32332
32333  LIBS="-lgif $LIBS"
32334
32335else
32336   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32337fi
32338
32339
32340    USE_EXTERNAL_LIBGIF=true
32341else
32342    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32343fi
32344
32345
32346###############################################################################
32347#
32348# Check for the zlib library
32349#
32350
32351
32352# Check whether --with-zlib was given.
32353if test "${with_zlib+set}" = set; then :
32354  withval=$with_zlib;
32355fi
32356
32357
32358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32359$as_echo_n "checking for compress in -lz... " >&6; }
32360if ${ac_cv_lib_z_compress+:} false; then :
32361  $as_echo_n "(cached) " >&6
32362else
32363  ac_check_lib_save_LIBS=$LIBS
32364LIBS="-lz  $LIBS"
32365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32366/* end confdefs.h.  */
32367
32368/* Override any GCC internal prototype to avoid an error.
32369   Use char because int might match the return type of a GCC
32370   builtin and then its argument prototype would still apply.  */
32371#ifdef __cplusplus
32372extern "C"
32373#endif
32374char compress ();
32375int
32376main ()
32377{
32378return compress ();
32379  ;
32380  return 0;
32381}
32382_ACEOF
32383if ac_fn_cxx_try_link "$LINENO"; then :
32384  ac_cv_lib_z_compress=yes
32385else
32386  ac_cv_lib_z_compress=no
32387fi
32388rm -f core conftest.err conftest.$ac_objext \
32389    conftest$ac_exeext conftest.$ac_ext
32390LIBS=$ac_check_lib_save_LIBS
32391fi
32392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32393$as_echo "$ac_cv_lib_z_compress" >&6; }
32394if test "x$ac_cv_lib_z_compress" = xyes; then :
32395   ZLIB_FOUND=yes
32396else
32397   ZLIB_FOUND=no
32398fi
32399
32400
32401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32402$as_echo_n "checking for which zlib to use... " >&6; }
32403
32404DEFAULT_ZLIB=bundled
32405if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32406#
32407# On macosx default is system...on others default is
32408#
32409    DEFAULT_ZLIB=system
32410fi
32411
32412if test "x${ZLIB_FOUND}" != "xyes"; then
32413#
32414# If we don't find any system...set default to bundled
32415#
32416    DEFAULT_ZLIB=bundled
32417fi
32418
32419#
32420# If user didn't specify, use DEFAULT_ZLIB
32421#
32422if test "x${with_zlib}" = "x"; then
32423    with_zlib=${DEFAULT_ZLIB}
32424fi
32425
32426if test "x${with_zlib}" = "xbundled"; then
32427    USE_EXTERNAL_LIBZ=false
32428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32429$as_echo "bundled" >&6; }
32430elif test "x${with_zlib}" = "xsystem"; then
32431    if test "x${ZLIB_FOUND}" = "xyes"; then
32432        USE_EXTERNAL_LIBZ=true
32433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32434$as_echo "system" >&6; }
32435    else
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32437$as_echo "system not found" >&6; }
32438        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32439    fi
32440else
32441    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32442fi
32443
32444
32445
32446###############################################################################
32447LIBZIP_CAN_USE_MMAP=true
32448
32449
32450
32451###############################################################################
32452#
32453# Check if altzone exists in time.h
32454#
32455
32456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32457/* end confdefs.h.  */
32458#include <time.h>
32459int
32460main ()
32461{
32462return (int)altzone;
32463  ;
32464  return 0;
32465}
32466_ACEOF
32467if ac_fn_cxx_try_link "$LINENO"; then :
32468  has_altzone=yes
32469else
32470  has_altzone=no
32471fi
32472rm -f core conftest.err conftest.$ac_objext \
32473    conftest$ac_exeext conftest.$ac_ext
32474if test "x$has_altzone" = xyes; then
32475
32476$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32477
32478fi
32479
32480###############################################################################
32481#
32482# Check the maths library
32483#
32484
32485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32486$as_echo_n "checking for cos in -lm... " >&6; }
32487if ${ac_cv_lib_m_cos+:} false; then :
32488  $as_echo_n "(cached) " >&6
32489else
32490  ac_check_lib_save_LIBS=$LIBS
32491LIBS="-lm  $LIBS"
32492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32493/* end confdefs.h.  */
32494
32495/* Override any GCC internal prototype to avoid an error.
32496   Use char because int might match the return type of a GCC
32497   builtin and then its argument prototype would still apply.  */
32498#ifdef __cplusplus
32499extern "C"
32500#endif
32501char cos ();
32502int
32503main ()
32504{
32505return cos ();
32506  ;
32507  return 0;
32508}
32509_ACEOF
32510if ac_fn_cxx_try_link "$LINENO"; then :
32511  ac_cv_lib_m_cos=yes
32512else
32513  ac_cv_lib_m_cos=no
32514fi
32515rm -f core conftest.err conftest.$ac_objext \
32516    conftest$ac_exeext conftest.$ac_ext
32517LIBS=$ac_check_lib_save_LIBS
32518fi
32519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32520$as_echo "$ac_cv_lib_m_cos" >&6; }
32521if test "x$ac_cv_lib_m_cos" = xyes; then :
32522  cat >>confdefs.h <<_ACEOF
32523#define HAVE_LIBM 1
32524_ACEOF
32525
32526  LIBS="-lm $LIBS"
32527
32528else
32529
32530                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32531$as_echo "$as_me: Maths library was not found" >&6;}
32532
32533fi
32534
32535
32536
32537###############################################################################
32538#
32539# Check for libdl.so
32540
32541save_LIBS="$LIBS"
32542LIBS=""
32543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32544$as_echo_n "checking for dlopen in -ldl... " >&6; }
32545if ${ac_cv_lib_dl_dlopen+:} false; then :
32546  $as_echo_n "(cached) " >&6
32547else
32548  ac_check_lib_save_LIBS=$LIBS
32549LIBS="-ldl  $LIBS"
32550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32551/* end confdefs.h.  */
32552
32553/* Override any GCC internal prototype to avoid an error.
32554   Use char because int might match the return type of a GCC
32555   builtin and then its argument prototype would still apply.  */
32556#ifdef __cplusplus
32557extern "C"
32558#endif
32559char dlopen ();
32560int
32561main ()
32562{
32563return dlopen ();
32564  ;
32565  return 0;
32566}
32567_ACEOF
32568if ac_fn_cxx_try_link "$LINENO"; then :
32569  ac_cv_lib_dl_dlopen=yes
32570else
32571  ac_cv_lib_dl_dlopen=no
32572fi
32573rm -f core conftest.err conftest.$ac_objext \
32574    conftest$ac_exeext conftest.$ac_ext
32575LIBS=$ac_check_lib_save_LIBS
32576fi
32577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32578$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32579if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32580  cat >>confdefs.h <<_ACEOF
32581#define HAVE_LIBDL 1
32582_ACEOF
32583
32584  LIBS="-ldl $LIBS"
32585
32586fi
32587
32588LIBDL="$LIBS"
32589
32590LIBS="$save_LIBS"
32591
32592
32593
32594###############################################################################
32595#
32596# statically link libstdc++ before C++ ABI is stablized on Linux unless
32597# dynamic build is configured on command line.
32598#
32599
32600# Check whether --with-stdc++lib was given.
32601if test "${with_stdc__lib+set}" = set; then :
32602  withval=$with_stdc__lib;
32603    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32604        && test "x$with_stdc__lib" != xdefault; then
32605      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32606    fi
32607
32608else
32609  with_stdc__lib=default
32610
32611fi
32612
32613
32614if test "x$OPENJDK_TARGET_OS" = xlinux; then
32615    # Test if -lstdc++ works.
32616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32617$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32618    ac_ext=cpp
32619ac_cpp='$CXXCPP $CPPFLAGS'
32620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32623
32624    OLD_CXXFLAGS="$CXXFLAGS"
32625    CXXFLAGS="$CXXFLAGS -lstdc++"
32626    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32627/* end confdefs.h.  */
32628
32629int
32630main ()
32631{
32632return 0;
32633  ;
32634  return 0;
32635}
32636_ACEOF
32637if ac_fn_cxx_try_link "$LINENO"; then :
32638  has_dynamic_libstdcxx=yes
32639else
32640  has_dynamic_libstdcxx=no
32641fi
32642rm -f core conftest.err conftest.$ac_objext \
32643    conftest$ac_exeext conftest.$ac_ext
32644    CXXFLAGS="$OLD_CXXFLAGS"
32645    ac_ext=cpp
32646ac_cpp='$CXXCPP $CPPFLAGS'
32647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32650
32651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32652$as_echo "$has_dynamic_libstdcxx" >&6; }
32653
32654    # Test if stdc++ can be linked statically.
32655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32656$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32657    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32658    ac_ext=cpp
32659ac_cpp='$CXXCPP $CPPFLAGS'
32660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32663
32664    OLD_LIBS="$LIBS"
32665    OLD_CXX="$CXX"
32666    LIBS="$STATIC_STDCXX_FLAGS"
32667    CXX="$CC"
32668    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32669/* end confdefs.h.  */
32670
32671int
32672main ()
32673{
32674return 0;
32675  ;
32676  return 0;
32677}
32678_ACEOF
32679if ac_fn_cxx_try_link "$LINENO"; then :
32680  has_static_libstdcxx=yes
32681else
32682  has_static_libstdcxx=no
32683fi
32684rm -f core conftest.err conftest.$ac_objext \
32685    conftest$ac_exeext conftest.$ac_ext
32686    LIBS="$OLD_LIBS"
32687    CXX="$OLD_CXX"
32688    ac_ext=cpp
32689ac_cpp='$CXXCPP $CPPFLAGS'
32690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32693
32694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32695$as_echo "$has_static_libstdcxx" >&6; }
32696
32697    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32698        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32699    fi
32700
32701    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32702        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32703    fi
32704
32705    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32706        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32707    fi
32708
32709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32710$as_echo_n "checking how to link with libstdc++... " >&6; }
32711    # If dynamic was requested, it's available since it would fail above otherwise.
32712    # If dynamic wasn't requested, go with static unless it isn't available.
32713    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32714        LIBCXX="$LIBCXX -lstdc++"
32715        LDCXX="$CXX"
32716        STATIC_CXX_SETTING="STATIC_CXX=false"
32717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32718$as_echo "dynamic" >&6; }
32719    else
32720        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32721        LDCXX="$CC"
32722        STATIC_CXX_SETTING="STATIC_CXX=true"
32723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32724$as_echo "static" >&6; }
32725    fi
32726fi
32727
32728
32729if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32730    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32731
32732pkg_failed=no
32733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32734$as_echo_n "checking for LIBFFI... " >&6; }
32735
32736if test -n "$LIBFFI_CFLAGS"; then
32737    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32738 elif test -n "$PKG_CONFIG"; then
32739    if test -n "$PKG_CONFIG" && \
32740    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32741  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32742  ac_status=$?
32743  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32744  test $ac_status = 0; }; then
32745  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32746else
32747  pkg_failed=yes
32748fi
32749 else
32750    pkg_failed=untried
32751fi
32752if test -n "$LIBFFI_LIBS"; then
32753    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32754 elif test -n "$PKG_CONFIG"; then
32755    if test -n "$PKG_CONFIG" && \
32756    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32757  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32758  ac_status=$?
32759  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32760  test $ac_status = 0; }; then
32761  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32762else
32763  pkg_failed=yes
32764fi
32765 else
32766    pkg_failed=untried
32767fi
32768
32769
32770
32771if test $pkg_failed = yes; then
32772
32773if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32774        _pkg_short_errors_supported=yes
32775else
32776        _pkg_short_errors_supported=no
32777fi
32778        if test $_pkg_short_errors_supported = yes; then
32779	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32780        else
32781	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32782        fi
32783	# Put the nasty error message in config.log where it belongs
32784	echo "$LIBFFI_PKG_ERRORS" >&5
32785
32786	as_fn_error $? "Package requirements (libffi) were not met:
32787
32788$LIBFFI_PKG_ERRORS
32789
32790Consider adjusting the PKG_CONFIG_PATH environment variable if you
32791installed software in a non-standard prefix.
32792
32793Alternatively, you may set the environment variables LIBFFI_CFLAGS
32794and LIBFFI_LIBS to avoid the need to call pkg-config.
32795See the pkg-config man page for more details.
32796" "$LINENO" 5
32797elif test $pkg_failed = untried; then
32798	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32800as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32801is in your PATH or set the PKG_CONFIG environment variable to the full
32802path to pkg-config.
32803
32804Alternatively, you may set the environment variables LIBFFI_CFLAGS
32805and LIBFFI_LIBS to avoid the need to call pkg-config.
32806See the pkg-config man page for more details.
32807
32808To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32809See \`config.log' for more details" "$LINENO" 5; }
32810else
32811	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32812	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32814$as_echo "yes" >&6; }
32815	:
32816fi
32817
32818fi
32819
32820if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32821    # Extract the first word of "llvm-config", so it can be a program name with args.
32822set dummy llvm-config; ac_word=$2
32823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32824$as_echo_n "checking for $ac_word... " >&6; }
32825if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32826  $as_echo_n "(cached) " >&6
32827else
32828  if test -n "$LLVM_CONFIG"; then
32829  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32830else
32831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32832for as_dir in $PATH
32833do
32834  IFS=$as_save_IFS
32835  test -z "$as_dir" && as_dir=.
32836    for ac_exec_ext in '' $ac_executable_extensions; do
32837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32838    ac_cv_prog_LLVM_CONFIG="llvm-config"
32839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32840    break 2
32841  fi
32842done
32843  done
32844IFS=$as_save_IFS
32845
32846fi
32847fi
32848LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32849if test -n "$LLVM_CONFIG"; then
32850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32851$as_echo "$LLVM_CONFIG" >&6; }
32852else
32853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32854$as_echo "no" >&6; }
32855fi
32856
32857
32858
32859    if test "x$LLVM_CONFIG" != xllvm-config; then
32860        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32861    fi
32862
32863    llvm_components="jit mcjit engine nativecodegen native"
32864    unset LLVM_CFLAGS
32865    for flag in $("$LLVM_CONFIG" --cxxflags); do
32866      if echo "${flag}" | grep -q '^-[ID]'; then
32867        if test "${flag}" != "-D_DEBUG" ; then
32868          if test "${LLVM_CFLAGS}" != "" ; then
32869            LLVM_CFLAGS="${LLVM_CFLAGS} "
32870          fi
32871          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32872        fi
32873      fi
32874    done
32875    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32876    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32877
32878    unset LLVM_LDFLAGS
32879    for flag in $("${LLVM_CONFIG}" --ldflags); do
32880      if echo "${flag}" | grep -q '^-L'; then
32881        if test "${LLVM_LDFLAGS}" != ""; then
32882          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32883        fi
32884        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32885      fi
32886    done
32887
32888    unset LLVM_LIBS
32889    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32890      if echo "${flag}" | grep -q '^-l'; then
32891        if test "${LLVM_LIBS}" != ""; then
32892          LLVM_LIBS="${LLVM_LIBS} "
32893        fi
32894        LLVM_LIBS="${LLVM_LIBS}${flag}"
32895      fi
32896    done
32897
32898
32899
32900
32901fi
32902
32903# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32904if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32905    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32906fi
32907
32908# TODO better (platform agnostic) test
32909if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32910    LIBCXX="-lstdc++"
32911fi
32912
32913
32914
32915
32916
32917# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32918
32919# When using cygwin or msys, we need a wrapper binary that renames
32920# /cygdrive/c/ arguments into c:/ arguments and peeks into
32921# @files and rewrites these too! This wrapper binary is
32922# called fixpath.
32923FIXPATH=
32924if test "x$OPENJDK_BUILD_OS" = xwindows; then
32925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32926$as_echo_n "checking if fixpath can be created... " >&6; }
32927    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32928    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32929    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32930      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32931      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32932      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32933      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32934    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32935      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32936      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32937
32938      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32939      # @ was chosen as separator to minimize risk of other tools messing around with it
32940      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32941      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32942
32943      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32944    fi
32945    rm -f $OUTPUT_ROOT/fixpath*
32946    cd $OUTPUT_ROOT
32947    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32948    cd $CURDIR
32949
32950    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32952$as_echo "no" >&6; }
32953        cat $OUTPUT_ROOT/fixpath1.log
32954        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32955    fi
32956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32957$as_echo "yes" >&6; }
32958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32959$as_echo_n "checking if fixpath.exe works... " >&6; }
32960    cd $OUTPUT_ROOT
32961    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32962    cd $CURDIR
32963    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32965$as_echo "no" >&6; }
32966        cat $OUTPUT_ROOT/fixpath2.log
32967        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32968    fi
32969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32970$as_echo "yes" >&6; }
32971    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32972fi
32973
32974
32975
32976
32977###############################################################################
32978#
32979# We need to do some final tweaking, when everything else is done.
32980#
32981###############################################################################
32982
32983
32984HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32985
32986
32987# The name of the Service Agent jar.
32988SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32989if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32990  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32991fi
32992
32993
32994
32995
32996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32997$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32998
32999if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33000    ENABLE_INTREE_EC=yes
33001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33002$as_echo "yes" >&6; }
33003else
33004    ENABLE_INTREE_EC=no
33005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33006$as_echo "no" >&6; }
33007fi
33008
33009
33010
33011
33012###############################################################################
33013#
33014# Configure parts of the build that only affect the build performance,
33015# not the result.
33016#
33017###############################################################################
33018
33019
33020  # How many cores do we have on this build system?
33021
33022# Check whether --with-num-cores was given.
33023if test "${with_num_cores+set}" = set; then :
33024  withval=$with_num_cores;
33025fi
33026
33027  if test "x$with_num_cores" = x; then
33028    # The number of cores were not specified, try to probe them.
33029
33030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33031$as_echo_n "checking for number of cores... " >&6; }
33032    NUM_CORES=1
33033    FOUND_CORES=no
33034
33035    if test -f /proc/cpuinfo; then
33036        # Looks like a Linux (or cygwin) system
33037        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33038        FOUND_CORES=yes
33039    elif test -x /usr/sbin/psrinfo; then
33040        # Looks like a Solaris system
33041        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33042        FOUND_CORES=yes
33043    elif test -x /usr/sbin/system_profiler; then
33044        # Looks like a MacOSX system
33045        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33046        FOUND_CORES=yes
33047    elif test -n "$NUMBER_OF_PROCESSORS"; then
33048        # On windows, look in the env
33049        NUM_CORES=$NUMBER_OF_PROCESSORS
33050        FOUND_CORES=yes
33051    fi
33052
33053    if test "x$FOUND_CORES" = xyes; then
33054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33055$as_echo "$NUM_CORES" >&6; }
33056    else
33057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33058$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33060$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33061    fi
33062
33063
33064  else
33065    NUM_CORES=$with_num_cores
33066  fi
33067
33068
33069
33070  # How much memory do we have on this build system?
33071
33072# Check whether --with-memory-size was given.
33073if test "${with_memory_size+set}" = set; then :
33074  withval=$with_memory_size;
33075fi
33076
33077  if test "x$with_memory_size" = x; then
33078    # The memory size was not specified, try to probe it.
33079
33080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33081$as_echo_n "checking for memory size... " >&6; }
33082    # Default to 1024 MB
33083    MEMORY_SIZE=1024
33084    FOUND_MEM=no
33085
33086    if test -f /proc/meminfo; then
33087        # Looks like a Linux (or cygwin) system
33088        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33089        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33090        FOUND_MEM=yes
33091    elif test -x /usr/sbin/prtconf; then
33092        # Looks like a Solaris system
33093        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33094        FOUND_MEM=yes
33095    elif test -x /usr/sbin/system_profiler; then
33096        # Looks like a MacOSX system
33097        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33098        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33099        FOUND_MEM=yes
33100    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33101        # Windows, but without cygwin
33102        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33103        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33104        FOUND_MEM=yes
33105    fi
33106
33107    if test "x$FOUND_MEM" = xyes; then
33108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33109$as_echo "$MEMORY_SIZE MB" >&6; }
33110    else
33111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33112$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33114$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33115    fi
33116
33117  else
33118    MEMORY_SIZE=$with_memory_size
33119  fi
33120
33121
33122
33123  # Provide a decent default number of parallel jobs for make depending on
33124  # number of cores, amount of memory and machine architecture.
33125
33126# Check whether --with-jobs was given.
33127if test "${with_jobs+set}" = set; then :
33128  withval=$with_jobs;
33129fi
33130
33131  if test "x$with_jobs" = x; then
33132    # Number of jobs was not specified, calculate.
33133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33134$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33135    # Approximate memory in GB, rounding up a bit.
33136    memory_gb=`expr $MEMORY_SIZE / 1100`
33137    # Pick the lowest of memory in gb and number of cores.
33138    if test "$memory_gb" -lt "$NUM_CORES"; then
33139      JOBS="$memory_gb"
33140    else
33141      JOBS="$NUM_CORES"
33142      # On bigger machines, leave some room for other processes to run
33143      if test "$JOBS" -gt "4"; then
33144        JOBS=`expr $JOBS '*' 90 / 100`
33145      fi
33146    fi
33147    # Cap number of jobs to 16
33148    if test "$JOBS" -gt "16"; then
33149      JOBS=16
33150    fi
33151    if test "$JOBS" -eq "0"; then
33152      JOBS=1
33153    fi
33154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33155$as_echo "$JOBS" >&6; }
33156  else
33157    JOBS=$with_jobs
33158  fi
33159
33160
33161
33162# Setup smart javac (after cores and memory have been setup)
33163
33164
33165# Check whether --with-sjavac-server-java was given.
33166if test "${with_sjavac_server_java+set}" = set; then :
33167  withval=$with_sjavac_server_java;
33168fi
33169
33170
33171if test "x$with_sjavac_server_java" != x; then
33172    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33173    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33174    if test "x$FOUND_VERSION" = x; then
33175        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33176    fi
33177else
33178    SJAVAC_SERVER_JAVA=""
33179    # Hotspot specific options.
33180
33181    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33182    $ECHO "Command: $JAVA -verbosegc -version" >&5
33183    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33184    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33185    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33186    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33187        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33188	JVM_ARG_OK=true
33189    else
33190	$ECHO "Arg failed:" >&5
33191	$ECHO "$OUTPUT" >&5
33192	JVM_ARG_OK=false
33193    fi
33194
33195    # JRockit specific options.
33196
33197    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33198    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33199    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33200    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33201    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33202    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33203        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33204	JVM_ARG_OK=true
33205    else
33206	$ECHO "Arg failed:" >&5
33207	$ECHO "$OUTPUT" >&5
33208	JVM_ARG_OK=false
33209    fi
33210
33211    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33212fi
33213
33214
33215if test "$MEMORY_SIZE" -gt "2500"; then
33216
33217    $ECHO "Check if jvm arg is ok: -d64" >&5
33218    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33219    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33220    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33221    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33222    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33223        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33224	JVM_ARG_OK=true
33225    else
33226	$ECHO "Arg failed:" >&5
33227	$ECHO "$OUTPUT" >&5
33228	JVM_ARG_OK=false
33229    fi
33230
33231    if test "$JVM_ARG_OK" = true; then
33232        JVM_64BIT=true
33233	JVM_ARG_OK=false
33234    fi
33235    fi
33236
33237if test "$JVM_64BIT" = true; then
33238    if test "$MEMORY_SIZE" -gt "17000"; then
33239
33240    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33241    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33242    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33243    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33244    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33245    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33246        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33247	JVM_ARG_OK=true
33248    else
33249	$ECHO "Arg failed:" >&5
33250	$ECHO "$OUTPUT" >&5
33251	JVM_ARG_OK=false
33252    fi
33253
33254    fi
33255    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33256
33257    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33258    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33259    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33260    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33261    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33262    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33263        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33264	JVM_ARG_OK=true
33265    else
33266	$ECHO "Arg failed:" >&5
33267	$ECHO "$OUTPUT" >&5
33268	JVM_ARG_OK=false
33269    fi
33270
33271    fi
33272    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33273
33274    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33275    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33276    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33277    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33278    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33279    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33280        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33281	JVM_ARG_OK=true
33282    else
33283	$ECHO "Arg failed:" >&5
33284	$ECHO "$OUTPUT" >&5
33285	JVM_ARG_OK=false
33286    fi
33287
33288    fi
33289    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33290
33291    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33292    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33293    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33294    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33295    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33296    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33297        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33298	JVM_ARG_OK=true
33299    else
33300	$ECHO "Arg failed:" >&5
33301	$ECHO "$OUTPUT" >&5
33302	JVM_ARG_OK=false
33303    fi
33304
33305    fi
33306fi
33307if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33308
33309    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33310    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33311    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33312    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33313    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33314    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33315        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33316	JVM_ARG_OK=true
33317    else
33318	$ECHO "Arg failed:" >&5
33319	$ECHO "$OUTPUT" >&5
33320	JVM_ARG_OK=false
33321    fi
33322
33323fi
33324if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33325
33326    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33327    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33328    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33329    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33330    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33331    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33332        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33333	JVM_ARG_OK=true
33334    else
33335	$ECHO "Arg failed:" >&5
33336	$ECHO "$OUTPUT" >&5
33337	JVM_ARG_OK=false
33338    fi
33339
33340fi
33341if test "$JVM_ARG_OK" = false; then
33342
33343    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33344    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33345    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33346    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33347    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33348    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33349        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33350	JVM_ARG_OK=true
33351    else
33352	$ECHO "Arg failed:" >&5
33353	$ECHO "$OUTPUT" >&5
33354	JVM_ARG_OK=false
33355    fi
33356
33357fi
33358
33359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33360$as_echo_n "checking whether to use sjavac... " >&6; }
33361# Check whether --enable-sjavac was given.
33362if test "${enable_sjavac+set}" = set; then :
33363  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33364else
33365  ENABLE_SJAVAC='no'
33366fi
33367
33368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33369$as_echo "$ENABLE_SJAVAC" >&6; }
33370
33371
33372if test "x$ENABLE_SJAVAC" = xyes; then
33373    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33374else
33375    SJAVAC_SERVER_DIR=
33376fi
33377
33378
33379
33380
33381# Can the C/C++ compiler use precompiled headers?
33382
33383
33384###############################################################################
33385#
33386# Can the C/C++ compiler use precompiled headers?
33387#
33388# Check whether --enable-precompiled-headers was given.
33389if test "${enable_precompiled_headers+set}" = set; then :
33390  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33391else
33392  ENABLE_PRECOMPH=yes
33393fi
33394
33395
33396USE_PRECOMPILED_HEADER=1
33397if test "x$ENABLE_PRECOMPH" = xno; then
33398    USE_PRECOMPILED_HEADER=0
33399fi
33400
33401if test "x$ENABLE_PRECOMPH" = xyes; then
33402    # Check that the compiler actually supports precomp headers.
33403    if test "x$GCC" = xyes; then
33404         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33405$as_echo_n "checking that precompiled headers work... " >&6; }
33406         echo "int alfa();" > conftest.h
33407         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33408         if test ! -f conftest.hpp.gch; then
33409             USE_PRECOMPILED_HEADER=0
33410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33411$as_echo "no" >&6; }
33412         else
33413             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33414$as_echo "yes" >&6; }
33415         fi
33416         rm -f conftest.h conftest.hpp.gch
33417    fi
33418fi
33419
33420
33421
33422
33423# Setup use of ccache, if available
33424
33425    # Check whether --enable-ccache was given.
33426if test "${enable_ccache+set}" = set; then :
33427  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33428else
33429  ENABLE_CCACHE=yes
33430fi
33431
33432    if test "x$ENABLE_CCACHE" = xyes; then
33433        OLD_PATH="$PATH"
33434        if test "x$TOOLS_DIR" != x; then
33435          PATH=$TOOLS_DIR:$PATH
33436        fi
33437        # Extract the first word of "ccache", so it can be a program name with args.
33438set dummy ccache; ac_word=$2
33439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33440$as_echo_n "checking for $ac_word... " >&6; }
33441if ${ac_cv_path_CCACHE+:} false; then :
33442  $as_echo_n "(cached) " >&6
33443else
33444  case $CCACHE in
33445  [\\/]* | ?:[\\/]*)
33446  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33447  ;;
33448  *)
33449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33450for as_dir in $PATH
33451do
33452  IFS=$as_save_IFS
33453  test -z "$as_dir" && as_dir=.
33454    for ac_exec_ext in '' $ac_executable_extensions; do
33455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33456    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33458    break 2
33459  fi
33460done
33461  done
33462IFS=$as_save_IFS
33463
33464  ;;
33465esac
33466fi
33467CCACHE=$ac_cv_path_CCACHE
33468if test -n "$CCACHE"; then
33469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33470$as_echo "$CCACHE" >&6; }
33471else
33472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33473$as_echo "no" >&6; }
33474fi
33475
33476
33477        PATH="$OLD_PATH"
33478    else
33479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33480$as_echo_n "checking for ccache... " >&6; }
33481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33482$as_echo "explicitly disabled" >&6; }
33483        CCACHE=
33484    fi
33485
33486
33487
33488# Check whether --with-ccache-dir was given.
33489if test "${with_ccache_dir+set}" = set; then :
33490  withval=$with_ccache_dir;
33491fi
33492
33493
33494    if test "x$with_ccache_dir" != x; then
33495        # When using a non home ccache directory, assume the use is to share ccache files
33496        # with other users. Thus change the umask.
33497        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33498    fi
33499    CCACHE_FOUND=""
33500    if test "x$CCACHE" != x; then
33501
33502    if test "x$CCACHE" != x; then
33503        CCACHE_FOUND="true"
33504        # Only use ccache if it is 3.1.4 or later, which supports
33505        # precompiled headers.
33506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33507$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33508        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33509        if test "x$HAS_GOOD_CCACHE" = x; then
33510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33511$as_echo "no, disabling ccache" >&6; }
33512            CCACHE=
33513        else
33514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33515$as_echo "yes" >&6; }
33516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33517$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33518            PUSHED_FLAGS="$CXXFLAGS"
33519            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33520            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33521/* end confdefs.h.  */
33522
33523int
33524main ()
33525{
33526
33527  ;
33528  return 0;
33529}
33530_ACEOF
33531if ac_fn_cxx_try_compile "$LINENO"; then :
33532  CC_KNOWS_CCACHE_TRICK=yes
33533else
33534  CC_KNOWS_CCACHE_TRICK=no
33535fi
33536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33537            CXXFLAGS="$PUSHED_FLAGS"
33538            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33539                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33540$as_echo "yes" >&6; }
33541            else
33542                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33543$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33544                CCACHE=
33545            fi
33546        fi
33547    fi
33548
33549    if test "x$CCACHE" != x; then
33550        CCACHE_SLOPPINESS=time_macros
33551        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33552        CCACHE_FLAGS=-fpch-preprocess
33553
33554        if test "x$SET_CCACHE_DIR" != x; then
33555            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33556	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33557        fi
33558    fi
33559
33560    fi
33561
33562
33563###############################################################################
33564#
33565# And now the finish...
33566#
33567###############################################################################
33568
33569# Check for some common pitfalls
33570
33571  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33572    file_to_test="$SRC_ROOT/LICENSE"
33573    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33574      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
33575    fi
33576  fi
33577
33578
33579
33580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33581$as_echo_n "checking if build directory is on local disk... " >&6; }
33582
33583	# df -l lists only local disks; if the given directory is not found then
33584	# a non-zero exit code is given
33585  if test "x$DF" = x; then
33586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33587      # msys does not have df; use Windows "net use" instead.
33588      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33589      if test "x$IS_NETWORK_DISK" = x; then
33590        OUTPUT_DIR_IS_LOCAL="yes"
33591      else
33592        OUTPUT_DIR_IS_LOCAL="no"
33593      fi
33594    else
33595      # No df here, say it's local
33596      OUTPUT_DIR_IS_LOCAL="yes"
33597    fi
33598  else
33599    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33600      OUTPUT_DIR_IS_LOCAL="yes"
33601    else
33602      OUTPUT_DIR_IS_LOCAL="no"
33603    fi
33604  fi
33605
33606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33607$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33608
33609
33610
33611# Check if the user has any old-style ALT_ variables set.
33612FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33613
33614# Before generating output files, test if they exist. If they do, this is a reconfigure.
33615# Since we can't properly handle the dependencies for this, warn the user about the situation
33616if test -e $OUTPUT_ROOT/spec.gmk; then
33617  IS_RECONFIGURE=yes
33618else
33619  IS_RECONFIGURE=no
33620fi
33621
33622if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33623  HIDE_PERFORMANCE_HINTS=yes
33624else
33625  HIDE_PERFORMANCE_HINTS=no
33626  # Hide it the next time around...
33627  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33628fi
33629
33630
33631
33632# At the end, call the custom hook. (Dummy macro if no custom sources available)
33633
33634
33635# We're messing a bit with internal autoconf variables to put the config.status
33636# in the output directory instead of the current directory.
33637CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33638# Create the actual output files. Now the main work of configure is done.
33639cat >confcache <<\_ACEOF
33640# This file is a shell script that caches the results of configure
33641# tests run on this system so they can be shared between configure
33642# scripts and configure runs, see configure's option --config-cache.
33643# It is not useful on other systems.  If it contains results you don't
33644# want to keep, you may remove or edit it.
33645#
33646# config.status only pays attention to the cache file if you give it
33647# the --recheck option to rerun configure.
33648#
33649# `ac_cv_env_foo' variables (set or unset) will be overridden when
33650# loading this file, other *unset* `ac_cv_foo' will be assigned the
33651# following values.
33652
33653_ACEOF
33654
33655# The following way of writing the cache mishandles newlines in values,
33656# but we know of no workaround that is simple, portable, and efficient.
33657# So, we kill variables containing newlines.
33658# Ultrix sh set writes to stderr and can't be redirected directly,
33659# and sets the high bit in the cache file unless we assign to the vars.
33660(
33661  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33662    eval ac_val=\$$ac_var
33663    case $ac_val in #(
33664    *${as_nl}*)
33665      case $ac_var in #(
33666      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33667$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33668      esac
33669      case $ac_var in #(
33670      _ | IFS | as_nl) ;; #(
33671      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33672      *) { eval $ac_var=; unset $ac_var;} ;;
33673      esac ;;
33674    esac
33675  done
33676
33677  (set) 2>&1 |
33678    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33679    *${as_nl}ac_space=\ *)
33680      # `set' does not quote correctly, so add quotes: double-quote
33681      # substitution turns \\\\ into \\, and sed turns \\ into \.
33682      sed -n \
33683	"s/'/'\\\\''/g;
33684	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33685      ;; #(
33686    *)
33687      # `set' quotes correctly as required by POSIX, so do not add quotes.
33688      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33689      ;;
33690    esac |
33691    sort
33692) |
33693  sed '
33694     /^ac_cv_env_/b end
33695     t clear
33696     :clear
33697     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33698     t end
33699     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33700     :end' >>confcache
33701if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33702  if test -w "$cache_file"; then
33703    if test "x$cache_file" != "x/dev/null"; then
33704      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33705$as_echo "$as_me: updating cache $cache_file" >&6;}
33706      if test ! -f "$cache_file" || test -h "$cache_file"; then
33707	cat confcache >"$cache_file"
33708      else
33709        case $cache_file in #(
33710        */* | ?:*)
33711	  mv -f confcache "$cache_file"$$ &&
33712	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33713        *)
33714	  mv -f confcache "$cache_file" ;;
33715	esac
33716      fi
33717    fi
33718  else
33719    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33720$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33721  fi
33722fi
33723rm -f confcache
33724
33725test "x$prefix" = xNONE && prefix=$ac_default_prefix
33726# Let make expand exec_prefix.
33727test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33728
33729DEFS=-DHAVE_CONFIG_H
33730
33731ac_libobjs=
33732ac_ltlibobjs=
33733U=
33734for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33735  # 1. Remove the extension, and $U if already installed.
33736  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33737  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33738  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33739  #    will be set to the directory where LIBOBJS objects are built.
33740  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33741  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33742done
33743LIBOBJS=$ac_libobjs
33744
33745LTLIBOBJS=$ac_ltlibobjs
33746
33747
33748
33749: "${CONFIG_STATUS=./config.status}"
33750ac_write_fail=0
33751ac_clean_files_save=$ac_clean_files
33752ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33753{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33754$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33755as_write_fail=0
33756cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33757#! $SHELL
33758# Generated by $as_me.
33759# Run this file to recreate the current configuration.
33760# Compiler output produced by configure, useful for debugging
33761# configure, is in config.log if it exists.
33762
33763debug=false
33764ac_cs_recheck=false
33765ac_cs_silent=false
33766
33767SHELL=\${CONFIG_SHELL-$SHELL}
33768export SHELL
33769_ASEOF
33770cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33771## -------------------- ##
33772## M4sh Initialization. ##
33773## -------------------- ##
33774
33775# Be more Bourne compatible
33776DUALCASE=1; export DUALCASE # for MKS sh
33777if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33778  emulate sh
33779  NULLCMD=:
33780  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33781  # is contrary to our usage.  Disable this feature.
33782  alias -g '${1+"$@"}'='"$@"'
33783  setopt NO_GLOB_SUBST
33784else
33785  case `(set -o) 2>/dev/null` in #(
33786  *posix*) :
33787    set -o posix ;; #(
33788  *) :
33789     ;;
33790esac
33791fi
33792
33793
33794as_nl='
33795'
33796export as_nl
33797# Printing a long string crashes Solaris 7 /usr/bin/printf.
33798as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33799as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33800as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33801# Prefer a ksh shell builtin over an external printf program on Solaris,
33802# but without wasting forks for bash or zsh.
33803if test -z "$BASH_VERSION$ZSH_VERSION" \
33804    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33805  as_echo='print -r --'
33806  as_echo_n='print -rn --'
33807elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33808  as_echo='printf %s\n'
33809  as_echo_n='printf %s'
33810else
33811  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33812    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33813    as_echo_n='/usr/ucb/echo -n'
33814  else
33815    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33816    as_echo_n_body='eval
33817      arg=$1;
33818      case $arg in #(
33819      *"$as_nl"*)
33820	expr "X$arg" : "X\\(.*\\)$as_nl";
33821	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33822      esac;
33823      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33824    '
33825    export as_echo_n_body
33826    as_echo_n='sh -c $as_echo_n_body as_echo'
33827  fi
33828  export as_echo_body
33829  as_echo='sh -c $as_echo_body as_echo'
33830fi
33831
33832# The user is always right.
33833if test "${PATH_SEPARATOR+set}" != set; then
33834  PATH_SEPARATOR=:
33835  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33836    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33837      PATH_SEPARATOR=';'
33838  }
33839fi
33840
33841
33842# IFS
33843# We need space, tab and new line, in precisely that order.  Quoting is
33844# there to prevent editors from complaining about space-tab.
33845# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33846# splitting by setting IFS to empty value.)
33847IFS=" ""	$as_nl"
33848
33849# Find who we are.  Look in the path if we contain no directory separator.
33850as_myself=
33851case $0 in #((
33852  *[\\/]* ) as_myself=$0 ;;
33853  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33854for as_dir in $PATH
33855do
33856  IFS=$as_save_IFS
33857  test -z "$as_dir" && as_dir=.
33858    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33859  done
33860IFS=$as_save_IFS
33861
33862     ;;
33863esac
33864# We did not find ourselves, most probably we were run as `sh COMMAND'
33865# in which case we are not to be found in the path.
33866if test "x$as_myself" = x; then
33867  as_myself=$0
33868fi
33869if test ! -f "$as_myself"; then
33870  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33871  exit 1
33872fi
33873
33874# Unset variables that we do not need and which cause bugs (e.g. in
33875# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33876# suppresses any "Segmentation fault" message there.  '((' could
33877# trigger a bug in pdksh 5.2.14.
33878for as_var in BASH_ENV ENV MAIL MAILPATH
33879do eval test x\${$as_var+set} = xset \
33880  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33881done
33882PS1='$ '
33883PS2='> '
33884PS4='+ '
33885
33886# NLS nuisances.
33887LC_ALL=C
33888export LC_ALL
33889LANGUAGE=C
33890export LANGUAGE
33891
33892# CDPATH.
33893(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33894
33895
33896# as_fn_error STATUS ERROR [LINENO LOG_FD]
33897# ----------------------------------------
33898# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33899# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33900# script with STATUS, using 1 if that was 0.
33901as_fn_error ()
33902{
33903  as_status=$1; test $as_status -eq 0 && as_status=1
33904  if test "$4"; then
33905    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33906    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33907  fi
33908  $as_echo "$as_me: error: $2" >&2
33909  as_fn_exit $as_status
33910} # as_fn_error
33911
33912
33913# as_fn_set_status STATUS
33914# -----------------------
33915# Set $? to STATUS, without forking.
33916as_fn_set_status ()
33917{
33918  return $1
33919} # as_fn_set_status
33920
33921# as_fn_exit STATUS
33922# -----------------
33923# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33924as_fn_exit ()
33925{
33926  set +e
33927  as_fn_set_status $1
33928  exit $1
33929} # as_fn_exit
33930
33931# as_fn_unset VAR
33932# ---------------
33933# Portably unset VAR.
33934as_fn_unset ()
33935{
33936  { eval $1=; unset $1;}
33937}
33938as_unset=as_fn_unset
33939# as_fn_append VAR VALUE
33940# ----------------------
33941# Append the text in VALUE to the end of the definition contained in VAR. Take
33942# advantage of any shell optimizations that allow amortized linear growth over
33943# repeated appends, instead of the typical quadratic growth present in naive
33944# implementations.
33945if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33946  eval 'as_fn_append ()
33947  {
33948    eval $1+=\$2
33949  }'
33950else
33951  as_fn_append ()
33952  {
33953    eval $1=\$$1\$2
33954  }
33955fi # as_fn_append
33956
33957# as_fn_arith ARG...
33958# ------------------
33959# Perform arithmetic evaluation on the ARGs, and store the result in the
33960# global $as_val. Take advantage of shells that can avoid forks. The arguments
33961# must be portable across $(()) and expr.
33962if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33963  eval 'as_fn_arith ()
33964  {
33965    as_val=$(( $* ))
33966  }'
33967else
33968  as_fn_arith ()
33969  {
33970    as_val=`expr "$@" || test $? -eq 1`
33971  }
33972fi # as_fn_arith
33973
33974
33975if expr a : '\(a\)' >/dev/null 2>&1 &&
33976   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33977  as_expr=expr
33978else
33979  as_expr=false
33980fi
33981
33982if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33983  as_basename=basename
33984else
33985  as_basename=false
33986fi
33987
33988if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33989  as_dirname=dirname
33990else
33991  as_dirname=false
33992fi
33993
33994as_me=`$as_basename -- "$0" ||
33995$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33996	 X"$0" : 'X\(//\)$' \| \
33997	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33998$as_echo X/"$0" |
33999    sed '/^.*\/\([^/][^/]*\)\/*$/{
34000	    s//\1/
34001	    q
34002	  }
34003	  /^X\/\(\/\/\)$/{
34004	    s//\1/
34005	    q
34006	  }
34007	  /^X\/\(\/\).*/{
34008	    s//\1/
34009	    q
34010	  }
34011	  s/.*/./; q'`
34012
34013# Avoid depending upon Character Ranges.
34014as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34015as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34016as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34017as_cr_digits='0123456789'
34018as_cr_alnum=$as_cr_Letters$as_cr_digits
34019
34020ECHO_C= ECHO_N= ECHO_T=
34021case `echo -n x` in #(((((
34022-n*)
34023  case `echo 'xy\c'` in
34024  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34025  xy)  ECHO_C='\c';;
34026  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34027       ECHO_T='	';;
34028  esac;;
34029*)
34030  ECHO_N='-n';;
34031esac
34032
34033rm -f conf$$ conf$$.exe conf$$.file
34034if test -d conf$$.dir; then
34035  rm -f conf$$.dir/conf$$.file
34036else
34037  rm -f conf$$.dir
34038  mkdir conf$$.dir 2>/dev/null
34039fi
34040if (echo >conf$$.file) 2>/dev/null; then
34041  if ln -s conf$$.file conf$$ 2>/dev/null; then
34042    as_ln_s='ln -s'
34043    # ... but there are two gotchas:
34044    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34045    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34046    # In both cases, we have to default to `cp -pR'.
34047    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34048      as_ln_s='cp -pR'
34049  elif ln conf$$.file conf$$ 2>/dev/null; then
34050    as_ln_s=ln
34051  else
34052    as_ln_s='cp -pR'
34053  fi
34054else
34055  as_ln_s='cp -pR'
34056fi
34057rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34058rmdir conf$$.dir 2>/dev/null
34059
34060
34061# as_fn_mkdir_p
34062# -------------
34063# Create "$as_dir" as a directory, including parents if necessary.
34064as_fn_mkdir_p ()
34065{
34066
34067  case $as_dir in #(
34068  -*) as_dir=./$as_dir;;
34069  esac
34070  test -d "$as_dir" || eval $as_mkdir_p || {
34071    as_dirs=
34072    while :; do
34073      case $as_dir in #(
34074      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34075      *) as_qdir=$as_dir;;
34076      esac
34077      as_dirs="'$as_qdir' $as_dirs"
34078      as_dir=`$as_dirname -- "$as_dir" ||
34079$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34080	 X"$as_dir" : 'X\(//\)[^/]' \| \
34081	 X"$as_dir" : 'X\(//\)$' \| \
34082	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34083$as_echo X"$as_dir" |
34084    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34085	    s//\1/
34086	    q
34087	  }
34088	  /^X\(\/\/\)[^/].*/{
34089	    s//\1/
34090	    q
34091	  }
34092	  /^X\(\/\/\)$/{
34093	    s//\1/
34094	    q
34095	  }
34096	  /^X\(\/\).*/{
34097	    s//\1/
34098	    q
34099	  }
34100	  s/.*/./; q'`
34101      test -d "$as_dir" && break
34102    done
34103    test -z "$as_dirs" || eval "mkdir $as_dirs"
34104  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34105
34106
34107} # as_fn_mkdir_p
34108if mkdir -p . 2>/dev/null; then
34109  as_mkdir_p='mkdir -p "$as_dir"'
34110else
34111  test -d ./-p && rmdir ./-p
34112  as_mkdir_p=false
34113fi
34114
34115
34116# as_fn_executable_p FILE
34117# -----------------------
34118# Test if FILE is an executable regular file.
34119as_fn_executable_p ()
34120{
34121  test -f "$1" && test -x "$1"
34122} # as_fn_executable_p
34123as_test_x='test -x'
34124as_executable_p=as_fn_executable_p
34125
34126# Sed expression to map a string onto a valid CPP name.
34127as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34128
34129# Sed expression to map a string onto a valid variable name.
34130as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34131
34132
34133exec 6>&1
34134## ----------------------------------- ##
34135## Main body of $CONFIG_STATUS script. ##
34136## ----------------------------------- ##
34137_ASEOF
34138test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34139
34140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34141# Save the log message, to keep $0 and so on meaningful, and to
34142# report actual input values of CONFIG_FILES etc. instead of their
34143# values after options handling.
34144ac_log="
34145This file was extended by OpenJDK $as_me jdk8, which was
34146generated by GNU Autoconf 2.69.  Invocation command line was
34147
34148  CONFIG_FILES    = $CONFIG_FILES
34149  CONFIG_HEADERS  = $CONFIG_HEADERS
34150  CONFIG_LINKS    = $CONFIG_LINKS
34151  CONFIG_COMMANDS = $CONFIG_COMMANDS
34152  $ $0 $@
34153
34154on `(hostname || uname -n) 2>/dev/null | sed 1q`
34155"
34156
34157_ACEOF
34158
34159case $ac_config_files in *"
34160"*) set x $ac_config_files; shift; ac_config_files=$*;;
34161esac
34162
34163case $ac_config_headers in *"
34164"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34165esac
34166
34167
34168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34169# Files that config.status was made for.
34170config_files="$ac_config_files"
34171config_headers="$ac_config_headers"
34172
34173_ACEOF
34174
34175cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34176ac_cs_usage="\
34177\`$as_me' instantiates files and other configuration actions
34178from templates according to the current configuration.  Unless the files
34179and actions are specified as TAGs, all are instantiated by default.
34180
34181Usage: $0 [OPTION]... [TAG]...
34182
34183  -h, --help       print this help, then exit
34184  -V, --version    print version number and configuration settings, then exit
34185      --config     print configuration, then exit
34186  -q, --quiet, --silent
34187                   do not print progress messages
34188  -d, --debug      don't remove temporary files
34189      --recheck    update $as_me by reconfiguring in the same conditions
34190      --file=FILE[:TEMPLATE]
34191                   instantiate the configuration file FILE
34192      --header=FILE[:TEMPLATE]
34193                   instantiate the configuration header FILE
34194
34195Configuration files:
34196$config_files
34197
34198Configuration headers:
34199$config_headers
34200
34201Report bugs to <build-dev@openjdk.java.net>.
34202OpenJDK home page: <http://openjdk.java.net>."
34203
34204_ACEOF
34205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34206ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34207ac_cs_version="\\
34208OpenJDK config.status jdk8
34209configured by $0, generated by GNU Autoconf 2.69,
34210  with options \\"\$ac_cs_config\\"
34211
34212Copyright (C) 2012 Free Software Foundation, Inc.
34213This config.status script is free software; the Free Software Foundation
34214gives unlimited permission to copy, distribute and modify it."
34215
34216ac_pwd='$ac_pwd'
34217srcdir='$srcdir'
34218AWK='$AWK'
34219test -n "\$AWK" || AWK=awk
34220_ACEOF
34221
34222cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34223# The default lists apply if the user does not specify any file.
34224ac_need_defaults=:
34225while test $# != 0
34226do
34227  case $1 in
34228  --*=?*)
34229    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34230    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34231    ac_shift=:
34232    ;;
34233  --*=)
34234    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34235    ac_optarg=
34236    ac_shift=:
34237    ;;
34238  *)
34239    ac_option=$1
34240    ac_optarg=$2
34241    ac_shift=shift
34242    ;;
34243  esac
34244
34245  case $ac_option in
34246  # Handling of the options.
34247  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34248    ac_cs_recheck=: ;;
34249  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34250    $as_echo "$ac_cs_version"; exit ;;
34251  --config | --confi | --conf | --con | --co | --c )
34252    $as_echo "$ac_cs_config"; exit ;;
34253  --debug | --debu | --deb | --de | --d | -d )
34254    debug=: ;;
34255  --file | --fil | --fi | --f )
34256    $ac_shift
34257    case $ac_optarg in
34258    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34259    '') as_fn_error $? "missing file argument" ;;
34260    esac
34261    as_fn_append CONFIG_FILES " '$ac_optarg'"
34262    ac_need_defaults=false;;
34263  --header | --heade | --head | --hea )
34264    $ac_shift
34265    case $ac_optarg in
34266    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34267    esac
34268    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34269    ac_need_defaults=false;;
34270  --he | --h)
34271    # Conflict between --help and --header
34272    as_fn_error $? "ambiguous option: \`$1'
34273Try \`$0 --help' for more information.";;
34274  --help | --hel | -h )
34275    $as_echo "$ac_cs_usage"; exit ;;
34276  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34277  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34278    ac_cs_silent=: ;;
34279
34280  # This is an error.
34281  -*) as_fn_error $? "unrecognized option: \`$1'
34282Try \`$0 --help' for more information." ;;
34283
34284  *) as_fn_append ac_config_targets " $1"
34285     ac_need_defaults=false ;;
34286
34287  esac
34288  shift
34289done
34290
34291ac_configure_extra_args=
34292
34293if $ac_cs_silent; then
34294  exec 6>/dev/null
34295  ac_configure_extra_args="$ac_configure_extra_args --silent"
34296fi
34297
34298_ACEOF
34299cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34300if \$ac_cs_recheck; then
34301  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34302  shift
34303  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34304  CONFIG_SHELL='$SHELL'
34305  export CONFIG_SHELL
34306  exec "\$@"
34307fi
34308
34309_ACEOF
34310cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34311exec 5>>config.log
34312{
34313  echo
34314  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34315## Running $as_me. ##
34316_ASBOX
34317  $as_echo "$ac_log"
34318} >&5
34319
34320_ACEOF
34321cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34322_ACEOF
34323
34324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34325
34326# Handling of arguments.
34327for ac_config_target in $ac_config_targets
34328do
34329  case $ac_config_target in
34330    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34331    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34332    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34333    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34334    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34335    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34336    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34337
34338  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34339  esac
34340done
34341
34342
34343# If the user did not use the arguments to specify the items to instantiate,
34344# then the envvar interface is used.  Set only those that are not.
34345# We use the long form for the default assignment because of an extremely
34346# bizarre bug on SunOS 4.1.3.
34347if $ac_need_defaults; then
34348  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34349  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34350fi
34351
34352# Have a temporary directory for convenience.  Make it in the build tree
34353# simply because there is no reason against having it here, and in addition,
34354# creating and moving files from /tmp can sometimes cause problems.
34355# Hook for its removal unless debugging.
34356# Note that there is a small window in which the directory will not be cleaned:
34357# after its creation but before its name has been assigned to `$tmp'.
34358$debug ||
34359{
34360  tmp= ac_tmp=
34361  trap 'exit_status=$?
34362  : "${ac_tmp:=$tmp}"
34363  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34364' 0
34365  trap 'as_fn_exit 1' 1 2 13 15
34366}
34367# Create a (secure) tmp directory for tmp files.
34368
34369{
34370  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34371  test -d "$tmp"
34372}  ||
34373{
34374  tmp=./conf$$-$RANDOM
34375  (umask 077 && mkdir "$tmp")
34376} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34377ac_tmp=$tmp
34378
34379# Set up the scripts for CONFIG_FILES section.
34380# No need to generate them if there are no CONFIG_FILES.
34381# This happens for instance with `./config.status config.h'.
34382if test -n "$CONFIG_FILES"; then
34383
34384
34385ac_cr=`echo X | tr X '\015'`
34386# On cygwin, bash can eat \r inside `` if the user requested igncr.
34387# But we know of no other shell where ac_cr would be empty at this
34388# point, so we can use a bashism as a fallback.
34389if test "x$ac_cr" = x; then
34390  eval ac_cr=\$\'\\r\'
34391fi
34392ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34393if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34394  ac_cs_awk_cr='\\r'
34395else
34396  ac_cs_awk_cr=$ac_cr
34397fi
34398
34399echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34400_ACEOF
34401
34402
34403{
34404  echo "cat >conf$$subs.awk <<_ACEOF" &&
34405  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34406  echo "_ACEOF"
34407} >conf$$subs.sh ||
34408  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34409ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34410ac_delim='%!_!# '
34411for ac_last_try in false false false false false :; do
34412  . ./conf$$subs.sh ||
34413    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34414
34415  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34416  if test $ac_delim_n = $ac_delim_num; then
34417    break
34418  elif $ac_last_try; then
34419    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34420  else
34421    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34422  fi
34423done
34424rm -f conf$$subs.sh
34425
34426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34427cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34428_ACEOF
34429sed -n '
34430h
34431s/^/S["/; s/!.*/"]=/
34432p
34433g
34434s/^[^!]*!//
34435:repl
34436t repl
34437s/'"$ac_delim"'$//
34438t delim
34439:nl
34440h
34441s/\(.\{148\}\)..*/\1/
34442t more1
34443s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34444p
34445n
34446b repl
34447:more1
34448s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34449p
34450g
34451s/.\{148\}//
34452t nl
34453:delim
34454h
34455s/\(.\{148\}\)..*/\1/
34456t more2
34457s/["\\]/\\&/g; s/^/"/; s/$/"/
34458p
34459b
34460:more2
34461s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34462p
34463g
34464s/.\{148\}//
34465t delim
34466' <conf$$subs.awk | sed '
34467/^[^""]/{
34468  N
34469  s/\n//
34470}
34471' >>$CONFIG_STATUS || ac_write_fail=1
34472rm -f conf$$subs.awk
34473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34474_ACAWK
34475cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34476  for (key in S) S_is_set[key] = 1
34477  FS = ""
34478
34479}
34480{
34481  line = $ 0
34482  nfields = split(line, field, "@")
34483  substed = 0
34484  len = length(field[1])
34485  for (i = 2; i < nfields; i++) {
34486    key = field[i]
34487    keylen = length(key)
34488    if (S_is_set[key]) {
34489      value = S[key]
34490      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34491      len += length(value) + length(field[++i])
34492      substed = 1
34493    } else
34494      len += 1 + keylen
34495  }
34496
34497  print line
34498}
34499
34500_ACAWK
34501_ACEOF
34502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34503if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34504  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34505else
34506  cat
34507fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34508  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34509_ACEOF
34510
34511# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34512# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34513# trailing colons and then remove the whole line if VPATH becomes empty
34514# (actually we leave an empty line to preserve line numbers).
34515if test "x$srcdir" = x.; then
34516  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34517h
34518s///
34519s/^/:/
34520s/[	 ]*$/:/
34521s/:\$(srcdir):/:/g
34522s/:\${srcdir}:/:/g
34523s/:@srcdir@:/:/g
34524s/^:*//
34525s/:*$//
34526x
34527s/\(=[	 ]*\).*/\1/
34528G
34529s/\n//
34530s/^[^=]*=[	 ]*$//
34531}'
34532fi
34533
34534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34535fi # test -n "$CONFIG_FILES"
34536
34537# Set up the scripts for CONFIG_HEADERS section.
34538# No need to generate them if there are no CONFIG_HEADERS.
34539# This happens for instance with `./config.status Makefile'.
34540if test -n "$CONFIG_HEADERS"; then
34541cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34542BEGIN {
34543_ACEOF
34544
34545# Transform confdefs.h into an awk script `defines.awk', embedded as
34546# here-document in config.status, that substitutes the proper values into
34547# config.h.in to produce config.h.
34548
34549# Create a delimiter string that does not exist in confdefs.h, to ease
34550# handling of long lines.
34551ac_delim='%!_!# '
34552for ac_last_try in false false :; do
34553  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34554  if test -z "$ac_tt"; then
34555    break
34556  elif $ac_last_try; then
34557    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34558  else
34559    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34560  fi
34561done
34562
34563# For the awk script, D is an array of macro values keyed by name,
34564# likewise P contains macro parameters if any.  Preserve backslash
34565# newline sequences.
34566
34567ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34568sed -n '
34569s/.\{148\}/&'"$ac_delim"'/g
34570t rset
34571:rset
34572s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34573t def
34574d
34575:def
34576s/\\$//
34577t bsnl
34578s/["\\]/\\&/g
34579s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34580D["\1"]=" \3"/p
34581s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34582d
34583:bsnl
34584s/["\\]/\\&/g
34585s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34586D["\1"]=" \3\\\\\\n"\\/p
34587t cont
34588s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34589t cont
34590d
34591:cont
34592n
34593s/.\{148\}/&'"$ac_delim"'/g
34594t clear
34595:clear
34596s/\\$//
34597t bsnlc
34598s/["\\]/\\&/g; s/^/"/; s/$/"/p
34599d
34600:bsnlc
34601s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34602b cont
34603' <confdefs.h | sed '
34604s/'"$ac_delim"'/"\\\
34605"/g' >>$CONFIG_STATUS || ac_write_fail=1
34606
34607cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34608  for (key in D) D_is_set[key] = 1
34609  FS = ""
34610}
34611/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34612  line = \$ 0
34613  split(line, arg, " ")
34614  if (arg[1] == "#") {
34615    defundef = arg[2]
34616    mac1 = arg[3]
34617  } else {
34618    defundef = substr(arg[1], 2)
34619    mac1 = arg[2]
34620  }
34621  split(mac1, mac2, "(") #)
34622  macro = mac2[1]
34623  prefix = substr(line, 1, index(line, defundef) - 1)
34624  if (D_is_set[macro]) {
34625    # Preserve the white space surrounding the "#".
34626    print prefix "define", macro P[macro] D[macro]
34627    next
34628  } else {
34629    # Replace #undef with comments.  This is necessary, for example,
34630    # in the case of _POSIX_SOURCE, which is predefined and required
34631    # on some systems where configure will not decide to define it.
34632    if (defundef == "undef") {
34633      print "/*", prefix defundef, macro, "*/"
34634      next
34635    }
34636  }
34637}
34638{ print }
34639_ACAWK
34640_ACEOF
34641cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34642  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34643fi # test -n "$CONFIG_HEADERS"
34644
34645
34646eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34647shift
34648for ac_tag
34649do
34650  case $ac_tag in
34651  :[FHLC]) ac_mode=$ac_tag; continue;;
34652  esac
34653  case $ac_mode$ac_tag in
34654  :[FHL]*:*);;
34655  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34656  :[FH]-) ac_tag=-:-;;
34657  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34658  esac
34659  ac_save_IFS=$IFS
34660  IFS=:
34661  set x $ac_tag
34662  IFS=$ac_save_IFS
34663  shift
34664  ac_file=$1
34665  shift
34666
34667  case $ac_mode in
34668  :L) ac_source=$1;;
34669  :[FH])
34670    ac_file_inputs=
34671    for ac_f
34672    do
34673      case $ac_f in
34674      -) ac_f="$ac_tmp/stdin";;
34675      *) # Look for the file first in the build tree, then in the source tree
34676	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34677	 # because $ac_f cannot contain `:'.
34678	 test -f "$ac_f" ||
34679	   case $ac_f in
34680	   [\\/$]*) false;;
34681	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34682	   esac ||
34683	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34684      esac
34685      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34686      as_fn_append ac_file_inputs " '$ac_f'"
34687    done
34688
34689    # Let's still pretend it is `configure' which instantiates (i.e., don't
34690    # use $as_me), people would be surprised to read:
34691    #    /* config.h.  Generated by config.status.  */
34692    configure_input='Generated from '`
34693	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34694	`' by configure.'
34695    if test x"$ac_file" != x-; then
34696      configure_input="$ac_file.  $configure_input"
34697      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34698$as_echo "$as_me: creating $ac_file" >&6;}
34699    fi
34700    # Neutralize special characters interpreted by sed in replacement strings.
34701    case $configure_input in #(
34702    *\&* | *\|* | *\\* )
34703       ac_sed_conf_input=`$as_echo "$configure_input" |
34704       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34705    *) ac_sed_conf_input=$configure_input;;
34706    esac
34707
34708    case $ac_tag in
34709    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34710      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34711    esac
34712    ;;
34713  esac
34714
34715  ac_dir=`$as_dirname -- "$ac_file" ||
34716$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34717	 X"$ac_file" : 'X\(//\)[^/]' \| \
34718	 X"$ac_file" : 'X\(//\)$' \| \
34719	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34720$as_echo X"$ac_file" |
34721    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34722	    s//\1/
34723	    q
34724	  }
34725	  /^X\(\/\/\)[^/].*/{
34726	    s//\1/
34727	    q
34728	  }
34729	  /^X\(\/\/\)$/{
34730	    s//\1/
34731	    q
34732	  }
34733	  /^X\(\/\).*/{
34734	    s//\1/
34735	    q
34736	  }
34737	  s/.*/./; q'`
34738  as_dir="$ac_dir"; as_fn_mkdir_p
34739  ac_builddir=.
34740
34741case "$ac_dir" in
34742.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34743*)
34744  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34745  # A ".." for each directory in $ac_dir_suffix.
34746  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34747  case $ac_top_builddir_sub in
34748  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34749  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34750  esac ;;
34751esac
34752ac_abs_top_builddir=$ac_pwd
34753ac_abs_builddir=$ac_pwd$ac_dir_suffix
34754# for backward compatibility:
34755ac_top_builddir=$ac_top_build_prefix
34756
34757case $srcdir in
34758  .)  # We are building in place.
34759    ac_srcdir=.
34760    ac_top_srcdir=$ac_top_builddir_sub
34761    ac_abs_top_srcdir=$ac_pwd ;;
34762  [\\/]* | ?:[\\/]* )  # Absolute name.
34763    ac_srcdir=$srcdir$ac_dir_suffix;
34764    ac_top_srcdir=$srcdir
34765    ac_abs_top_srcdir=$srcdir ;;
34766  *) # Relative name.
34767    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34768    ac_top_srcdir=$ac_top_build_prefix$srcdir
34769    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34770esac
34771ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34772
34773
34774  case $ac_mode in
34775  :F)
34776  #
34777  # CONFIG_FILE
34778  #
34779
34780_ACEOF
34781
34782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34783# If the template does not know about datarootdir, expand it.
34784# FIXME: This hack should be removed a few years after 2.60.
34785ac_datarootdir_hack=; ac_datarootdir_seen=
34786ac_sed_dataroot='
34787/datarootdir/ {
34788  p
34789  q
34790}
34791/@datadir@/p
34792/@docdir@/p
34793/@infodir@/p
34794/@localedir@/p
34795/@mandir@/p'
34796case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34797*datarootdir*) ac_datarootdir_seen=yes;;
34798*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34799  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34800$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34801_ACEOF
34802cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34803  ac_datarootdir_hack='
34804  s&@datadir@&$datadir&g
34805  s&@docdir@&$docdir&g
34806  s&@infodir@&$infodir&g
34807  s&@localedir@&$localedir&g
34808  s&@mandir@&$mandir&g
34809  s&\\\${datarootdir}&$datarootdir&g' ;;
34810esac
34811_ACEOF
34812
34813# Neutralize VPATH when `$srcdir' = `.'.
34814# Shell code in configure.ac might set extrasub.
34815# FIXME: do we really want to maintain this feature?
34816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34817ac_sed_extra="$ac_vpsub
34818$extrasub
34819_ACEOF
34820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34821:t
34822/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34823s|@configure_input@|$ac_sed_conf_input|;t t
34824s&@top_builddir@&$ac_top_builddir_sub&;t t
34825s&@top_build_prefix@&$ac_top_build_prefix&;t t
34826s&@srcdir@&$ac_srcdir&;t t
34827s&@abs_srcdir@&$ac_abs_srcdir&;t t
34828s&@top_srcdir@&$ac_top_srcdir&;t t
34829s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34830s&@builddir@&$ac_builddir&;t t
34831s&@abs_builddir@&$ac_abs_builddir&;t t
34832s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34833$ac_datarootdir_hack
34834"
34835eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34836  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34837
34838test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34839  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34840  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34841      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34842  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34843which seems to be undefined.  Please make sure it is defined" >&5
34844$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34845which seems to be undefined.  Please make sure it is defined" >&2;}
34846
34847  rm -f "$ac_tmp/stdin"
34848  case $ac_file in
34849  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34850  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34851  esac \
34852  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34853 ;;
34854  :H)
34855  #
34856  # CONFIG_HEADER
34857  #
34858  if test x"$ac_file" != x-; then
34859    {
34860      $as_echo "/* $configure_input  */" \
34861      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34862    } >"$ac_tmp/config.h" \
34863      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34864    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34865      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34866$as_echo "$as_me: $ac_file is unchanged" >&6;}
34867    else
34868      rm -f "$ac_file"
34869      mv "$ac_tmp/config.h" "$ac_file" \
34870	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34871    fi
34872  else
34873    $as_echo "/* $configure_input  */" \
34874      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34875      || as_fn_error $? "could not create -" "$LINENO" 5
34876  fi
34877 ;;
34878
34879
34880  esac
34881
34882done # for ac_tag
34883
34884
34885as_fn_exit 0
34886_ACEOF
34887ac_clean_files=$ac_clean_files_save
34888
34889test $ac_write_fail = 0 ||
34890  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34891
34892
34893# configure is writing to config.log, and then calls config.status.
34894# config.status does its own redirection, appending to config.log.
34895# Unfortunately, on DOS this fails, as config.log is still kept open
34896# by configure, so config.status won't be able to write to it; its
34897# output is simply discarded.  So we exec the FD to /dev/null,
34898# effectively closing config.log, so it can be properly (re)opened and
34899# appended to by config.status.  When coming back to configure, we
34900# need to make the FD available again.
34901if test "$no_create" != yes; then
34902  ac_cs_success=:
34903  ac_config_status_args=
34904  test "$silent" = yes &&
34905    ac_config_status_args="$ac_config_status_args --quiet"
34906  exec 5>/dev/null
34907  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34908  exec 5>>config.log
34909  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34910  # would make configure fail if this is the last instruction.
34911  $ac_cs_success || as_fn_exit 1
34912fi
34913if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34914  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34915$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34916fi
34917
34918
34919# Make the compare script executable
34920$CHMOD +x $OUTPUT_ROOT/compare.sh
34921
34922# Finally output some useful information to the user
34923
34924# Finally output some useful information to the user
34925
34926if test "x$CCACHE_FOUND" != x; then
34927	if  test "x$HAS_GOOD_CCACHE" = x; then
34928		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34929		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34930	else
34931		CCACHE_STATUS="installed and in use"
34932	fi
34933else
34934	if test "x$GCC" = xyes; then
34935		CCACHE_STATUS="not installed (consider installing)"
34936		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34937	else
34938		CCACHE_STATUS="not available for your system"
34939	fi
34940fi
34941
34942printf "\n"
34943printf "====================================================\n"
34944printf "A new configuration has been successfully created in\n"
34945printf "$OUTPUT_ROOT\n"
34946if test "x$CONFIGURE_COMMAND_LINE" != x; then
34947	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34948else
34949	printf "using default settings.\n"
34950fi
34951
34952printf "\n"
34953printf "Configuration summary:\n"
34954printf "* Debug level:    $DEBUG_LEVEL\n"
34955printf "* JDK variant:    $JDK_VARIANT\n"
34956printf "* JVM variants:   $with_jvm_variants\n"
34957printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34958
34959printf "\n"
34960printf "Tools summary:\n"
34961if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34962  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34963fi
34964printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34965printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34966printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34967
34968printf "\n"
34969printf "Build performance summary:\n"
34970printf "* Cores to use:   $JOBS\n"
34971printf "* Memory limit:   $MEMORY_SIZE MB\n"
34972printf "* ccache status:  $CCACHE_STATUS\n"
34973printf "\n"
34974
34975if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34976	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34977	printf "$CCACHE_HELP_MSG\n"
34978
34979    # Print a helpful message on how to acquire the necessary build dependency.
34980    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34981    MISSING_DEPENDENCY=ccache
34982    PKGHANDLER_COMMAND=
34983
34984    case $PKGHANDLER in
34985	apt-get)
34986                apt_help     $MISSING_DEPENDENCY ;;
34987    yum)
34988                yum_help     $MISSING_DEPENDENCY ;;
34989	port)
34990                port_help    $MISSING_DEPENDENCY ;;
34991	pkgutil)
34992                pkgutil_help $MISSING_DEPENDENCY ;;
34993	pkgadd)
34994                pkgadd_help  $MISSING_DEPENDENCY ;;
34995    * )
34996      break ;;
34997    esac
34998
34999    if test "x$PKGHANDLER_COMMAND" != x; then
35000        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35001    fi
35002
35003	printf "$HELP_MSG\n"
35004	printf "\n"
35005fi
35006
35007if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35008	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35009	printf "will result in longer build times.\n"
35010	printf "\n"
35011fi
35012
35013if test "x$FOUND_ALT_VARIABLES" != "x"; then
35014	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35015	printf "These are not respected, and will be ignored. It is recommended\n"
35016	printf "that you clean your environment. The following variables are set:\n"
35017	printf "$FOUND_ALT_VARIABLES\n"
35018	printf "\n"
35019fi
35020
35021if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35022	printf "WARNING: Your build output directory is not on a local disk.\n"
35023	printf "This will severely degrade build performance!\n"
35024	printf "It is recommended that you create an output directory on a local disk,\n"
35025	printf "and run the configure script again from that directory.\n"
35026	printf "\n"
35027fi
35028
35029if test "x$IS_RECONFIGURE" = "xyes"; then
35030	printf "WARNING: The result of this configuration has overridden an older\n"
35031	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35032	printf "proper build. Failure to do so might result in strange build problems.\n"
35033	printf "\n"
35034fi
35035
35036